C# Class Eryan.Input.Mouse

Mouse input device
Inheritance: Eryan.Input.InputDevice
Mostrar archivo Open project: emist/Eryan Class Usage Examples

Protected Properties

Property Type Description
X int
defRandX int
defRandY int
missChance int
screen System.Utils
speed int

Public Methods

Method Description
GetRandomNumber ( double minimum, double maximum ) : double
Mouse ( ) : System
WindMouse ( int xs, int ys, int xe, int ye, double gravity, double wind, double minWait, double maxWait, double maxStep, double targetArea ) : void

Insane mouse logic

atPosition ( int x, int y ) : bool

Check whether the mouse it at the given x and y coordinates

click ( bool leftClick ) : void
click ( bool leftClick, int move_after ) : void
click ( int x, int y, bool leftClick, int move_after ) : void

Clicks the given coordinates

cursorDistance ( Point p ) : int

Get how far the mouse is from the given point

cursorLocation ( ) : Point

The current cursor location

drag ( Point p ) : void
getSpeed ( ) : int

Gets the mouse speed

getX ( ) : int

Get mouse position on the X axis

getY ( ) : int

Get mouse position on the Y axis

holdLeftButton ( ) : void
holdRightButton ( ) : void
hypot ( double xs, double xe, double ys, double ye ) : double

Gets the hypotenuse of the triangle made by two points

move ( Point p ) : void

Mouse the mouse to the point

move ( Point p, int randX, int randY ) : void

Move the mouse to the given point with the given randomization

move ( Point p, int randX, int randY, int afterOffset ) : void

Move the mouse to the given point with randomization and movement after

move ( int speed, Point p ) : void

Move the mouse to a poitn with the given speed

move ( int x, int y, int randX, int randY ) : void

Move the mouse to the given coordinates with randomization

move ( int speed, int x, int y, int randX, int randY, int afterOffset ) : void

More insane mouse logic

moveMouse ( Point p ) : void

Move the mouse to Point p

releaseLeftButton ( ) : void
releaseRightButton ( ) : void
synchronize ( Mouse m ) : void

Private Methods

Method Description
dllCalcTest ( IntPtr handle ) : void
dllMouseButtonDown ( IntPtr handle, bool left, int x, int y ) : void
dllMouseButtonUp ( IntPtr handle, bool left, int x, int y ) : void
dllMouseClick ( IntPtr handle, bool left, int x, int y ) : void
dllMoveMouse ( IntPtr handle, int x, int y ) : void

Method Details

GetRandomNumber() public method

public GetRandomNumber ( double minimum, double maximum ) : double
minimum double
maximum double
return double

Mouse() public method

public Mouse ( ) : System
return System

WindMouse() public method

Insane mouse logic
public WindMouse ( int xs, int ys, int xe, int ye, double gravity, double wind, double minWait, double maxWait, double maxStep, double targetArea ) : void
xs int
ys int
xe int
ye int
gravity double
wind double
minWait double
maxWait double
maxStep double
targetArea double
return void

atPosition() public method

Check whether the mouse it at the given x and y coordinates
public atPosition ( int x, int y ) : bool
x int X coordinate to check
y int Y coordinate to check
return bool

click() public method

public click ( bool leftClick ) : void
leftClick bool
return void

click() public method

public click ( bool leftClick, int move_after ) : void
leftClick bool
move_after int
return void

click() public method

Clicks the given coordinates
public click ( int x, int y, bool leftClick, int move_after ) : void
x int The position in the x axis to click
y int The position in the y axis to click
leftClick bool Whether its a left click or right click
move_after int How much it should move after clicking
return void

cursorDistance() public method

Get how far the mouse is from the given point
public cursorDistance ( Point p ) : int
p Point The point to test against
return int

cursorLocation() public method

The current cursor location
public cursorLocation ( ) : Point
return Point

drag() public method

public drag ( Point p ) : void
p Point
return void

getSpeed() public method

Gets the mouse speed
public getSpeed ( ) : int
return int

getX() public method

Get mouse position on the X axis
public getX ( ) : int
return int

getY() public method

Get mouse position on the Y axis
public getY ( ) : int
return int

holdLeftButton() public method

public holdLeftButton ( ) : void
return void

holdRightButton() public method

public holdRightButton ( ) : void
return void

hypot() public method

Gets the hypotenuse of the triangle made by two points
public hypot ( double xs, double xe, double ys, double ye ) : double
xs double X coordinate of point 1
xe double X coordinate of point 2
ys double Y coordinate of point 1
ye double Y coordinate of point 2
return double

move() public method

Mouse the mouse to the point
public move ( Point p ) : void
p Point Point to move to
return void

move() public method

Move the mouse to the given point with the given randomization
public move ( Point p, int randX, int randY ) : void
p Point The point to move to
randX int The deviation along the X axis
randY int The deviation along the Y axis
return void

move() public method

Move the mouse to the given point with randomization and movement after
public move ( Point p, int randX, int randY, int afterOffset ) : void
p Point The point to move
randX int The deviation along the X axis
randY int The deviation along the Y axis
afterOffset int How much to move by after it gets there
return void

move() public method

Move the mouse to a poitn with the given speed
public move ( int speed, Point p ) : void
speed int The speed at which to move
p Point The point to move to
return void

move() public method

Move the mouse to the given coordinates with randomization
public move ( int x, int y, int randX, int randY ) : void
x int The position in the x axis to move to
y int The position in the y axis to move to
randX int The random deviation along the X axis
randY int The random deviation along the Y axis
return void

move() public method

More insane mouse logic
public move ( int speed, int x, int y, int randX, int randY, int afterOffset ) : void
speed int
x int
y int
randX int
randY int
afterOffset int
return void

moveMouse() public method

Move the mouse to Point p
public moveMouse ( Point p ) : void
p Point The point to move the mouse to
return void

releaseLeftButton() public method

public releaseLeftButton ( ) : void
return void

releaseRightButton() public method

public releaseRightButton ( ) : void
return void

synchronize() public method

public synchronize ( Mouse m ) : void
m Mouse
return void

Property Details

X protected_oe property

protected int X
return int

defRandX protected_oe property

protected int defRandX
return int

defRandY protected_oe property

protected int defRandY
return int

missChance protected_oe property

protected int missChance
return int

screen protected_oe property

protected Utils,System screen
return System.Utils

speed protected_oe property

protected int speed
return int