コード例 #1
0
ファイル: Application.cs プロジェクト: wilson1011/uia2atk
        public void AddRootElementAutomationEventHandler(int eventId, TreeScope scope, int handlerId)
        {
            var handlerData = new AutomationEventHandlerData(eventId,
                                                             null, scope, handlerId, true);

            lock (automationEventHandlers)
                automationEventHandlers.Add(handlerData);
        }
コード例 #2
0
ファイル: Application.cs プロジェクト: wilson1011/uia2atk
        public void AddRootElementStructureChangedEventHandler(TreeScope scope, int handlerId)
        {
            var handlerData = new AutomationEventHandlerData(
                AutomationElementIdentifiers.StructureChangedEvent.Id,
                null, scope, handlerId, true);

            lock (structureEventHandlers)
                structureEventHandlers.Add(handlerData);
        }
コード例 #3
0
ファイル: Application.cs プロジェクト: wilson1011/uia2atk
        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);
        }
コード例 #4
0
ファイル: Application.cs プロジェクト: wilson1011/uia2atk
        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);
        }