Merge branch 'master' into dev/AutoUpdate

This commit is contained in:
Gregor Biswanger
2019-07-28 13:24:41 +02:00
20 changed files with 2143 additions and 44 deletions

View File

@@ -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