Ejemplo n.º 1
0
        public void AddRootElementAutomationEventHandler(int eventId, TreeScope scope, int handlerId)
        {
            var handlerData = new AutomationEventHandlerData(eventId,
                                                             null, scope, handlerId, true);

            lock (automationEventHandlers)
                automationEventHandlers.Add(handlerData);
        }
Ejemplo n.º 2
0
        public void AddRootElementStructureChangedEventHandler(TreeScope scope, int handlerId)
        {
            var handlerData = new AutomationEventHandlerData(
                AutomationElementIdentifiers.StructureChangedEvent.Id,
                null, scope, handlerId, true);

            lock (structureEventHandlers)
                structureEventHandlers.Add(handlerData);
        }
Ejemplo n.º 3
0
        public void AddAutomationEventHandler(int eventId, int [] elementRuntimeId,
                                              TreeScope scope, int handlerId)
        {
            var provider = AutomationBridge.Instance.FindProviderByRuntimeId(elementRuntimeId);

            if (provider == null)
            {
                return;
            }
            AutomationEventHandlerData handlerData =
                new AutomationEventHandlerData(eventId, provider, scope, handlerId, false);

            lock (automationEventHandlers)
                automationEventHandlers.Add(handlerData);
        }
Ejemplo n.º 4
0
        public void AddStructureChangedEventHandler(int [] elementRuntimeId,
                                                    TreeScope scope, int handlerId)
        {
            var provider = AutomationBridge.Instance.FindProviderByRuntimeId(elementRuntimeId);

            if (provider == null)
            {
                return;
            }
            AutomationEventHandlerData handlerData =
                new AutomationEventHandlerData(
                    AutomationElementIdentifiers.StructureChangedEvent.Id,
                    provider, scope, handlerId, false);

            lock (structureEventHandlers)
                structureEventHandlers.Add(handlerData);
        }