private void HandleFocusChangedEvent(object sender, UIA.AutomationFocusChangedEventArgs automationFocusChangedEventArgs) { var frameworkElement = new UIA2FrameworkAutomationElement((UIA2Automation)Automation, (UIA.AutomationElement)sender); var senderElement = new AutomationElement(frameworkElement); HandleFocusChangedEvent(senderElement); }
private void HandleStructureChangedEvent(object sender, UIA.StructureChangedEventArgs structureChangedEventArgs) { var frameworkElement = new UIA2FrameworkAutomationElement((UIA2Automation)Automation, (UIA.AutomationElement)sender); var senderElement = new AutomationElement(frameworkElement); HandleStructureChangedEvent(senderElement, (StructureChangeType)structureChangedEventArgs.StructureChangeType, structureChangedEventArgs.GetRuntimeId()); }
private void HandleAutomationEvent(object sender, UIA.AutomationEventArgs automationEventArgs) { var frameworkElement = new UIA2FrameworkAutomationElement((UIA2Automation)Automation, (UIA.AutomationElement)sender); var senderElement = new AutomationElement(frameworkElement); var @event = EventId.Find(AutomationType.UIA2, automationEventArgs.EventId.Id); HandleAutomationEvent(senderElement, @event); }
private void HandlePropertyChangedEvent(object sender, UIA.AutomationPropertyChangedEventArgs automationPropertyChangedEventArgs) { var frameworkElement = new UIA2FrameworkAutomationElement((UIA2Automation)Automation, (UIA.AutomationElement)sender); var senderElement = new AutomationElement(frameworkElement); var propertyId = PropertyId.Find(Automation.AutomationType, automationPropertyChangedEventArgs.Property.Id); HandlePropertyChangedEvent(senderElement, propertyId, automationPropertyChangedEventArgs.NewValue); }