public void RaiseStructureChangedEvent(object provider, StructureChangedEventArgs e) { var providerSimple = provider as IRawElementProviderSimple; if (providerSimple == null) { return; } ClientEventManager.RaiseStructureChangedEvent(providerSimple, e); }
public void RaiseAutomationPropertyChangedEvent(object provider, AutomationPropertyChangedEventArgs e) { var providerSimple = provider as IRawElementProviderSimple; if (providerSimple == null) { return; } ClientEventManager.RaiseAutomationPropertyChangedEvent(providerSimple, e); }
public void RaiseAutomationEvent(AutomationEvent eventId, object provider, AutomationEventArgs e) { var providerSimple = provider as IRawElementProviderSimple; if (providerSimple == null) { return; } ClientEventManager.RaiseAutomationEvent(eventId, providerSimple, e); }
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); }
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); }
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); }
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); }
public void RemoveAllEventHandlers() { ClientEventManager.RemoveAllEventHandlers(); }