internal static void DoAction(object sender, HotkeyEventArgs e) { if (methodToExecute != null) { methodToExecute.Invoke(); } }
internal IntPtr HandleHotkeyMessage( IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled, out Hotkey hotkey) { hotkey = null; if (msg == WmHotkey) { int id = wParam.ToInt32(); string name; if (_hotkeyNames.TryGetValue(id, out name)) { hotkey = _hotkeys[name]; var handler = hotkey.Handler; if (handler != null) { var e = new HotkeyEventArgs(name); handler(this, e); handled = e.Handled; } } } return IntPtr.Zero; }
private void EmergyStop(object sender, HotkeyEventArgs e) { using (var soundboarClient = new SoundBoardClient(_serverAddress)) { soundboarClient.EmergencyStopAsync(); } }
internal IntPtr HandleHotkeyMessage( IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled, out Hotkey hotkey) { hotkey = null; if (msg == WmHotkey) { int id = wParam.ToInt32(); string name; lock (_hotkeys) { if (_hotkeyNames.TryGetValue(id, out name)) { hotkey = _hotkeys[name]; var handler = hotkey.Handler; if (handler != null) { var e = new HotkeyEventArgs(name); handler(this, e); handled = e.Handled; } } } } return(IntPtr.Zero); }
private void OnHotkey(object sender, HotkeyEventArgs e) { if (ShouldIgnoreHotkeys()) return; ToggleWox(); e.Handled = true; }
private void OnHotkey(object sender, HotkeyEventArgs e) { }
private void EndEncounter_Key(object sender, HotkeyEventArgs e) { Console.WriteLine("Encounter hotkey pressed"); EndEncounter_Click(null, null); e.Handled=true; }
private void DebugMenu_Key(object sender, HotkeyEventArgs e) { Console.WriteLine("Debug hotkey pressed"); DebugMenu.Visibility=Visibility.Visible; e.Handled=true; }
private void OnHotkeyPressed(object sender, HotkeyEventArgs e) { ToggleMainWindow(); }
void OnHotkeyOccurred(object sender, HotkeyEventArgs e) { switch (e.Name) { case ConfirmNegative: SaveBg_OnClick(null, null); break; case ConfirmPositive: SaveSample_OnClick(null, null); break; case PrevImage: PredecessorImage(true); break; case NextImage: SuccessorImage(true); break; } e.Handled = true; }
private async Task OnHotKey(object sender, HotkeyEventArgs e) { await ((MetroWindow)Application.Current.MainWindow).ShowMessageAsync( "Hotkey pressed", "You pressed the hotkey '" + HotKey + "' registered with the name '" + e.Name + "'"); }
public void ScanText_HotKey(object sender, NHotkey.HotkeyEventArgs e) { StartScanScreen(); }