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(); }
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); }
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(); }
private void HotkeyToolStripMenuItem_Click(object sender, EventArgs e) { if (hotkey != null) { hotkeyTextBox.Hotkey = hotkey; hotkeyBinder.Unbind(hotkey); } MyShow(); }
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); } } }
private void Application_ApplicationExit(object sender, EventArgs e) { _hotkeyBinder.Unbind(_hotkeyCombination); }