mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-07-13 20:30:03 +00:00
implement first demo app template
This commit is contained in:
23
ElectronNET.WebApp/Controllers/WindowsController.cs
Normal file
23
ElectronNET.WebApp/Controllers/WindowsController.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using ElectronNET.API;
|
||||
|
||||
namespace ElectronNET.WebApp.Controllers
|
||||
{
|
||||
public class WindowsController : Controller
|
||||
{
|
||||
public IActionResult Index()
|
||||
{
|
||||
Electron.IpcMain.On("new-window", async (args) => {
|
||||
|
||||
await Electron.WindowManager.CreateWindowAsync();
|
||||
|
||||
});
|
||||
|
||||
return View();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user