示例#1
0
 protected override void OnLoad(EventArgs e)
 {
     AttachBrowser(webBrowser);
     if (RedirectUrl != "about:blank")
     {
         Thread t = new Thread(() =>
         {
             bool result = fakeHttpContext.Authenticate(RedirectUrl);
             if (result)
             {
                 webBrowser.Navigate(RedirectUrl);
             }
         });
         t.SetApartmentState(ApartmentState.STA);
         t.Start();
     }
     base.OnLoad(e);
 }