Beispiel #1
0
 /// <summary>
 /// Simulate touch drag.
 /// </summary>
 /// <param name="from">The start position.</param>
 /// <param name="to">The end position.</param>
 public static void Drag(Point from, Point to)
 {
     Drag(from, to, Interpolation.Duration(from, to, MoveSpeed));
 }
Beispiel #2
0
 /// <summary>
 /// Simulate touch drag.
 /// </summary>
 /// <param name="from">The start position.</param>
 /// <param name="to">The end position.</param>
 /// <param name="speed">The speed for the drag pixels per second.</param>
 public static void Drag(Point from, Point to, double speed)
 {
     Drag(from, to, Interpolation.Duration(from, to, speed));
 }
Beispiel #3
0
 /// <summary>
 /// Drags the mouse in one step.
 /// </summary>
 /// <param name="mouseButton">The mouse button to use for dragging.</param>
 /// <param name="from">Start point of the drag.</param>
 /// <param name="to">End point for the drga.</param>
 /// <param name="speed">The speed in pixels per second.</param>
 public static void Drag(MouseButton mouseButton, Point from, Point to, double speed)
 {
     Drag(mouseButton, from, to, Interpolation.Duration(from, to, speed));
 }
Beispiel #4
0
 /// <summary>
 /// Moves the mouse to a new position.
 /// </summary>
 /// <param name="newPosition">The new position for the mouse.</param>
 /// <param name="speed">The speed in pixels per second.</param>
 public static void MoveTo(Point newPosition, double speed)
 {
     MoveTo(newPosition, Interpolation.Duration(Position, newPosition, speed));
 }
Beispiel #5
0
 /// <summary>
 /// Moves the mouse to a new position.
 /// </summary>
 /// <param name="newPosition">The new position for the mouse.</param>
 public static void MoveTo(Point newPosition)
 {
     MoveTo(newPosition, Interpolation.Duration(Position, newPosition, MoveSpeed));
 }
Beispiel #6
0
        /// <summary>
        /// Moves the mouse to a new position.
        /// </summary>
        /// <param name="newX">The new position on the x-axis.</param>
        /// <param name="newY">The new position on the y-axis.</param>
        public static void MoveTo(int newX, int newY)
        {
            var p = new Point(newX, newY);

            MoveTo(p, Interpolation.Duration(Position, p, MoveSpeed));
        }
Beispiel #7
0
 /// <summary>
 /// Moves the mouse by a given delta from the current position.
 /// </summary>
 /// <param name="delta">The delta for the x-axis.</param>
 /// <param name="speed">The speed in pixels per second.</param>
 public static void MoveBy(Vector delta, double speed)
 {
     MoveTo(Position + delta, Interpolation.Duration(delta, speed));
 }