mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-14 21:24:58 +00:00
24 lines
608 B
C#
24 lines
608 B
C#
using Microsoft.AspNetCore.Mvc;
|
|
using ElectronNET.API;
|
|
using ElectronNET.API.Entities;
|
|
|
|
namespace ElectronNET.WebApp.Controllers
|
|
{
|
|
public class HomeController : Controller
|
|
{
|
|
public IActionResult Index()
|
|
{
|
|
App.IpcMain.On("SayHello", (args) => {
|
|
App.CreateNotification(new NotificationOptions
|
|
{
|
|
Title = "Hallo Robert",
|
|
Body = "Nachricht von ASP.NET Core App"
|
|
});
|
|
|
|
App.IpcMain.Send("Goodbye", "Elephant!");
|
|
});
|
|
|
|
return View();
|
|
}
|
|
}
|
|
} |