Beispiel #1
0
 void OnHotkeyChanged(object sender, EventArgs e)
 {
     if (HotkeyControl.CurrentHotkeyAvailable)
     {
         SetHotkey(HotkeyControl.CurrentHotkey, delegate
         {
             if (!Application.Current.MainWindow.IsVisible)
             {
                 _api.ShowApp();
             }
             else
             {
                 _api.HideApp();
             }
         });
         RemoveHotkey(_settings.Hotkey);
         _settings.Hotkey = HotkeyControl.CurrentHotkey.ToString();
     }
 }
Beispiel #2
0
 void ctlHotkey_OnHotkeyChanged(object sender, EventArgs e)
 {
     if (ctlHotkey.CurrentHotkeyAvailable)
     {
         SetHotkey(ctlHotkey.CurrentHotkey, delegate
         {
             if (!System.Windows.Application.Current.MainWindow.IsVisible)
             {
                 _api.ShowApp();
             }
             else
             {
                 _api.HideApp();
             }
         });
         RemoveHotkey(_settings.Hotkey);
         _settings.Hotkey = ctlHotkey.CurrentHotkey.ToString();
     }
 }
Beispiel #3
0
 void ctlHotkey_OnHotkeyChanged(object sender, EventArgs e)
 {
     if (ctlHotkey.CurrentHotkeyAvailable)
     {
         SetHotkey(ctlHotkey.CurrentHotkey, delegate
         {
             if (!App.Window.IsVisible)
             {
                 _api.ShowApp();
             }
             else
             {
                 _api.HideApp();
             }
         });
         RemoveHotkey(UserSettingStorage.Instance.Hotkey);
         UserSettingStorage.Instance.Hotkey = ctlHotkey.CurrentHotkey.ToString();
         UserSettingStorage.Instance.Save();
     }
 }