void WebView_LoadError(object sender, UIWebErrorArgs e)
 {
     UIApplication.SharedApplication.NetworkActivityIndicatorVisible = false;
     Debug.WriteLine("Erreur lors d'un élément de la page");
     Debug.WriteLine(e.Error.LocalizedDescription);
     Debug.WriteLine(e.Error.LocalizedFailureReason);
 }
예제 #2
0
        protected override void OnLoadError(object sender, UIWebErrorArgs e)
        {
            base.OnLoadError(sender, e);

            //Can't load this!
            MonoTouch.Utilities.ShowAlert("Error", "Unable to display this type of file.");
        }
예제 #3
0
 protected override void OnLoadError(object sender, UIWebErrorArgs e)
 {
     base.OnLoadError(sender, e);
     if (e.Error.Code == 102)
     {
         _alertDialogFactory.Alert("Oh no!", "Looks like CodeHub cannot display this type of file. Sorry about that :(");
     }
 }
예제 #4
0
        private void WebViewMainLoadError(object sender, UIWebErrorArgs e)
        {
            LoadUrlComplete();

            UIAlertView alert = new UIAlertView("Cannot Open Page", e.Error.LocalizedDescription, null, "OK", null);

            alert.Show();
        }
예제 #5
0
 void UiWebView_LoadError(object sender, UIWebErrorArgs e)
 {
     if (this.Element == null)
     {
         return;
     }
     this.Element.HandleNavigationError(Convert.ToInt32(e.Error.Code));
 }
 protected virtual void OnLoadError(object sender, UIWebErrorArgs e)
 {
     NetworkActivityService.PopNetworkActive();
     if (RefreshButton != null)
     {
         RefreshButton.Enabled = true;
     }
 }
예제 #7
0
 protected virtual void OnLoadError(object sender, UIWebErrorArgs e)
 {
     MonoTouch.Utilities.PopNetworkActive();
     if (RefreshButton != null)
     {
         RefreshButton.Enabled = true;
     }
 }
예제 #8
0
 void WebView_LoadError(object sender, UIWebErrorArgs e)
 {
     if (!Failed)
     {
         Failed = true;
         ActiveIndicator.StopAnimating();
         CustomWebView.LoadPageFailed = true;
     }
 }
예제 #9
0
		protected override void OnLoadError(object sender, UIWebErrorArgs e)
		{
			base.OnLoadError(sender, e);

			//Frame interrupted error
			if (e.Error.Code == 102)
				return;

			MonoTouch.Utilities.ShowAlert("Error", "Unable to communicate with Bitbucket. " + e.Error.LocalizedDescription);
		}
예제 #10
0
 private void NativeWebView_LoadError(object sender, UIWebErrorArgs uiWebErrorArgs)
 {
     // TODO: Do we need here to call: RefreshNavigationHistoryProperties (); ??
     this.OnNavigationFailed(
         new NavigationFailedEventArgs(
             this.lastLoaded,
             uiWebErrorArgs.Error == null
                 ? null
                 : new InvalidOperationException(uiWebErrorArgs.Error.Description)));
 }
예제 #11
0
        protected override void OnLoadError(object sender, UIWebErrorArgs e)
        {
            base.OnLoadError(sender, e);

            //Frame interrupted error
            if (e.Error.Code == 102 || e.Error.Code == -999)
            {
                return;
            }

            _alertDialogService.Alert("Error", "Unable to communicate with GitHub. " + e.Error.LocalizedDescription).ToBackground();
        }
예제 #12
0
        protected override void OnLoadError(object sender, UIWebErrorArgs e)
        {
            base.OnLoadError(sender, e);

            //Frame interrupted error
            if (e.Error.Code == 102)
            {
                return;
            }

            MonoTouch.Utilities.ShowAlert("Error", "Unable to communicate with Bitbucket. " + e.Error.LocalizedDescription);
        }
        public void LoadError(object sender, UIWebErrorArgs e)
        {
            this.imgBusy.StopAnimating();
            this.btnStop.Enabled = false;
            this.SetBackAndForwardEnable();
            // show the error
            UIAlertView alert = new UIAlertView("Browse Error"
                                                , "Web page failed to load: " + e.Error.ToString()
                                                , null, "OK", null);

            alert.Show();
        }
예제 #14
0
        protected override void OnLoadError(object sender, UIWebErrorArgs e)
        {
            base.OnLoadError(sender, e);

            //Frame interrupted error
            if (e.Error.Code == 102)
                return;

            if (ViewModel.IsEnterprise)
                MonoTouch.Utilities.ShowAlert("Error", "Unable to communicate with GitHub with given Url. " + e.Error.LocalizedDescription, Stuff);
            else
                MonoTouch.Utilities.ShowAlert("Error", "Unable to communicate with GitHub. " + e.Error.LocalizedDescription);
        }
