private void HandleFocusChangedEvent(object sender, UIA.AutomationFocusChangedEventArgs automationFocusChangedEventArgs)
        {
            var frameworkElement = new UIA2FrameworkAutomationElement((UIA2Automation)Automation, (UIA.AutomationElement)sender);
            var senderElement    = new AutomationElement(frameworkElement);

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