public void AddRootElementAutomationEventHandler(int eventId, TreeScope scope, int handlerId) { var handlerData = new AutomationEventHandlerData(eventId, null, scope, handlerId, true); lock (automationEventHandlers) automationEventHandlers.Add(handlerData); }
public void AddRootElementStructureChangedEventHandler(TreeScope scope, int handlerId) { var handlerData = new AutomationEventHandlerData( AutomationElementIdentifiers.StructureChangedEvent.Id, null, scope, handlerId, true); lock (structureEventHandlers) structureEventHandlers.Add(handlerData); }
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); }
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); }