From 8bcdd703a2d272649a4d3b99cea51c9576435eb6 Mon Sep 17 00:00:00 2001 From: "wanling040@gmail.com" Date: Fri, 12 Aug 2022 18:50:11 +0800 Subject: [PATCH] =?UTF-8?q?solar=5FApp:=20=E6=96=B0=E5=A2=9E=E6=B8=AC?= =?UTF-8?q?=E8=A9=A6Email=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- solarApp/fmArchive.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/solarApp/fmArchive.cs b/solarApp/fmArchive.cs index 39826eb..119c1c1 100644 --- a/solarApp/fmArchive.cs +++ b/solarApp/fmArchive.cs @@ -9,6 +9,7 @@ using System.Text; using System.Windows.Forms; using solarApp.Service; using solarApp.Model; +//using System.Text.RegularExpressions; namespace solarApp { @@ -699,5 +700,24 @@ namespace solarApp autoTask = false; lbMsgTitle.Text = System.DateTime.Now.ToString() + " invdayhour - 完成!"; } + + //test for email format + //private void button3_Click(object sender, EventArgs e) + //{ + // if(IsValidEmail(textBox2.Text)) + // { + // label3.Text = "OK"; + // } + // else + // { + // label3.Text = "X"; + // } + //} + + //bool IsValidEmail(string strIn) + //{ + // // Return true if strIn is in valid e-mail format. + // return Regex.IsMatch(strIn, @"^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$"); + //} } }