예제 #1
0
 public static PointF DragMouseHere(this PointF p, int offsetX = 0, int offsetY = 0)
 {
     if (offsetX == 0 && offsetY == 0)
     {
         return(SetMouseHere(p));
     }
     InputBridge.SendMouse(Models.MouseEventType.LEFT_DOWN);
     Thread.Sleep(5);
     InputBridge.MoveMouse(Models.Point2d.FromPointF(p.Offset(offsetX, offsetY)), true);
     Thread.Sleep(5);
     InputBridge.SendMouse(Models.MouseEventType.LEFT_UP);
     return(p);
 }
예제 #2
0
 public static PointF Click(this PointF p, bool rightClick = false)
 {
     if (rightClick)
     {
         InputBridge.SendMouse(Models.MouseEventType.RIGHT_DOWN);
         InputBridge.SendMouse(Models.MouseEventType.RIGHT_UP);
     }
     else
     {
         InputBridge.SendMouse(Models.MouseEventType.LEFT_DOWN);
         InputBridge.SendMouse(Models.MouseEventType.LEFT_UP);
     }
     return(p);
 }