solar_App: 新增測試Email格式
This commit is contained in:
parent
2781530487
commit
8bcdd703a2
@ -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})(\]?)$");
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user