implement Demo App sections: Dialogs, Menu, Tray, Shell, CrashHang, Notification, Shortcuts etc. Fix some API bugs and implement GlobalShortcut-, Shell- and WebContents-API.

This commit is contained in:
Gregor Biswanger
2017-10-21 04:37:01 +02:00
parent 9046f6ca25
commit 248ddde82b
61 changed files with 2505 additions and 57 deletions

View File

@@ -0,0 +1,27 @@
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();
}
}
}