implement hybrid support

This commit is contained in:
Gregor Biswanger
2017-10-23 21:24:05 +02:00
parent 4d76c87000
commit cca50abefb
17 changed files with 299 additions and 237 deletions

View File

@@ -8,18 +8,20 @@ namespace ElectronNET.WebApp.Controllers
{
public IActionResult Index()
{
Electron.IpcMain.On("open-file-manager", async (args) => {
if (HybridSupport.IsElectronActive)
{
Electron.IpcMain.On("open-file-manager", async (args) =>
{
string path = await Electron.App.GetPathAsync(PathName.home);
await Electron.Shell.ShowItemInFolderAsync(path);
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");
});
Electron.IpcMain.On("open-ex-links", async (args) =>
{
await Electron.Shell.OpenExternalAsync("https://github.com/ElectronNET");
});
}
return View();
}