[Feature] When open during mainpreload open it afterwards (#251), version 1.1.0.8

This commit is contained in:
Markus Hofknecht 2021-11-25 23:49:50 +01:00
parent 7a0bfef122
commit c2d5ca5062

View file

@ -41,6 +41,7 @@ namespace SystemTrayMenu.Business
private bool searchTextChanging; private bool searchTextChanging;
private bool waitingForReactivate; private bool waitingForReactivate;
private int rowIndexLastMouseDown = -1; private int rowIndexLastMouseDown = -1;
private bool showMenuAfterMainPreload;
public Menus() public Menus()
{ {
@ -88,6 +89,11 @@ namespace SystemTrayMenu.Business
workerMainMenu.DoWork -= LoadMenu; workerMainMenu.DoWork -= LoadMenu;
menus[0] = Create(menuData, Path.GetFileName(Config.Path)); menus[0] = Create(menuData, Path.GetFileName(Config.Path));
IconReader.MainPreload = false; IconReader.MainPreload = false;
if (showMenuAfterMainPreload)
{
AsEnumerable.ToList().ForEach(m => { m.ShowWithFade(); });
}
} }
else else
{ {
@ -102,6 +108,11 @@ namespace SystemTrayMenu.Business
if (IconReader.MainPreload) if (IconReader.MainPreload)
{ {
IconReader.MainPreload = false; IconReader.MainPreload = false;
if (showMenuAfterMainPreload)
{
AsEnumerable.ToList().ForEach(m => { m.ShowWithFade(); });
}
} }
else else
{ {
@ -553,6 +564,7 @@ namespace SystemTrayMenu.Business
// Ignore open close events during main preload #248 // Ignore open close events during main preload #248
if (IconReader.MainPreload && !isMainPreload) if (IconReader.MainPreload && !isMainPreload)
{ {
showMenuAfterMainPreload = true;
return; return;
} }