Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsPlugin.cs =================================================================== diff -u -r764d8b4def2fd6d7a3d296aae65dd5bed54f1828 -recc8ef0eb9c115e10464b534e6c83c2bb780f9d1 --- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsPlugin.cs (.../GrassCoverErosionOutwardsPlugin.cs) (revision 764d8b4def2fd6d7a3d296aae65dd5bed54f1828) +++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsPlugin.cs (.../GrassCoverErosionOutwardsPlugin.cs) (revision ecc8ef0eb9c115e10464b534e6c83c2bb780f9d1) @@ -32,6 +32,8 @@ using Core.Common.Gui.Forms.ProgressDialog; using Core.Common.Gui.Plugin; using Core.Common.Util; +using Ringtoets.AssemblyTool.Data; +using Ringtoets.Common.Data.AssemblyTool; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.FailureMechanism; @@ -224,7 +226,8 @@ { Text = context => Resources.GrassCoverErosionOutwardsDesignWaterLevelCalculationsGroupContext_DisplayName, Image = context => RingtoetsCommonFormsResources.GeneralFolderIcon, - ContextMenuStrip = GrassCoverErosionOutwardsDesignWaterLevelCalculationsGroupContextMenuStrip + ContextMenuStrip = GrassCoverErosionOutwardsDesignWaterLevelCalculationsGroupContextMenuStrip, + ChildNodeObjects = DesignWaterlevelCalculationsGroupContextChildNodeObjects }; yield return new TreeNodeInfo @@ -267,7 +270,7 @@ .Build() }; } - + public override IEnumerable GetExportInfos() { yield return new ExportInfo @@ -956,6 +959,38 @@ .Build(); } + private static object[] DesignWaterlevelCalculationsGroupContextChildNodeObjects(GrassCoverErosionOutwardsDesignWaterLevelCalculationsGroupContext context) + { + return new object[] + { + new GrassCoverErosionOutwardsDesignWaterLevelCalculationsContext( + context.FailureMechanism.WaterLevelCalculationsForMechanismSpecificFactorizedSignalingNorm, + context.FailureMechanism, context.AssessmentSection, () => GetMechanismSpecificFactorizedSignalingHydraulicBoundaryNorm( + context.AssessmentSection, + context.FailureMechanism), Resources.Hydraulic_category_boundary_mechanismSpecificFactorizedSignalingNorm_name), + new GrassCoverErosionOutwardsDesignWaterLevelCalculationsContext( + context.FailureMechanism.WaterLevelCalculationsForMechanismSpecificSignalingNorm, + context.FailureMechanism, context.AssessmentSection, () => GetMechanismSpecificSignalingHydraulicBoundaryNorm( + context.AssessmentSection, + context.FailureMechanism), Resources.Hydraulic_category_boundary_mechanismSpecificSignalingNorm_name), + new GrassCoverErosionOutwardsDesignWaterLevelCalculationsContext( + context.FailureMechanism.WaterLevelCalculationsForMechanismSpecificLowerLimitNorm, + context.FailureMechanism, context.AssessmentSection, () => GetMechanismSpecificLowerLimitHydraulicBoundaryNorm( + context.AssessmentSection, + context.FailureMechanism), Resources.Hydraulic_category_boundary_mechanismSpecificLowerLimitNorm_name), + new GrassCoverErosionOutwardsDesignWaterLevelCalculationsContext( + context.AssessmentSection.WaterLevelCalculationsForLowerLimitNorm, + context.FailureMechanism, context.AssessmentSection, () => GetLowerLimitHydraulicBoundaryNorm( + context.AssessmentSection, + context.FailureMechanism), Resources.Hydraulic_category_boundary_lowerLimitNorm_name), + new GrassCoverErosionOutwardsDesignWaterLevelCalculationsContext( + context.AssessmentSection.WaterLevelCalculationsForFactorizedLowerLimitNorm, + context.FailureMechanism, context.AssessmentSection, () => GetFactorizedLowerLimitHydraulicBoundaryNorm( + context.AssessmentSection, + context.FailureMechanism), Resources.Hydraulic_category_boundary_factorizedLowerLimitNorm_name) + }; + } + #endregion #region GrassCoverErosionOutwardsWaveHeightCalculationsGroupContext TreeNodeInfo @@ -980,5 +1015,58 @@ } #endregion + + #region Hydraulic boundary norms + + private static double GetMechanismSpecificFactorizedSignalingHydraulicBoundaryNorm(IAssessmentSection assessmentSection, + GrassCoverErosionOutwardsFailureMechanism failureMechanism) + { + return CreateFailureMechanismAssemblyCategories(assessmentSection, failureMechanism) + .Single(c => c.Group == FailureMechanismSectionAssemblyCategoryGroup.IIv) + .LowerBoundary; + } + + private static double GetMechanismSpecificSignalingHydraulicBoundaryNorm(IAssessmentSection assessmentSection, + GrassCoverErosionOutwardsFailureMechanism failureMechanism) + { + return CreateFailureMechanismAssemblyCategories(assessmentSection, failureMechanism) + .Single(c => c.Group == FailureMechanismSectionAssemblyCategoryGroup.IIIv) + .LowerBoundary; + } + + private static double GetMechanismSpecificLowerLimitHydraulicBoundaryNorm(IAssessmentSection assessmentSection, + GrassCoverErosionOutwardsFailureMechanism failureMechanism) + { + return CreateFailureMechanismAssemblyCategories(assessmentSection, failureMechanism) + .Single(c => c.Group == FailureMechanismSectionAssemblyCategoryGroup.IVv) + .LowerBoundary; + } + + private static double GetLowerLimitHydraulicBoundaryNorm(IAssessmentSection assessmentSection, + GrassCoverErosionOutwardsFailureMechanism failureMechanism) + { + return CreateFailureMechanismAssemblyCategories(assessmentSection, failureMechanism) + .Single(c => c.Group == FailureMechanismSectionAssemblyCategoryGroup.Vv) + .LowerBoundary; + } + + private static double GetFactorizedLowerLimitHydraulicBoundaryNorm(IAssessmentSection assessmentSection, + GrassCoverErosionOutwardsFailureMechanism failureMechanism) + { + return CreateFailureMechanismAssemblyCategories(assessmentSection, failureMechanism) + .Single(c => c.Group == FailureMechanismSectionAssemblyCategoryGroup.VIv) + .LowerBoundary; + } + + private static IEnumerable CreateFailureMechanismAssemblyCategories( + IAssessmentSection assessmentSection, GrassCoverErosionOutwardsFailureMechanism failureMechanism) + { + return AssemblyToolCategoriesFactory.CreateFailureMechanismSectionAssemblyCategories( + assessmentSection.FailureMechanismContribution.SignalingNorm, + assessmentSection.FailureMechanismContribution.LowerLimitNorm, + failureMechanism.Contribution, failureMechanism.GeneralInput.N); + } + + #endregion } } \ No newline at end of file