#72, version 0.9.2.17

This commit is contained in:
Markus Hofknecht 2020-04-07 19:29:02 +02:00
parent e913c011e3
commit 03acc34e04
3 changed files with 7 additions and 23 deletions

View file

@ -33,7 +33,6 @@ namespace SystemTrayMenu
{
AppRestart.BeforeRestarting += Dispose;
SystemEvents.DisplaySettingsChanged += AppRestart.ByDisplaySettings;
menus[0] = new Menu(Menu.MenuState.DisposedFake);
waitLeave.LeaveTriggered += FadeHalfOrOutIfNeeded;
keyboardInput = new KeyboardInput(menus);
keyboardInput.RegisterHotKey();
@ -144,18 +143,10 @@ namespace SystemTrayMenu
}
}
#warning todo
//Workaround to preload cache
SwitchOpenClose();
while (worker.IsBusy)
{
Application.DoEvents();
}
SwitchOpenClose();
//or better load without showing?
//menus[0] = CreateMenu( //not the same?
// ReadMenu(worker, Config.Path, 0),
// Path.GetFileName(Config.Path));
#warning #72, #73 First start slower than others
menus[0] = CreateMenu(ReadMenu(worker, Config.Path, 0),
Path.GetFileName(Config.Path));
DisposeMenu(menus[0]);
}
public void Dispose()

View file

@ -35,5 +35,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.9.2.16")]
[assembly: AssemblyFileVersion("0.9.2.16")]
[assembly: AssemblyVersion("0.9.2.17")]
[assembly: AssemblyFileVersion("0.9.2.17")]

View file

@ -35,9 +35,7 @@ namespace SystemTrayMenu.UserInterface
private readonly Fading fading = new Fading();
private bool autoResizeRowsDone = false;
internal enum MenuState { Default, DisposedFake };
internal Menu(MenuState menuType = MenuState.Default)
internal Menu()
{
fading.ChangeOpacity += Fading_ChangeOpacity;
void Fading_ChangeOpacity(object sender, double newOpacity)
@ -77,11 +75,6 @@ namespace SystemTrayMenu.UserInterface
{
MouseLeave.Invoke();
}
if (menuType == MenuState.DisposedFake)
{
Dispose();
}
}
private static void SetDoubleBuffer(Control ctl, bool DoubleBuffered)