public ReconnectingView(TopLevelViewControllerBase parent) : base() { ExceptionUtility.Try(() => { this.BackgroundColor = GraphicsUtility.ColorForReconBar(DisplayMode.Reconnecting); this._parent = new WeakReference <TopLevelViewControllerBase>(parent); this._messageLabel.SetFontAndColor(new UI.FontWithColor(Fonts.RegularFontName, Sizes.FontSize9, UIColor.White)); }); }
public TabBarView(TopLevelViewControllerBase parent) : base() { ExceptionUtility.Try(() => { this.BackgroundColor = UIColor.White; this._parent = new WeakReference <TopLevelViewControllerBase>(parent); this.SetAlertsButtonImage(); _alertsButton.TouchUpInside += (o, e) => { ExceptionUtility.Try(() => { TopLevelViewControllerBase target; if (this._parent != null && this._parent.TryGetTarget(out target)) { target.NavigateAlerts(); } }); }; _homeButton.SetImage(_homeTabImage, UIControlState.Normal); _homeButton.SetImage(_homeTabActiveImage, UIControlState.Disabled); _homeButton.TouchUpInside += (o, e) => { ExceptionUtility.Try(() => { TopLevelViewControllerBase target; if (this._parent != null && this._parent.TryGetTarget(out target)) { target.NavigateHome(); } }); }; _settingsButton.ImageView.Image = UIImage.FromFile("Images/TabBar/gear.png"); _settingsButton.SetImage(_settingsTabImage, UIControlState.Normal); _settingsButton.SetImage(_settingsTabActiveImage, UIControlState.Disabled); _settingsButton.TouchUpInside += (o, e) => { ExceptionUtility.Try(() => { TopLevelViewControllerBase target; if (this._parent != null && this._parent.TryGetTarget(out target)) { target.NavigateUserConfig(); } }); }; this.AddSubviews(_alertsButton, _homeButton, _settingsButton, _dividerView); NSNotificationCenter.DefaultCenter.AddObserver(new NSString(NotificationType.AlertsCountChanged.ToString()), this.OnAlertsCountChanged); }); }
public ConnectionStateDebugView(TopLevelViewControllerBase parent) : base() { ExceptionUtility.Try(() => { this.BackgroundColor = UIColor.White; this._parent = new WeakReference <TopLevelViewControllerBase>(parent); this._infoLabel.SetFontAndColor(new UI.FontWithColor(Fonts.RegularFontName, Sizes.FontSize4, Colors.StandardTextColor)); this.SetText(String.Empty); this.AddSubviews(_dividerView, _infoLabel); NSNotificationCenter.DefaultCenter.AddObserver(new NSString(NotificationType.ConnectionStateChanged.ToString()), this.OnConnectionStateChanged); }); }