solar_App: 新增測試Email格式

This commit is contained in:
wanling040@gmail.com 2022-08-12 18:50:11 +08:00
parent 2781530487
commit 8bcdd703a2

View File

@ -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})(\]?)$");
//}
}
}