Beispiel #1
0
 protected void fireMouseDragStarted(MouseEventArgs me)
 {
     if (MouseDragStarted != null)
     {
         MouseDragStarted.Invoke(this, me.Position.x, me.Position.y);
     }
 }
Beispiel #2
0
        public MouseKeyHook()
        {
            _hook = Hook.GlobalEvents();

            _hook.KeyUp   += (S, E) => KeyUp?.Invoke(this, E);
            _hook.KeyDown += (S, E) => KeyDown?.Invoke(this, E);

            _hook.MouseUp          += (S, E) => MouseUp?.Invoke(this, E);
            _hook.MouseDown        += (S, E) => MouseDown?.Invoke(this, E);
            _hook.MouseClick       += (S, E) => MouseClick?.Invoke(this, E);
            _hook.MouseDoubleClick += (S, E) => MouseDoubleClick?.Invoke(this, E);
            _hook.MouseWheel       += (S, E) => MouseWheel?.Invoke(this, E);
            _hook.MouseMove        += (S, E) => MouseMove?.Invoke(this, E);

            _hook.MouseDragStarted  += (S, E) => MouseDragStarted?.Invoke(this, E);
            _hook.MouseDragFinished += (S, E) => MouseDragFinished?.Invoke(this, E);

            _hook.KeyPress += (S, E) => KeyPress?.Invoke(this, E);
        }