mirror of
https://github.com/Hofknecht/SystemTrayMenu.git
synced 2024-06-20 19:30:31 +12:00
[Feature] Show loading as mouse cursor and extra loading menu (#161), version 1.0.17.42
This commit is contained in:
parent
85587370f8
commit
bd95ee3cd5
|
@ -181,7 +181,7 @@ namespace SystemTrayMenu.Business
|
|||
HideOldMenu(menus[level]);
|
||||
}
|
||||
|
||||
if (menus[level] != null)
|
||||
if (menus[level - 1] != null)
|
||||
{
|
||||
menus[level - 1].FocusTextBox();
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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)");
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue