Beispiel #1
0
        protected override void Initialize()
        {
            signinView            = ViewsManager.GetView <SignInView>("SigninView");
            signupView            = ViewsManager.GetView <SignUpView>("SignupView");
            passwordResetView     = ViewsManager.GetView <PasswordResetView>("PasswordResetView");
            passwordResetCodeView = ViewsManager.GetView <PasswordResetCodeView>("PasswordResetCodeView");
            emailConfirmationView = ViewsManager.GetView <EmailConfirmationView>("EmailConfirmationView");

            MsfTimer.WaitForEndOfFrame(() =>
            {
                if (useDefaultCredentials && Application.isEditor)
                {
                    signinView.SetInputFieldsValues(defaultUsername, defaultPassword);
                    signupView.SetInputFieldsValues(defaultUsername, defaultEmail, defaultPassword);
                }

                if (IsConnected)
                {
                    Msf.Events.Invoke(EventKeys.hideLoadingInfo);
                    signinView.Show();
                }
                else
                {
                    Msf.Events.Invoke(EventKeys.showLoadingInfo, "Connecting to master server... Please wait!");
                }
            });
        }
Beispiel #2
0
        protected override void OnBeforeClientConnectedToServer()
        {
            signinView            = ViewsManager.GetView <SignInView>("SigninView");
            signupView            = ViewsManager.GetView <SignUpView>("SignupView");
            passwordResetView     = ViewsManager.GetView <PasswordResetView>("PasswordResetView");
            passwordResetCodeView = ViewsManager.GetView <PasswordResetCodeView>("PasswordResetCodeView");
            emailConfirmationView = ViewsManager.GetView <EmailConfirmationView>("EmailConfirmationView");

            Msf.Client.Auth.RememberMe = rememberUser;

            MsfTimer.WaitForEndOfFrame(() =>
            {
                if (useDefaultCredentials && Application.isEditor)
                {
                    signinView.SetInputFieldsValues(defaultUsername, defaultPassword);
                    signupView.SetInputFieldsValues(defaultUsername, defaultEmail, defaultPassword);
                }

                //if (IsConnected)
                //{
                //    Msf.Events.Invoke(EventKeys.hideLoadingInfo);
                //    signinView.Show();
                //}
                //else
                //{
                //    Msf.Events.Invoke(EventKeys.showLoadingInfo, "Connecting to master server... Please wait!");
                //}
            });
        }