protected IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) { if (msg == WM_WINCOMPOSE.DISABLE) { if (Process.GetCurrentProcess().Id != (int)wParam) { DisableEvent?.Invoke(); } handled = true; } else if (msg == WM_WINCOMPOSE.EXIT) { if (Process.GetCurrentProcess().Id != (int)wParam) { ExitEvent?.Invoke(); } handled = true; } else if (msg == WM_WINCOMPOSE.SETTINGS) { SettingsEvent?.Invoke(); handled = true; } else if (msg == WM_WINCOMPOSE.SEQUENCES) { SequencesEvent?.Invoke(); handled = true; } return(IntPtr.Zero); }
protected IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) { if (msg == WM_WINCOMPOSE.DISABLE) { if (Process.GetCurrentProcess().Id != (int)wParam) { DisableEvent?.Invoke(); } handled = true; } else if (msg == WM_WINCOMPOSE.EXIT) { if (Process.GetCurrentProcess().Id != (int)wParam) { ExitEvent?.Invoke(); } handled = true; } else if (msg == WM_WINCOMPOSE.OPEN) { OpenEvent?.Invoke((MenuCommand)wParam); handled = true; } return(IntPtr.Zero); }
private void OnDisable() { DisableEvent.Invoke(); }
public void RunDisable() => DisableEvent?.Invoke();