Esempio n. 1
0
        public GitExtensionsHandlerImpl(WindowOpeningListener windowOpeningListener)
        {
            _onWindowClosedThrottled = Throttler.Throttle((bool firstRun) =>
                                                          onWindowClosed(firstRun), TimeSpan.FromSeconds(2));

            timer = new Timer {
                AutoReset = true,
                Interval  = 200
            };

            timer.Elapsed += findCommitWindows;

            windowOpeningListener.windowOpened += onWindowOpened;
            Automation.AddAutomationEventHandler(WindowPattern.WindowClosedEvent, AutomationElement.RootElement, TreeScope.Subtree, onWindowClosedThrottled);

            _onWindowClosedThrottled.Run(true);

            LOGGER.Trace("Waiting for Git Extensions commit window");
        }
 public MicrosoftManagementConsoleHandlerImpl(WindowOpeningListener windowOpeningListener)
 {
     windowOpeningListener.windowOpened += onWindowOpened;
 }