private void InitializeAllStrings()
        {
            // login
            EmailTextField.Placeholder    = Application.LocalizedString("EmailAddress");
            PasswordTextField.Placeholder = Application.LocalizedString("Password");
            LoginButton.SetTitle(Application.LocalizedString("Login"), UIControlState.Normal);
            WhatIsSeekiosButton.SetTitle(Application.LocalizedString("WhatIsSeekios"), UIControlState.Normal);

            // double action forget/create
            ForgetPasswordButton.SetTitle(Application.LocalizedString("ForgetPassword"), UIControlState.Normal);
            CreateAccountButton.SetTitle(Application.LocalizedString("CreateAccount"), UIControlState.Normal);
            BackButton.SetTitle(Application.LocalizedString("Back"), UIControlState.Normal);

            // createAccount
            FirstNameTextField.Placeholder = Application.LocalizedString("FirstName");
            LastNameTextField.Placeholder  = Application.LocalizedString("LastName");
            PasswordTextFieldOfRegistration.Placeholder = Application.LocalizedString("Password");
            ConfirmPasswordTextField.Placeholder        = Application.LocalizedString("ConfirmPassword");
            RegistrationButton.SetTitle(Application.LocalizedString("CreateMyAccount"), UIControlState.Normal);
            EmailTextFieldOfRegistration.Placeholder = Application.LocalizedString("EmailAddress");
            ErrorMessageLabel.Text = Application.LocalizedString("PasswordErrorLength");

            // forget Password
            EmailTextFieldOfForgetPassword.Placeholder = Application.LocalizedString("EmailAddress");
            ResetPasswordButton.SetTitle(Application.LocalizedString("ResetPassword"), UIControlState.Normal);
        }
示例#2
0
        void ReleaseDesignerOutlets()
        {
            if (ActivityIndicator != null)
            {
                ActivityIndicator.Dispose();
                ActivityIndicator = null;
            }

            if (DoneCard != null)
            {
                DoneCard.Dispose();
                DoneCard = null;
            }

            if (EmailTextField != null)
            {
                EmailTextField.Dispose();
                EmailTextField = null;
            }

            if (ErrorLabel != null)
            {
                ErrorLabel.Dispose();
                ErrorLabel = null;
            }

            if (ResetPasswordButton != null)
            {
                ResetPasswordButton.Dispose();
                ResetPasswordButton = null;
            }

            if (ResetPasswordButtonBottomConstraint != null)
            {
                ResetPasswordButtonBottomConstraint.Dispose();
                ResetPasswordButtonBottomConstraint = null;
            }

            if (TopConstraint != null)
            {
                TopConstraint.Dispose();
                TopConstraint = null;
            }

            if (SuccessMessageLabel != null)
            {
                SuccessMessageLabel.Dispose();
                SuccessMessageLabel = null;
            }
        }
示例#3
0
        private void TextBox_KeyUp(object sender, KeyRoutedEventArgs e)
        {
            if (e.Key == Windows.System.VirtualKey.Enter)
            {
                switch (((Control)sender).Name)
                {
                case "Email":
                    ResetPasswordButton.Focus(FocusState.Pointer);
                    ResetPasswordButton_Click(sender, null);
                    break;

                default:
                    break;
                }
            }
        }
        private void prepareViews()
        {
            ResetPasswordButton.SetTitleColor(
                Color.Login.DisabledButtonColor.ToNativeColor(),
                UIControlState.Disabled
                );

            EmailTextField.ShouldReturn = _ =>
            {
                ViewModel.ResetCommand.Execute();
                return(false);
            };

            ActivityIndicator.StartAnimation();

            prepareBackbutton();
        }
示例#5
0
        private void prepareViews()
        {
            NavigationController.NavigationBarHidden = false;

            ResetPasswordButton.SetTitleColor(
                Core.UI.Helper.Colors.Login.DisabledButtonColor.ToNativeColor(),
                UIControlState.Disabled
                );

            EmailTextField.Rx().ShouldReturn()
            .Subscribe(ViewModel.Reset.Inputs)
            .DisposedBy(DisposeBag);

            ActivityIndicator.StartSpinning();

            ErrorLabel.Hidden = true;
        }
        public AdminMainMenuForm(FormClose hClose, LogoutButton hLogout, ViewBooksButton hViewBooks, CheckOutButton hCheckOut, RenewBooksButton hRenewBooks, ReturnBooksButton hReturnBooks, UpdateConditionButton hUpdate, RetireBookButton hRetire, ResetPasswordButton hReset, AddBookButton hAdd, CreateAccountButton hCreate)
        {
            handleClose           = hClose;
            handleLogOut          = hLogout;
            handleViewBooks       = hViewBooks;
            handleCheckOut        = hCheckOut;
            handleRenewBooks      = hRenewBooks;
            handleReturnBooks     = hReturnBooks;
            handleUpdateCondition = hUpdate;
            handleRetireBook      = hRetire;
            handleResetPassword   = hReset;
            handleAddBook         = hAdd;
            handleCreateAccount   = hCreate;

            InitializeComponent();
            BackColor = Color.SteelBlue;
            uxWelcomeLabel.BackColor = Color.LightSteelBlue;
            uxButtonPanel.BackColor  = Color.LightSteelBlue;
        }
