Ejemplo n.º 1
0
        public virtual void SetParentView(IParentView parentView)
        {
            //We're using SetParentView as a kind of initializer...
            if (HighLogic.LoadedSceneIsFlight)
            {
                rebuildAbundanceSummary();
            }

            geoLabView.gps = this.gps;
            geoLabView.abundanceSummary = this.abundanceSummary;
            geoLabView.part             = this.part;
        }
Ejemplo n.º 2
0
 public void SetParentView(IParentView parentView)
 {
 }
Ejemplo n.º 3
0
 public override void SetParentView(IParentView parentView)
 {
     base.SetParentView(parentView);
     this.parentView = parentView;
 }
 public virtual void SetParentView(IParentView parentView)
 {
 }
Ejemplo n.º 5
0
 virtual public void UnRegisterAsChildView(IParentView parent)
 {
     parent.OnObjectSelectEvent -= Parent_OnObjectSelectEvent;
 }
Ejemplo n.º 6
0
        public ParentPresenter(IDataModel dataModel, IParentView parentView, ILoginUserView loginUserView, ICreateUserView createUserView, IWallView wallView, ISettingsView settingView, IAboutView aboutView)
        {
            serverRequest = new MyServerRequest();

            this.dataModel = dataModel;

            this.parentView = parentView;
            this.parentView.InvertVisibility += this.OnInvertVisibility;
            this.parentView.SettingsClicked += this.OnSettingsClicked;
            this.parentView.AboutClicked += this.OnAboutClicked;
            this.parentView.ExitClicked += this.OnExitClicked;

            this.loginUserView = loginUserView;
            this.loginUserView.LoginUserClicked += this.OnLoginUserClicked;
            this.loginUserView.LoginUserOfflineClicked += this.OnLoginUserOfflineClicked;
            this.loginUserView.GoToCreateUserClicked += this.OnGoToCreateUserClicked;
            this.loginUserView.LoginUsernameChanged += this.OnLoginUsernameChanged;

            this.createUserView = createUserView;
            this.createUserView.CreateUserClicked += this.OnCreateUserClicked;
            this.createUserView.GoToLoginUserClicked += this.OnGoToLoginUserClicked;

            this.wallView = wallView;
            this.wallView.NewWallClicked += this.OnNewWallClicked;
            this.wallView.NewMessageClicked += this.OnNewMessageClicked;
            this.wallView.NewWallSelected += this.OnNewWallSelected;
            this.wallView.RefreshWallsClicked += this.OnRefreshWallsClicked;
            this.wallView.WallsAutoRefresh += this.OnRefreshWallsClicked;

            this.settingView = settingView;
            this.settingView.ShowNotificationChanged += this.OnShowNotificationChanged;
            this.settingView.RefreshMinutesChanged += this.OnRefreshMinutesChanged;
            this.settingView.RefreshSecondsChanged += this.OnRefreshSecondsChanged;
            this.settingView.GoToPreviousView += this.OnGoToPreviousView;

            this.aboutView = aboutView;
            this.aboutView.GoToPreviousView += this.OnGoToPreviousView;
            this.aboutView.AuthorWebLinkClicked += this.OnAuthorWebLinkClicked;
            this.aboutView.CodeWebLinkClicked += this.OnCodeWebLinkClicked;

            //load model data
            dataModel.LoadDataModel();

            //set settings on loginView
            if (dataModel.Settings.RememberUser)
            {
                loginUserView.RememberUser = true;
                if (!string.IsNullOrEmpty(dataModel.User.username))
                {
                    loginUserView.Username = dataModel.User.username;
                    loginUserView.LoginOfflineVisible = true;
                    loginUserView.SetPasswordFocus();
                }
                else
                {
                    loginUserView.SetUsernameFocus();
                }
            }
            else
            {
                loginUserView.RememberUser = false;
                loginUserView.SetUsernameFocus();
            }

            //load loginUSerView
            parentView.CurrentChildView = this.loginUserView;
        }