Ejemplo n.º 1
0
        private void HotkeyToolStripMenuItem_Click(object sender, EventArgs e)
        {
            // toggle
            if (hotkey != null)
            {
                hotkeyTextBox.Hotkey = hotkey;
                if (hotkeyBinder.IsHotkeyAlreadyBound(hotkey))
                {
                    hotkeyBinder.Unbind(hotkey);
                }
            }

            // mute
            if (muteHotkey != null)
            {
                muteTextBox.Hotkey = muteHotkey;
                if (hotkeyBinder.IsHotkeyAlreadyBound(muteHotkey))
                {
                    hotkeyBinder.Unbind(muteHotkey);
                }
            }

            // unmute
            if (unMuteHotkey != null)
            {
                unmuteTextBox.Hotkey = unMuteHotkey;
                if (hotkeyBinder.IsHotkeyAlreadyBound(unMuteHotkey))
                {
                    hotkeyBinder.Unbind(unMuteHotkey);
                }
            }

            MyShow();
        }
Ejemplo n.º 2
0
 private void UnbindHotkeys()
 {
     hotkeyBinder.Unbind(Modifiers.None, Keys.Space);
     hotkeyBinder.Unbind(Modifiers.None, Keys.Multiply);
     hotkeyBinder.Unbind(Modifiers.None, Keys.Subtract);
     hotkeyBinder.Unbind(Modifiers.None, Keys.Divide);
     hotkeyBinder.Unbind(Modifiers.None, Keys.Decimal);
 }
Ejemplo n.º 3
0
        private void preferencesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            hotkeyBinder.Unbind(Settings.Default.CaptureAreaHotkey);
            hotkeyBinder.Unbind(Settings.Default.CaptureFullscreenHotkey);
            hotkeyBinder.Unbind(Settings.Default.CaptureActiveWindowHotkey);

            var preferencesForm = new PreferencesForm();

            preferencesForm.ShowDialog();
            preferencesForm.Dispose();

            InitializeHotkeyBinder();
        }
Ejemplo n.º 4
0
 private void HotkeyToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (hotkey != null)
     {
         hotkeyTextBox.Hotkey = hotkey;
         hotkeyBinder.Unbind(hotkey);
     }
     MyShow();
 }
Ejemplo n.º 5
0
        private void UnBindHotKey()
        {
            if (_hotKeyBinder.IsHotkeyAlreadyBound(new Hotkey(Modifiers.None, Keys.Escape)))
            {
                _hotKeyBinder.Unbind(Modifiers.None, Keys.Escape);
            }

            if (_hotKeyBinder.IsHotkeyAlreadyBound(new Hotkey(Modifiers.None, Keys.Up)))
            {
                _hotKeyBinder.Unbind(Modifiers.None, Keys.Up);
            }
            if (_hotKeyBinder.IsHotkeyAlreadyBound(new Hotkey(Modifiers.None, Keys.Down)))
            {
                _hotKeyBinder.Unbind(Modifiers.None, Keys.Down);
            }

            foreach (var t in _digitHotkeys)
            {
                if (_hotKeyBinder.IsHotkeyAlreadyBound(t))
                {
                    _hotKeyBinder.Unbind(t);
                }
            }
        }
Ejemplo n.º 6
0
 private void Application_ApplicationExit(object sender, EventArgs e)
 {
     _hotkeyBinder.Unbind(_hotkeyCombination);
 }