Exemplo n.º 1
0
        private void windowsHook_MouseHook(object sender, Hooks.MouseHookEventArgs e)
        {
            switch (e.Message)
            {
            case Hooks.MouseMessages.LButtonDblClk:
            case Hooks.MouseMessages.LButtonDown:
            case Hooks.MouseMessages.LButtonUp:
            case Hooks.MouseMessages.MButtonDblClk:
            case Hooks.MouseMessages.MButtonDown:
            case Hooks.MouseMessages.MButtonUp:
            case Hooks.MouseMessages.RButtonDblClk:
            case Hooks.MouseMessages.RButtonDown:
            case Hooks.MouseMessages.RButtonUp:
            case Hooks.MouseMessages.XButtonDblClk:
            case Hooks.MouseMessages.XButtonDown:
                if (this.CloseOnMouseClick)
                {
                    Close();
                }
                break;

            case Hooks.MouseMessages.MouseMove:
                if (this.CloseOnMouseMove)
                {
                    Close();
                }
                break;
            }
        }
Exemplo n.º 2
0
        private void windowsHook_MouseHook(object sender, MouseHookEventArgs e)
        {
            switch (e.Message)
            {
                case MouseMessages.MouseMove:
                    if (this.CloseOnMouseMove)
                    {
                        base.Close();
                    }
                    break;

                case MouseMessages.LButtonDown:
                case MouseMessages.LButtonUp:
                case MouseMessages.LButtonDblClk:
                case MouseMessages.RButtonDown:
                case MouseMessages.RButtonUp:
                case MouseMessages.RButtonDblClk:
                case MouseMessages.MButtonDown:
                case MouseMessages.MButtonUp:
                case MouseMessages.MButtonDblClk:
                case MouseMessages.XButtonDown:
                case MouseMessages.XButtonDblClk:
                    if (!this.CloseOnMouseClick)
                    {
                        break;
                    }
                    base.Close();
                    return;

                case MouseMessages.MouseWheel:
                case MouseMessages.XButtonUP:
                    break;

                default:
                    return;
            }
        }
Exemplo n.º 3
0
		protected internal virtual void OnMouseHook(object hook, MouseHookEventArgs e)
		{
			MouseHookEventHandler handler = (MouseHookEventHandler)Events[hook];
			handler(this, e);
		}
Exemplo n.º 4
0
        protected internal virtual void OnMouseHook(object hook, MouseHookEventArgs e)
        {
            MouseHookEventHandler handler = (MouseHookEventHandler)Events[hook];

            handler(this, e);
        }
Exemplo n.º 5
0
 protected internal virtual void OnMouseHook(object hook, MouseHookEventArgs e)
 {
     MouseHookEventHandler handler = (MouseHookEventHandler) base.Events.get_Item(hook);
     handler(this, e);
 }