public void HandlePropertyChangedEvent(UIA.IUIAutomationElement sender, int propertyId, object newValue) { var senderElement = new Element(Automation, sender); var property = PropertyId.Find(AutomationType.UIA3, propertyId); _callAction(senderElement, property, newValue); }
public override PropertyId[] GetSupportedProperties() { int[] rawIds; string[] rawPatternNames; Automation.NativeAutomation.PollForPotentialSupportedProperties(NativeElement, out rawIds, out rawPatternNames); return(rawIds.Select(id => PropertyId.Find(Automation.AutomationType, id)).ToArray()); }
public void HandlePropertyChangedEvent(UIA.IUIAutomationElement sender, int propertyId, object newValue) { var basicAutomationElement = new UIA3BasicAutomationElement((UIA3Automation)Automation, sender); var senderElement = new AutomationElement(basicAutomationElement); var property = PropertyId.Find(AutomationType.UIA3, propertyId); HandlePropertyChangedEvent(senderElement, property, newValue); }
private void HandlePropertyChangedEvent(object sender, UIA.AutomationPropertyChangedEventArgs automationPropertyChangedEventArgs) { var basicAutomationElement = new UIA2BasicAutomationElement((UIA2Automation)Automation, (UIA.AutomationElement)sender); var senderElement = new AutomationElement(basicAutomationElement); var propertyId = PropertyId.Find(AutomationType.UIA2, automationPropertyChangedEventArgs.Property.Id); HandlePropertyChangedEvent(senderElement, propertyId, automationPropertyChangedEventArgs.NewValue); }
public void HandlePropertyChangedEvent(UIA.IUIAutomationElement sender, int propertyId, object newValue) { var frameworkElement = new UIA3FrameworkAutomationElement((UIA3Automation)Automation, sender); var senderElement = new SHAutomationElement(frameworkElement); var property = PropertyId.Find(Automation.AutomationType, propertyId); HandlePropertyChangedEvent(senderElement, property, newValue); }
public void HandlePropertyChangedEvent(Interop.UIAutomationClient.IUIAutomationElement sender, int propertyId, object newValue) { var basicAutomationElement = new UIA3BasicAutomationElement((UIA3Automation)this.Automation, sender); var senderElement = new AutomationElement(basicAutomationElement); var property = PropertyId.Find(propertyId); this.HandlePropertyChangedEvent(senderElement, property, newValue); }
public override PropertyId[] GetSupportedProperties() { var raw = NativeElement.GetSupportedProperties(); return(raw.Select(r => PropertyId.Find(Automation.AutomationType, r.Id)).ToArray()); }