prompt to save if closing form and changes have been made

This commit is contained in:
Tim Young 2017-09-20 08:03:07 -05:00
parent 03e5724a25
commit 03ab2781ad

View File

@ -371,7 +371,14 @@ namespace SpriteLibrary
private void SpriteEntryForm_FormClosing(object sender, FormClosingEventArgs e) private void SpriteEntryForm_FormClosing(object sender, FormClosingEventArgs e)
{ {
myDatabase.Save(); //try saving the file if (PromptToApplyChangesAndContinue())
{
myDatabase.Save(); //try saving the file
}
else
{
e.Cancel = true;
}
} }
private void pbImageField_MouseMove(object sender, MouseEventArgs e) private void pbImageField_MouseMove(object sender, MouseEventArgs e)