public AutomationElement FindFirst(TreeScope scope, Condition condition) { Validate.ArgumentNotNull(parameter: condition, parameterName: nameof(condition)); var firstBuildCache = IUIAutomationElement.FindFirstBuildCache(scope: UiaConvert.Convert(treeScope: scope), condition: condition.IUIAutomationCondition, cacheRequest: DefaultCacheRequest.IUIAutomationCacheRequest); return(firstBuildCache != null ? new AutomationElement(autoElement: firstBuildCache) : null); }
public AutomationElementCollection FindAll( TreeScope scope, Condition condition) { Validate.ArgumentNotNull(parameter: condition, parameterName: nameof(condition)); var allBuildCache = IUIAutomationElement.FindAllBuildCache(scope: UiaConvert.Convert(treeScope: scope), condition: condition.IUIAutomationCondition, cacheRequest: DefaultCacheRequest.IUIAutomationCacheRequest); return(allBuildCache != null ? new AutomationElementCollection(elementArray: allBuildCache) : null); }
internal static void Add( AutomationElement element, TreeScope scope, StructureChangedEventHandler handlingDelegate) { var e = new StructureChangedEventHandlerImpl(uiAutomationElement: element.IUIAutomationElement, handlingDelegate: handlingDelegate); var cacheRequest = AutomationElement.DefaultCacheRequest.IUIAutomationCacheRequest; Boundary.UIAutomation(a: () => Automation.AutomationClass.AddStructureChangedEventHandler(element: e._uiAutomationElement, scope: UiaConvert.Convert(treeScope: scope), cacheRequest: cacheRequest, handler: e)); Add(instance: e); }
void IUIAutomationStructureChangedEventHandler.HandleStructureChangedEvent( IUIAutomationElement sender, UIAutomationClient.StructureChangeType changeType, int[] runtimeId) { AutomationElement automationElement = null; if (sender != null) { automationElement = new AutomationElement(autoElement: sender); } this._handlingDelegate(sender: automationElement, e: new StructureChangedEventArgs(structureChangeType: UiaConvert.Convert(structureChangeType: changeType), runtimeId: runtimeId)); }
public void ScrollVertical(ScrollAmount amount) { this._scrollPattern.Scroll(horizontalAmount: UiaConvert.Convert(scrollAmount: ScrollAmount.NoAmount), verticalAmount: UiaConvert.Convert(scrollAmount: amount)); }
public void Scroll(ScrollAmount horizontalAmount, ScrollAmount verticalAmount) { this._scrollPattern.Scroll(horizontalAmount: UiaConvert.Convert(scrollAmount: horizontalAmount), verticalAmount: UiaConvert.Convert(scrollAmount: verticalAmount)); }
public void SetDockPosition(DockPosition dockPosition) { this._dockPattern.SetDockPosition(dockPos: UiaConvert.Convert(position: dockPosition)); }
public void SetWindowVisualState(WindowVisualState state) { this._windowPattern.SetWindowVisualState(state: UiaConvert.Convert(state: state)); }
internal static void Add( AutomationElement element, TreeScope scope, AutomationPropertyChangedEventHandler handlingDelegate, AutomationProperty[] properties) { var e = new AutomationPropertyChangedEventHandlerImpl(uiAutomationElement: element.IUIAutomationElement, handlingDelegate: handlingDelegate); var cacheRequest = AutomationElement.DefaultCacheRequest.IUIAutomationCacheRequest; var propertiesArray = properties.Select(selector: p => p.Id).ToArray(); Boundary.UIAutomation(a: () => Automation.AutomationClass.AddPropertyChangedEventHandler(element: e._uiAutomationElement, scope: UiaConvert.Convert(treeScope: scope), cacheRequest: cacheRequest, handler: e, propertyArray: propertiesArray)); Add(instance: e); }