Silenced the System.Drawing.Image exceptions

The ProfileAdapter and ShortcutAdapters used
by the ImageListView Control unfortunately
have to access the sizes of the bitmaps being
loaded into the respective imagelistviews. I
can't find anyway of stopping the GDI+
from complaining about the Bitmap being
accessed by multiple different threads (as
ImageListView creates one thread per image.
This will be fixed once I move to this being a
WPF application as we'll use a different control.
This commit is contained in:
terrymacdonald
2020-07-24 16:51:48 +12:00
parent f23ae340a7
commit 5004f5f76a
20 changed files with 197 additions and 115 deletions

View File

@ -138,7 +138,7 @@ namespace HeliosPlus {
}
catch (CommandParsingException ex)
{
Console.WriteLine($"Program/Main commandParsingException: {ex.Message}: {ex.InnerException}");
Console.WriteLine($"Program/Main commandParsingException: {ex.Message}: {ex.StackTrace} - {ex.InnerException}");
// You'll always want to catch this exception, otherwise it will generate a messy and confusing error for the end user.
// the message will usually be something like:
// "Unrecognized command or argument '<invalid-command>'"
@ -146,7 +146,7 @@ namespace HeliosPlus {
}
catch (Exception ex)
{
Console.WriteLine($"Program/Main exception: {ex.Message}: {ex.InnerException}");
Console.WriteLine($"Program/Main exception: {ex.Message}: {ex.StackTrace} - {ex.InnerException}");
Console.WriteLine("Unable to execute application: {0}", ex.Message);
}
return 0;
@ -179,7 +179,7 @@ namespace HeliosPlus {
}
catch (Exception ex)
{
Console.WriteLine($"Program/StartUpNormally exception: {ex.Message}: {ex.InnerException}");
Console.WriteLine($"Program/StartUpNormally exception: {ex.Message}: {ex.StackTrace} - {ex.InnerException}");
// TODO
}
}
@ -228,7 +228,7 @@ namespace HeliosPlus {
}
catch (Exception ex)
{
Console.WriteLine($"Program/StartUpNormally exception 2: {ex.Message}: {ex.InnerException}");
Console.WriteLine($"Program/StartUpNormally exception 2: {ex.Message}: {ex.StackTrace} - {ex.InnerException}");
// TODO
}
@ -238,7 +238,7 @@ namespace HeliosPlus {
}
catch (Exception ex)
{
Console.WriteLine($"Program/StartUpNormally exception 3: {ex.Message}: {ex.InnerException}");
Console.WriteLine($"Program/StartUpNormally exception 3: {ex.Message}: {ex.StackTrace} - {ex.InnerException}");
MessageBox.Show(
ex.Message,
Language.Fatal_Error,