コード例 #1
0
 public void browser_DocumentCompleted(object sender, Gecko.Events.GeckoDocumentCompletedEventArgs e)
 {
     if (!browser1.IsBusy)
     {
         txtUrl.Text           = browser1.Url.AbsoluteUri;
         progressBar.EditValue = 0;
     }
 }
コード例 #2
0
 private void geckoWebBrowser1_DocumentCompleted(object sender, Gecko.Events.GeckoDocumentCompletedEventArgs e)
 {
     label_statusbrowser.Text  = "Done.. " + geckoWebBrowser1.StatusText;
     textbox_navigate.Text     = geckoWebBrowser1.Url.AbsoluteUri;
     progressbar_browser.Value = 0;
     if (geckoWebBrowser1.Document.Title == "403 Forbidden" || geckoWebBrowser1.Document.TextContent == "429 Too Many Requests")
     {
         button_skip.PerformClick();
     }
     else
     {
         if (!geckoWebBrowser1.IsBusy && onepage == 0)
         {
             clickad();
         }
     }
 }
コード例 #3
0
        private void geckoWebBrowser2_DocumentCompleted(object sender, Gecko.Events.GeckoDocumentCompletedEventArgs e)
        {
            var iframe = geckoWebBrowser1.Document.GetHtmlElementById("aads") as Gecko.GeckoHtmlElement;

            if (iframe == null)
            {
                List <IntPtr> ChromeWindows = WindowsFinder("MozillaWindowClass", "MUIPRT");
                foreach (IntPtr windowHandle in ChromeWindows)
                {
                    int           iHandle = FindWindow("MozillaWindowClass", "MUIPRT");
                    int           length  = GetWindowTextLength(windowHandle);
                    StringBuilder sb      = new StringBuilder(length + 1);
                    GetWindowText(windowHandle, sb, sb.Capacity);
                    SendMessage(iHandle, WM_SYSCOMMAND, SC_CLOSE, 0);
                    CloseWindow(windowHandle);
                }
            }

            //else{
            //    autocaptcha()}
        }
コード例 #4
0
 private void RaiseDocumentCompleted(object sender, GeckoDocumentCompletedEventArgs args)
 {
     if (Navigated != null)
         Navigated(this, new EventArgs());
 }
コード例 #5
0
		/// <summary>Raises the <see cref="DocumentCompleted"/> event.</summary>
		/// <param name="e">The data for the event.</param>
		protected virtual void OnDocumentCompleted(GeckoDocumentCompletedEventArgs e)
		{
			var evnt = (EventHandler<GeckoDocumentCompletedEventArgs>)Events[DocumentCompletedEvent];
			if ( evnt != null ) evnt( this, e );
		}
コード例 #6
0
 private void _browser_OnDocumentCompleted(object sender, GeckoDocumentCompletedEventArgs geckoDocumentCompletedEventArgs)
 {
     Debug.WriteLine("_browser_OnDocumentCompleted ({0})", Thread.CurrentThread.ManagedThreadId);
     var order = (ThumbnailOrder)((GeckoWebBrowser)sender).Tag;
     order.Done = true;
     if (order.WaitHandle != null)
         order.WaitHandle.Set();
 }