public static void SetMouseClick(Point point) { OptBaseX.SetCursorPos(new POINT() { x = point.X, y = point.Y }); MouseKeyboardLibrary.MouseSimulator.Click(MouseKeyboardLibrary.MouseButton.Left); }
/// <summary> /// 点击矩形中间部分 /// </summary> /// <param name="rectangle"></param> public static void SetMouseClick(Rectangle rectangle) { OptBaseX.SetCursorPos(new POINT() { x = (int)Math.Abs(rectangle.X + rectangle.Width / 2.0), y = (int)Math.Abs(rectangle.Y + rectangle.Height / 2.0) }); MouseKeyboardLibrary.MouseSimulator.Click(MouseKeyboardLibrary.MouseButton.Left ); }