Ejemplo n.º 1
0
 private void Application_NavigationFailed(object sender, NavigationFailedEventArgs e)
 {
     if (e.Exception is System.Net.WebException) {
         MessageBox.Show("Site " + e.Uri + " not available :(");
         e.Handled = true;
     }
 }
 // If an error occurs during navigation, show an error window
 private void ContentFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
 {
     e.Handled = true;
     ChildWindow errorWin = new ErrorWindow(e.Uri);
     errorWin.Show();
     
 }
 /// <summary>Callback of browser navigation failed.</summary>
 private void OnBrowserNavigationFailed(object sender, NavigationFailedEventArgs e)
 {
     if (!tcsAuthorizationCodeResponse.Task.IsCompleted)
     {
         tcsAuthorizationCodeResponse.SetException(e.Exception);
     }
 }
 // Code to execute if a navigation fails
 private void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
 {
     if (System.Diagnostics.Debugger.IsAttached) {
         // A navigation has failed; break into the debugger
         System.Diagnostics.Debugger.Break();
     }
 }
Ejemplo n.º 5
0
		private void RootFrame_NavigationFailed( object sender, NavigationFailedEventArgs e )
		{
			if ( Debugger.IsAttached )
			{
				Debugger.Break();
			}
		}
Ejemplo n.º 6
0
		private void OnFrameNavigationFailed(object sender, NavigationFailedEventArgs e)
		{
			string text = (e.Uri != null ? e.Uri.ToString() : null);
			if (!text.IsEmpty())
				Helper.Alert(string.Format("Cannot locate internal page '{0}'", text));
			e.Handled = true;
		}
Ejemplo n.º 7
0
 // Code to execute if a navigation fails
 protected virtual void NavigationFailed(object sender, NavigationFailedEventArgs e)
 {
     //if (System.Diagnostics.Debugger.IsAttached)
     //{
     //    // A navigation has failed; break into the debugger
     //    System.Diagnostics.Debugger.Break();
     //}
 }
Ejemplo n.º 8
0
 // Code, der bei einem Navigationsfehler ausgeführt wird
 private void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
 {
     if (System.Diagnostics.Debugger.IsAttached)
     {
         // Navigationsfehler. Unterbrechen und Debugger öffnen
         System.Diagnostics.Debugger.Break();
     }
 }
Ejemplo n.º 9
0
 // Código para ejecutar si hay un error de navegación
 private void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
 {
     if (Debugger.IsAttached)
     {
         // Ha habido un error de navegación; interrumpir el depurador
         Debugger.Break();
     }
 }
Ejemplo n.º 10
0
 // 导航失败时执行的代码
 private void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
 {
     if (System.Diagnostics.Debugger.IsAttached)
     {
         // 导航已失败;强行进入调试器
         System.Diagnostics.Debugger.Break();
     }
 }
Ejemplo n.º 11
0
 // Code to execute if a navigation fails
 void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
 {
     if (Debugger.IsAttached)
     {
         // A navigation has failed; break into the debugger
         Debugger.Break();
     }
 }
Ejemplo n.º 12
0
		// Код для выполнения в случае ошибки навигации
		private void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
		{
			if (Debugger.IsAttached)
			{
				// Ошибка навигации; перейти в отладчик
				Debugger.Break();
			}
		}
Ejemplo n.º 13
0
 // ナビゲーションに失敗した場合に実行されるコード
 private void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
 {
     if (Debugger.IsAttached)
     {
         // ナビゲーションに失敗しました。デバッガーで中断します。
         Debugger.Break();
     }
 }
 void browserControl_NavigationFailed(object sender, NavigationFailedEventArgs e)
 {
     WebBrowserNavigationException ex = e.Exception as WebBrowserNavigationException;
     uint error = ex != null ? (uint)ex.StatusCode : 0u;
     WebAuthenticationResult result = new WebAuthenticationResult("", WebAuthenticationStatus.ErrorHttp, error);
     WebAuthenticationResultSource.TrySetResult(result);
     e.Handled = true;
 }
 private void webBrowser_NavigationFailed(object sender, NavigationFailedEventArgs e)
 {
     e.Handled = true;
     webBrowser.NavigateToString("<html><body>I'm having trouble loading " +
         "the web applicaiton right now. Are you in airplane mode?<br/>" +
         "<a href='" + e.Uri.ToString() + "'>Try again.</a>" +
         "</body></html>");
 }
