Added the API Power

This commit is contained in:
Rocket
2020-05-11 12:59:21 -05:00
parent b6417d0718
commit df02855471
15 changed files with 171 additions and 96 deletions

View File

@@ -1,4 +1,7 @@
using Microsoft.AspNetCore.Mvc;
using ElectronNET.API;
using ElectronNET.API.Entities;
using System;
namespace ElectronNET.WebApp.Controllers
{
@@ -6,7 +9,19 @@ namespace ElectronNET.WebApp.Controllers
{
public IActionResult Index()
{
return View();
if (HybridSupport.IsElectronActive)
{
Electron.PowerMonitor.OnLockScreen += () =>
{
Console.WriteLine("Screeen Bloqueado desde C#");
};
Electron.PowerMonitor.OnUnLockScreen += () =>
{
Console.WriteLine("Desbloquedo desde C#");
};
}
return View();
}
}
}