Refactoring directory path for storage

This commit is contained in:
bao-qian
2016-01-07 02:31:17 +00:00
parent b1ed51e72c
commit c8a932b6b3
15 changed files with 29 additions and 131 deletions

View File

@@ -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();