예제 #15
0
        private async void HandleLoadError(object sender, UIWebErrorArgs e)
        {
            Debug.WriteLine(">>>>> Load failed; retrying");
            // Send notification 10 seconds into every every 10 minutes.  This permits two failures withotu notification at the beginning.
            Counter = Counter % 120; // Resets to 0 every 10 minutes.
            await Task.Delay(5000);  // 5 seconds.

            if (Counter == 2)
            {
                Manager.DisplayNotification("Connection lost", null, "Please connect to the Internet", "Connecting");
            }
            // Increment counter.
            Counter++;
            // Try again.
            WebView.LoadRequest(new NSUrlRequest(PopditServer.WebRoot));
        }
예제 #16
0
        protected override void OnLoadError(object sender, UIWebErrorArgs e)
        {
            base.OnLoadError(sender, e);

            //Frame interrupted error
            if (e.Error.Code == 102)
            {
                return;
            }

            if (ViewModel.IsEnterprise)
            {
                MonoTouch.Utilities.ShowAlert("Error", "Unable to communicate with GitHub with given Url. " + e.Error.LocalizedDescription, Stuff);
            }
            else
            {
                MonoTouch.Utilities.ShowAlert("Error", "Unable to communicate with GitHub. " + e.Error.LocalizedDescription);
            }
        }
예제 #17
0
        protected override void OnLoadError(object sender, UIWebErrorArgs e)
        {
            base.OnLoadError(sender, e);

            //Frame interrupted error
            if (e.Error.Code == 102)
            {
                return;
            }

            if (ViewModel.IsEnterprise)
            {
                var alert = _alertDialogService.Alert("Error", "Unable to communicate with GitHub with given Url. " + e.Error.LocalizedDescription);
                alert.ContinueWith(t => ViewModel.LoadCommand.ExecuteIfCan(), TaskContinuationOptions.OnlyOnRanToCompletion);
            }
            else
            {
                _alertDialogService.Alert("Error", "Unable to communicate with GitHub. " + e.Error.LocalizedDescription);
            }
        }
        private void WebView_LoadError(object sender, UIWebErrorArgs e)
        {
            var    URL = (NSObject)e.Error.UserInfo.Values[2];
            string req = URL.ToString();

            if (req.Contains("id_token="))
            {
                string token = Common.FunGetValuefromQueryString(req, "id_token");
                PreferenceHandler.SetToken(token);
            }
            else
            {
                IOSUtil.ShowAlert("Failed to change password.Please try again later.");
            }
            var ViewController = (ViewController)Storyboard.InstantiateViewController("ViewController");

            ViewController.NavigationItem.SetHidesBackButton(true, false);
            NavController.PushViewController(ViewController, false);
            SidebarController.MenuWidth = 0;
            SidebarController.CloseMenu();
        }
예제 #19
0
        public void LoadError(object sender, UIWebErrorArgs e)
        {
            imgBusy.StopAnimating();
            btnStop.Enabled = false;
            SetBackAndForwardEnable();
            var msg = e.Error.ToString();

            if (msg.Contains("NSURLErrorDomain error -999"))
            {
https:          //bugzilla.xamarin.com/show_bug.cgi?id=3480
                Console.WriteLine("### unexpected error occured: " + e.Error);
            }
            else
            {
                // show the error
                UIAlertView alert = new UIAlertView("Browse Error",
                                                    "Web page failed to load: " + e.Error.ToString(),
                                                    null, "OK", null);
                alert.Show();
            }
        }
예제 #20
0
        private async void WebView_LoadError(object sender, UIWebErrorArgs e)
        {
            var URL = (NSObject)e.Error.UserInfo.Values[2];

            string req = URL.ToString();

            if (req.Contains("&code="))
            {
                string code = Common.FunGetValuefromQueryString(req, "code");
                PreferenceHandler.SetAccessCode(code);
                string tokenURL = string.Format(B2CConfig.TokenURLIOS, B2CConfig.Tenant, B2CPolicy.SignInPolicyId, B2CConfig.Grant_type, B2CConfig.ClientId, code);
                var    response = await InvokeApi.Authenticate(tokenURL, string.Empty, HttpMethod.Post);

                if (response.StatusCode == System.Net.HttpStatusCode.OK)
                {
                    string strContent = await response.Content.ReadAsStringAsync();

                    var token = JsonConvert.DeserializeObject <AccessToken>(strContent);
                    PreferenceHandler.SetToken(token.id_token);
                    PreferenceHandler.SetRefreshToken(token.refresh_token);
                }
            }

            if (req.Contains("id_token="))
            {
                string token = Common.FunGetValuefromQueryString(req, "id_token");
                PreferenceHandler.SetToken(token);
                //PreferenceHandler.SetRefreshToken(token.refresh_token);
            }

            var responseUser = await InvokeApi.Invoke(Constants.API_GET_CURRENTUSER, string.Empty, HttpMethod.Get, PreferenceHandler.GetToken());

            if (responseUser.StatusCode != 0)
            {
                InvokeOnMainThread(() =>
                {
                    GetCurrentUserResponse(responseUser);
                });
            }
        }
