Esempio n. 1
0
        static void Main(string[] args)
        {
            EmailCheckHelper emailCheck = new EmailCheckHelper();
            string           input      = "";
            bool             isSucess   = emailCheck.checkEmail("*****@*****.**");

            Console.WriteLine(emailCheck.ToString());
            Console.WriteLine("请输入电子邮件地址:");
            while ((input = Console.ReadLine()) != "")
            {
                emailCheck.checkEmail(input);
                Console.WriteLine(emailCheck.ToString());
                Console.WriteLine("请输入电子邮件地址:");
            }
            Console.Read();
        }
Esempio n. 2
0
        private void btnQuery_Click(object sender, EventArgs e)
        {
            string email = this.txtEmailAddress.Text;

            this.richText.Text    = "开始验证……";
            this.btnQuery.Enabled = false;
            th = new Thread(delegate(){
                if (emailCheck.checkEmail(email))
                {
                    threadCorssControl(string.Format("Email:{0}存在\r\n", email));
                }
                else
                {
                    threadCorssControl(string.Format("Email:{0}不存在\r\n", email));
                }
                threadCorssControl(emailCheck.ToString());

                threadCorssControlButton(this.btnQuery, true);
            });

            th.Start();
        }