public static void MouseUp(MouseButtons button) { if (button != MouseButtons.Left) { if (button != MouseButtons.Right) { if (button == MouseButtons.Middle) { MouseSimulator.MouseUp(MouseButton.Middle); } } else { MouseSimulator.MouseUp(MouseButton.Right); } } else { MouseSimulator.MouseUp(MouseButton.Left); } }
public static void MouseDown(MouseButton button) { MouseSimulator.mouse_event((int)button, 0, 0, 0, 0); }
public static void MouseUp(MouseButton button) { MouseSimulator.mouse_event((int)((int)(button) * (int)(MouseButton.Left)), 0, 0, 0, 0); }
public static void Hide() { MouseSimulator.ShowCursor(false); }
public static void Show() { MouseSimulator.ShowCursor(true); }
public static void MouseWheel(int delta) { MouseSimulator.mouse_event(2048, 0, 0, delta, 0); }
public static void DoubleClick(MouseButton button) { MouseSimulator.Click(button); MouseSimulator.Click(button); }
public static void Click(MouseButton button) { MouseSimulator.MouseDown(button); MouseSimulator.MouseUp(button); }