internal static void Add(
            AutomationFocusChangedEventHandler handlingDelegate)
        {
            var e            = new AutomationFocusChangedEventHandlerImpl(handlingDelegate: handlingDelegate);
            var cacheRequest = AutomationElement.DefaultCacheRequest.IUIAutomationCacheRequest;

            Boundary.UIAutomation(a: () => Automation.AutomationClass.AddFocusChangedEventHandler(cacheRequest: cacheRequest, handler: e));
            Add(instance: e);
        }
        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);
        }
        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);
        }
Ejemplo n.º 4
0
 public static string PatternName(AutomationPattern pattern)
 {
     return(Boundary.UIAutomation(f: () => AutomationClass.GetPatternProgrammaticName(pattern: pattern.Id)));
 }
Ejemplo n.º 5
0
 public static string PropertyName(AutomationProperty property)
 {
     return(Boundary.UIAutomation(f: () => AutomationClass.GetPropertyProgrammaticName(property: property.Id)));
 }
Ejemplo n.º 6
0
 public static bool Compare(int[] runtimeId1, int[] runtimeId2)
 {
     return(Convert.ToBoolean(value: Boundary.UIAutomation(f: () => AutomationClass.CompareRuntimeIds(runtimeId1: runtimeId1, runtimeId2: runtimeId2))));
 }
Ejemplo n.º 7
0
 public static bool Compare(AutomationElement el1, AutomationElement el2)
 {
     return(Convert.ToBoolean(value: Boundary.UIAutomation(f: () => AutomationClass.CompareElements(el1: el1.IUIAutomationElement, el2: el2.IUIAutomationElement))));
 }