public TextPatternRange RangeFromPoint(PointI screenLocation) { var num = (int)ActionHandler.Invoke(sender: UIObject, actionInfo: ActionEventArgs.GetDefault(action: "WaitForReady")); object overridden; return(ActionHandler.Invoke(sender: UIObject, actionInfo: new ActionEventArgs(action: nameof(RangeFromPoint), screenLocation), overridden: out overridden) == ActionResult.Handled ? (TextPatternRange)overridden : Pattern.RangeFromPoint(screenLocation: new Point(x: screenLocation.X, y: screenLocation.Y))); }
public int[] GetSupportedViews() { var num = (int)ActionHandler.Invoke(sender: UIObject, actionInfo: ActionEventArgs.GetDefault(action: "WaitForReady")); object overridden; return(ActionHandler.Invoke(sender: UIObject, actionInfo: new ActionEventArgs(action: nameof(GetSupportedViews), args: Array.Empty <object>()), overridden: out overridden) == ActionResult.Handled ? (int[])overridden : Pattern.Current.GetSupportedViews()); }
private void OnAction() { if (ActionHandler != null) { ActionHandler.Invoke(); } }
public I GetCell(int row, int column) { var num = (int)ActionHandler.Invoke(sender: UIObject, actionInfo: ActionEventArgs.GetDefault(action: "WaitForReady")); object overridden; return(ActionHandler.Invoke(sender: UIObject, actionInfo: new ActionEventArgs(action: nameof(GetCell), row, (object)column), overridden: out overridden) == ActionResult.Handled ? this._itemFactory.Create(element: (UIObject)overridden) : this._itemFactory.Create(element: new UIObject(element: Pattern.GetItem(row: row, column: column)))); }
public string GetViewName(int viewId) { var num = (int)ActionHandler.Invoke(sender: UIObject, actionInfo: ActionEventArgs.GetDefault(action: "WaitForReady")); object overridden; return(ActionHandler.Invoke(sender: UIObject, actionInfo: new ActionEventArgs(action: nameof(GetViewName), viewId), overridden: out overridden) == ActionResult.Handled ? (string)overridden : Pattern.GetViewName(viewId: viewId)); }
public override void OnEndDrag(PointerEventData eventData) { base.OnEndDrag(eventData); if (OnMouseDragEnd != null) { OnMouseDragEnd.Invoke(eventData); } }
public override void OnDrag(PointerEventData eventData) { base.OnPointerDown(eventData); if (OnMouseDrag != null) { OnMouseDrag.Invoke(eventData); } }
public override void OnPointerUp(PointerEventData eventData) { base.OnPointerUp(eventData); if (OnMouseUp != null) { OnMouseUp.Invoke(eventData); } }
public override void OnPointerExit(PointerEventData eventData) { base.OnPointerExit(eventData); if (OnMouseExit != null) { OnMouseExit.Invoke(eventData); } }
public TextPatternRange RangeFromChild(UIObject childElement) { Validate.ArgumentNotNull(parameter: childElement, parameterName: nameof(childElement)); var num = (int)ActionHandler.Invoke(sender: UIObject, actionInfo: ActionEventArgs.GetDefault(action: "WaitForReady")); object overridden; return(ActionHandler.Invoke(sender: UIObject, actionInfo: new ActionEventArgs(action: nameof(RangeFromChild), childElement), overridden: out overridden) == ActionResult.Handled ? (TextPatternRange)overridden : Pattern.RangeFromChild(childElement: childElement.AutomationElement)); }
public override void OnPointerEnter(PointerEventData eventData) { base.OnPointerEnter(eventData); if (OnHover != null) { OnHover.Invoke(eventData); } }
public void TurnOff() { var num = (int)ActionHandler.Invoke(sender: this, actionInfo: ActionEventArgs.GetDefault(action: "WaitForReady")); if (ActionHandler.Invoke(sender: this, actionInfo: ActionEventArgs.GetDefault(action: "Toggle")) != ActionResult.Handled && !SetToggleState(toggleState: ToggleState.Off)) { throw new ActionException(message: StringResource.Get(id: "ToggleSwitch_TurnOffFailed", (object)SafeGetName(uiObject: this))); } }
public void SetValue(double value) { var num1 = (int)ActionHandler.Invoke(sender: UIObject, actionInfo: ActionEventArgs.GetDefault(action: "WaitForReady")); if (ActionHandler.Invoke(sender: UIObject, actionInfo: new ActionEventArgs(action: "RangeSetValue", value)) == ActionResult.Unhandled) { Pattern.SetValue(value: value); } var num2 = (int)ActionHandler.Invoke(sender: UIObject, actionInfo: ActionEventArgs.GetDefault(action: "UIScrollComplete")); }
public void ScrollIntoView() { var num = (int)ActionHandler.Invoke(sender: UIObject, actionInfo: ActionEventArgs.GetDefault(action: "WaitForReady")); if (ActionHandler.Invoke(sender: UIObject, actionInfo: new ActionEventArgs(action: nameof(ScrollIntoView), args: Array.Empty <object>())) != ActionResult.Unhandled) { return; } Pattern.ScrollIntoView(); }
public void SetCurrentView(int viewId) { var num1 = (int)ActionHandler.Invoke(sender: UIObject, actionInfo: ActionEventArgs.GetDefault(action: "WaitForReady")); if (ActionHandler.Invoke(sender: UIObject, actionInfo: new ActionEventArgs(action: nameof(SetCurrentView), viewId)) == ActionResult.Unhandled) { Pattern.SetCurrentView(viewId: viewId); } var num2 = (int)ActionHandler.Invoke(sender: UIObject, actionInfo: ActionEventArgs.GetDefault(action: "UIScrollComplete")); }
public void ScrollVertical(ScrollAmount amount) { var num1 = (int)ActionHandler.Invoke(sender: UIObject, actionInfo: ActionEventArgs.GetDefault(action: "WaitForReady")); if (ActionHandler.Invoke(sender: UIObject, actionInfo: new ActionEventArgs(action: nameof(ScrollVertical), amount)) == ActionResult.Unhandled) { Pattern.ScrollVertical(amount: amount); } var num2 = (int)ActionHandler.Invoke(sender: UIObject, actionInfo: ActionEventArgs.GetDefault(action: "UIScrollComplete")); }
public void SetScrollPercent(double horizontalPercent, double verticalPercent) { var num1 = (int)ActionHandler.Invoke(sender: UIObject, actionInfo: ActionEventArgs.GetDefault(action: "WaitForReady")); if (ActionHandler.Invoke(sender: UIObject, actionInfo: new ActionEventArgs(action: nameof(SetScrollPercent), horizontalPercent, (object)verticalPercent)) == ActionResult.Unhandled) { Pattern.SetScrollPercent(horizontalPercent: horizontalPercent, verticalPercent: verticalPercent); } var num2 = (int)ActionHandler.Invoke(sender: UIObject, actionInfo: ActionEventArgs.GetDefault(action: "UIScrollComplete")); }
public void WaitForInputIdle(int milliseconds) { var num = (int)ActionHandler.Invoke(sender: UIObject, actionInfo: ActionEventArgs.GetDefault(action: "WaitForReady")); if (ActionHandler.Invoke(sender: UIObject, actionInfo: new ActionEventArgs(action: nameof(WaitForInputIdle), milliseconds)) != ActionResult.Unhandled) { return; } Pattern.WaitForInputIdle(milliseconds: milliseconds); }
public void Rotate(double degrees) { var num1 = (int)ActionHandler.Invoke(sender: UIObject, actionInfo: ActionEventArgs.GetDefault(action: "WaitForReady")); var num2 = (int)ActionHandler.Invoke(sender: UIObject, actionInfo: ActionEventArgs.GetDefault(action: "MakeVisible")); if (ActionHandler.Invoke(sender: UIObject, actionInfo: new ActionEventArgs(action: nameof(Rotate), degrees)) != ActionResult.Unhandled) { return; } Pattern.Rotate(degrees: degrees); }
public void SetDockPosition(DockPosition position) { var num1 = (int)ActionHandler.Invoke(sender: UIObject, actionInfo: ActionEventArgs.GetDefault(action: "WaitForReady")); var num2 = (int)ActionHandler.Invoke(sender: UIObject, actionInfo: ActionEventArgs.GetDefault(action: "MakeVisible")); if (ActionHandler.Invoke(sender: UIObject, actionInfo: new ActionEventArgs(action: nameof(SetDockPosition), position)) == ActionResult.Unhandled) { Pattern.SetDockPosition(dockPosition: position); } var num3 = (int)ActionHandler.Invoke(sender: UIObject, actionInfo: ActionEventArgs.GetDefault(action: "UIScrollComplete")); }
public void Resize(double width, double height) { var num1 = (int)ActionHandler.Invoke(sender: UIObject, actionInfo: ActionEventArgs.GetDefault(action: "WaitForReady")); var num2 = (int)ActionHandler.Invoke(sender: UIObject, actionInfo: ActionEventArgs.GetDefault(action: "MakeVisible")); if (ActionHandler.Invoke(sender: UIObject, actionInfo: new ActionEventArgs(action: nameof(Resize), width, (object)height)) != ActionResult.Unhandled) { return; } Pattern.Resize(width: width, height: height); }
public void SetWindowVisualState(WindowVisualState state) { var num1 = (int)ActionHandler.Invoke(sender: UIObject, actionInfo: ActionEventArgs.GetDefault(action: "WaitForReady")); var num2 = (int)ActionHandler.Invoke(sender: UIObject, actionInfo: ActionEventArgs.GetDefault(action: "MakeVisible")); if (ActionHandler.Invoke(sender: UIObject, actionInfo: new ActionEventArgs(action: nameof(SetWindowVisualState), state)) != ActionResult.Unhandled) { return; } Pattern.SetWindowVisualState(state: state); }
public void Move(double x, double y) { var num1 = (int)ActionHandler.Invoke(sender: UIObject, actionInfo: ActionEventArgs.GetDefault(action: "WaitForReady")); var num2 = (int)ActionHandler.Invoke(sender: UIObject, actionInfo: ActionEventArgs.GetDefault(action: "MakeVisible")); if (ActionHandler.Invoke(sender: UIObject, actionInfo: new ActionEventArgs(action: nameof(Move), x, (object)y)) != ActionResult.Unhandled) { return; } Pattern.Move(x: x, y: y); }
public void Toggle() { var num1 = (int)ActionHandler.Invoke(sender: UIObject, actionInfo: ActionEventArgs.GetDefault(action: "WaitForReady")); var num2 = (int)ActionHandler.Invoke(sender: UIObject, actionInfo: ActionEventArgs.GetDefault(action: "MakeVisible")); if (ActionHandler.Invoke(sender: UIObject, actionInfo: ActionEventArgs.GetDefault(action: nameof(Toggle))) != ActionResult.Unhandled) { return; } Pattern.Toggle(); }
public void Invoke() { var num1 = (int)ActionHandler.Invoke(sender: UIObject, actionInfo: ActionEventArgs.GetDefault(action: "WaitForReady")); var num2 = (int)ActionHandler.Invoke(sender: UIObject, actionInfo: ActionEventArgs.GetDefault(action: "MakeVisible")); if (ActionHandler.Invoke(sender: UIObject, actionInfo: new ActionEventArgs(action: nameof(Invoke), args: Array.Empty <object>())) != ActionResult.Unhandled) { return; } Pattern.Invoke(); }
public void SetValue(string value) { Validate.ArgumentNotNull(parameter: value, parameterName: nameof(value)); var num1 = (int)ActionHandler.Invoke(sender: UIObject, actionInfo: ActionEventArgs.GetDefault(action: "WaitForReady")); var num2 = (int)ActionHandler.Invoke(sender: UIObject, actionInfo: ActionEventArgs.GetDefault(action: "MakeVisible")); if (ActionHandler.Invoke(sender: UIObject, actionInfo: new ActionEventArgs(action: nameof(SetValue), value)) == ActionResult.Unhandled) { Pattern.SetValue(value: value); } var num3 = (int)ActionHandler.Invoke(sender: UIObject, actionInfo: ActionEventArgs.GetDefault(action: "UIScrollComplete")); }
public TextPatternRange GetVisibleRange() { var num = (int)ActionHandler.Invoke(sender: UIObject, actionInfo: ActionEventArgs.GetDefault(action: "WaitForReady")); object overridden; if (ActionHandler.Invoke(sender: UIObject, actionInfo: ActionEventArgs.GetDefault(action: nameof(GetVisibleRange)), overridden: out overridden) == ActionResult.Handled) { return((TextPatternRange)overridden); } var visibleRanges = Pattern.GetVisibleRanges(); return(visibleRanges != null && visibleRanges.Length != 0 ? visibleRanges[0] : null); }
public TextPatternRange GetSelection() { var num = (int)ActionHandler.Invoke(sender: UIObject, actionInfo: ActionEventArgs.GetDefault(action: "WaitForReady")); object overridden; if (ActionHandler.Invoke(sender: UIObject, actionInfo: ActionEventArgs.GetDefault(action: nameof(GetSelection)), overridden: out overridden) == ActionResult.Handled) { return((TextPatternRange)overridden); } var selection = Pattern.GetSelection(); return(selection != null && selection.Length != 0 ? selection[0] : null); }
public UIObject FindItemByProperty( UIObject uiObject, UIProperty uiProperty, object value) { Validate.ArgumentNotNull(parameter: uiProperty, parameterName: nameof(uiProperty)); if (value != null && uiProperty == UIProperty.Get(property: AutomationElement.SearchVirtualItemsProperty)) { throw new ArgumentException(message: StringResource.Get(id: "FindItemByProperty_ArgumentException")); } var num = (int)ActionHandler.Invoke(sender: UIObject, actionInfo: ActionEventArgs.GetDefault(action: "WaitForReady")); var element = uiObject == (UIObject)null ? Pattern.FindItemByProperty(element: null, property: uiProperty.Property, value: value) : Pattern.FindItemByProperty(element: uiObject.AutomationElement, property: uiProperty.Property, value: value); return(!(element == null) ? new UIObject(element: element) : null); }
private bool recurringConverse(ConverseResponse prevResponse) { bool doOneMoreStep = false; T tempContext = default(T); switch (prevResponse.typeCode) { case ConverseResponse.Types.merge: tempContext = _merge.Invoke(conversationId, context, prevResponse.entities, prevResponse.confidence); doOneMoreStep = true; break; case ConverseResponse.Types.msg: _say.Invoke(conversationId, context, prevResponse.msg, prevResponse.confidence); doOneMoreStep = true; break; case ConverseResponse.Types.action: tempContext = _action.Invoke(conversationId, context, prevResponse.action, prevResponse.entities, prevResponse.confidence); doOneMoreStep = true; break; case ConverseResponse.Types.stop: tempContext = _stop.Invoke(conversationId, context); doOneMoreStep = false; break; default: break; } if (tempContext != null) { context = tempContext; } if (doOneMoreStep) { ConverseResponse response = client.Converse(conversationId, null, context); return(recurringConverse(response)); } return(true); }