コード例 #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;
                }
            };
        }
コード例 #2
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;
                }

            };
        }
コード例 #3
0
 private void ShowProgressHud()
 {
     _hud = new LoadingHUDView("Contacting AgileZen", "Verifying API key");
     window.AddSubview(_hud);
     _hud.StartAnimating();
 }
コード例 #4
0
ファイル: BaseController.cs プロジェクト: johnkors/AgileZen
 protected void StartAnimatingHud()
 {
     _hud = new LoadingHUDView("Loading", "Contacting AgileZen");
     _navController.View.AddSubview(_hud);
     _hud.StartAnimating();
 }