mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-07 13:51:36 +00:00
27 lines
687 B
C#
27 lines
687 B
C#
using ElectronNET.API;
|
|
using ElectronNET.API.Entities;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace ElectronNET.WebApp.Controllers
|
|
{
|
|
public class ShellController : Controller
|
|
{
|
|
public IActionResult Index()
|
|
{
|
|
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();
|
|
}
|
|
}
|
|
} |