WPF 程序检测 windows 关机
2024-10-14 06:23:08
1.使用SessionEnding事件 参考MSDN。 2.在需要处理 关机事件中可以注册SessionEnding事件
App.Current.SessionEnding += Current_SessionEnding;
private void Current_SessionEnding(object sender, SessionEndingCancelEventArgs e)
{ //处理一些事情
DoExit(); }
最新文章
- 优化SQLServer--表和索引的分区(二)
- TestNG @Factory与 @DataProvider 结合使用进行参数化测试
- json与对象转化
- HTML——meta标签
- KMP算法详解 --- 彻头彻尾理解KMP算法
- 【C traps and pit falls】阅读笔记
- windows 远程桌面连接 RPi 2B
- Mysql MEMORY 引擎
- 【转】C++虚函数解析
- html5 canvas 运行起来绝对让你震撼!
- [Android学习笔记]组合控件的使用
- iOS 加载Image的两种方式
- LINQ里的“equals”和“==”的区别
- 全面学习理解TLB(Translation Look-aside Buffer)地址变换高速缓存
- mysql查看索引与锁
- yii DbCriteria相关属性常用方法
- hello1实例的分析
- CSS 背景图像 重复图像
- table-layout 显示规则以及其他一些零碎的东西
- Python web 框架之 Django 基础搭建服务