Remove instance logic for BinaryStorage and JsonStorage, part 1

1. part of #389
2. huge refactoring
This commit is contained in:
bao-qian
2016-04-21 01:53:21 +01:00
parent 0bcb76fa81
commit 8d10c9aa41
52 changed files with 502 additions and 584 deletions

View File

@@ -12,7 +12,7 @@ namespace Wox.Core.Resource
{
public class Internationalization : Resource
{
public UserSettingStorage Settings { get; set; }
public UserSettings.Settings Settings { get; set; }
public Internationalization()
{
@@ -67,7 +67,6 @@ namespace Wox.Core.Resource
}
Settings.Language = language.LanguageCode;
Settings.Save();
ResourceMerger.UpdateResource(this);
}

View File

@@ -15,7 +15,7 @@ namespace Wox.Core.Resource
public class Theme : Resource
{
private static List<string> themeDirectories = new List<string>();
public UserSettingStorage Settings { get; set; }
public UserSettings.Settings Settings { get; set; }
public Theme()
{
@@ -55,7 +55,6 @@ namespace Wox.Core.Resource
}
Settings.Theme = themeName;
Settings.Save();
ResourceMerger.UpdateResource(this);
// Exception of FindResource can't be cathed if global exception handle is set