private bool CanExecuteRemoveHotkey(GlobalHotkey hotkey)
 {
     return hotkey != null && _hotkeyService.ConfiguredHotkeys.Contains(hotkey);
 }
        public void Add(GlobalHotkey hotkey)
        {
            try
            {
                using (var session = DocumentStore.OpenSession())
                {
                    session.Store(hotkey);
                    session.SaveChanges();
                }

                _hotkeys.Add(hotkey);
            }
            catch (Exception e)
            {
                ToastService.Show(new ToastData
                {
                    Message = "Unexpected error while adding hotkey. " + e.Message
                });

                Logger.Log(e.ToString(), Category.Exception, Priority.Medium);
            }
        }
 private void ExecuteRemoveHotkey(GlobalHotkey hotkey)
 {
     _hotkeyService.Remove(hotkey.Id);
 }