예제 #1
0
        private MouseParameters FromMouseState(MouseState state)
        {
            MouseParameters param = new MouseParameters();

            param.X            = state.X;
            param.Y            = state.Y;
            param.LeftButton   = (state.LeftButton == ButtonState.Pressed);
            param.RightButton  = (state.RightButton == ButtonState.Pressed);
            param.MiddleButton = (state.MiddleButton == ButtonState.Pressed);
            param.WheelValue   = state.ScrollWheelValue;
            return(param);
        }
예제 #2
0
 public MouseEventArgs(MouseState previous, MouseState current)
 {
     PreviousState = FromMouseState(previous);
     State         = FromMouseState(current);
 }