コード例 #1
0
 private static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
 {
     MessageBox.Show(e.Exception.ToString(), "捕获程序异常");
     LogHelper.WriteDebugException(e.Exception);
 }
コード例 #2
0
 private static void Application_ApplicationExit(object sender, EventArgs e)
 {
     LogHelper.WriteDebugMessage("退出应用程序");
     ProcessCmd.ShowWindowDesk();
     //System.Diagnostics.Process.Start("shutdown.exe", "-s -t 15"); //1分钟后关机
 }