Beispiel #1
0
        protected virtual void ShowReconBar(string text = null)
        {
            MainThreadUtility.InvokeOnMain(() =>
            {
                //if reconnecting view has been disposed, take care of it
                if (this.ReconBar.IsDisposed)
                {
                    try { this.ReconBar.RemoveFromSuperview(); }
                    catch (Exception) { }
                    this.ReconBar = new ReconnectingView(this);
                }

                if (String.IsNullOrEmpty(text))
                {
                    text = StringLiterals.Reconnecting;
                }

                ReconnectingView.DisplayMode displayMode = ReconnectingView.DisplayMode.Reconnecting;
                if (ConnectionManager.State.IsDead)
                {
                    displayMode = ReconnectingView.DisplayMode.ServerDown;
                    text        = StringLiterals.ServerNotAvailable;
                }

                this.ReconBar.SetFrameSize(this.PrimeView.Frame.Width, ReconnectingView.Height);
                this.ReconBar.SetFrameLocation(0, this.ReconBarVerticalLocation);
                this.ReconBar.UserInteractionEnabled = false;
                this.PrimeView.AddSubview(this.ReconBar);
                this.ReconBar.SetTextAndMode(text, displayMode);
                this.PrimeView.BringSubviewToFront(this.ReconBar);

                this.AfterShowReconBar();
            });
        }
Beispiel #2
0
 public TopLevelViewControllerBase() : base()
 {
     ExceptionUtility.Try(() =>
     {
         SubscribeConnectionEvents();
         this.TabBar        = new TabBarView(this);
         this.ConnectionBar = new ConnectionStateDebugView(this);
         this.ReconBar      = new ReconnectingView(this);
     });
 }
Beispiel #3
0
 public TopLevelViewControllerBase(string nibName, Foundation.NSBundle bundle, AlertViewModel alert) : base(nibName, null)
 {
     ExceptionUtility.Try(() =>
     {
         SubscribeConnectionEvents();
         this.TabBar        = new TabBarView(this);
         this.ConnectionBar = new ConnectionStateDebugView(this);
         this.ReconBar      = new ReconnectingView(this);
         AlertID            = alert;
     });
 }