private void HandleStructureChangedEvent(object sender, UIA.StructureChangedEventArgs structureChangedEventArgs) { var basicAutomationElement = new UIA2BasicAutomationElement((UIA2Automation)Automation, (UIA.AutomationElement)sender); var senderElement = new AutomationElement(basicAutomationElement); HandleStructureChangedEvent(senderElement, (StructureChangeType)structureChangedEventArgs.StructureChangeType, structureChangedEventArgs.GetRuntimeId()); }
private void HandleFocusChangedEvent(object sender, UIA.AutomationFocusChangedEventArgs automationFocusChangedEventArgs) { var basicAutomationElement = new UIA2BasicAutomationElement((UIA2Automation)Automation, (UIA.AutomationElement)sender); var senderElement = new AutomationElement(basicAutomationElement); HandleFocusChangedEvent(senderElement); }
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); }
private void HandleAutomationEvent(object sender, UIA.AutomationEventArgs automationEventArgs) { var basicAutomationElement = new UIA2BasicAutomationElement((UIA2Automation)Automation, (UIA.AutomationElement)sender); var senderElement = new AutomationElement(basicAutomationElement); var @event = EventId.Find(AutomationType.UIA2, automationEventArgs.EventId.Id); HandleAutomationEvent(senderElement, @event); }