标签:
//系统启动后,自动启动时钟 void jishi_kernel() { try { while (DateTimeRun) { Thread.Sleep(1000); if (myRunning) Runni_time++; else Pasue_time++; if (DateTimeRun) /* 程序的核心,否则报错;DateTimeRun为false后,这句话还可能被调用;在Form_closing前置DateTimeRun=false*/ this.Invoke(new ShowMessageMethod(ShowMessage), Runni_time, Pasue_time); //正常和非正常计时 } } catch (System.ObjectDisposedException ee) { MessageBox.Show("错误1:" + ee.ToString()); } catch (System.Exception ee) { MessageBox.Show("错误2:" + ee.ToString()); } }
标签:
原文地址:http://www.cnblogs.com/qqhfeng/p/4206094.html