C# Class WindowsInput.MouseSimulator

Implements the IMouseSimulator interface by calling the an IInputMessageDispatcher to simulate Mouse gestures.
Inheritance: IMouseSimulator
Datei anzeigen Open project: Hebo/LeagueMaster Class Usage Examples

Public Methods

Method Description
HorizontalScroll ( int scrollAmountInClicks ) : void

Simulates a mouse horizontal wheel scroll gesture. Supported by Windows Vista and later.

LeftButtonClick ( ) : void

Simulates a mouse left-click gesture.

LeftButtonDoubleClick ( ) : void

Simulates a mouse left button double-click gesture.

LeftButtonDown ( ) : void

Simulates a mouse left button down gesture.

LeftButtonUp ( ) : void

Simulates a mouse left button up gesture.

MouseSimulator ( ) : System

Initializes a new instance of the MouseSimulator class using an instance of a WindowsInputMessageDispatcher for dispatching INPUT messages.

MouseSimulator ( IInputMessageDispatcher messageDispatcher ) : System

Initializes a new instance of the MouseSimulator class using the specified IInputMessageDispatcher for dispatching INPUT messages.

MoveMouseBy ( int pixelDeltaX, int pixelDeltaY ) : void

Simulates mouse movement by the specified distance measured as a delta from the current mouse location in pixels.

MoveMouseTo ( double absoluteX, double absoluteY ) : void

Simulates mouse movement to the specified location on the primary display device.

MoveMouseToPositionOnVirtualDesktop ( double absoluteX, double absoluteY ) : void

Simulates mouse movement to the specified location on the Virtual Desktop which includes all active displays.

RightButtonClick ( ) : void

Simulates a mouse right button click gesture.

RightButtonDoubleClick ( ) : void

Simulates a mouse right button double-click gesture.

RightButtonDown ( ) : void

Simulates a mouse right button down gesture.

RightButtonUp ( ) : void

Simulates a mouse right button up gesture.

VerticalScroll ( int scrollAmountInClicks ) : void

Simulates mouse vertical wheel scroll gesture.

XButtonClick ( int buttonId ) : void

Simulates a mouse X button click gesture.

XButtonDoubleClick ( int buttonId ) : void

Simulates a mouse X button double-click gesture.

XButtonDown ( int buttonId ) : void

Simulates a mouse X button down gesture.

XButtonUp ( int buttonId ) : void

Simulates a mouse X button up gesture.

Private Methods

Method Description
SendSimulatedInput ( INPUT inputList ) : int

Sends the list of INPUT messages using the IInputMessageDispatcher instance.

Method Details

HorizontalScroll() public method

Simulates a mouse horizontal wheel scroll gesture. Supported by Windows Vista and later.
public HorizontalScroll ( int scrollAmountInClicks ) : void
scrollAmountInClicks int The amount to scroll in clicks. A positive value indicates that the wheel was rotated to the right; a negative value indicates that the wheel was rotated to the left.
return void

LeftButtonClick() public method

Simulates a mouse left-click gesture.
public LeftButtonClick ( ) : void
return void

LeftButtonDoubleClick() public method

Simulates a mouse left button double-click gesture.
public LeftButtonDoubleClick ( ) : void
return void

LeftButtonDown() public method

Simulates a mouse left button down gesture.
public LeftButtonDown ( ) : void
return void

LeftButtonUp() public method

Simulates a mouse left button up gesture.
public LeftButtonUp ( ) : void
return void

MouseSimulator() public method

Initializes a new instance of the MouseSimulator class using an instance of a WindowsInputMessageDispatcher for dispatching INPUT messages.
public MouseSimulator ( ) : System
return System

MouseSimulator() public method

Initializes a new instance of the MouseSimulator class using the specified IInputMessageDispatcher for dispatching INPUT messages.
If null is passed as the .
public MouseSimulator ( IInputMessageDispatcher messageDispatcher ) : System
messageDispatcher IInputMessageDispatcher The to use for dispatching messages.
return System

MoveMouseBy() public method

Simulates mouse movement by the specified distance measured as a delta from the current mouse location in pixels.
public MoveMouseBy ( int pixelDeltaX, int pixelDeltaY ) : void
pixelDeltaX int The distance in pixels to move the mouse horizontally.
pixelDeltaY int The distance in pixels to move the mouse vertically.
return void

MoveMouseTo() public method

Simulates mouse movement to the specified location on the primary display device.
public MoveMouseTo ( double absoluteX, double absoluteY ) : void
absoluteX double The destination's absolute X-coordinate on the primary display device where 0 is the extreme left hand side of the display device and 65535 is the extreme right hand side of the display device.
absoluteY double The destination's absolute Y-coordinate on the primary display device where 0 is the top of the display device and 65535 is the bottom of the display device.
return void

MoveMouseToPositionOnVirtualDesktop() public method

Simulates mouse movement to the specified location on the Virtual Desktop which includes all active displays.
public MoveMouseToPositionOnVirtualDesktop ( double absoluteX, double absoluteY ) : void
absoluteX double The destination's absolute X-coordinate on the virtual desktop where 0 is the left hand side of the virtual desktop and 65535 is the extreme right hand side of the virtual desktop.
absoluteY double The destination's absolute Y-coordinate on the virtual desktop where 0 is the top of the virtual desktop and 65535 is the bottom of the virtual desktop.
return void

RightButtonClick() public method

Simulates a mouse right button click gesture.
public RightButtonClick ( ) : void
return void

RightButtonDoubleClick() public method

Simulates a mouse right button double-click gesture.
public RightButtonDoubleClick ( ) : void
return void

RightButtonDown() public method

Simulates a mouse right button down gesture.
public RightButtonDown ( ) : void
return void

RightButtonUp() public method

Simulates a mouse right button up gesture.
public RightButtonUp ( ) : void
return void

VerticalScroll() public method

Simulates mouse vertical wheel scroll gesture.
public VerticalScroll ( int scrollAmountInClicks ) : void
scrollAmountInClicks int The amount to scroll in clicks. A positive value indicates that the wheel was rotated forward, away from the user; a negative value indicates that the wheel was rotated backward, toward the user.
return void

XButtonClick() public method

Simulates a mouse X button click gesture.
public XButtonClick ( int buttonId ) : void
buttonId int The button id.
return void

XButtonDoubleClick() public method

Simulates a mouse X button double-click gesture.
public XButtonDoubleClick ( int buttonId ) : void
buttonId int The button id.
return void

XButtonDown() public method

Simulates a mouse X button down gesture.
public XButtonDown ( int buttonId ) : void
buttonId int The button id.
return void

XButtonUp() public method

Simulates a mouse X button up gesture.
public XButtonUp ( int buttonId ) : void
buttonId int The button id.
return void