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

@ -370,9 +370,16 @@ namespace SpriteLibrary
} }
private void SpriteEntryForm_FormClosing(object sender, FormClosingEventArgs e) private void SpriteEntryForm_FormClosing(object sender, FormClosingEventArgs e)
{
if (PromptToApplyChangesAndContinue())
{ {
myDatabase.Save(); //try saving the file 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)
{ {