예제 #1
0
        public void RaiseStructureChangedEvent(object provider, StructureChangedEventArgs e)
        {
            var providerSimple = provider as IRawElementProviderSimple;

            if (providerSimple == null)
            {
                return;
            }
            ClientEventManager.RaiseStructureChangedEvent(providerSimple, e);
        }
예제 #2
0
        public void RaiseAutomationPropertyChangedEvent(object provider, AutomationPropertyChangedEventArgs e)
        {
            var providerSimple = provider as IRawElementProviderSimple;

            if (providerSimple == null)
            {
                return;
            }
            ClientEventManager.RaiseAutomationPropertyChangedEvent(providerSimple, e);
        }
예제 #3
0
        public void RaiseAutomationEvent(AutomationEvent eventId, object provider, AutomationEventArgs e)
        {
            var providerSimple = provider as IRawElementProviderSimple;

            if (providerSimple == null)
            {
                return;
            }
            ClientEventManager.RaiseAutomationEvent(eventId, providerSimple, e);
        }
예제 #4
0
        public void RemoveStructureChangedEventHandler(IElement element, StructureChangedEventHandler eventHandler)
        {
            if (element == null)
            {
                return;
            }
            ClientElement clientElement = element as ClientElement;

            if (clientElement == null)
            {
                Log.Error("[ClientAutomationSource.RemoveStructureChangedEventHandler] Not ClientElement");
                return;
            }
            ClientEventManager.RemoveStructureChangedEventHandler(
                clientElement.Provider, eventHandler);
        }
예제 #5
0
        public void RemoveAutomationEventHandler(AutomationEvent eventId, IElement element, AutomationEventHandler eventHandler)
        {
            if (element == null)
            {
                return;
            }
            ClientElement clientElement = element as ClientElement;

            if (clientElement == null)
            {
                Log.Error("[ClientAutomationSource.RemoveAutomationEventHandler] Not ClientElement");
                return;
            }
            ClientEventManager.RemoveAutomationEventHandler(eventId,
                                                            clientElement.Provider, eventHandler);
        }
예제 #6
0
        public void AddAutomationPropertyChangedEventHandler(IElement element, TreeScope scope, AutomationPropertyChangedEventHandler eventHandler, AutomationProperty[] properties)
        {
            if (element == null)
            {
                return;
            }
            ClientElement clientElement = element as ClientElement;

            if (clientElement == null)
            {
                Log.Error("[ClientAutomationSource.AddAutomationPropertyChangedEventHandler] Not ClientElement");
                return;
            }
            int [] propertyIds = Array.ConvertAll(properties, p => p.Id);
            ClientEventManager.AddAutomationPropertyChangedEventHandler(
                clientElement.Provider, scope, eventHandler, propertyIds);
        }
예제 #7
0
        public void AddAutomationEventHandler(AutomationEvent eventId, IElement element, TreeScope scope, AutomationEventHandler eventHandler)
        {
            if (element == null)
            {
                // elements from local providers are not descendants of the RootElement.
                return;
            }
            ClientElement clientElement = element as ClientElement;

            if (clientElement == null)
            {
                Log.Error("[ClientAutomationSource.AddAutomationEventHandler] Not ClientElement");
                return;
            }
            ClientEventManager.AddAutomationEventHandler(eventId,
                                                         clientElement.Provider, scope, eventHandler);
        }
예제 #8
0
 public void RemoveAllEventHandlers()
 {
     ClientEventManager.RemoveAllEventHandlers();
 }