Index: Ringtoets/Common/src/Ringtoets.Common.Forms/TreeNodeInfos/RingtoetsContextMenuItemFactory.cs
===================================================================
diff -u -r776558d53b8a73cf16bdd5b50ff4d1eeff933b2f -rb6f4e414fc874653cc6ad84b80f330b28e69b823
--- Ringtoets/Common/src/Ringtoets.Common.Forms/TreeNodeInfos/RingtoetsContextMenuItemFactory.cs (.../RingtoetsContextMenuItemFactory.cs) (revision 776558d53b8a73cf16bdd5b50ff4d1eeff933b2f)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/TreeNodeInfos/RingtoetsContextMenuItemFactory.cs (.../RingtoetsContextMenuItemFactory.cs) (revision b6f4e414fc874653cc6ad84b80f330b28e69b823)
@@ -368,35 +368,6 @@
});
}
- ///
- /// Creates a which is bound to the action of removing all children
- /// in the .
- ///
- /// The calculation from which to remove all children.
- /// The object implementing a method for closing views for the removed children.
- /// The created .
- public static StrictContextMenuItem CreateRemoveAllChildrenFromGroupItem(CalculationGroup calculationGroup, IViewCommands viewCommands)
- {
- if (viewCommands == null)
- {
- throw new ArgumentNullException("viewCommands");
- }
- var menuItem = new StrictContextMenuItem(
- Resources.CalculationGroup_RemoveAllChildrenFromGroup_Remove_all,
- Resources.CalculationGroup_RemoveAllChildrenFromGroup_Remove_all_Tooltip,
- Resources.RemoveAllIcon,
- (sender, args) => RemoveAllChildrenFromGroup(calculationGroup, viewCommands));
-
- var errorMessage = calculationGroup.Children.Any() ? null : Resources.CalculationGroup_RemoveAllChildrenFromGroup_No_Calculation_or_Group_to_remove;
-
- if (errorMessage != null)
- {
- menuItem.Enabled = false;
- menuItem.ToolTipText = errorMessage;
- }
- return menuItem;
- }
-
private static void RemoveAllChildrenFromGroup(CalculationGroup calculationGroup, IViewCommands viewCommands)
{
if (MessageBox.Show(Resources.CalculationGroup_RemoveAllChildrenFromGroup_Are_you_sure_you_want_to_remove_everything_from_this_group, BaseResources.Confirm, MessageBoxButtons.OKCancel) != DialogResult.OK)