标签:style blog class code java tar
//窗体加载完毕 void MyMessageBox_Loaded(object sender, RoutedEventArgs e) { //启动定时期倒计时,多线程计时 //System.Threading.Timer timer; //启动单线程计时 System.Windows.Threading.DispatcherTimer timer = new System.Windows.Threading.DispatcherTimer(); timer.Interval = new TimeSpan(0, 0, 1); timer.Tick += ShowTimeTick; timer.Start(); } //定时修改计时时间 private void ShowTimeTick(object sender, EventArgs e) { timeTick.Content = TimeSpan + "秒后,自动关闭..."; if (TimeSpan == 0) { this.Close(); } TimeSpan--; }
标签:style blog class code java tar
原文地址:http://www.cnblogs.com/tianmahygj/p/3716225.html