Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Click"/> class.
 /// </summary>
 /// <param name="x">The x.</param>
 /// <param name="y">The y.</param>
 /// <param name="button">The button.</param>
 /// <param name="movement">The movement.</param>
 /// <param name="delay">The delay.</param>
 /// <param name="repetitions">The repetitions.</param>
 /// <param name="speed">The speed.</param>
 /// <param name="shift">if set to <c>true</c> [shift].</param>
 /// <param name="ctrl">if set to <c>true</c> [control].</param>
 /// <param name="alt">if set to <c>true</c> [alt].</param>
 public Click(int x = 0, int y = 0, ButtonType button = ButtonType.LEFT, MovementType?movement = null,
              DecimalTuple delay = null, DecimalTuple repetitions = null, DecimalTuple speed = null,
              bool shift         = false, bool ctrl = false, bool alt = false
              ) : this(new DecimalTuple(x), new DecimalTuple(y), button, movement,
                       delay, repetitions, speed, shift, ctrl, alt)
 {
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Hover"/> class.
 /// </summary>
 /// <param name="x">The x.</param>
 /// <param name="y">The y.</param>
 /// <param name="movement">The movement.</param>
 /// <param name="delay">The delay.</param>
 /// <param name="repetitions">The repetitions.</param>
 /// <param name="speed">The speed.</param>
 /// <param name="shift">if set to <c>true</c> [shift].</param>
 /// <param name="ctrl">if set to <c>true</c> [control].</param>
 /// <param name="alt">if set to <c>true</c> [alt].</param>
 public Hover(int x, int y, MovementType?movement = null,
              DecimalTuple delay = null, DecimalTuple repetitions = null, DecimalTuple speed = null,
              bool shift         = false, bool ctrl = false, bool alt = false
              ) : this(new DecimalTuple(x), new DecimalTuple(y), movement,
                       delay, repetitions, speed, shift, ctrl, alt)
 {
 }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Click"/> class.
 /// </summary>
 /// <param name="x">The x.</param>
 /// <param name="y">The y.</param>
 /// <param name="button">The button.</param>
 /// <param name="movement">The movement.</param>
 /// <param name="delay">The delay.</param>
 /// <param name="repetitions">The repetitions.</param>
 /// <param name="speed">The speed.</param>
 /// <param name="shift">if set to <c>true</c> [shift].</param>
 /// <param name="ctrl">if set to <c>true</c> [control].</param>
 /// <param name="alt">if set to <c>true</c> [alt].</param>
 public Click(DecimalTuple x, DecimalTuple y, ButtonType button = ButtonType.LEFT, MovementType?movement = null,
              DecimalTuple delay = null, DecimalTuple repetitions = null, DecimalTuple speed = null,
              bool shift         = false, bool ctrl = false, bool alt = false
              ) : base(x, y, movement, delay, repetitions, speed, shift, ctrl, alt)
 {
     ButtonType = button;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Drag"/> class.
 /// </summary>
 /// <param name="x">The x.</param>
 /// <param name="y">The y.</param>
 /// <param name="endX">The end x.</param>
 /// <param name="endY">The end y.</param>
 /// <param name="button">The button.</param>
 /// <param name="movement">The movement.</param>
 /// <param name="delay">The delay.</param>
 /// <param name="repetitions">The repetitions.</param>
 /// <param name="speed">The speed.</param>
 /// <param name="shift">if set to <c>true</c> [shift].</param>
 /// <param name="ctrl">if set to <c>true</c> [control].</param>
 /// <param name="alt">if set to <c>true</c> [alt].</param>
 public Drag(DecimalTuple x, DecimalTuple y, DecimalTuple endX, DecimalTuple endY, ButtonType button = ButtonType.LEFT, MovementType?movement = null,
             DecimalTuple delay = null, DecimalTuple repetitions = null, DecimalTuple speed = null,
             bool shift         = false, bool ctrl = false, bool alt = false
             ) : base(x, y, button, movement, delay, repetitions, speed, shift, ctrl, alt)
 {
     EndX = endX;
     EndY = endY;
 }
Exemplo n.º 5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Hover"/> class.
        /// </summary>
        /// <param name="x">The x.</param>
        /// <param name="y">The y.</param>
        /// <param name="movement">The movement.</param>
        /// <param name="delay">The delay.</param>
        /// <param name="repetitions">The repetitions.</param>
        /// <param name="speed">The speed.</param>
        /// <param name="shift">if set to <c>true</c> [shift].</param>
        /// <param name="ctrl">if set to <c>true</c> [control].</param>
        /// <param name="alt">if set to <c>true</c> [alt].</param>
        public Hover(DecimalTuple x     = null, DecimalTuple y = null, MovementType?movement        = null,
                     DecimalTuple delay = null, DecimalTuple repetitions = null, DecimalTuple speed = null,
                     bool shift         = false, bool ctrl = false, bool alt = false
                     ) : base(delay, repetitions, speed, shift, ctrl, alt)
        {
            X = x;
            Y = y;

            MovementType = movement;
        }
Exemplo n.º 6
0
 /// <summary>
 /// Randomizes the position.
 /// </summary>
 /// <param name="x">The x.</param>
 /// <param name="y">The y.</param>
 internal void RandomizePosition(DecimalTuple x, DecimalTuple y)
 {
     if (x == null || y == null)
     {
         RandomizedPosition = Cursor.Vector;
     }
     else
     {
         RandomizedPosition = new Vector(x.Get(GlobalData.RandomX), y.Get(GlobalData.RandomY));
     }
 }
Exemplo n.º 7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Hover"/> class.
 /// </summary>
 /// <param name="x">The x.</param>
 /// <param name="y">The y.</param>
 /// <param name="movement">The movement.</param>
 /// <param name="instruction">The instruction.</param>
 public Hover(Instruction instruction, DecimalTuple x = null, DecimalTuple y = null, MovementType?movement = null)
     : this(x, y, movement, instruction.Delay(), instruction.Repetitions, instruction.Speed(), instruction.Shift, instruction.Ctrl, instruction.Alt)
 {
 }
Exemplo n.º 8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Text"/> class.
 /// </summary>
 /// <param name="input">The input.</param>
 /// <param name="delay">The delay.</param>
 /// <param name="repetitions">The repetitions.</param>
 /// <param name="speed">The speed.</param>
 /// <param name="ctrl">if set to <c>true</c> [control].</param>
 /// <param name="alt">if set to <c>true</c> [alt].</param>
 public Text(string input = "", DecimalTuple delay = null, DecimalTuple repetitions = null, DecimalTuple speed = null,
             bool ctrl    = false, bool alt        = false
             ) : base(delay, repetitions, speed, false, ctrl, alt)
 {
     Input = input;
 }
Exemplo n.º 9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Click"/> class.
 /// </summary>
 /// <param name="x">The x.</param>
 /// <param name="y">The y.</param>
 /// <param name="button">The button.</param>
 /// <param name="movement">The movement.</param>
 /// <param name="instruction">The instruction.</param>
 public Click(Instruction instruction, DecimalTuple x = null, DecimalTuple y = null, ButtonType button = ButtonType.LEFT, MovementType?movement = null
              ) : this(x, y, button, movement, instruction.Delay(), instruction.Repetitions, instruction.Speed(), instruction.Shift, instruction.Ctrl, instruction.Alt)
 {
 }
Exemplo n.º 10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Wait"/> class.
 /// </summary>
 /// <param name="delay">The delay.</param>
 /// <param name="repetitions">The repetitions.</param>
 public Wait(DecimalTuple delay = null, DecimalTuple repetitions = null) : base(delay, repetitions)
 {
 }
Exemplo n.º 11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Keystroke"/> class.
 /// </summary>
 /// <param name="key">The key.</param>
 /// <param name="delay">The delay.</param>
 /// <param name="repetitions">The repetitions.</param>
 /// <param name="speed">The speed.</param>
 /// <param name="shift">if set to <c>true</c> [shift].</param>
 /// <param name="ctrl">if set to <c>true</c> [control].</param>
 /// <param name="alt">if set to <c>true</c> [alt].</param>
 public Keystroke(VirtualKeyCode key=VirtualKeyCode.SPACE, DecimalTuple delay = null, DecimalTuple repetitions = null, DecimalTuple speed = null,
     bool shift = false, bool ctrl = false, bool alt = false
     ) : base(delay, repetitions, speed, shift, ctrl, alt)
 {
     Key = key;
 }
Exemplo n.º 12
0
 public void Delay(DecimalTuple delay)
 {
     _delay = delay;
 }