Exemplo n.º 1
0
        public void FromInternalMouseMessage(MouseMessagesInternal ev)
        {
            if (ev == MouseMessagesInternal.MouseMove)
            {
                Button = MouseButton.None;
                Event = MouseEvent.Move;
            }
            else if (ev == MouseMessagesInternal.MouseWheel)
            {
                Button = MouseButton.None;
                Event = MouseEvent.Wheel;
            }
            else
            {
                int t = (int)ev - 0x0201;
                int btt = t / 3;
                int e = t % 3;

                Event = e == 0 ? MouseEvent.Down : e == 1 ? MouseEvent.Up : MouseEvent.Click;
                Button = btt == 0 ? MouseButton.Left : btt == 1 ? MouseButton.Right : MouseButton.Middle;
            }
        }
Exemplo n.º 2
0
 public MyMouseEvent(MouseMessagesInternal ev)
 {
     FromInternalMouseMessage(ev);
 }