引用using System.Windows.Threading;

DispatcherTimer dispatchertimer = new DispatcherTimer();//创建一个新的计时器
dispatchertimer.Interval = TimeSpan.FromSeconds(1);//每一秒钟发生一次
dispatchertimer.Tick += new EventHandler(dispatchertimer_Tick);//dispatchertimer_Tick:一个事件,到一秒钟发生的事件
dispatchertimer.Start();//开始

相关文章:

  • 2021-12-14
  • 2022-02-03
  • 2021-06-20
  • 2021-11-16
  • 2021-10-14
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-20
  • 2021-10-13
  • 2021-08-19
  • 2021-05-16
  • 2021-12-01
相关资源
相似解决方案