1.使用SessionEnding事件

参考MSDN。

2.在需要处理 关机事件中可以注册SessionEnding事件
App.Current.SessionEnding += Current_SessionEnding;
        private void Current_SessionEnding(object sender, SessionEndingCancelEventArgs e)
{ //处理一些事情
DoExit(); }

最新文章

  1. 优化SQLServer--表和索引的分区(二)
  2. TestNG @Factory与 @DataProvider 结合使用进行参数化测试
  3. json与对象转化
  4. HTML——meta标签
  5. KMP算法详解 --- 彻头彻尾理解KMP算法
  6. 【C traps and pit falls】阅读笔记
  7. windows 远程桌面连接 RPi 2B
  8. Mysql MEMORY 引擎
  9. 【转】C++虚函数解析
  10. html5 canvas 运行起来绝对让你震撼!
  11. [Android学习笔记]组合控件的使用
  12. iOS 加载Image的两种方式
  13. LINQ里的“equals”和“==”的区别
  14. 全面学习理解TLB(Translation Look-aside Buffer)地址变换高速缓存
  15. mysql查看索引与锁
  16. yii DbCriteria相关属性常用方法
  17. hello1实例的分析
  18. CSS 背景图像 重复图像
  19. table-layout 显示规则以及其他一些零碎的东西
  20. Python web 框架之 Django 基础搭建服务

热门文章

  1. Redis在windows环境下的部署
  2. mongodb 3.2 分片部署步骤
  3. DS实验题 Missile
  4. jQuery 复合选择器的几个例子
  5. 龙珠 超宇宙 [Dragon Ball Xenoverse]
  6. /etc/hosts.conf
  7. Flink - Working with State
  8. 【Demo】 生成二维码 和 条形码
  9. Python中布尔类型
  10. 64 位win 7或windows 8下的visual studio不能连接Oracle数据库调试网站的问题