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

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

            Automation.AddAutomationFocusChangedEventHandler(focusHandler);
        }