adding all powerMonitor api events

This commit is contained in:
Gustavo Lara Molina
2020-05-17 22:16:31 -05:00
parent 09fa662ed1
commit 8fe60bfcda
7 changed files with 232 additions and 11 deletions

View File

@@ -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();