Ejemplo n.º 16
0
 // Code à exécuter en cas d'échec d'une navigation
 private void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
 {
     if (Debugger.IsAttached)
     {
         // Échec d'une navigation ; arrêt dans le débogueur
         Debugger.Break();
     }
 }
Ejemplo n.º 17
0
 private void Frame_NavigationFailed(object sender, NavigationFailedEventArgs e)
 {
     //if (e.Exception is WebException)
     {
         string s = LanguageDictionary.Current.Translate<string>("NavigationError", "Text", "Error opening ") + e.Uri.ToString();
         MessageBox.Show(s, App.Name, MessageBoxButton.OK, MessageBoxImage.Error);
         e.Handled = true;
     }
 }
Ejemplo n.º 18
0
 void BrowserNavigationFailed(object sender, NavigationFailedEventArgs e)
 {
     if (completed || e.Exception == null)
         return;
     string statusCode = "no status code given";
     if (e.Exception is WebBrowserNavigationException)
         statusCode = ((WebBrowserNavigationException)e.Exception).StatusCode.ToString();
     MessageBox.Show(string.Format("{0} ({1})", e.Exception.Message, statusCode), "Error logging in", MessageBoxButton.OK);
 }
Ejemplo n.º 19
0
 private void Application_NavigationFailed(object sender, System.Windows.Navigation.NavigationFailedEventArgs e)
 {
     if (e.Exception is System.Net.WebException)
     {
         MessageBox.Show("Сайт " + e.Uri.ToString() + " не доступен :(");
         // Нейтрализовать ошибку, чтобы приложение продолжило свою работу
         e.Handled = true;
     }
 }
        void Browser_NavigationFailed(object sender, NavigationFailedEventArgs e)
        {
            Progress.IsIndeterminate = false;
            Progress.Visibility = Visibility.Collapsed;

            WebAuthenticationBroker.Result = new WebAuthenticationResult(e.Exception == null ? "" : e.Exception.Message, e.Exception == null ? 0 : (uint)e.Exception.HResult, WebAuthenticationStatus.ErrorHttp);

            NavigationService.GoBack();
            WebAuthenticationBroker.Handle.Set(); 
        }
Ejemplo n.º 21
0
        private void App_NavigationFailed(object sender, NavigationFailedEventArgs e)
        {
            if (e.Exception is System.Net.WebException)
            {                
                MessageBox.Show("Website " + e.Uri.ToString() + " cannot be reached.");

                // Neutralize the erorr so the application continues running.
                e.Handled = true;                
            }
        }
        // Code to execute if a navigation fails
        private void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e) {
#if DEBUG
            if (!System.Diagnostics.Debugger.IsAttached) {
                // A navigation has failed; break into the debugger
                System.Diagnostics.Debugger.Break();
            }
#else
            MessageBox.Show("A unknown navigation error occurred. Please report this error. The application will shutdown.",
                                "Navigation Error",
                                MessageBoxButton.OK);
#endif
        }
Ejemplo n.º 23
0
 private void frame_NavigationFailed(object sender, NavigationFailedEventArgs e)
 {
     e.Handled = true;
     if (e.Exception is WebException) {
         WebException ex = e.Exception as WebException;
         var ru = ex.Response.ResponseUri;
         string s = ((int)((HttpWebResponse)ex.Response).StatusCode) + " " + ((HttpWebResponse)ex.Response).StatusCode.ToString();
         var a = new PageHttpError();
         a.OnRetry += delegate {
             frame.Source = ru;
         };
         frame.Navigate(a.SetStatus(s));
     }
 }
 /// <summary>Callback of browser navigation failed.</summary>
 private void OnBrowserNavigationFailed(object sender, NavigationFailedEventArgs e)
 {
     if (!tcsAuthorizationCodeResponse.Task.IsCompleted)
     {
         // See https://code.google.com/p/google-api-dotnet-client/issues/detail?id=431.
         // If we encounter a null exception, cancel the task because the Windows Phone app crashed.
         if (e.Exception != null)
         {
             tcsAuthorizationCodeResponse.SetException(e.Exception);
         }
         else
         {
             tcsAuthorizationCodeResponse.SetCanceled();
         }
     }
 }
Ejemplo n.º 25
0
 // Handle navigation failures
 private void Browser_NavigationFailed(object sender, System.Windows.Navigation.NavigationFailedEventArgs e)
 {
     MessageBox.Show("Navigation to this page failed.");
 }
