mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
Refactoring directory path for storage
This commit is contained in:
@@ -20,15 +20,7 @@ namespace Wox.Storage
|
||||
public static PluginMetadata MetaData { get; } = new PluginMetadata
|
||||
{ ID = "Query history", Name = "Query history" };
|
||||
|
||||
protected override string ConfigFolder
|
||||
{
|
||||
get { return Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Config"); }
|
||||
}
|
||||
|
||||
protected override string ConfigName
|
||||
{
|
||||
get { return "QueryHistory"; }
|
||||
}
|
||||
protected override string FileName { get; } = "QueryHistory";
|
||||
|
||||
public HistoryItem Previous()
|
||||
{
|
||||
|
||||
@@ -11,15 +11,7 @@ namespace Wox.Storage
|
||||
{
|
||||
public Dictionary<string, TopMostRecord> records = new Dictionary<string, TopMostRecord>();
|
||||
|
||||
protected override string ConfigFolder
|
||||
{
|
||||
get { return Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Config"); }
|
||||
}
|
||||
|
||||
protected override string ConfigName
|
||||
{
|
||||
get { return "TopMostRecords"; }
|
||||
}
|
||||
protected override string FileName { get; } = "TopMostRecords";
|
||||
|
||||
internal bool IsTopMost(Result result)
|
||||
{
|
||||
@@ -50,10 +42,10 @@ namespace Wox.Storage
|
||||
{
|
||||
records.Add(result.OriginQuery.RawQuery, new TopMostRecord
|
||||
{
|
||||
PluginID = result.PluginID,
|
||||
Title = result.Title,
|
||||
SubTitle = result.SubTitle
|
||||
});
|
||||
PluginID = result.PluginID,
|
||||
Title = result.Title,
|
||||
SubTitle = result.SubTitle
|
||||
});
|
||||
}
|
||||
|
||||
Save();
|
||||
|
||||
@@ -12,15 +12,7 @@ namespace Wox.Storage
|
||||
[JsonProperty]
|
||||
private Dictionary<string, int> records = new Dictionary<string, int>();
|
||||
|
||||
protected override string ConfigFolder
|
||||
{
|
||||
get { return Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Config"); }
|
||||
}
|
||||
|
||||
protected override string ConfigName
|
||||
{
|
||||
get { return "UserSelectedRecords"; }
|
||||
}
|
||||
protected override string FileName { get; } = "UserSelectedRecords";
|
||||
|
||||
public void Add(Result result)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user