C2020-026 – consistent messaging when deleting sections and steps

This commit is contained in:
2020-07-16 14:11:09 +00:00
parent b8d46d3768
commit 91958accaa
2 changed files with 25 additions and 8 deletions

View File

@@ -3355,7 +3355,8 @@ namespace Volian.Controls.Library
SectionInfo si = MyEditItem.MyItemInfo as SectionInfo;
if (si != null)
{
string msg = si.HasChildren ? "Are you sure you want to delete this section and its steps?" : "Are you sure you want to delete this section?";
//C2020-026 specific description of what user is trying to delete
string msg = "Are you sure you want to delete this Section" + (si.HasChildren ? " and its steps?" : "?");
DialogResult result = FlexibleMessageBox.Show(msg, "Verify Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (result == DialogResult.Yes)
{
@@ -3386,13 +3387,13 @@ namespace Volian.Controls.Library
string msgs = "";
if (MyFlexGrid != null) MyEditItem.IdentifyMe(true);
MyEditItem.IdentifyChildren(true);
//C2020-026 specific description of what user is trying to delete
if (stpi.HasChildren)
msgs = string.Format("Are you sure you want to delete this {0} and its substeps?", typeDescription);
msgs = string.Format("Are you sure you want to delete this \"{0}\" and its substeps?", typeDescription);
else
msgs = string.Format("Are you sure you want to delete this {0}?", typeDescription);
msgs = string.Format("Are you sure you want to delete this \"{0}\"?", typeDescription);
if (stpi.HasEnhancedLinkedStep)
msgs = msgs + " The linked Enhanced step will also be deleted!";
//string msgs = stpi.HasChildren ? "Are you sure you want to delete this step and its substeps?" : "Are you sure you want to delete this step?";
msgs = msgs + "\n\n The linked Enhanced step will also be deleted!";
DialogResult results = FlexibleMessageBox.Show(msgs, "Verify Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (MyFlexGrid != null)
{