日期:2014-05-17 浏览次数:21000 次
//启动 短信记录刷新 线程名称为 newthread3
newthread3 = new Thread(new ThreadStart(t_record_flash));
newthread3.IsBackground = true;
newthread3.Start();
public void t_record_flash( ) //短信记录刷新事件
{
while (true)
{
try
{
this.t_historyTableAdapter.Fill(this.messageMedomDataSet.t_history);
}
catch(System.Exception ex)
{
System.Windows.Forms.MessageBox.Show(ex.Message);
}
Thread.Sleep(5000); //5秒之后再次执行该时间,不停刷新
}
}