コード例 #1
0
 private void PasswordTextBox1_Leave(object sender, EventArgs e)
 {
     if (PasswordTextBox1.Text.Trim() == "")
     {
         PasswordCueText1.Show();
     }
     else
     {
         if (IsNumAndEnCh(PasswordTextBox1.Text) == false)
         {
             PWD1AlertLabel.Show();
             if (PasswordTextBox1.Text != PasswordTextBox2.Text && PasswordTextBox2.Text != "" && PWD2AlertLabel.Visible == false)
             {
                 PWD2AlertLabel.Show();
             }
         }
         else
         {
             if (PasswordTextBox1.Text == PasswordTextBox2.Text && PWD2AlertLabel.Visible == true)
             {
                 PWD2AlertLabel.Hide();
             }
             else if (PasswordTextBox1.Text != PasswordTextBox2.Text && PasswordTextBox2.Text != "" && PWD2AlertLabel.Visible == false)
             {
                 PWD2AlertLabel.Show();
             }
             PWD1AlertLabel.Hide();
             PasswordCueText1.Hide();
         }
     }
 }
コード例 #2
0
 private void PasswordTextBox1_Enter(object sender, EventArgs e)
 {
     if (PasswordTextBox1.Text.Trim() == "")
     {
         PasswordCueText1.Hide();
     }
     else if (PasswordTextBox1.Text.Trim() != "" && PasswordCueText1.Visible == false)
     {
         PasswordCueText1.Hide();
     }
 }