Class Mouse
Inheritance
System.Object
Mouse
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Oasys.Common.dll
[Obfuscation(Feature = "code control flow obfuscation", Exclude = true)]
public class Mouse
Fields
Declaration
public static Pos _restore
Field Value
Properties
Declaration
public static bool InUse { get; }
Property Value
Type |
Description |
System.Boolean |
|
Declaration
public static Pos Resolution { get; set; }
Property Value
Methods
Declaration
public static long ClickAndBounce(Pos p, int delay = 100, bool left = false, Action callback = null)
Parameters
Type |
Name |
Description |
Pos |
p |
|
System.Int32 |
delay |
|
System.Boolean |
left |
|
System.Action |
callback |
|
Returns
Type |
Description |
System.Int64 |
|
Clicks on target position, and after [delay]ms bounces back to origin location.
Declaration
public static long ClickAndBounce(int x, int y, int delay = 100, bool left = false, Action callback = null)
Parameters
Type |
Name |
Description |
System.Int32 |
x |
|
System.Int32 |
y |
|
System.Int32 |
delay |
|
System.Boolean |
left |
|
System.Action |
callback |
what to do instead of a right click in case we need a key press or something
|
Returns
Type |
Description |
System.Int64 |
has clicked
|
Declaration
public static void LeftClick()
Declaration
public static void LeftClick(int x, int y)
Parameters
Type |
Name |
Description |
System.Int32 |
x |
|
System.Int32 |
y |
|
Declaration
public static void RightClick(int delay = 4)
Parameters
Type |
Name |
Description |
System.Int32 |
delay |
|
Declaration
public static void RightClick(int x, int y, int delay = 4)
Parameters
Type |
Name |
Description |
System.Int32 |
x |
|
System.Int32 |
y |
|
System.Int32 |
delay |
|
Declaration
public static void SetCursor(Pos p)
Parameters
Type |
Name |
Description |
Pos |
p |
|
Sets the cursor position.
Note that using SetCursor over SetPosition will not send any input stream events that we might want for certain scenarios.
Declaration
public static void SetCursor(int x, int y)
Parameters
Type |
Name |
Description |
System.Int32 |
x |
|
System.Int32 |
y |
|
Declaration
public static void SetCursorRelative(Pos p)
Parameters
Type |
Name |
Description |
Pos |
p |
|
Changes the cursor position relatively to its current position.
Note that using SetCursor over SetPosition will not send any input stream events that we might want for certain scenarios.
Declaration
public static void SetCursorRelative(int xOffset, int yOffset)
Parameters
Type |
Name |
Description |
System.Int32 |
xOffset |
|
System.Int32 |
yOffset |
|
Declaration
public static void SetPosition(Pos p)
Parameters
Type |
Name |
Description |
Pos |
p |
|
Sets the mouse position using the native mouse_event call.
This will also stream all information of mouse movement into the input handler.
Declaration
public static void SetPosition(int x, int y)
Parameters
Type |
Name |
Description |
System.Int32 |
x |
|
System.Int32 |
y |
|
Declaration
public static void SetPositionRelative(Pos p)
Parameters
Type |
Name |
Description |
Pos |
p |
|
Changes the mouse position relatively to its current position using the native mouse_event call.
This will also stream all information of mouse movement into the input handler.
Declaration
public static void SetPositionRelative(int x, int y)
Parameters
Type |
Name |
Description |
System.Int32 |
x |
|
System.Int32 |
y |
|
Extension Methods