Ejemplo n.º 1
0
        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());
        }
Ejemplo n.º 2
0
        private void HandleFocusChangedEvent(object sender, UIA.AutomationFocusChangedEventArgs automationFocusChangedEventArgs)
        {
            var basicAutomationElement = new UIA2BasicAutomationElement((UIA2Automation)Automation, (UIA.AutomationElement)sender);
            var senderElement          = new AutomationElement(basicAutomationElement);

            HandleFocusChangedEvent(senderElement);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        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);
        }