diff --git a/Business/App.xaml.cs b/Business/App.xaml.cs
index 84d044a..a870986 100644
--- a/Business/App.xaml.cs
+++ b/Business/App.xaml.cs
@@ -28,14 +28,17 @@ namespace SystemTrayMenu
menus.LoadStarted += menuNotifyIcon.LoadingStart;
menus.LoadStopped += menuNotifyIcon.LoadingStop;
menuNotifyIcon.Click += () => menus.SwitchOpenClose(true);
- menus.MainPreload();
if (Settings.Default.ShowInTaskbar)
{
- TaskbarLogo = new TaskbarLogo();
+ TaskbarLogo = new ();
TaskbarLogo.Activated += (_, _) => menus.SwitchOpenCloseByTaskbarItem();
TaskbarLogo.Show();
}
+ else
+ {
+ menus.FirstStartInBackground();
+ }
if (Settings.Default.CheckForUpdates)
{
diff --git a/Business/KeyboardInput.cs b/Business/KeyboardInput.cs
index a57fa1a..18b4d6d 100644
--- a/Business/KeyboardInput.cs
+++ b/Business/KeyboardInput.cs
@@ -331,13 +331,6 @@ namespace SystemTrayMenu.Handler
{
ClosePressed?.Invoke();
}
-#if TODO // WPF: Can be removed as we do not paint ourselfs?
- if (iRowKey > -1 && dgv.Rows.Count > iRowKey)
- {
- // Raise Dgv_RowPostPaint to show ProcessStarted
- dgv.InvalidateRow(iRowKey);
- }
-#endif
}
else
{
diff --git a/Business/Menus.cs b/Business/Menus.cs
index 98c2796..c43e389 100644
--- a/Business/Menus.cs
+++ b/Business/Menus.cs
@@ -45,11 +45,6 @@ namespace SystemTrayMenu.Business
private bool searchTextChanging;
private int lastMouseDownRowIndex = -1;
private bool showMenuAfterMainPreload;
-#if TODO // TOUCH
- private int dragSwipeScrollingStartRowIndex = -1;
- private bool isDraggingSwipeScrolling;
-#endif
- private bool isDragSwipeScrolled;
private bool hideSubmenuDuringRefreshSearch;
public Menus()
@@ -107,12 +102,13 @@ namespace SystemTrayMenu.Business
switch (menuData.DirectoryState)
{
case MenuDataDirectoryState.Valid:
- if (IconReader.MainPreload)
+ if (IconReader.IsPreloading)
{
workerMainMenu.DoWork -= LoadMenu;
+ workerMainMenu.CancelAsync();
Create(menuData, Config.Path); // Level 0 Main Menu
- IconReader.MainPreload = false;
+ IconReader.IsPreloading = false;
if (showMenuAfterMainPreload)
{
AsEnumerable.ToList().ForEach(m => { m.ShowWithFade(); });
@@ -258,7 +254,6 @@ namespace SystemTrayMenu.Business
joystickHelper = new();
joystickHelper.KeyPressed += (key, modifiers) => menus[0]?.Dispatcher.Invoke(keyboardInput.CmdKeyProcessed, new object[] { null!, key, modifiers });
- timerShowProcessStartedAsLoadingIcon.Interval = TimeSpan.FromMilliseconds(Settings.Default.TimeUntilClosesAfterEnterPressed);
timerStillActiveCheck.Interval = TimeSpan.FromMilliseconds(Settings.Default.TimeUntilClosesAfterEnterPressed + 20);
timerStillActiveCheck.Tick += (sender, e) => StillActiveTick();
void StillActiveTick()
@@ -327,7 +322,7 @@ namespace SystemTrayMenu.Business
private bool IsMainUsable => menus[0]?.IsUsable ?? false;
- private IEnumerable