Пример #1
0
        private void txNewEmail_TextChanged(object sender, EventArgs e)
        {
            var temp = sender as TextBox;

            btSignIn.Enabled = checkNotEmptyOrNull();
            if (String.IsNullOrEmpty(temp.Text))
            {
                email = false; return;
            }
            else if (!MyChecker.isEmail(temp.Text))
            {
                MyChecker.setErr(temp, errorEmail, "Email Invailable!", Properties.Resources.ERROR); email = false;
            }
            else
            {
                MyChecker.setErr(temp, errorEmail, "Available!", Properties.Resources.OK); email = true;
            }
        }
Пример #2
0
 public frmAccountSetting()
 {
     InitializeComponent();
     //Text Change
     txChangeEmail.TextChanged += (o, e) =>
     {
         var temp = o as TextBox;
         if (!MyChecker.isEmail(temp.Text))
         {
             MyChecker.setErr(temp, errorChangeEmail, "Email Invailable!", Properties.Resources.ERROR); return;
         }
         else
         {
             MyChecker.setErr(temp, errorChangeEmail, "Available!", Properties.Resources.OK); btChangeEmail.Enabled = true;
         }
     };
     //Button Click
     btChangeEmail.Click += (o, e) =>
     {
         frmEnterPassword frmPasswrod = new frmEnterPassword(btChangeEmail, txChangeEmail);
         frmPasswrod.ShowDialog();
     };
 }