C# 监控Windows睡眠与恢复
SystemEvents.PowerModeChanged += SystemEvents_PowerModeChanged; private void SystemEvents_PowerModeChanged(object sender, PowerModeChangedEventArgs e) { switch (e.Mode) { case PowerModes.Suspend: break; case PowerModes.Resume: break; } }