private void OnPlayerLoaded(object sender, EventArgs eventArgs) { HotkeyRegister.RegisterHotkey(Guid.NewGuid(), "Ctrl+K", () => { Settings.ShowOsd = !Settings.ShowOsd; if (Player.State == PlayerState.Playing) { return; } Gui.VideoBox.Invalidate(); }); }
private void RegisterHotkey() { HotkeyRegister.RegisterHotkey(m_HotkeyGuid, Hotkey, IncrementSelection); }
private void DeregisterHotkey() { HotkeyRegister.DeregisterHotkey(m_HotkeyGuid); }
internal CommandMenuItemProvider([ImportMany] IEnumerable <Lazy <ICommand> > commands, [Import] Lazy <HotkeyRegister> hotkeys) { _commands = commands; _hotkeys = hotkeys.Value; }