-
0 votesanswersviews
C#检测窗口关闭
我希望我的C#服务在Windows关闭之前执行一些任务 . 我看到有一个事件SystemEvents.SessionEnding Event . 但是它似乎没有区分注销和系统关闭 . 有人知道检测关机的方法吗?谢谢 . 这不是以下问题的重复,因为我具体引用了Shutdown而不是Shutdown | Logoff:How to detect Windows shutdown or logoff -
45 votesanswersviews
如何检测Windows关闭或注销
我需要检测Windows何时关闭(或重新启动)或用户何时注销 . 我需要在应用程序关闭之前正确关闭应用程序 . 我注意到Windows关闭时没有出现退出应用程序事件 . 我看了帖子Is there a way in c# to detect a Windows shutdown/logoff and cancel that action (after asking the user) 但我不确定在... -
-1 votesanswersviews
如何解决Google-Cloud Compute没有正常关机的问题? [等候接听]
我有一个 Google-Cloud Compute 实例 . 当我 stop it 时,似乎需要再花2分钟才能关闭(也就是说,可能是 not shutting down gracefully ) . How to troubleshoot 那个?它是 Debian-9 实例(即默认/典型实例) . In another format: How I am shutting it down: ...