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:
parent
565779c9c8
commit
96e61aea2b
@ -2398,10 +2398,15 @@ namespace ROEditor
|
|||||||
*/
|
*/
|
||||||
private void menuRODelete_Click(object sender, System.EventArgs e)
|
private void menuRODelete_Click(object sender, System.EventArgs e)
|
||||||
{
|
{
|
||||||
bool success=false;
|
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?";
|
||||||
XmlNode nd = (XmlNode) roTreeView.SelectedNode.Tag;
|
|
||||||
|
DialogResult AnswerYN = MessageBox.Show(msgstr, "Deleting ROs/RO Group", MessageBoxButtons.YesNo);
|
||||||
|
if (AnswerYN == DialogResult.Yes)
|
||||||
|
{
|
||||||
|
bool success = false;
|
||||||
|
XmlNode nd = (XmlNode)roTreeView.SelectedNode.Tag;
|
||||||
if (nd.ParentNode.Name == "RO_Root")
|
if (nd.ParentNode.Name == "RO_Root")
|
||||||
success = myrodb.RODB_DeleteGroup(nd,null,null);
|
success = myrodb.RODB_DeleteGroup(nd, null, null);
|
||||||
else
|
else
|
||||||
success = myrodb.RODB_DeleteRO(nd);
|
success = myrodb.RODB_DeleteRO(nd);
|
||||||
if (success == true)
|
if (success == true)
|
||||||
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user