public void DoubleClick(PointerButtons button, double offsetX, double offsetY) { var num1 = (int)ActionHandler.Invoke(sender: this, actionInfo: ActionEventArgs.GetDefault(action: "WaitForReady")); var num2 = (int)ActionHandler.Invoke(sender: this, actionInfo: ActionEventArgs.GetDefault(action: "MakeVisible")); DoubleClickImplementation(button: button, offsetX: offsetX, offsetY: offsetY); }
public virtual void Release(PointerButtons button) { var inputList = Up(button: button, modifierKeys: ModifierKeys.None); inputList.Add(item: Input.CreateWait(duration: 100)); this.inputQueue.Process(inputDevice: this.inputDevice, inputList: inputList); }
public static void ClickDrag( UIObject targetObject, UIObject destinationObject, PointerButtons button) { Move(uiObject: targetObject); ClickDrag(endPoint: destinationObject.GetClickablePoint(), button: button, dragDuration: DefaultDragDuration); }
public void DoubleClick(PointerButtons button) { var num1 = (int)ActionHandler.Invoke(sender: this, actionInfo: ActionEventArgs.GetDefault(action: "WaitForReady")); var num2 = (int)ActionHandler.Invoke(sender: this, actionInfo: ActionEventArgs.GetDefault(action: "MakeVisible")); var fromUpperLeftCorner = ComputeOffsetFromUpperLeftCorner(); DoubleClickImplementation(button: button, offsetX: fromUpperLeftCorner.X, offsetY: fromUpperLeftCorner.Y); }
static void ClickImplementation( UIObject uiObject, PointerButtons button, uint numClicks) { Move(uiObject: uiObject); Click(button: button, count: (int)numClicks); }
public static void DoubleClick( UIObject uiObject, PointerButtons button, double offsetX, double offsetY) { ClickImplementation(uiObject: uiObject, button: button, numClicks: 2U, offsetX: offsetX, offsetY: offsetY); }
protected void DoubleClickImplementation(PointerButtons button, double offsetX, double offsetY) { if (ActionHandler.Invoke(sender: this, actionInfo: new ActionEventArgs(action: "DoubleClick", button, (object)offsetX, (object)offsetY)) != ActionResult.Unhandled) { return; } MovePointer(offsetX: offsetX, offsetY: offsetY); PointerInput.Click(button: button, count: 2); }
IList <IInputAction> Up( PointerButtons button, ModifierKeys modifierKeys) { var inputActionList = new List <IInputAction>(); inputActionList.Add(item: Input.CreateMouseUpInput(button: button, swapped: GetMouseButtonsSwapped())); inputActionList.AddRange(collection: Input.CreateKeyModifierInputs(modifierKeys: modifierKeys, press: false, duration: Keyboard.SendKeysDelay)); return(inputActionList); }
static void ClickImplementation( UIObject uiObject, PointerButtons button, uint numClicks, double offsetX, double offsetY) { Move(uiObject: uiObject, offsetX: offsetX, offsetY: offsetY); Click(button: button, count: (int)numClicks); }
public void ClickDrag(PointI endPoint, PointerButtons button, uint dragDuration) { var inputActionList = new List <IInputAction>(); inputActionList.AddRange(collection: Down(button: button, modifierKeys: ModifierKeys.None)); inputActionList.Add(item: Input.CreateWait(duration: (int)dragDuration)); inputActionList.Add(item: Input.CreateMouseMoveInput(absoluteX: endPoint.X, absoluteY: endPoint.Y)); inputActionList.AddRange(collection: Up(button: button, modifierKeys: ModifierKeys.None)); inputActionList.Add(item: Input.CreateWait(duration: 0)); this.inputQueue.Process(inputDevice: this.inputDevice, inputList: inputActionList); this._location = endPoint; }
public void ClickDrag(PointerButtons button, UIObject uiObject) { Validate.ArgumentNotNull(parameter: uiObject, parameterName: nameof(uiObject)); var num1 = (int)ActionHandler.Invoke(sender: this, actionInfo: ActionEventArgs.GetDefault(action: "WaitForReady")); var num2 = (int)ActionHandler.Invoke(sender: this, actionInfo: ActionEventArgs.GetDefault(action: "MakeVisible")); if (ActionHandler.Invoke(sender: this, actionInfo: new ActionEventArgs(action: nameof(ClickDrag), button, (object)uiObject)) != ActionResult.Unhandled) { return; } PointerInput.ClickDrag(targetObject: this, destinationObject: uiObject, button: button); }
internal static IInputAction CreateMouseUpInput(PointerButtons button, bool swapped) { var physicalButton = DeterminePhysicalButton(button: button, swapped: swapped); var mouseInputAction = new MouseInputAction(); mouseInputAction.mouseInput.flags = MouseButtonsToMouseInputs(physicalButton: physicalButton, isMouseFlagsDown: false); if ((button & PointerButtons.XButton1) != PointerButtons.None) { mouseInputAction.mouseInput.mouseData |= 1U; } if ((button & PointerButtons.XButton2) != PointerButtons.None) { mouseInputAction.mouseInput.mouseData |= 2U; } return(mouseInputAction); }
static RIMNativeMethods.MOUSE_EVENT_FLAGS MouseButtonsToMouseInputs( PointerButtons physicalButton, bool isMouseFlagsDown) { var mouseEventFlags = RIMNativeMethods.MOUSE_EVENT_FLAGS.NONE; if (isMouseFlagsDown) { if ((physicalButton & PointerButtons.PhysicalLeft) != PointerButtons.None) { mouseEventFlags |= RIMNativeMethods.MOUSE_EVENT_FLAGS.LEFTDOWN; } if ((physicalButton & PointerButtons.PhysicalRight) != PointerButtons.None) { mouseEventFlags |= RIMNativeMethods.MOUSE_EVENT_FLAGS.RIGHTDOWN; } if ((physicalButton & PointerButtons.Middle) != PointerButtons.None) { mouseEventFlags |= RIMNativeMethods.MOUSE_EVENT_FLAGS.MIDDLEDOWN; } if ((physicalButton & PointerButtons.XButton1) != PointerButtons.None || (physicalButton & PointerButtons.XButton2) != PointerButtons.None) { mouseEventFlags |= RIMNativeMethods.MOUSE_EVENT_FLAGS.XDOWN; } } else { if ((physicalButton & PointerButtons.PhysicalLeft) != PointerButtons.None) { mouseEventFlags |= RIMNativeMethods.MOUSE_EVENT_FLAGS.LEFTUP; } if ((physicalButton & PointerButtons.PhysicalRight) != PointerButtons.None) { mouseEventFlags |= RIMNativeMethods.MOUSE_EVENT_FLAGS.RIGHTUP; } if ((physicalButton & PointerButtons.Middle) != PointerButtons.None) { mouseEventFlags |= RIMNativeMethods.MOUSE_EVENT_FLAGS.MIDDLEUP; } if ((physicalButton & PointerButtons.XButton1) != PointerButtons.None || (physicalButton & PointerButtons.XButton2) != PointerButtons.None) { mouseEventFlags |= RIMNativeMethods.MOUSE_EVENT_FLAGS.XUP; } } return(mouseEventFlags != RIMNativeMethods.MOUSE_EVENT_FLAGS.NONE ? mouseEventFlags : throw new ArgumentException(message: StringResource.Get(id: "InvalidMouseButtonEnum"), paramName: "mouseInputs")); }
static PointerButtons DeterminePhysicalButton( PointerButtons button, bool swapped) { if ((button & PointerButtons.Primary) != PointerButtons.None) { button &= ~PointerButtons.Primary; button = swapped ? button | PointerButtons.PhysicalRight : button | PointerButtons.PhysicalLeft; } if ((button & PointerButtons.Secondary) != PointerButtons.None) { button &= ~PointerButtons.Secondary; button = swapped ? button | PointerButtons.PhysicalLeft : button | PointerButtons.PhysicalRight; } return(button); }
public virtual void Click(PointerButtons button, int count) { if (0 >= count) { throw new ArgumentOutOfRangeException(paramName: nameof(count), actualValue: count, message: "count should be a positive value"); } var location = Location; var inputActionList = new List <IInputAction>(); inputActionList.AddRange(collection: Input.PreventAccidentalDoubleClick(x: location.X, y: location.Y, previousRuntimeId: ref this._previousRuntimeId)); for (var index = 0; index < count; ++index) { if (index > 0) { inputActionList.Add(item: Input.CreateWait(duration: (int)InputManager.DefaultTapDelta)); } inputActionList.AddRange(collection: Down(button: button, modifierKeys: ModifierKeys.None)); inputActionList.Add(item: Input.CreateWait(duration: (int)InputManager.DefaultPressDuration)); inputActionList.AddRange(collection: Up(button: button, modifierKeys: ModifierKeys.None)); } inputActionList.Add(item: Input.CreateWait(duration: 100)); this.inputQueue.Process(inputDevice: this.inputDevice, inputList: inputActionList); }
public static void DoubleClick(UIObject uiObject, PointerButtons button) { ClickImplementation(uiObject: uiObject, button: button, numClicks: 2U); }
public static void Release(PointerButtons button) { Current.Release(button: button); }
public static void Press(PointerButtons button) { Current.Press(button: button); }
public static void ClickDrag(PointI endPoint, PointerButtons button, uint dragDuration) { Current.ClickDrag(endPoint: endPoint, button: button, dragDuration: dragDuration); }
public static void Click(PointerButtons button, int count) { Current.Click(button: button, count: count); }
public void Click(PointerButtons button, int count) { this._inputManager.InjectPress(point: Location, holdDuration: InputManager.DefaultPressDuration, tapCount: (uint)count, tapDelta: InputManager.DefaultTapDelta, packetDelta: InputManager.DefaultPacketDelta); }
public void Release(PointerButtons button) { this._inputManager.InjectDynamicRelease(touchPoint: Location, contactId: this.DefaultContactId); }
public void ClickDrag(PointI endPoint, PointerButtons button, uint dragDuration) { PressAndDrag(endPoint: endPoint, dragDuration: dragDuration); }