Beispiel #1
0
        private void UpdatePasswordStrengthLabel(string text)
        {
            bool show = !(string.IsNullOrEmpty(text) || passwordStrengthVisible);
            bool hide = string.IsNullOrEmpty(text) && passwordStrengthVisible;

            if (show)
            {
                PasswordStrengthLabel.FadeTo(1, easing: Easing.CubicInOut);
                passwordStrengthVisible = true;
            }
            else if (hide)
            {
                PasswordStrengthLabel.FadeTo(0, easing: Easing.CubicInOut);
                passwordStrengthVisible = false;
            }
        }
Beispiel #2
0
 private void SwitchButtons_Switched(object sender, bool signUp)
 {
     justSwitched = true;
     _signUp      = signUp;
     if (signUp)
     {
         Button.TranslateTo(0, 0, easing: Easing.CubicInOut);
         PasswordConfirmationEntry.IsEnabled = true;
         PasswordConfirmationSL.FadeTo(1, easing: Easing.CubicInOut);
         UpdatePasswordStrengthLabel(PasswordEntry.Text);
     }
     else
     {
         Button.TranslateTo(0, -(PasswordConfirmationSL.Height + 4), easing: Easing.CubicInOut);
         PasswordConfirmationSL.FadeTo(0, easing: Easing.CubicInOut)
         .ContinueWith(_ => PasswordConfirmationEntry.IsEnabled = false);
         if (passwordStrengthVisible)
         {
             PasswordStrengthLabel.FadeTo(0, easing: Easing.CubicInOut);
             passwordStrengthVisible = false;
         }
     }
 }