C2025-007 ROEditor - PROMPT to Confirm Deletion

When deleting a group or an RO in the RO Editor, consider adding a prompte for the user asking if they are sure they want to delete the ro/group.  Perhaps also add text to the message saying they may want to consider creating a zip file of the RO folder prior to deleting ROs/groups.
This commit is contained in:
Matthew Schill 2025-01-22 12:45:27 -05:00
parent 565779c9c8
commit 96e61aea2b

View File

@ -2397,6 +2397,11 @@ namespace ROEditor
*Delete currently selected RO Group or RO Value *Delete currently selected RO Group or RO Value
*/ */
private void menuRODelete_Click(object sender, System.EventArgs e) private void menuRODelete_Click(object sender, System.EventArgs e)
{
string msgstr = "It is recommended that you may wish to create a backup zip of your RO folder prior to performing deletions.\n\nAre you sure you wish to delete the selected RO/RO Group?";
DialogResult AnswerYN = MessageBox.Show(msgstr, "Deleting ROs/RO Group", MessageBoxButtons.YesNo);
if (AnswerYN == DialogResult.Yes)
{ {
bool success = false; bool success = false;
XmlNode nd = (XmlNode)roTreeView.SelectedNode.Tag; XmlNode nd = (XmlNode)roTreeView.SelectedNode.Tag;
@ -2414,6 +2419,7 @@ namespace ROEditor
roTreeView.Refresh(); roTreeView.Refresh();
} }
} }
}
/* /*
* Cut text from current text box to windows clipboard * Cut text from current text box to windows clipboard