コード例 #1
0
        private void BtnRegister_Click(object sender, EventArgs e)
        {
            FormRegister FrmRegister = new FormRegister();

            FrmRegister.Show();
            Close();
        }
コード例 #2
0
        private void BtnForgetPwd_Click(object sender, EventArgs e)
        {
            DialogResult ret;

            if (TxtID.Text.Trim().Equals(string.Empty))
            {
                MessageBox.Show("请输入用户名\n或者您未注册!", "提示",
                                MessageBoxButtons.OK, MessageBoxIcon.Information);

                ret = MessageBox.Show("您要注册吗?", "提示",
                                      MessageBoxButtons.YesNo, MessageBoxIcon.Information);

                if (ret.Equals(DialogResult.Yes))
                {
                    FormRegister frmRegister = new FormRegister();
                    frmRegister.Show();

                    Close();
                }

                return;
            }

            ret = MessageBox.Show("您是否还记的您的密码提示问题?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information);

            if (ret.Equals(DialogResult.Yes))
            {
                FormForgetPwdByPwdQuestion FrmFgPwd = new FormForgetPwdByPwdQuestion();
                FrmFgPwd.TxtID.Text = TxtID.Text.Trim();

                FrmFgPwd.Show();
                Close();

                MessageBox.Show("请输入密码提示问题的答案", "提示",
                                MessageBoxButtons.OK, MessageBoxIcon.Information);

                return;
            }
            else
            {
                ret = MessageBox.Show("确定通过邮箱验证身份吗?", "提示",
                                      MessageBoxButtons.YesNo, MessageBoxIcon.Information);

                if (ret.Equals(DialogResult.Yes))
                {
                    FormForgetPwdByMail FrmFgPwd = new FormForgetPwdByMail();
                    FrmFgPwd.TxtID.Text = TxtID.Text.Trim();

                    FrmFgPwd.Show();

                    Close();

                    return;
                }
                else
                {
                }
            }
        }