[Feature] Show loading as mouse cursor and extra loading menu (#161), version 1.0.17.42

This commit is contained in:
Markus Hofknecht 2021-05-14 12:33:35 +02:00
parent 85587370f8
commit bd95ee3cd5
5 changed files with 9 additions and 12 deletions

View file

@ -181,7 +181,7 @@ namespace SystemTrayMenu.Business
HideOldMenu(menus[level]);
}
if (menus[level] != null)
if (menus[level - 1] != null)
{
menus[level - 1].FocusTextBox();
}

View file

@ -44,9 +44,7 @@ namespace SystemTrayMenu
}
}
}
#pragma warning disable CA1031 // Do not catch general exception types
catch (Exception ex)
#pragma warning restore CA1031 // => Represents ThreadException during attached to process
{
AskUserSendError(ex);
}

View file

@ -79,7 +79,14 @@ namespace SystemTrayMenu.Properties
{
if (IsConfigPathAssembly())
{
File.Delete(ConfigPathAssembly);
try
{
File.Delete(ConfigPathAssembly);
}
catch (Exception ex)
{
Log.Warn($"Could not delete {ConfigPathAssembly}", ex);
}
}
}

View file

@ -348,9 +348,7 @@ namespace SystemTrayMenu.UserInterface
nvc.Add("CodeBase", a.CodeBase.Replace("file:///", string.Empty, StringComparison.InvariantCulture));
}
}
#pragma warning disable CA1031 // Do not catch general exception types
catch (NotSupportedException)
#pragma warning restore CA1031 // Do not catch general exception types
{
nvc.Add("CodeBase", "(not supported)");
}
@ -374,9 +372,7 @@ namespace SystemTrayMenu.UserInterface
nvc.Add("Location", a.Location);
}
}
#pragma warning disable CA1031 // Do not catch general exception types
catch (NotSupportedException)
#pragma warning restore CA1031 // Do not catch general exception types
{
nvc.Add("Location", "(not supported)");
}

View file

@ -140,9 +140,7 @@ namespace SystemTrayMenu.Utilities
icon = (Icon)Icon.FromHandle(shfi.hIcon).Clone();
DllImports.NativeMethods.User32DestroyIcon(shfi.hIcon);
}
#pragma warning disable CA1031 // Do not catch general exception types
catch (Exception ex)
#pragma warning restore CA1031 // Do not catch general exception types
{
Log.Error($"directoryPath:'{directoryPath}'", ex);
}
@ -239,9 +237,7 @@ namespace SystemTrayMenu.Utilities
// Copy (clone) the returned icon to a new object, thus allowing us to clean-up properly
icon = (Icon)Icon.FromHandle(hIcon).Clone();
}
#pragma warning disable CA1031 // Do not catch general exception types
catch (Exception ex)
#pragma warning restore CA1031 // Do not catch general exception types
{
Log.Error($"filePath:'{filePath}'", ex);
}