Example #1
0
        public void ShowPopUp(string header, string detail, int showInSeconds, bool loading, UIView currentView)
        {
            LoadingView = new LoadingHUDView(header, detail);

            currentView.AddSubview(AppDelegate.MainAppDelegate.LoadingView);


            if (loading)
            {
                LoadingView.StartAnimating();
            }
            else
            {
                LoadingView.Show();
            }

            var timerCancel = NSTimer.CreateScheduledTimer(new TimeSpan(0, 0, showInSeconds), delegate
            {
                if (AppDelegate.MainAppDelegate.LoadingView == null)
                {
                    return;
                }

                AppDelegate.MainAppDelegate.LoadingView.Close();
                AppDelegate.MainAppDelegate.LoadingView = null;
            });

            LoadingView.CancelEvent += delegate {
                //Hide the view
                AppDelegate.MainAppDelegate.LoadingView.Close();
                AppDelegate.MainAppDelegate.LoadingView = null;

                if (timerCancel != null)
                {
                    timerCancel.Invalidate();
                    timerCancel = null;
                }
            };
        }
        public void ShowPopUp(string header, string detail, int showInSeconds, bool loading, UIView currentView)
        {
            LoadingView = new LoadingHUDView (header, detail);

            currentView.AddSubview(AppDelegate.MainAppDelegate.LoadingView);

            if(loading)
            {
                LoadingView.StartAnimating();
            } else {
                LoadingView.Show ();
            }

            var timerCancel = NSTimer.CreateScheduledTimer(new TimeSpan(0, 0, showInSeconds),delegate
            {

                if(AppDelegate.MainAppDelegate.LoadingView == null)
                    return;

                AppDelegate.MainAppDelegate.LoadingView.Close();
                AppDelegate.MainAppDelegate.LoadingView = null;

            });

            LoadingView.CancelEvent += delegate {
                //Hide the view
                AppDelegate.MainAppDelegate.LoadingView.Close();
                AppDelegate.MainAppDelegate.LoadingView = null;

                if(timerCancel != null)
                {
                    timerCancel.Invalidate();
                    timerCancel = null;
                }

            };
        }
Example #3
0
 private void ShowProgressHud()
 {
     _hud = new LoadingHUDView("Contacting AgileZen", "Verifying API key");
     window.AddSubview(_hud);
     _hud.StartAnimating();
 }
Example #4
0
 protected void StartAnimatingHud()
 {
     _hud = new LoadingHUDView("Loading", "Contacting AgileZen");
     _navController.View.AddSubview(_hud);
     _hud.StartAnimating();
 }