mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-06 21:28:53 +00:00
* Summaries rewritten * Added new parameters / Removed not supported parameters * Added some new methods like appFocus(options), appHasSingleLock, etc.
29 lines
820 B
C#
29 lines
820 B
C#
using ElectronNET.API;
|
|
using ElectronNET.API.Entities;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace ElectronNET.WebApp.Controllers
|
|
{
|
|
public class ShellController : Controller
|
|
{
|
|
public IActionResult Index()
|
|
{
|
|
if (HybridSupport.IsElectronActive)
|
|
{
|
|
Electron.IpcMain.On("open-file-manager", async (args) =>
|
|
{
|
|
string path = await Electron.App.GetPathAsync(PathName.Home);
|
|
await Electron.Shell.ShowItemInFolderAsync(path);
|
|
|
|
});
|
|
|
|
Electron.IpcMain.On("open-ex-links", async (args) =>
|
|
{
|
|
await Electron.Shell.OpenExternalAsync("https://github.com/ElectronNET");
|
|
});
|
|
}
|
|
|
|
return View();
|
|
}
|
|
}
|
|
} |