Example #1
0
        private void geckoWebBrowser1_NavigationError(object sender, Gecko.Events.GeckoNavigationErrorEventArgs e)
        {
            if (string.IsNullOrEmpty(geckoWebBrowser1.Document.Head.InnerHtml) || geckoWebBrowser1.Document.Head.InnerHtml.ToLower().Contains("page load error") ||
                e.ErrorCode == GeckoError.NS_ERROR_PROXY_CONNECTION_REFUSED || e.ErrorCode == GeckoError.NS_ERROR_UNKNOWN_PROXY_HOST ||
                e.ErrorCode == GeckoError.NS_ERROR_CONNECTION_REFUSED)

            {
                ((Form1)(Application.OpenForms["Form1"])).listBox3.Items.Add("URL'ye Erişilemedi: " + prxy_lstesi[basla - 1]);
                timer1.Enabled = true;
            }
        }
Example #2
0
        private void Browser_NavigationError(object sender, Gecko.Events.GeckoNavigationErrorEventArgs e)
        {
            VPKSoft.ErrorLogger.ExceptionLogger.LogMessage("Invalid URL: " + e.Uri); // Log the browser's invalid URL..

            if (this.IsHandleCreated)                                                // an exception might occur: "Invoke or BeginInvoke cannot be called on a control until the window handle has been created."
            {
                this.Invoke(new MethodInvoker(delegate()                             // Set the button states with an invoke call as the browser runs in a different thread..
                {
                    lbUrl.Text =                                                     // show a message int the URL label that the navigation failed..
                                 string.Format(
                        DBLangEngine.GetMessage(
                            "msgInvalidURL", "The given URL is invalid: '{0}'.|A navigation error occurred in a web browser form."),
                        e.Uri);
                }
                                              ));
            }
        }
Example #3
0
 private void WebBrowser_NavigationError(object sender, Gecko.Events.GeckoNavigationErrorEventArgs e)
 {
     MessageBox.Show("Failed to connect", "Internet error", MessageBoxButtons.OKCancel, MessageBoxIcon.Error);
     Text = "ZonClub Hack Tool - Nguyen Tuan Kiet - Disconnected";
 }