コード例 #1
0
ファイル: UIA3Automation.cs プロジェクト: yougayuki/FlaUI
        public override IAutomationFocusChangedEventHandler RegisterFocusChangedEvent(Action <AutomationElement> action)
        {
            var eventHandler = new UIA3FocusChangedEventHandler(this, action);

            ComCallWrapper.Call(() => NativeAutomation.AddFocusChangedEventHandler(null, eventHandler));
            return(eventHandler);
        }
コード例 #2
0
        public override IDisposable SubscribeToFocusChangedEvent(Action <AutomationElement> action)
        {
            var eventHandler = new UIA3FocusChangedEventHandler(this, action);

            Com.Call(() => this.NativeAutomation.AddFocusChangedEventHandler(null, eventHandler));
            return(Disposable.Create(() => this.NativeAutomation.RemoveFocusChangedEventHandler(eventHandler)));
        }