更新时间:2023-01-26 12:08:08
有一个内置事件
There is a built-in event Application.SessionEnding - this event fires when the user logs off or shuts down the computer... you just need to subscribe to that and put your code to save date etc. in there...
Application.SessionEnding
在Windows手机中关闭按键应用程序?
在C#Windows应用程序中关闭特定表单的代码
在WPF表单应用程序中关闭WPF用户控件
表单关闭事件在Windows应用程序中不起作用。
在WPF应用程序中捕获Windows关闭事件
Windows应用程序中的WPF
wpf中的windows应用程序
将WPF应用程序中捕获的照片发送到Silvelight应用程序
从WPF到C#.net中的Windows应用程序
如何在MVVMCross WPF应用程序中实现关闭按钮?