定時器實現
作者:互联网
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");
});
}
标签:System,實現,定時器,Content,HH,SvrTime,ToString,po 来源: https://www.cnblogs.com/aDoc/p/12870674.html