How to detect when the laptop is running on batteries in .NET?
How to detect when the laptop is running on batteries (or AC开发者_开发知识库) in .NET?
How to detect when laptop power cable has been disconnected?
For Vista and up, you can use WindowsAPICodecPack (PowerManager.PowerSourceChanged)
精彩评论