mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-04-28 17:11:14 +00:00
adding all powerMonitor api events
This commit is contained in:
@@ -19,6 +19,27 @@ namespace ElectronNET.WebApp.Controllers
|
||||
{
|
||||
Console.WriteLine("Screen unlocked detected from C# ");
|
||||
};
|
||||
|
||||
Electron.PowerMonitor.OnSuspend += () =>
|
||||
{
|
||||
Console.WriteLine("The system is going to sleep");
|
||||
};
|
||||
|
||||
Electron.PowerMonitor.OnResume += () =>
|
||||
{
|
||||
Console.WriteLine("The system is resuming");
|
||||
};
|
||||
|
||||
Electron.PowerMonitor.OnAC += () =>
|
||||
{
|
||||
Console.WriteLine("The system changes to AC power");
|
||||
};
|
||||
|
||||
Electron.PowerMonitor.OnBattery += () =>
|
||||
{
|
||||
Console.WriteLine("The system about to reboot or shut down.");
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
return View();
|
||||
|
||||
Reference in New Issue
Block a user