1 System.Timers.Timer timer = new System.Timers.Timer(); 2 timer.Interval = 360; 3 timer.Elapsed += delegate 4 { 5 Application.Current.Dispatcher.BeginInvoke(new Action(() => 6 { 7 //TODO :你的业务; 8 })); 9 10 timer.Stop(); 11 }; 12 timer.Start();
1 System.Timers.Timer timer = new System.Timers.Timer(); 2 timer.Interval = 360; 3 timer.Elapsed += delegate 4 { 5 Application.Current.Dispatcher.BeginInvoke(new Action(() => 6 { 7 //TODO :你的业务; 8 })); 9 10 timer.Stop(); 11 }; 12 timer.Start();
上一篇:WPF 踩坑笔记7 引用字体文件
下一篇:WPF 踩坑笔记9 直接打印
多线程这些线程安全的坑,你在工作中踩了么?
systemtap embedded C踩坑笔记戳这:
一、DataBinding1.让布局页面承担了部分原本属于页面的工作,是页面文件和布局耦合度进一步降低。页面文件:Activity。布局:activity_main.xml2.减少了很多 findViewById 与 OnClickListener 布局文件可以包含一些简单的业务逻辑二、LiveData在 ViewModel 中的数据发生变化时通知页面LiveData 与 ObservableFi
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M