Ejemplo n.º 26
0
 /// <summary>
 /// If an error occurs during navigation, show an error window
 /// </summary>
 private void ContentFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
 {
     e.Handled = true;
     ErrorWindow.CreateNew(e.Exception);
 }
Ejemplo n.º 27
0
 private void Application_NavigationFailed(object sender, System.Windows.Navigation.NavigationFailedEventArgs e)
 {
     logger.InfoFormat("{0:D3}.{1}", ++numberIndex, MethodBase.GetCurrentMethod().Name);
 }
Ejemplo n.º 28
0
		// If an error occurs during navigation, show an error window
		private void ContentFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
		{
			e.Handled = true;
			ApplicationModel.Current.AddErrorNotification(e.Exception, string.Format("Could not load page: {0}", e.Uri));
		}
Ejemplo n.º 29
0
		protected virtual void OnNavigationFailed (NavigationFailedEventArgs args)
		{
			if (NavigationFailed != null)
				NavigationFailed (this, args);
		}
Ejemplo n.º 30
0
 // Handle navigation failures.
 private void Browser_NavigationFailed(object sender, System.Windows.Navigation.NavigationFailedEventArgs e)
 {
     MessageBox.Show("Navigation to this page failed, check your internet connection");
 }
 private void Engine_Failed(object sender, System.Windows.Navigation.NavigationFailedEventArgs e)
 {
     Debugger.Log(1, "Main", "Engine Failed");
 }
Ejemplo n.º 32
0
 private void parametarsFrame_NavigationFailed_1(object sender, NavigationFailedEventArgs e)
 {
 }
Ejemplo n.º 33
0
 // Handle navigation failures
 private void Browser_NavigationFailed(object sender, System.Windows.Navigation.NavigationFailedEventArgs e)
 {
     MessageBox.Show("Navigation to this page failed. Please ensure that you have a working internet connection");
 }
 private void ContentFrame_NavigationFailed(object sender, System.Windows.Navigation.NavigationFailedEventArgs e)
 {
 }
Ejemplo n.º 35
0
 private void theBrowser_NavigationFailed(object sender, System.Windows.Navigation.NavigationFailedEventArgs e)
 {
     MessageBox.Show("There was an error loading the page.");
 }
Ejemplo n.º 36
0
 private void disclaimerBrowser_NavigationFailed(object sender, System.Windows.Navigation.NavigationFailedEventArgs e)
 {
     this.ProgressBar.Hide();
 }
Ejemplo n.º 37
0
        // Code to execute if a navigation fails
        private void RootFrameNavigationFailed(object sender, NavigationFailedEventArgs e)
        {
            if (Debugger.IsAttached)
            {
                // A navigation has failed; break into the debugger
                Debugger.Break();
            }

            _logger.FatalException(string.Format("NavigationFailed, URI: {0}", e.Uri), e.Exception);
        }
Ejemplo n.º 38
0
        /// <summary>
        /// Handler for the browser control's navigation failed event.  We use this to detect errors
        /// </summary>
        private void BrowserControl_NavigationFailed(object sender, NavigationFailedEventArgs e)
        {
            UnhookEvents();

            WebBrowserNavigationException navEx = e.Exception as WebBrowserNavigationException;

            if (navEx != null)
            {
                // Pass along the provided error information.
                responseErrorDetail = string.Format("Error code: {0}", navEx.StatusCode);
            }
            else
            {
                // No error information available.
                responseErrorDetail = NoDetailsAvailableMessage;
            }
            responseStatus = PhoneAuthenticationStatus.ErrorHttp;

            authenticationFinished = true;
            e.Handled = true;

            // Navigate back now.
            this.NavigateBackWithProgress();
        }
Ejemplo n.º 39
0
        // Code to execute if a navigation fails
        private void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
        {
            if (System.Diagnostics.Debugger.IsAttached)
            {
                // A navigation has failed; break into the debugger
                System.Diagnostics.Debugger.Break();

            }

            //            MessageBox.Show(string.Format("Page {0} failed to load because of with error: {1}", e.Uri.ToString(), e.Exception.StackTrace)); e.Handled = true;
        }
 // boilerplate
 private void Browser_NavigationFailed(object sender, System.Windows.Navigation.NavigationFailedEventArgs e)
 {
 }