From a2e830d0c34be352afc4dd3523caf7a526e3abb7 Mon Sep 17 00:00:00 2001 From: Kevin Laskey Date: Fri, 7 Jun 2024 14:42:26 -0400 Subject: [PATCH] Update for "cancel" button action --- PROMS/VEPROMS User Interface/dlgExportImport.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/PROMS/VEPROMS User Interface/dlgExportImport.cs b/PROMS/VEPROMS User Interface/dlgExportImport.cs index d3631612..0d804ecb 100644 --- a/PROMS/VEPROMS User Interface/dlgExportImport.cs +++ b/PROMS/VEPROMS User Interface/dlgExportImport.cs @@ -230,9 +230,14 @@ namespace VEPROMS var fileLocation = txtExport.Text; if (File.Exists(fileLocation)) { // C2022-029 if an existing export of the same name is found, provide option to overwrite it - DialogResult ovewriteEx = FlexibleMessageBox.ShowCustom(null, "There is already another export file with the same name, you can either overwrite the existing file, or have the existing file renamed with it's created date appended?\r\n\r\nSelecting 'Cancel' will cancel the export.", "What would you like to do?", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);// == DialogResult.Yes; + DialogResult ovewriteEx = FlexibleMessageBox.ShowCustom(null, "There is already another export file with the same name, you can either overwrite the existing file, or have the existing file renamed with it's created date appended.\r\n\r\nSelecting 'Cancel' will cancel the export.", "What would you like to do?", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);// == DialogResult.Yes; - if (ovewriteEx == DialogResult.Abort) btnCloseExport.Enabled = true; + if (ovewriteEx == DialogResult.Abort) + { + MessageBox.Show("Export has been cancelled", "You have chosen to cancel the export.", MessageBoxButtons.OK, MessageBoxIcon.Information); // C2020-042 changed mesage box title + btnCloseExport.Enabled = true; + return; + } else if (ovewriteEx == DialogResult.Retry) { // Ovewrite