|
@@ -151,6 +151,22 @@ namespace InABox.DynamicGrid
|
|
|
|
|
|
private void Window_Closing(object sender, CancelEventArgs e)
|
|
|
{
|
|
|
+ if (bChanged && DialogResult == null)
|
|
|
+ {
|
|
|
+ var result = MessageWindow.ShowYesNoCancel("Save Changes?", "Confirm");
|
|
|
+ switch (result)
|
|
|
+ {
|
|
|
+ case MessageWindowResult.Yes:
|
|
|
+ DialogResult = true;
|
|
|
+ break;
|
|
|
+ case MessageWindowResult.No:
|
|
|
+ DialogResult = false;
|
|
|
+ break;
|
|
|
+ case MessageWindowResult.Cancel:
|
|
|
+ e.Cancel = true;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
if (DialogResult == true)
|
|
|
Form.SaveItem(e);
|
|
|
}
|