示例#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
 void OnDisableEvent(DisableEvent e)
 {
     this.Disable(e.Duration);
     //this.Interrupt(e.Duration);
 }
示例#5
0
 public void RunDisable() => DisableEvent?.Invoke();
示例#6
0
 void OnDisableEvent(DisableEvent e)
 {
     this.Disable(e.duration);
 }