Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs =================================================================== diff -u -rc703acd9b4aa18825e6938815ba975c34949cc6f -rb32ec68f52968bc821b67cd973544bc2d0e7d568 --- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs (.../RingtoetsPlugin.cs) (revision c703acd9b4aa18825e6938815ba975c34949cc6f) +++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs (.../RingtoetsPlugin.cs) (revision b32ec68f52968bc821b67cd973544bc2d0e7d568) @@ -448,6 +448,17 @@ Color.FromKnownColor(KnownColor.ControlText), ContextMenuStrip = DesignWaterLevelContextMenuStrip }; + + yield return new TreeNodeInfo + { + Text = designWaterLevel => RingtoetsFormsResources.WaveHeightContext_DisplayName, + Image = designWaterLevel => RingtoetsCommonFormsResources.GenericInputOutputIcon, + CanRename = (context, o) => false, + ForeColor = context => context.WrappedData.HydraulicBoundaryDatabase == null ? + Color.FromKnownColor(KnownColor.GrayText) : + Color.FromKnownColor(KnownColor.ControlText), + ContextMenuStrip = WaveHeightContextMenuStrip + }; yield return CreateFailureMechanismSectionResultTreeNodeInfo(); yield return CreateFailureMechanismSectionResultTreeNodeInfo(); @@ -966,7 +977,8 @@ { return new object[] { - new DesignWaterLevelContext(nodeData.WrappedData) + new DesignWaterLevelContext(nodeData.WrappedData), + new WaveHeightContext(nodeData.WrappedData) }; } @@ -1007,6 +1019,27 @@ .Build(); } + private ContextMenuStrip WaveHeightContextMenuStrip(WaveHeightContext nodeData, object parentData, TreeViewControl treeViewControl) + { + var waveHeightItem = new StrictContextMenuItem( + RingtoetsFormsResources.WaveHeight_Calculate, + RingtoetsFormsResources.WaveHeight_Calculate_ToolTip, + RingtoetsCommonFormsResources.FailureMechanismIcon, + null); + + if (nodeData.WrappedData.HydraulicBoundaryDatabase == null) + { + waveHeightItem.Enabled = false; + waveHeightItem.ToolTipText = RingtoetsFormsResources.WaveHeight_No_HRD_To_Calculate; + } + + return Gui.Get(nodeData, treeViewControl) + .AddCustomItem(waveHeightItem) + .AddSeparator() + .AddPropertiesItem() + .Build(); + } + private ContextMenuStrip HydraulicBoundaryDatabaseContextMenuStrip(HydraulicBoundaryDatabaseContext nodeData, object parentData, TreeViewControl treeViewControl) { var connectionItem = new StrictContextMenuItem(