定時器實現

时间:2020-05-11 19:55:24   收藏:0   阅读:47

private void OnTimerCallback(Object obj)
{
po_SvrTime = po_SvrTime.AddSeconds(1);

this.Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Normal,

(System.Threading.ThreadStart)delegate()
{
//你的定时处理
labSvcTime.Content = po_SvrTime.ToString("HH:mm:ss");
//label1.Content = po_SvrTime.ToString("HH");
//textBox1.Text = po_SvrTime.ToString("mm");
});
}

原文:https://www.cnblogs.com/aDoc/p/12870674.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!