DispatcherTimer timer; private void Window_Loaded(object sender, RoutedEventArgs e) { timer = new DispatcherTimer(); timer.Interval = TimeSpan.FromMilliseconds(64); timer.Tick += timer1_Tick; timer.Start(); } private void timer1_Tick(object sender, EventArgs e) { //定时执行的内容 }
只是记录一下写过的代码,后面忘记的时候可以来看看,就不多做描述了!!!
时间: 2024-10-10 16:52:42