mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-07-13 12:18:08 +00:00
Merge branch 'master' into dev/AutoUpdate
This commit is contained in:
@@ -1,11 +1,21 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.IO;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using ElectronNET.API;
|
||||
using ElectronNET.API.Entities;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
|
||||
namespace ElectronNET.WebApp.Controllers
|
||||
{
|
||||
public class TrayController : Controller
|
||||
{
|
||||
private readonly IHostingEnvironment _env;
|
||||
|
||||
public TrayController(IHostingEnvironment env)
|
||||
{
|
||||
_env = env;
|
||||
}
|
||||
|
||||
|
||||
public IActionResult Index()
|
||||
{
|
||||
if (HybridSupport.IsElectronActive)
|
||||
@@ -21,7 +31,7 @@ namespace ElectronNET.WebApp.Controllers
|
||||
Click = () => Electron.Tray.Destroy()
|
||||
};
|
||||
|
||||
Electron.Tray.Show("/Assets/electron_32x32.png", menu);
|
||||
Electron.Tray.Show(Path.Combine(_env.ContentRootPath, "Assets/electron_32x32.png"), menu);
|
||||
Electron.Tray.SetToolTip("Electron Demo in the tray.");
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user