public SubHeaderStripViewModel(SubHeaderBarViewModel subHeaderBarViewModel, RestrictedLocationContainerViewModel restrictedLocationViewModel, UserContext userContext, IPersistedSettings settings, RestrictedLocationChecker restrictedLocationChecker) { this._subHeaderBarViewModel = subHeaderBarViewModel; this._restrictedLocationViewModel = restrictedLocationViewModel; this._restrictedLocationChecker = restrictedLocationChecker; this._userContext = userContext; this._settings = settings; this._userContext.add_UserLoggedIn(new EventHandler <UserEventArgs>(this.OnUserLoggedIn)); base.get_Items().Add(subHeaderBarViewModel); base.get_Items().Add(restrictedLocationViewModel); }
private void OnIpResolveFailed(object sender, EventArgs e) { if (this._currentServer != null) { if (this._currentState == 3) { this.StateMessage = string.Format("You are connected to {0}.", this._currentServer.GetConnectionName()) + string.Format("{0}", SubHeaderBarViewModel.GetFailedIpResolveIpDestinationMessage(this._currentServer)); return; } } }
private void SetConnected(GeographicalServer server) { this.LabelForeground = "#8ba6bd"; this.BubbleColor = "#73ba10"; this.StateMessage = string.Format("You are connected to {0}.", server.GetConnectionName()) + string.Format(" {0}", SubHeaderBarViewModel.GetResolvedIpDestinationMessage(server, "")); }