public PointerMoveInteraction(InputDevice sourceDevice, IWebElement target, CoordinateOrigin origin, int x, int y, TimeSpan duration, PointerEventProperties properties) : base(sourceDevice) { if (target != null) { this.target = target; this.origin = CoordinateOrigin.Element; } else { if (this.origin != CoordinateOrigin.Element) { this.origin = origin; } } if (duration != TimeSpan.MinValue) { this.duration = duration; } this.x = x; this.y = y; this.eventProperties = properties; }
public WheelScrollInteraction(InputDevice sourceDevice, IWebElement target, CoordinateOrigin origin, int x, int y, int deltaX, int deltaY, TimeSpan duration) : base(sourceDevice) { if (target != null) { this.target = target; this.origin = CoordinateOrigin.Element; } else { if (this.origin != CoordinateOrigin.Element) { this.origin = origin; } } if (duration != TimeSpan.MinValue) { this.duration = duration; } this.x = x; this.y = y; this.deltaX = deltaX; this.deltaY = deltaY; }
/// <summary> /// Creates a pointer move action to an absolute coordinate. /// </summary> /// <param name="origin">The origin of coordinates for the move. Values can be relative to /// the view port origin, or the most recent pointer position.</param> /// <param name="xOffset">The horizontal offset from the origin of the move.</param> /// <param name="yOffset">The vertical offset from the origin of the move.</param> /// <param name="duration">The length of time the move gesture takes to complete.</param> /// <returns>The action representing the pointer move gesture.</returns> /// <exception cref="ArgumentException">Thrown when passing CoordinateOrigin.Element into origin. /// Users should us the other CreatePointerMove overload to move to a specific element.</exception> public Interaction CreatePointerMove(CoordinateOrigin origin, int xOffset, int yOffset, TimeSpan duration) { if (origin == CoordinateOrigin.Element) { throw new ArgumentException("Using a value of CoordinateOrigin.Element without an element is not supported.", "origin"); } return(new PointerMoveInteraction(this, null, origin, xOffset, yOffset, duration)); }
public void Initialize() { SelectedIndex = -1; DispatcherHelper.UIDispatcher.Invoke(() => Items = new HUDItemCollection()); TextBox.Initialize(); CustomFilter = new DefaultFilter(); CoordinateOrigin = new CoordinateOrigin(); RaisePropertyChanged(nameof(CoordinateOrigin)); ItemsCountPerPage = UIAssistantAPI.Instance.UIAssistantSettings.ItemsCountPerPage; }
/// <summary> /// Creates a wheel scroll action. /// </summary> /// <param name="origin">The coordinate origin, either the view port or the current pointer position, from which to begin the scroll.</param> /// <param name="xOffset">The horizontal offset from the center of the origin from which to start the scroll.</param> /// <param name="yOffset">The vertical offset from the center of the origin from which to start the scroll.</param> /// <param name="deltaX">The distance along the X axis to scroll using the wheel.</param> /// <param name="deltaY">The distance along the Y axis to scroll using the wheel.</param> /// <param name="duration">The duration of the scroll action.</param> /// <returns>The <see cref="Interaction"/> representing the wheel scroll.</returns> public Interaction CreateWheelScroll(CoordinateOrigin origin, int xOffset, int yOffset, int deltaX, int deltaY, TimeSpan duration) { return(new WheelScrollInteraction(this, null, origin, xOffset, yOffset, deltaX, deltaY, duration)); }
/// <summary> /// Creates a pointer move action to an absolute coordinate. /// </summary> /// <param name="origin">The origin of coordinates for the move. Values can be relative to /// the view port origin, or the most recent pointer position.</param> /// <param name="xOffset">The horizontal offset from the origin of the move.</param> /// <param name="yOffset">The vertical offset from the origin of the move.</param> /// <param name="duration">The length of time the move gesture takes to complete.</param> /// <param name="pointerExtraAttributes">Additional pointer attributes.</param> /// <returns>The action representing the pointer move gesture.</returns> /// <exception cref="ArgumentException">Thrown when passing CoordinateOrigin.Element into origin. /// Users should use the other CreatePointerMove overload to move to a specific element.</exception> public Interaction CreatePointerMove(CoordinateOrigin origin, int xOffset, int yOffset, TimeSpan duration, IInteractionInfo pointerExtraAttributes) { return(new ExtendedPointerInteraction(CreatePointerMove(origin, xOffset, yOffset, duration), pointerExtraAttributes)); }
/// <summary> /// Creates a pointer move action to an absolute coordinate. /// </summary> /// <param name="origin">The origin of coordinates for the move. Values can be relative to /// the view port origin, or the most recent pointer position.</param> /// <param name="xOffset">The horizontal offset from the origin of the move.</param> /// <param name="yOffset">The vertical offset from the origin of the move.</param> /// <param name="duration">The length of time the move gesture takes to complete.</param> /// <returns>The action representing the pointer move gesture.</returns> /// <exception cref="ArgumentException">Thrown when passing CoordinateOrigin.Element into origin. /// Users should us the other CreatePointerMove overload to move to a specific element.</exception> public Interaction CreatePointerMove(CoordinateOrigin origin, int xOffset, int yOffset, TimeSpan duration) { return(CreatePointerMove(origin, xOffset, yOffset, duration, new PointerEventProperties())); }