예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
 private void OnDisable()
 {
     DisableEvent.Invoke();
 }
예제 #4
0
 public void RunDisable() => DisableEvent?.Invoke();