mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-07-16 05:36:34 +00:00
Storing main window instance to reload later.
This commit is contained in:
@@ -112,7 +112,9 @@ namespace ElectronNET.WebApp.Controllers
|
||||
new MenuItem { Label = "Electron.NET", Type = MenuType.checkbox, Checked = true }
|
||||
};
|
||||
|
||||
var mainWindow = Electron.WindowManager.BrowserWindows.First();
|
||||
var mainWindow = Electron.WindowManager.BrowserWindows.FirstOrDefault();
|
||||
if (mainWindow == null) return;
|
||||
|
||||
Electron.Menu.SetContextMenu(mainWindow, menu);
|
||||
|
||||
Electron.IpcMain.On("show-context-menu", (args) =>
|
||||
|
||||
Reference in New Issue
Block a user