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

@@ -25,11 +25,11 @@ namespace Wox
#region Private Fields
private readonly Storyboard _progressBarStoryboard = new Storyboard();
private UserSettingStorage _settings;
private Settings _settings;
#endregion
public MainWindow(UserSettingStorage settings, MainViewModel mainVM)
public MainWindow(Settings settings, MainViewModel mainVM)
{
DataContext = mainVM;
InitializeComponent();
@@ -43,7 +43,6 @@ namespace Wox
{
_settings.WindowLeft = Left;
_settings.WindowTop = Top;
_settings.Save();
}
private void OnLoaded(object sender, RoutedEventArgs _)
@@ -71,13 +70,12 @@ namespace Wox
QueryTextBox.Focus();
Left = GetWindowsLeft();
Top = GetWindowsTop();
_settings.IncreaseActivateTimes();
_settings.ActivateTimes++;
}
else
{
_settings.WindowLeft = Left;
_settings.WindowTop = Top;
_settings.Save();
}
};