C# Class Eryan.Input.Mouse

Mouse input device
Inheritance: Eryan.Input.InputDevice
Afficher le fichier Open project: emist/Eryan Class Usage Examples

Protected Properties

Свойство Type Description
X int
defRandX int
defRandY int
missChance int
screen System.Utils
speed int

Méthodes publiques

Méthode 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

Méthode 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 méthode

public GetRandomNumber ( double minimum, double maximum ) : double
minimum double
maximum double
Résultat double

Mouse() public méthode

public Mouse ( ) : System
Résultat System

WindMouse() public méthode

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
Résultat void

atPosition() public méthode

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
Résultat bool

click() public méthode

public click ( bool leftClick ) : void
leftClick bool
Résultat void

click() public méthode

public click ( bool leftClick, int move_after ) : void
leftClick bool
move_after int
Résultat void

click() public méthode

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
Résultat void

cursorDistance() public méthode

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

cursorLocation() public méthode

The current cursor location
public cursorLocation ( ) : Point
Résultat Point

drag() public méthode

public drag ( Point p ) : void
p Point
Résultat void

getSpeed() public méthode

Gets the mouse speed
public getSpeed ( ) : int
Résultat int

getX() public méthode

Get mouse position on the X axis
public getX ( ) : int
Résultat int

getY() public méthode

Get mouse position on the Y axis
public getY ( ) : int
Résultat int

holdLeftButton() public méthode

public holdLeftButton ( ) : void
Résultat void

holdRightButton() public méthode

public holdRightButton ( ) : void
Résultat void

hypot() public méthode

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
Résultat double

move() public méthode

Mouse the mouse to the point
public move ( Point p ) : void
p Point Point to move to
Résultat void

move() public méthode

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
Résultat void

move() public méthode

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
Résultat void

move() public méthode

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
Résultat void

move() public méthode

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
Résultat void

move() public méthode

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
Résultat void

moveMouse() public méthode

Move the mouse to Point p
public moveMouse ( Point p ) : void
p Point The point to move the mouse to
Résultat void

releaseLeftButton() public méthode

public releaseLeftButton ( ) : void
Résultat void

releaseRightButton() public méthode

public releaseRightButton ( ) : void
Résultat void

synchronize() public méthode

public synchronize ( Mouse m ) : void
m Mouse
Résultat void

Property Details

X protected_oe property

protected int X
Résultat int

defRandX protected_oe property

protected int defRandX
Résultat int

defRandY protected_oe property

protected int defRandY
Résultat int

missChance protected_oe property

protected int missChance
Résultat int

screen protected_oe property

protected Utils,System screen
Résultat System.Utils

speed protected_oe property

protected int speed
Résultat int