This commit is contained in:
bao-qian 2016-05-09 22:56:05 +01:00
parent fb3ba16a92
commit f376e1ab01
3 changed files with 2 additions and 3 deletions

View File

@ -85,8 +85,7 @@ namespace Wox
// but if sessionending is not called, exit won't be called when log off / shutdown // but if sessionending is not called, exit won't be called when log off / shutdown
if (!_disposed) if (!_disposed)
{ {
var vm = (MainViewModel)Current.MainWindow.DataContext; ((MainViewModel)Current.MainWindow?.DataContext)?.Save();
vm.Save();
_disposed = true; _disposed = true;
} }
} }

View File

@ -53,6 +53,7 @@ namespace Wox
{ {
InitProgressbarAnimation(); InitProgressbarAnimation();
WindowIntelopHelper.DisableControlBox(this); WindowIntelopHelper.DisableControlBox(this);
ThemeManager.Instance.ChangeTheme(_settings.Theme);
var vm = (MainViewModel)DataContext; var vm = (MainViewModel)DataContext;
vm.TextBoxSelected += (o, e) => QueryTextBox.SelectAll(); vm.TextBoxSelected += (o, e) => QueryTextBox.SelectAll();

View File

@ -69,7 +69,6 @@ namespace Wox.ViewModel
InternationalizationManager.Instance.Settings = _settings; InternationalizationManager.Instance.Settings = _settings;
InternationalizationManager.Instance.ChangeLanguage(_settings.Language); InternationalizationManager.Instance.ChangeLanguage(_settings.Language);
ThemeManager.Instance.Settings = _settings; ThemeManager.Instance.Settings = _settings;
ThemeManager.Instance.ChangeTheme(_settings.Theme);
_queryHistoryStorage = new JsonStrorage<QueryHistory>(); _queryHistoryStorage = new JsonStrorage<QueryHistory>();
_userSelectedRecordStorage = new JsonStrorage<UserSelectedRecord>(); _userSelectedRecordStorage = new JsonStrorage<UserSelectedRecord>();