예제 #21
0
 private void LoadError(object sender, UIWebErrorArgs e)
 {
     Console.WriteLine(("LoadError"));
 }
예제 #22
0
 protected virtual void OnLoadError(object sender, UIWebErrorArgs e)
 {
     MonoTouch.Utilities.PopNetworkActive();
 }
예제 #23
0
 void HandleLoadError(object sender, UIWebErrorArgs e)
 {
     //_ProgressBar.Hidden = true;
     Console.WriteLine(e.Error);
 }
예제 #24
0
 protected virtual void OnLoadError(object sender, UIWebErrorArgs e)
 {
     MonoTouch.Utilities.PopNetworkActive();
     if (RefreshButton != null)
         RefreshButton.Enabled = true;
 }
예제 #25
0
 private void NativeWebView_LoadError(object sender, UIWebErrorArgs uiWebErrorArgs)
 {
     // TODO: Do we need here to call: RefreshNavigationHistoryProperties (); ??
     this.OnNavigationFailed(
         new NavigationFailedEventArgs(
             this.lastLoaded,
             uiWebErrorArgs.Error == null
                 ? null
                 : new InvalidOperationException(uiWebErrorArgs.Error.Description)));
 }
예제 #26
0
		public void HandleWebViewLoadError (object sender, UIWebErrorArgs e)
		{
			MessageBox.Show("Kan ikke åpne side", "Du må ha tilgang til internett for å se innholdet.");
			activityIndicator.StopAnimating();
		}
예제 #27
0
        private void WebView_LoadError(object sender, UIWebErrorArgs e)
        {
            _webView.LoadError -= WebView_LoadError;

            _tcs.SetException(new NSErrorException(e.Error));
        }
예제 #28
0
 protected override void OnLoadError(object sender, UIWebErrorArgs e)
 {
     MonoTouch.Utilities.LogException(new Exception(e.Error.Description));
     MonoTouch.Utilities.ShowAlert("Error", e.Error.Description);
     base.OnLoadError(sender, e);
 }
예제 #29
0
 protected override void OnLoadError(object sender, UIWebErrorArgs e)
 {
     base.OnLoadError(sender, e);
     MonoTouch.Utilities.ShowAlert("Error", "Unable to display this type of file.");
 }
예제 #30
0
 protected virtual void OnLoadError(object sender, UIWebErrorArgs e)
 {
     NetworkActivityService.Instance.PopNetworkActive();
 }
예제 #31
0
 protected virtual void OnLoadError (object sender, UIWebErrorArgs e)
 {
     MonoTouch.Utilities.PopNetworkActive();
 }
예제 #32
0
		public void LoadError (object sender, UIWebErrorArgs e)
		{
			imgBusy.StopAnimating ();
			btnStop.Enabled = false;
			SetBackAndForwardEnable ();
			var msg = e.Error.ToString ();
			if (msg.Contains ("NSURLErrorDomain error -999")) {
				https://bugzilla.xamarin.com/show_bug.cgi?id=3480
				Console.WriteLine ("### unexpected error occured: " + e.Error);
			} else {
				// show the error
				UIAlertView alert = new UIAlertView ("Browse Error",
					                   "Web page failed to load: " + e.Error.ToString (),
					                   null, "OK", null);
				alert.Show ();
			}
		}
		public void HandleWebViewLoadError (object sender, UIWebErrorArgs e)
		{
			MessageBox.Show("Siden kunne ikke lastes", "Sjekk internett-tilkoblingen og prøv igjen");
			activityIndicator.StopAnimating();
		}
예제 #34
0
		public void LoadError (object sender, UIWebErrorArgs e)
		{
			imgBusy.StopAnimating ();
			btnStop.Enabled = false;
			SetBackAndForwardEnable ();
			// show the error
			UIAlertView alert = new UIAlertView ("Browse Error",
							     "Web page failed to load: " + e.Error.ToString (),
							     null, "OK", null);
			alert.Show ();
		}
예제 #35
0
 protected override void OnLoadError(object sender, UIWebErrorArgs e)
 {
     base.OnLoadError(sender, e);
     _backButton.Enabled    = Web.CanGoBack;
     _forwardButton.Enabled = Web.CanGoForward;
 }
 private void ConfigurationLoadError(object sender, UIWebErrorArgs e)
 {
     SetCurrentView(ViewType.eConfigureLoadError);
 }
예제 #37
0
 protected override void OnLoadError(object sender, UIWebErrorArgs e)
 {
     base.OnLoadError(sender, e);
     _alertDialogService.Alert("Error", "Unable to display this type of file.");
 }