mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
Add hotkey setting
This commit is contained in:
@@ -31,6 +31,8 @@ namespace Wox
|
||||
this.mainWindow = mainWindow;
|
||||
InitializeComponent();
|
||||
Loaded += Setting_Loaded;
|
||||
ctlHotkey.OnHotkeyChanged += ctlHotkey_OnHotkeyChanged;
|
||||
ctlHotkey.SetHotkey(CommonStorage.Instance.UserSetting.Hotkey);
|
||||
cbReplaceWinR.Checked += (o, e) =>
|
||||
{
|
||||
CommonStorage.Instance.UserSetting.ReplaceWinR = true;
|
||||
@@ -43,6 +45,16 @@ namespace Wox
|
||||
};
|
||||
}
|
||||
|
||||
void ctlHotkey_OnHotkeyChanged(object sender, System.EventArgs e)
|
||||
{
|
||||
if (ctlHotkey.CurrentHotkeyAvailable)
|
||||
{
|
||||
mainWindow.SetHotkey(ctlHotkey.CurrentHotkey.ToString());
|
||||
CommonStorage.Instance.UserSetting.Hotkey = ctlHotkey.CurrentHotkey.ToString();
|
||||
CommonStorage.Instance.Save();
|
||||
}
|
||||
}
|
||||
|
||||
private void Setting_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
foreach (string theme in LoadAvailableThemes())
|
||||
|
||||
Reference in New Issue
Block a user