Example #1
0
        private void txNewPassword_TextChanged(object sender, EventArgs e)
        {
            var temp = sender as TextboxPassword;

            if (String.IsNullOrEmpty(temp.Text))
            {
                curr = false;
            }
            else if (MyChecker.HaveUnicodeCharacter(temp.Text))
            {
                MyChecker.setErr(temp, errorNew, "Can't accept password with a unicode character. Please try again!!", Properties.Resources.ERROR); newpw = false;
            }
            else if (!MyChecker.isPassword(temp.Text))
            {
                MyChecker.setErr(temp, errorNew, "Password need a-z, A-Z, 0-9 and symbol for a stronger password!", Properties.Resources.ERROR); newpw = false;
            }
            else
            {
                MyChecker.setErr(temp, errorNew, "Available!", Properties.Resources.OK); newpw = true;
            }
        }