mirror of
https://github.com/terrymacdonald/DisplayMagician.git
synced 2024-08-30 18:32:20 +00:00
Fixed ShortcutAdaptor errors and Saved prompt
Did a fix for the SHortcutAdaptor doing exceptions for showing the form before loading all the graphics but can't really do much about it without adding background loading to the main form. This is a lot of work considering we'll be moving from WinForms to WPF UI in the future. Also fixed the 'Do you want to save' prompt detection logic so that it correctly waits until all the loading has finished before monitoring for users making changes. Should stop the form incorrectly suggesting you should save unless they've really made a change.
This commit is contained in:
@ -134,8 +134,10 @@ namespace HeliosPlus
|
||||
{
|
||||
File.Delete(shortcutToRemove.SavedShortcutIconCacheFilename);
|
||||
}
|
||||
catch
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"ShortcutRepository/RemoveShortcut exception: {ex.Message}: {ex.InnerException}");
|
||||
|
||||
// TODO check and report
|
||||
}
|
||||
}
|
||||
@ -182,8 +184,10 @@ namespace HeliosPlus
|
||||
{
|
||||
File.Delete(shortcutToRemove.SavedShortcutIconCacheFilename);
|
||||
}
|
||||
catch
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"ShortcutRepository/RemoveShortcut exception 2: {ex.Message}: {ex.InnerException}");
|
||||
|
||||
// TODO check and report
|
||||
}
|
||||
}
|
||||
@ -354,6 +358,8 @@ namespace HeliosPlus
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"ShortcutRepository/SaveShortcuts exception: {ex.Message}: {ex.InnerException}");
|
||||
|
||||
Console.WriteLine($"Unable to create Shortcut folder {_shortcutStorageJsonPath}: " + ex.Message);
|
||||
|
||||
}
|
||||
@ -378,6 +384,8 @@ namespace HeliosPlus
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"ShortcutRepository/SaveShortcuts exception 2: {ex.Message}: {ex.InnerException}");
|
||||
|
||||
Console.WriteLine($"Unable to save Shortcut JSON file {_shortcutStorageJsonFileName}: " + ex.Message);
|
||||
}
|
||||
|
||||
@ -434,6 +442,8 @@ namespace HeliosPlus
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"ShortcutRepository/SaveShortcutIconToCache exception: {ex.Message}: {ex.InnerException}");
|
||||
|
||||
// If we fail to create an icon based on the original executable or game
|
||||
// Then we use the standard HeliosPlus profile one.
|
||||
shortcutIcon = shortcut.ProfileToUse.ProfileIcon.ToIcon();
|
||||
|
Reference in New Issue
Block a user