コード例 #1
0
        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();
            });
        }
コード例 #2
0
 private void RegisterHotkey()
 {
     HotkeyRegister.RegisterHotkey(m_HotkeyGuid, Hotkey, IncrementSelection);
 }
コード例 #3
0
 private void DeregisterHotkey()
 {
     HotkeyRegister.DeregisterHotkey(m_HotkeyGuid);
 }
コード例 #4
0
 internal CommandMenuItemProvider([ImportMany] IEnumerable <Lazy <ICommand> > commands, [Import] Lazy <HotkeyRegister> hotkeys)
 {
     _commands = commands;
     _hotkeys  = hotkeys.Value;
 }