Index: Riskeer/Piping/src/Riskeer.Piping.Plugin/PipingPlugin.cs =================================================================== diff -u -rb6c574cf6bc779c216c06ff5d214e453183ff100 -r242c0f8348fd696858006ead7738427ae4c5374f --- Riskeer/Piping/src/Riskeer.Piping.Plugin/PipingPlugin.cs (.../PipingPlugin.cs) (revision b6c574cf6bc779c216c06ff5d214e453183ff100) +++ Riskeer/Piping/src/Riskeer.Piping.Plugin/PipingPlugin.cs (.../PipingPlugin.cs) (revision 242c0f8348fd696858006ead7738427ae4c5374f) @@ -718,6 +718,7 @@ bool isNestedGroup = parentData is PipingCalculationGroupContext; StrictContextMenuItem generateCalculationsItem = CreateGeneratePipingCalculationsItem(nodeData); + StrictContextMenuItem addSemiProbabilisticCalculationItem = CreateAddSemiProbabilisticCalculationItem(nodeData); PipingCalculationScenario[] calculations = nodeData.WrappedData.GetCalculations() .OfType() @@ -746,7 +747,7 @@ } builder.AddCreateCalculationGroupItem(group) - .AddCreateCalculationItem(nodeData, AddCalculationScenario) + .AddCustomItem(addSemiProbabilisticCalculationItem) .AddSeparator(); if (isNestedGroup) @@ -837,6 +838,15 @@ Enabled = surfaceLineAvailable }; } + + private static StrictContextMenuItem CreateAddSemiProbabilisticCalculationItem(PipingCalculationGroupContext context) + { + return new StrictContextMenuItem( + Resources.CalculationGroup_Add_SemiProbabilisticCalculation, + Resources.CalculationGroup_Add_SemiProbabilisticCalculation_ToolTip, + RiskeerCommonFormsResources.FailureMechanismIcon, + (sender, args) => AddCalculationScenario(context)); + } private void ShowSurfaceLineSelectionDialog(PipingCalculationGroupContext nodeData) { Index: Riskeer/Piping/src/Riskeer.Piping.Plugin/Properties/Resources.Designer.cs =================================================================== diff -u -r106eeb3a0608bd85eb1fcc8fff72256fd9c3ac5f -r242c0f8348fd696858006ead7738427ae4c5374f --- Riskeer/Piping/src/Riskeer.Piping.Plugin/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 106eeb3a0608bd85eb1fcc8fff72256fd9c3ac5f) +++ Riskeer/Piping/src/Riskeer.Piping.Plugin/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 242c0f8348fd696858006ead7738427ae4c5374f) @@ -1,4 +1,4 @@ -// Copyright (C) Stichting Deltares 2019. All rights reserved. +// Copyright (C) Stichting Deltares 2019. All rights reserved. // // This file is part of Riskeer. // @@ -82,6 +82,24 @@ } /// + /// Looks up a localized string similar to Semi-probabilistische berekening &toevoegen. + /// + public static string CalculationGroup_Add_SemiProbabilisticCalculation { + get { + return ResourceManager.GetString("CalculationGroup_Add_SemiProbabilisticCalculation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Voeg een nieuwe semi-probabilistische berekening toe aan deze map met berekeningen.. + /// + public static string CalculationGroup_Add_SemiProbabilisticCalculation_ToolTip { + get { + return ResourceManager.GetString("CalculationGroup_Add_SemiProbabilisticCalculation_ToolTip", resourceCulture); + } + } + + /// /// Looks up a localized string similar to Alle berekeningen met een profielschematisatie bijwerken.. /// public static string PipingPlugin_CreateUpdateEntryAndExitPointItem_Update_all_calculations_with_surface_line_ToolTip { Index: Riskeer/Piping/src/Riskeer.Piping.Plugin/Properties/Resources.resx =================================================================== diff -u -rbf1fde9d2147a6eeaecebbb371be2c4856759159 -r242c0f8348fd696858006ead7738427ae4c5374f --- Riskeer/Piping/src/Riskeer.Piping.Plugin/Properties/Resources.resx (.../Resources.resx) (revision bf1fde9d2147a6eeaecebbb371be2c4856759159) +++ Riskeer/Piping/src/Riskeer.Piping.Plugin/Properties/Resources.resx (.../Resources.resx) (revision 242c0f8348fd696858006ead7738427ae4c5374f) @@ -158,4 +158,10 @@ Weet u zeker dat u wilt doorgaan? + + Semi-probabilistische berekening &toevoegen + + + Voeg een nieuwe semi-probabilistische berekening toe aan deze map met berekeningen. + \ No newline at end of file Index: Riskeer/Piping/test/Riskeer.Piping.Plugin.Test/TreeNodeInfos/PipingCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -r05ccb12347fe3b2591de1b328c20d566de34ab2a -r242c0f8348fd696858006ead7738427ae4c5374f --- Riskeer/Piping/test/Riskeer.Piping.Plugin.Test/TreeNodeInfos/PipingCalculationGroupContextTreeNodeInfoTest.cs (.../PipingCalculationGroupContextTreeNodeInfoTest.cs) (revision 05ccb12347fe3b2591de1b328c20d566de34ab2a) +++ Riskeer/Piping/test/Riskeer.Piping.Plugin.Test/TreeNodeInfos/PipingCalculationGroupContextTreeNodeInfoTest.cs (.../PipingCalculationGroupContextTreeNodeInfoTest.cs) (revision 242c0f8348fd696858006ead7738427ae4c5374f) @@ -59,7 +59,7 @@ private const int contextMenuImportCalculationGroupIndexRootGroup = 2; private const int contextMenuExportCalculationGroupIndexRootGroup = 3; private const int contextMenuAddCalculationGroupIndexRootGroup = 7; - private const int contextMenuAddCalculationIndexRootGroup = 8; + private const int contextMenuAddSemiProbabilisticCalculationIndexRootGroup = 8; private const int contextMenuUpdateEntryAndExitPointsAllIndexRootGroup = 10; private const int contextMenuValidateAllIndexRootGroup = 12; private const int contextMenuCalculateAllIndexRootGroup = 13; @@ -72,7 +72,7 @@ private const int contextMenuExportCalculationGroupIndexNestedGroup = 1; private const int contextMenuDuplicateIndexNestedGroup = 3; private const int contextMenuAddCalculationGroupIndexNestedGroup = 5; - private const int contextMenuAddCalculationIndexNestedGroup = 6; + private const int contextMenuAddSemiProbabilisticCalculationIndexNestedGroup = 6; private const int contextMenuRenameCalculationGroupIndexNestedGroup = 8; private const int contextMenuUpdateEntryAndExitPointsAllIndexNestedGroup = 9; private const int contextMenuValidateAllIndexNestedGroup = 11; @@ -259,9 +259,9 @@ "&Map toevoegen", "Voeg een nieuwe map toe aan deze map met berekeningen.", RiskeerCommonFormsResources.AddFolderIcon); - TestHelper.AssertContextMenuStripContainsItem(menu, contextMenuAddCalculationIndexNestedGroup, - "Berekening &toevoegen", - "Voeg een nieuwe berekening toe aan deze map met berekeningen.", + TestHelper.AssertContextMenuStripContainsItem(menu, contextMenuAddSemiProbabilisticCalculationIndexNestedGroup, + "Semi-probabilistische berekening &toevoegen", + "Voeg een nieuwe semi-probabilistische berekening toe aan deze map met berekeningen.", RiskeerCommonFormsResources.CalculationIcon); TestHelper.AssertContextMenuStripContainsItem(menu, contextMenuRenameCalculationGroupIndexNestedGroup, "&Hernoemen", @@ -385,9 +385,9 @@ "Voeg een nieuwe map toe aan deze map met berekeningen.", RiskeerCommonFormsResources.AddFolderIcon); - TestHelper.AssertContextMenuStripContainsItem(menu, contextMenuAddCalculationIndexRootGroup, - "Berekening &toevoegen", - "Voeg een nieuwe berekening toe aan deze map met berekeningen.", + TestHelper.AssertContextMenuStripContainsItem(menu, contextMenuAddSemiProbabilisticCalculationIndexRootGroup, + "Semi-probabilistische berekening &toevoegen", + "Voeg een nieuwe semi-probabilistische berekening toe aan deze map met berekeningen.", RiskeerCommonFormsResources.CalculationIcon); TestHelper.AssertContextMenuStripContainsItem(menu, contextMenuUpdateEntryAndExitPointsAllIndexRootGroup, @@ -906,7 +906,7 @@ Assert.AreEqual(1, group.Children.Count); // Call - contextMenu.Items[contextMenuAddCalculationIndexNestedGroup].PerformClick(); + contextMenu.Items[contextMenuAddSemiProbabilisticCalculationIndexNestedGroup].PerformClick(); // Assert Assert.AreEqual(2, group.Children.Count);