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:
terrymacdonald
2020-07-15 20:11:38 +12:00
parent 0e985238f9
commit 85963b3417
16 changed files with 166 additions and 112 deletions

View File

@ -18,15 +18,14 @@ namespace HeliosPlus.UIForms
private string _saveOrRenameMode = "save";
//private static bool _inDialog = false;
private static ProfileItem _profileToLoad = null;
private ProfileAdaptor _profileAdaptor;
private ProfileRepository _profileRepository;
private ProfileAdaptor _profileAdaptor = new ProfileAdaptor();
private ProfileRepository _profileRepository = new ProfileRepository();
public DisplayProfileForm()
{
InitializeComponent();
this.AcceptButton = this.btn_save_or_rename;
_profileAdaptor = new ProfileAdaptor();
_profileRepository = new ProfileRepository();
//_profileRepository = new ProfileRepository();
}
public DisplayProfileForm(ProfileItem profileToLoad) : this()