111,097
社区成员




public void MessageManage()
{
WaitCallback callBack_Split;
callBack_Split = new WaitCallback(SMS_AutoSplit);
ThreadPool.QueueUserWorkItem(callBack_Split, Service_IsRunning);
}
private void frmMain_Load(object sender, EventArgs e)
{
try
{
EasyCreate.Data.Common.COBase.System_Init();
WcfService_Init();
Init_SMS();
Service_IsRunning = !Service_IsRunning;
MessageManage();
}
catch (Exception ex)
{
}
}
private void Start_Click(object sender, EventArgs e)
{
Service_IsRunning = !Service_IsRunning;
//Init_SMS();
//MessageManage();
if (Service_IsRunning)
{
Start.Text = "开始";
}
else
{
Start.Text = "暂停";
}
}
public void SMS_AutoSplit(object state)
{
if (!(bool)state)
{
Thread.Sleep(5000);
}
while ((bool)state)
{....}
}