public void ExcluirItem() { bd.SalvarPosicaoAtual(); Thread.Sleep(250); mouse.LeftButtonDoubleClick(); movimento.MoveCursorLixeira(); mouse.LeftButtonClick(); teclado.KeyPress(VirtualKeyCode.RETURN); movimento.MoveCursorInicial(); }
public async Task LeftClickMouse(Point p) { await SetCursorPos(p); await Sleep(SleepTime); _mouseSimulator.LeftButtonClick(); await Sleep(SleepTime); await SetCursorPos(Point.Empty); }
public static void MouseButtonClick(this IMouseSimulator mouse, MouseButton button) { switch (button) { case MouseButton.LeftButton: mouse.LeftButtonClick(); break; case MouseButton.RightButton: mouse.RightButtonClick(); break; default: break; } }
public void Activate(string button) { int buttonNumber = ParseMouseButtonNumber(button); if (buttonNumber == 1) { _mouse.LeftButtonClick(); } else if (buttonNumber == 2) { _mouse.RightButtonClick(); } else if (buttonNumber == 3) { _mouse.MiddleButtonClick(); } else if (buttonNumber > 3) { _mouse.XButtonClick(buttonNumber - 3); } }
/// <summary> /// Left clicks the mouse at the current location /// </summary> public void Click() { mouse.LeftButtonClick(); }