예제 #1
0
 private void MskCep_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         if (EmailText.Enabled)
         {
             EmailText.Focus();
         }
         else
         {
             ReturnButton.Focus();
         }
     }
 }
예제 #2
0
 //Validating email address
 private void EmailText_Validating(object sender, CancelEventArgs e)
 {
     try
     {
         var  mail         = new MailAddress(EmailText.Text);
         bool isValidEmail = mail.Host.Contains(".");
         if (!isValidEmail)
         {
             MessageBox.Show("Not a valid e-mail address!");
             EmailText.Focus();
         }
     }
     catch (Exception)
     {
         MessageBox.Show("Not a valid e-mail address!");
         EmailText.Focus();
     }
 }
예제 #3
0
 public LoginPage()
 {
     InitializeComponent();
     EmailText.Focus();
 }