Index: Ringtoets/Common/src/Ringtoets.Common.Forms/TreeNodeInfos/CalculationTreeNodeInfoFactory.cs
===================================================================
diff -u -r6f20aae03e9fecf0d90cf930d06ed72bc4633749 -r3bd79dc878fa0b81b1ebb5c35dd5612f2bfed356
--- Ringtoets/Common/src/Ringtoets.Common.Forms/TreeNodeInfos/CalculationTreeNodeInfoFactory.cs (.../CalculationTreeNodeInfoFactory.cs) (revision 6f20aae03e9fecf0d90cf930d06ed72bc4633749)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/TreeNodeInfos/CalculationTreeNodeInfoFactory.cs (.../CalculationTreeNodeInfoFactory.cs) (revision 3bd79dc878fa0b81b1ebb5c35dd5612f2bfed356)
@@ -207,6 +207,23 @@
builder.AddCustomItem(performAllItem);
}
+ ///
+ /// This method adds a context menu item for performing a calculation.
+ ///
+ /// The builder to add the context menu item to.
+ /// The calculation involved.
+ /// The action that performs the calculation.
+ public static void AddPerformCalculationItem(IContextMenuBuilder builder, ICalculation calculation, Action calculate)
+ {
+ var calculateItem = new StrictContextMenuItem(
+ Resources.Calculate,
+ Resources.Calculate_ToolTip,
+ Resources.CalculateIcon,
+ (o, args) => { calculate(calculation); });
+
+ builder.AddCustomItem(calculateItem);
+ }
+
# region Helper methods for CreateCalculationGroupContextTreeNodeInfo
private static bool IsNestedGroup(object parentData)