Beispiel #1
0
 protected void Browser_DocumentComplete(object sender, DocumentCompleteEventArgs e)
 {
     if (DocumentComplete != null)
     {
         DocumentComplete(sender, e);
     }
 }
Beispiel #2
0
 public void DocumentComplete(object pDisp, ref object URL)
 {
     try
     {
         Delegate d = null;
         d = this.GetHandler(WebBrowserEvent.DocumentComplete);
         if (d != null)
         {
             DocumentCompleteEventArgs e = new DocumentCompleteEventArgs();
             e._pDisp = pDisp;
             e.URL    = URL;
             this.Raise(d, e);
             URL = e.URL;
         }
         d = null;
         if (((IWebBrowser2)pDisp).Equals(this._WebBrowserControl.WebBrowser))
         {
             d = this.GetHandler(WebBrowserEvent.PageLoadComplete);
         }
         if (d != null)
         {
             DocumentCompleteEventArgs args2 = new DocumentCompleteEventArgs();
             args2._pDisp = pDisp;
             args2.URL    = URL;
             this.Raise(d, args2);
             URL = args2.URL;
         }
         d = this.GetHandler(WebBrowserEvent.LegacyBrowserExtendedWebBrowserDocumentCompleted);
         if (d != null)
         {
             WebBrowserDocumentCompletedEventArgs args3 = new WebBrowserDocumentCompletedEventArgs(new Uri(URL.ToString()));
             this.Raise(d, args3);
             URL = args3.Url.ToString();
         }
     }
     catch (Exception ex) { Trace.WriteLine("DocumentComplete exception: " + ex.Message + "\r\n" + ex.StackTrace); }
 }