Made sure the OK and Cancel buttons set the DialogResult just before closing the form

This commit is contained in:
2012-02-23 15:44:47 +00:00
parent 5649e60d69
commit 92e7711be0
3 changed files with 5 additions and 2 deletions

View File

@@ -283,7 +283,6 @@ namespace VEPROMS
{
folderConfigBindingSource.EndEdit();
DialogResult = DialogResult.OK;
// Save Default settings for User
//
// Save whether we should display the default values on this property page
@@ -291,12 +290,14 @@ namespace VEPROMS
Settings.Default.Save();
_FolderConfig.MyFolder.Config = _FolderConfig.ToString();
_FolderConfig.MyFolder.Save().Dispose();
DialogResult = DialogResult.OK;
this.Close();
}
private void ppBtnCancel_Click(object sender, EventArgs e)
{
folderConfigBindingSource.CancelEdit();
DialogResult = DialogResult.Cancel;
this.Close();
}