Пример #1
0
 /// <summary>
 /// Loads keybindings from the configuration file and registers them with Windows.
 /// </summary>
 private void AssignHotkeys(HotkeyManager hotkeyManager)
 {
     try
     {
         hotkeyManager.AssignHotkeys(
             ConfigManager.Config.Hotkeys ?? new HotkeyConfig[0],
             actionDispatcher,
             notificationService);
     }
     catch (Exception e) when(e is ArgumentException || e is HotkeyException)
     {
         notificationService.ShowErrorWindow(e.Message, "Could not register hotkeys");
         Exit();
     }
 }