private void btnCapture_Click(object sender, RoutedEventArgs e) { focusHandler = new AutomationFocusChangedEventHandler(OnFocusChange); Automation.AddAutomationFocusChangedEventHandler(focusHandler); }
public void StartEventWatcher() { Automation.AddAutomationFocusChangedEventHandler(OnFocusChanged); }
public FocusMonitor() { AutomationFocusChangedEventHandler focusHandler = OnFocusChanged; Automation.AddAutomationFocusChangedEventHandler(focusHandler); }
/// <summary> /// Initialization. /// </summary> void Startup() { Automation.AddAutomationFocusChangedEventHandler(OnFocusChanged); }
/// <summary> /// Create an event handler and register it. /// </summary> public void SubscribeToFocusChange() { focusHandler = new AutomationFocusChangedEventHandler(OnFocusChange); Automation.AddAutomationFocusChangedEventHandler(focusHandler); }
private void SocketMessage(object sender, EventArgs e) { focusHandler = new AutomationFocusChangedEventHandler(OnFocusChange); Automation.AddAutomationFocusChangedEventHandler(focusHandler); }
//private WindowInteropHelper windowInteropHelper; public KeyMouse() { menuFocusEventHandler = new AutomationFocusChangedEventHandler(OnMenuFocusEvent); Automation.AddAutomationFocusChangedEventHandler(menuFocusEventHandler); }
public override void Add(WrappedEventHandler handler, AutomationElementWrapper element) { _handler = (o, e) => handler(element, e); Automation.AddAutomationFocusChangedEventHandler(_handler); }
/// <summary> /// Subscribe to UI Automation events. /// </summary> /// <remarks> /// Do not call from the UI thread. /// </remarks> private void StartListening() { focusHandler = new AutomationFocusChangedEventHandler(OnFocusChanged); Automation.AddAutomationFocusChangedEventHandler(focusHandler); }
public MainWindow() { InitializeComponent(); line = 0; Automation.AddAutomationFocusChangedEventHandler(OnFocusChangedHandler); }
public static IDisposable ToFocusChangedEvent(AutomationFocusChangedEventHandler handler) { Automation.AddAutomationFocusChangedEventHandler(handler); return(Disposable.Create(() => Automation.RemoveAutomationFocusChangedEventHandler(handler))); }
private PSAutomationEvent() { Automation.AddAutomationFocusChangedEventHandler(this.FocusChangedHandler); }
private void timer2_Tick(object sender, EventArgs e) { AutomationFocusChangedEventHandler focusHandler = OnFocusChanged; Automation.AddAutomationFocusChangedEventHandler(focusHandler); }