コード例 #1
0
 private void InitialiseBrowser(WebBrowser browser, string template)
 {
     browser.AllowNavigation     = false;
     browser.AllowWebBrowserDrop = false;
     using (Stream xmlStream = this.GetType().Assembly.GetManifestResourceStream(template))
     {
         CompletionClosure.LoadSynchronously(browser, xmlStream);
     }
 }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: kascomp/CruiseControl.NET
 public static void LoadSynchronously(WebBrowser b, Stream page)
 {
     CompletionClosure cc = new CompletionClosure();
     b.DocumentCompleted += cc.Handler;
     try
     {
         b.DocumentStream = page;
         while (!cc.done)
         {
             Application.DoEvents();
             System.Threading.Thread.Sleep(0);
         }
     }
     finally
     {
         b.DocumentCompleted -= cc.Handler;
     }
 }
コード例 #3
0
            public static void LoadSynchronously(WebBrowser b, Stream page)
            {
                CompletionClosure cc = new CompletionClosure();

                b.DocumentCompleted += cc.Handler;
                try
                {
                    b.DocumentStream = page;
                    while (!cc.done)
                    {
                        Application.DoEvents();
                        System.Threading.Thread.Sleep(0);
                    }
                }
                finally
                {
                    b.DocumentCompleted -= cc.Handler;
                }
            }