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

@@ -17,15 +17,7 @@ namespace Wox.Plugin.CMD
[JsonProperty]
public Dictionary<string, int> CMDHistory = new Dictionary<string, int>();
protected override string ConfigFolder
{
get { return Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); }
}
protected override string ConfigName
{
get { return "CMDHistory"; }
}
protected override string FileName { get; } = "CMDHistory";
protected override CMDStorage LoadDefault()
{

View File

@@ -15,15 +15,7 @@ namespace Wox.Plugin.Everything
public IPublicAPI API { get; set; }
protected override string ConfigName
{
get { return "EverythingContextMenu"; }
}
protected override string ConfigFolder
{
get { return Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); }
}
protected override string FileName { get; } = "EverythingContextMenu";
protected override void OnAfterLoad(ContextMenuStorage obj)
{

View File

@@ -10,14 +10,7 @@ namespace Wox.Plugin.Folder
{
[JsonProperty]
public List<FolderLink> FolderLinks { get; set; }
protected override string ConfigFolder
{
get { return Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); }
}
protected override string ConfigName
{
get { return "setting"; }
}
protected override string FileName { get; } = "settings_folder_plugin";
}
}

View File

@@ -11,14 +11,6 @@ namespace Wox.Plugin.Program
{
public List<Program> Programs = new List<Program>();
protected override string ConfigFolder
{
get { return Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); }
}
protected override string ConfigName
{
get { return "ProgramIndexCache"; }
}
protected override string FileName { get; } = "ProgramIndexCache";
}
}

View File

@@ -23,11 +23,6 @@ namespace Wox.Plugin.Program
[DefaultValue(true)]
public bool EnableRegistrySource { get; set; }
protected override string ConfigFolder
{
get { return Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); }
}
protected override ProgramStorage LoadDefault()
{
ProgramSources = new List<ProgramSource>();
@@ -44,9 +39,6 @@ namespace Wox.Plugin.Program
}
}
protected override string ConfigName
{
get { return "setting"; }
}
protected override string FileName { get; } = "settings_plugin_program";
}
}

View File

@@ -17,14 +17,6 @@ namespace Wox.Plugin.WebSearch
[JsonProperty]
public string WebSearchSuggestionSource { get; set; }
protected override string ConfigFolder
{
get { return Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); }
}
protected override string ConfigName
{
get { return "setting"; }
}
protected override string FileName { get; } = "settings_plugin_websearch";
}
}