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); }
public MouseEventArgs(MouseState previous, MouseState current) { PreviousState = FromMouseState(previous); State = FromMouseState(current); }