示例#7
0
        void ReleaseDesignerOutlets()
        {
            if (BackButton != null)
            {
                BackButton.Dispose();
                BackButton = null;
            }

            if (BackgroundImageView != null)
            {
                BackgroundImageView.Dispose();
                BackgroundImageView = null;
            }

            if (ConfirmPasswordTextField != null)
            {
                ConfirmPasswordTextField.Dispose();
                ConfirmPasswordTextField = null;
            }

            if (CreateAccountButton != null)
            {
                CreateAccountButton.Dispose();
                CreateAccountButton = null;
            }

            if (EmailTextField != null)
            {
                EmailTextField.Dispose();
                EmailTextField = null;
            }

            if (EmailTextFieldOfForgetPassword != null)
            {
                EmailTextFieldOfForgetPassword.Dispose();
                EmailTextFieldOfForgetPassword = null;
            }

            if (EmailTextFieldOfRegistration != null)
            {
                EmailTextFieldOfRegistration.Dispose();
                EmailTextFieldOfRegistration = null;
            }

            if (ErrorMessageLabel != null)
            {
                ErrorMessageLabel.Dispose();
                ErrorMessageLabel = null;
            }

            if (FirstNameTextField != null)
            {
                FirstNameTextField.Dispose();
                FirstNameTextField = null;
            }

            if (ForgetPasswordButton != null)
            {
                ForgetPasswordButton.Dispose();
                ForgetPasswordButton = null;
            }

            if (ForgetPasswordContainer != null)
            {
                ForgetPasswordContainer.Dispose();
                ForgetPasswordContainer = null;
            }

            if (LastNameTextField != null)
            {
                LastNameTextField.Dispose();
                LastNameTextField = null;
            }

            if (LoadingIndicator != null)
            {
                LoadingIndicator.Dispose();
                LoadingIndicator = null;
            }

            if (LoginButton != null)
            {
                LoginButton.Dispose();
                LoginButton = null;
            }

            if (LoginContainer != null)
            {
                LoginContainer.Dispose();
                LoginContainer = null;
            }

            if (PasswordTextField != null)
            {
                PasswordTextField.Dispose();
                PasswordTextField = null;
            }

            if (PasswordTextFieldOfRegistration != null)
            {
                PasswordTextFieldOfRegistration.Dispose();
                PasswordTextFieldOfRegistration = null;
            }

            if (RegistrationButton != null)
            {
                RegistrationButton.Dispose();
                RegistrationButton = null;
            }

            if (RegistrationContainer != null)
            {
                RegistrationContainer.Dispose();
                RegistrationContainer = null;
            }

            if (ResetPasswordButton != null)
            {
                ResetPasswordButton.Dispose();
                ResetPasswordButton = null;
            }

            if (WhatIsSeekiosButton != null)
            {
                WhatIsSeekiosButton.Dispose();
                WhatIsSeekiosButton = null;
            }
        }
示例#8
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            Title = Resources.LoginForgotPassword;
            ResetPasswordButton.SetTitle(Resources.GetPasswordResetLink, UIControlState.Normal);
            EmailTextField.Placeholder = Resources.EmailAddress;
            SuccessMessageLabel.Text   = Resources.PasswordResetSuccess;

            prepareViews();

            //Text
            ViewModel.ErrorMessage
            .Subscribe(errorMessage =>
            {
                ErrorLabel.Text   = errorMessage;
                ErrorLabel.Hidden = string.IsNullOrEmpty(errorMessage);
            })
            .DisposedBy(DisposeBag);

            EmailTextField.Rx().Text()
            .Select(Email.From)
            .Subscribe(ViewModel.Email.OnNext)
            .DisposedBy(DisposeBag);

            ViewModel.Reset.Executing
            .Subscribe(loading =>
            {
                UIView.Transition(
                    ResetPasswordButton,
                    Animation.Timings.EnterTiming,
                    UIViewAnimationOptions.TransitionCrossDissolve,
                    () => ResetPasswordButton.SetTitle(loading ? "" : Resources.GetPasswordResetLink, UIControlState.Normal),
                    null
                    );
            })
            .DisposedBy(DisposeBag);

            //Visibility
            ViewModel.PasswordResetSuccessful
            .Subscribe(DoneCard.Rx().IsVisibleWithFade())
            .DisposedBy(DisposeBag);

            ViewModel.PasswordResetSuccessful
            .Invert()
            .Subscribe(ResetPasswordButton.Rx().IsVisibleWithFade())
            .DisposedBy(DisposeBag);

            ViewModel.PasswordResetSuccessful
            .Where(s => s == false)
            .Subscribe(_ => EmailTextField.BecomeFirstResponder())
            .DisposedBy(DisposeBag);

            ViewModel.Reset.Executing
            .Subscribe(ActivityIndicator.Rx().IsVisibleWithFade())
            .DisposedBy(DisposeBag);

            //Commands
            ResetPasswordButton.Rx()
            .BindAction(ViewModel.Reset)
            .DisposedBy(DisposeBag);
        }