Exemplo n.º 1
0
        /// <summary>
        /// Shows the message.
        /// </summary>
        /// <param name="message">The message.</param>
        /// <param name="controlName">Name of the control.</param>
        public void ShowMessage(string message, ControlNames controlName)
        {
            if (!string.IsNullOrEmpty(message))
            {
                ErrorMessageTextBlock.Text       = message;
                ErrorMessageTextBlock.Visibility = Visibility.Visible;
                switch (controlName)
                {
                case ControlNames.ConfirmPassword:
                {
                    ConfirmPasswordBox.DelayedFocus();
                    break;
                }

                case ControlNames.Password:
                {
                    PasswordBox.DelayedFocus();
                    break;
                }

                case ControlNames.ZipCode:
                {
                    ZipCodeTextBox.DelayedFocus();
                    break;
                }

                case ControlNames.LastName:
                {
                    LastNameTextBox.DelayedFocus();
                    break;
                }

                case ControlNames.FirstName:
                {
                    FirstNameTextBox.DelayedFocus();
                    break;
                }

                case ControlNames.Email:
                {
                    EmailTextBox.DelayedFocus();
                    break;
                }

                case ControlNames.GetEmail:
                {
                    GetEmailCheckBox.DelayedFocus();
                    break;
                }
                }
            }
            else
            {
                ErrorMessageTextBlock.Visibility = Visibility.Collapsed;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Loads this instance.
        /// </summary>
        public void Load()
        {
            ErrorMessageTextBlock.Visibility = Visibility.Collapsed;
            FirstNameTextBox.Text            = string.Empty;
            LastNameTextBox.Text             = string.Empty;
            EmailTextBox.Text           = string.Empty;
            PasswordBox.Password        = string.Empty;
            ConfirmPasswordBox.Password = string.Empty;
            ZipCodeTextBox.Text         = string.Empty;
            GetEmailCheckBox.IsChecked  = true;

            _isValidInput = ValidateMembershipInputs();
            MembershipKeyboard.ResetSettings();

            FirstNameTextBox.DelayedFocus();
        }
Exemplo n.º 3
0
        /// <summary>
        /// Loads this instance.
        /// </summary>
        public void Load(string firstname, string lastname, string email, string password, string confirmPassword, string zipcode, bool isGetEmail)
        {
            ErrorMessageTextBlock.Visibility = Visibility.Collapsed;
            FirstNameTextBox.Text            = firstname;
            LastNameTextBox.Text             = lastname;
            EmailTextBox.Text           = email;
            PasswordBox.Password        = password;
            ConfirmPasswordBox.Password = confirmPassword;
            ZipCodeTextBox.Text         = zipcode;
            GetEmailCheckBox.IsChecked  = isGetEmail;

            _isValidInput = ValidateMembershipInputs();

            DoneButton.IsEnabled       = _isValidInput;
            SubscriptionPlan.IsEnabled = _isValidInput;
            MembershipKeyboard.ResetSettings();

            FirstNameTextBox.DelayedFocus();
        }