Example #1
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;
		}
 // 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();
     
 }
 // 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();
     }
 }
 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;
     }
 }
 /// <summary>Callback of browser navigation failed.</summary>
 private void OnBrowserNavigationFailed(object sender, NavigationFailedEventArgs e)
 {
     if (!tcsAuthorizationCodeResponse.Task.IsCompleted)
     {
         tcsAuthorizationCodeResponse.SetException(e.Exception);
     }
 }
Example #6
0
		private void RootFrame_NavigationFailed( object sender, NavigationFailedEventArgs e )
		{
			if ( Debugger.IsAttached )
			{
				Debugger.Break();
			}
		}
 // 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();
     //}
 }
Example #8
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;
 }
Example #10
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();
     }
 }
 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>");
 }
Example #12
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();
     }
 }
Example #13
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();
     }
 }
Example #14
0
 // 导航失败时执行的代码
 private void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
 {
     if (System.Diagnostics.Debugger.IsAttached)
     {
         // 导航已失败;强行进入调试器
         System.Diagnostics.Debugger.Break();
     }
 }
 // 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();
     }
 }
Example #16
0
 // ナビゲーションに失敗した場合に実行されるコード
 private void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
 {
     if (Debugger.IsAttached)
     {
         // ナビゲーションに失敗しました。デバッガーで中断します。
         Debugger.Break();
     }
 }
 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;
     }
 }
Example #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);
 }
Example #19
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;                
            }
        }
        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(); 
        }
        // 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
        }
Example #22
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();
         }
     }
 }
Example #24
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;
        }
Example #25
0
 private void parametarsFrame_NavigationFailed_1(object sender, NavigationFailedEventArgs e)
 {
 }
        // 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);
        }
Example #27
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);
 }
Example #28
0
		protected virtual void OnNavigationFailed (NavigationFailedEventArgs args)
		{
			if (NavigationFailed != null)
				NavigationFailed (this, args);
		}
Example #29
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));
		}
        /// <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();
        }