From a25b5fc6b881689767d65c53e28e8aa21be90247 Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Tue, 10 Sep 2024 17:54:54 -0400 Subject: [PATCH] C2021-038-No-and_Cancel-button-2 --- PROMS/VEPROMS User Interface/dlgExportImport.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/PROMS/VEPROMS User Interface/dlgExportImport.cs b/PROMS/VEPROMS User Interface/dlgExportImport.cs index e4673385..47b85a1b 100644 --- a/PROMS/VEPROMS User Interface/dlgExportImport.cs +++ b/PROMS/VEPROMS User Interface/dlgExportImport.cs @@ -425,7 +425,7 @@ namespace VEPROMS MessageBox.Show(msg, "Import Completed", MessageBoxButtons.OK, MessageBoxIcon.Information); // C2020-042 changed mesage box title //MessageBox.Show(string.Format("Finished Importing:\n\n{0}", txtImport.Text.Substring(txtImport.Text.LastIndexOf("\\") + 1)), "Import", MessageBoxButtons.OK, MessageBoxIcon.Information); } - if (canceledPressed) + if (canceledPressed || !isImported) { MessageBox.Show(string.Format("Cancelling the import of:\n\n{0}", txtImport.Text.Substring(txtImport.Text.LastIndexOf("\\") + 1)), "Cancelling Import", MessageBoxButtons.OK, MessageBoxIcon.Information); btnCloseImport.PerformClick(); @@ -906,8 +906,8 @@ namespace VEPROMS // C2020-032: Import Procedure set when existing name exists, allow user to import with 'Copy (#) of'. // This is similar functionality to the import of a procedure without the overwrite part. string msg = string.Format("The procedure set you are importing, {0}, already exists.\n\nDo you want to import {0} as a COPY of the existing set?\n\nThis will prefix the name with \"Copy (#) of\"", name); - DialogResult dr = MessageBox.Show(this, msg, "Create Copy Of Existing Procedure Set", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Stop); - if (dr == DialogResult.Yes) + DialogResult dr = MessageBox.Show(this, msg, "Create Copy Of Existing Procedure Set", MessageBoxButtons.OKCancel, MessageBoxIcon.Stop); + if (dr == DialogResult.OK) { string number = ""; int max = -1; @@ -931,6 +931,11 @@ namespace VEPROMS ff = AddFolder(Folder.Get(MyFolder.FolderID), xd, name); } + //else if (dr == System.Windows.Forms.DialogResult.Cancel) + //{ + // //canceledPressed = true; + // //resolvedProcNum = false; + //} else return false; }