Example #1
0
 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);
    }
Example #4
0
 /// <summary>
 /// Initialization.
 /// </summary>
 void Startup()
 {
     Automation.AddAutomationFocusChangedEventHandler(OnFocusChanged);
 }
Example #5
0
 /// <summary>
 /// Create an event handler and register it.
 /// </summary>
 public void SubscribeToFocusChange()
 {
     focusHandler = new AutomationFocusChangedEventHandler(OnFocusChange);
     Automation.AddAutomationFocusChangedEventHandler(focusHandler);
 }
Example #6
0
 private void SocketMessage(object sender, EventArgs e)
 {
     focusHandler = new AutomationFocusChangedEventHandler(OnFocusChange);
     Automation.AddAutomationFocusChangedEventHandler(focusHandler);
 }
Example #7
0
    //private WindowInteropHelper windowInteropHelper;

    public KeyMouse()
    {
        menuFocusEventHandler = new AutomationFocusChangedEventHandler(OnMenuFocusEvent);
        Automation.AddAutomationFocusChangedEventHandler(menuFocusEventHandler);
    }
Example #8
0
 public override void Add(WrappedEventHandler handler, AutomationElementWrapper element)
 {
     _handler = (o, e) => handler(element, e);
     Automation.AddAutomationFocusChangedEventHandler(_handler);
 }
Example #9
0
 /// <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);
 }
Example #10
0
 public MainWindow()
 {
     InitializeComponent();
     line = 0;
     Automation.AddAutomationFocusChangedEventHandler(OnFocusChangedHandler);
 }
Example #11
0
 public static IDisposable ToFocusChangedEvent(AutomationFocusChangedEventHandler handler)
 {
     Automation.AddAutomationFocusChangedEventHandler(handler);
     return(Disposable.Create(() => Automation.RemoveAutomationFocusChangedEventHandler(handler)));
 }
Example #12
0
 private PSAutomationEvent()
 {
     Automation.AddAutomationFocusChangedEventHandler(this.FocusChangedHandler);
 }
Example #13
0
        private void timer2_Tick(object sender, EventArgs e)
        {
            AutomationFocusChangedEventHandler focusHandler = OnFocusChanged;

            Automation.AddAutomationFocusChangedEventHandler(focusHandler);
        }