Beispiel #1
0
 protected void OnMouseDoubleClick(MouseHookEventArgs e)
 {
     if (MouseDoubleClick != null)
     {
         MouseDoubleClick(this, e);
     }
 }
Beispiel #2
0
 protected void OnMouseUp(MouseHookEventArgs e)
 {
     if (MouseUp != null)
     {
         MouseUp(this, e);
     }
 }
Beispiel #3
0
 protected void OnMouseMove(MouseHookEventArgs e)
 {
     if (MouseMove != null)
     {
         MouseMove(this, e);
     }
 }
Beispiel #4
0
 private void hook_MouseDoubleClick(object sender, MouseHookEventArgs e)
 {
     if (MouseDoubleClick != null)
     {
         MouseDoubleClick(this, e);
     }
 }
Beispiel #5
0
 protected void OnMouseDown(MouseHookEventArgs e)
 {
     if (MouseDown != null)
     {
         MouseDown(this, e);
     }
 }
Beispiel #6
0
 private void hook_MouseMove(object sender, MouseHookEventArgs e)
 {
     if (MouseMove != null)
     {
         MouseMove(this, e);
     }
 }
Beispiel #7
0
 private void hook_MouseDown(object sender, MouseHookEventArgs e)
 {
     if (MouseDown != null)
     {
         MouseDown(this, e);
     }
 }
Beispiel #8
0
 private static void hook_MouseDoubleClick(object sender, MouseHookEventArgs e)
 {
     if (selectedItem != null)
     {
         selectedItem.PerformPick();
     }
 }
Beispiel #9
0
        /// <summary>
        /// Raises the appropriate MouseHook event
        /// </summary>
        /// <param name="wParam">The message ID passed to MouseProc</param>
        /// <param name="args">The repackaged arguments passed to MouseProc</param>
        private void RaiseMouseHookEvent(IntPtr wParam, MouseHookEventArgs args)
        {
            switch (wParam.ToInt32())
            {
            // mousemove messages
            case Win32.WM_MOUSEMOVE:
                OnMouseMove(args);
                break;

            case Win32.WM_NCMOUSEMOVE:
                args.SetNonClient();
                OnMouseMove(args);
                break;

            // button down messages
            case Win32.WM_LBUTTONDOWN:
            case Win32.WM_RBUTTONDOWN:
            case Win32.WM_MBUTTONDOWN:
            case Win32.WM_XBUTTONDOWN:
                OnMouseDown(args);
                break;

            case Win32.WM_NCLBUTTONDOWN:
            case Win32.WM_NCRBUTTONDOWN:
            case Win32.WM_NCMBUTTONDOWN:
            case Win32.WM_NCXBUTTONDOWN:
                args.SetNonClient();
                OnMouseDown(args);
                break;

            // button up messages
            case Win32.WM_LBUTTONUP:
            case Win32.WM_RBUTTONUP:
            case Win32.WM_MBUTTONUP:
            case Win32.WM_XBUTTONUP:
                OnMouseUp(args);
                break;

            case Win32.WM_NCLBUTTONUP:
            case Win32.WM_NCRBUTTONUP:
            case Win32.WM_NCMBUTTONUP:
            case Win32.WM_NCXBUTTONUP:
                args.SetNonClient();
                OnMouseUp(args);
                break;

            // double click messages
            case Win32.WM_LBUTTONDBLCLK:
            case Win32.WM_RBUTTONDBLCLK:
            case Win32.WM_MBUTTONDBLCLK:
            case Win32.WM_XBUTTONDBLCLK:
                OnMouseDoubleClick(args);
                break;

            case Win32.WM_NCLBUTTONDBLCLK:
            case Win32.WM_NCRBUTTONDBLCLK:
            case Win32.WM_NCMBUTTONDBLCLK:
            case Win32.WM_NCXBUTTONDBLCLK:
                args.SetNonClient();
                OnMouseDoubleClick(args);
                break;
            }
        }
Beispiel #10
0
        /// <summary>
        /// Raises the appropriate MouseHook event
        /// </summary>
        /// <param name="wParam">The message ID passed to MouseProc</param>
        /// <param name="args">The repackaged arguments passed to MouseProc</param>
        private void RaiseMouseHookEvent(IntPtr wParam, MouseHookEventArgs args)
        {
            switch (wParam.ToInt32())
            {
                    // mousemove messages
                case Win32.WM_MOUSEMOVE:
                    OnMouseMove(args);
                    break;
                case Win32.WM_NCMOUSEMOVE:
                    args.SetNonClient();
                    OnMouseMove(args);
                    break;

                    // button down messages
                case Win32.WM_LBUTTONDOWN:
                case Win32.WM_RBUTTONDOWN:
                case Win32.WM_MBUTTONDOWN:
                case Win32.WM_XBUTTONDOWN:
                    OnMouseDown(args);
                    break;

                case Win32.WM_NCLBUTTONDOWN:
                case Win32.WM_NCRBUTTONDOWN:
                case Win32.WM_NCMBUTTONDOWN:
                case Win32.WM_NCXBUTTONDOWN:
                    args.SetNonClient();
                    OnMouseDown(args);
                    break;

                    // button up messages
                case Win32.WM_LBUTTONUP:
                case Win32.WM_RBUTTONUP:
                case Win32.WM_MBUTTONUP:
                case Win32.WM_XBUTTONUP:
                    OnMouseUp(args);
                    break;

                case Win32.WM_NCLBUTTONUP:
                case Win32.WM_NCRBUTTONUP:
                case Win32.WM_NCMBUTTONUP:
                case Win32.WM_NCXBUTTONUP:
                    args.SetNonClient();
                    OnMouseUp(args);
                    break;

                    // double click messages
                case Win32.WM_LBUTTONDBLCLK:
                case Win32.WM_RBUTTONDBLCLK:
                case Win32.WM_MBUTTONDBLCLK:
                case Win32.WM_XBUTTONDBLCLK:
                    OnMouseDoubleClick(args);
                    break;

                case Win32.WM_NCLBUTTONDBLCLK:
                case Win32.WM_NCRBUTTONDBLCLK:
                case Win32.WM_NCMBUTTONDBLCLK:
                case Win32.WM_NCXBUTTONDBLCLK:
                    args.SetNonClient();
                    OnMouseDoubleClick(args);
                    break;
            }
        }
Beispiel #11
0
 protected void OnMouseUp(MouseHookEventArgs e)
 {
     if (MouseUp != null)
         MouseUp(this, e);
 }
Beispiel #12
0
 protected void OnMouseMove(MouseHookEventArgs e)
 {
     if (MouseMove != null)
         MouseMove(this, e);
 }
Beispiel #13
0
 protected void OnMouseDown(MouseHookEventArgs e)
 {
     if (MouseDown != null)
         MouseDown(this, e);
 }
Beispiel #14
0
 protected void OnMouseDoubleClick(MouseHookEventArgs e)
 {
     if (MouseDoubleClick != null)
         MouseDoubleClick(this, e);
 }