示例#1
0
 private void btSend_Click(object sender, EventArgs e)
 {
     code    = StringPassword.RandomStringGenerator(6);
     account = (ac.getObject(ac.getUserName(txSendEmail.Text)));
     if (String.IsNullOrEmpty(txSendEmail.Text))
     {
         return;
     }
     if (String.IsNullOrEmpty(account.username))
     {
         MyChecker.setErr(txSendEmail, errorEmail, "Email is not available!", Properties.Resources.ERROR); txSendEmail.Focus();
     }
     else if (MyAction.sendEmail(txSendEmail.Text, code))
     {
         MessageBox.Show("If you don't received code, Please try send again!", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); myEmail = txSendEmail.Text;
     }
     else
     {
         MessageBox.Show("If you don't received code, Please try send again!", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error); txSendEmail.Focus();
     }
     groupBox1.Visible = false;
 }