private void BuildHotKeys() { try { HotKeys newHotKeys = hotKeysBuilder.Build(); Unsubscribe(hotKeys); hotKeys = newHotKeys; Subscribe(newHotKeys); } catch (Exception exc) { MessageBox.Show(exc.ToString(), "Building HotKeys error", MessageBoxButton.OK, MessageBoxImage.Error); } }