PowerControl: MenuRoot update VisibleChanged and Render() to accept nulls

This commit is contained in:
Kamil Trzciński 2022-12-19 22:08:54 +01:00
parent bbc4cf8200
commit 130a6fb745
5 changed files with 22 additions and 32 deletions

View file

@ -60,10 +60,7 @@ namespace PowerControl
rootMenu.Visible = false;
rootMenu.Update();
rootMenu.CreateMenu(contextMenu.Items);
rootMenu.VisibleChanged = delegate ()
{
updateOSD();
};
rootMenu.VisibleChanged += delegate { updateOSD(); };
contextMenu.Items.Add(new ToolStripSeparator());
if (startupManager.IsAvailable)