"start wox on system startup" config changes.

This commit is contained in:
qianlifeng
2014-02-07 22:10:00 +08:00
parent 67f14d6a62
commit 3442081d20
5 changed files with 28 additions and 31 deletions

View File

@@ -53,6 +53,7 @@ namespace Wox
themeComboBox.SelectedItem = CommonStorage.Instance.UserSetting.Theme;
cbReplaceWinR.IsChecked = CommonStorage.Instance.UserSetting.ReplaceWinR;
webSearchView.ItemsSource = CommonStorage.Instance.UserSetting.WebSearches;
cbStartWithWindows.IsChecked = CommonStorage.Instance.UserSetting.StartWoxOnSystemStartup;
}
public void ReloadWebSearchView()
@@ -111,15 +112,21 @@ namespace Wox
}
}
private void CbStartWithWindows_OnChecked(object sender, RoutedEventArgs e)
{
OnStartWithWindowsChecked();
if (!CommonStorage.Instance.UserSetting.StartWoxOnSystemStartup)
{
CommonStorage.Instance.UserSetting.StartWoxOnSystemStartup = true;
OnStartWithWindowsChecked();
CommonStorage.Instance.Save();
}
}
private void CbStartWithWindows_OnUnchecked(object sender, RoutedEventArgs e)
{
CommonStorage.Instance.UserSetting.StartWoxOnSystemStartup = false;
OnStartWithWindowUnChecked();
CommonStorage.Instance.Save();
}
[MethodImpl(MethodImplOptions.NoInlining)]
@@ -142,7 +149,7 @@ namespace Wox
{
if (startup)
{
rk.SetValue("Wox",Path.Combine(Directory.GetCurrentDirectory(),"Wox.exe startHide"));
rk.SetValue("Wox", Path.Combine(Directory.GetCurrentDirectory(), "Wox.exe startHide"));
}
else
{