Example #1
0
        public void RefreshWindowsList()
        {
            Exception outException;
            bool      isOk = false;

            isOk = UIActions.PerformSlowOperation(
                "Operation: Refresh All Windows List",
                () =>
            {
                BrowserWindow[] currentWindows = WebSpyBrowser.GetBrowserWindows();
                string currentWindowHandle     = WebSpyBrowser.GetCurrentWindowHandle();
                view.UpdateBrowserWindowsList(currentWindows, currentWindowHandle);
            },
                out outException,
                null,
                TimeSpan.FromMinutes(1)
                );

            if (!isOk)
            {
                MyLog.Error("Failed to refresh All Windows List");
                if (outException != null)
                {
                    throw outException;
                }
            }
        }