Index: Riskeer/Piping/src/Riskeer.Piping.Forms/PropertyClasses/Probabilistic/ProbabilisticPipingInputContextProperties.cs =================================================================== diff -u -ra26eb3ffe3960dacedbf69a4b23d6f7d682c5041 -rdc57cdbc78dd268f87c97fbb6f72b2a94391cc54 --- Riskeer/Piping/src/Riskeer.Piping.Forms/PropertyClasses/Probabilistic/ProbabilisticPipingInputContextProperties.cs (.../ProbabilisticPipingInputContextProperties.cs) (revision a26eb3ffe3960dacedbf69a4b23d6f7d682c5041) +++ Riskeer/Piping/src/Riskeer.Piping.Forms/PropertyClasses/Probabilistic/ProbabilisticPipingInputContextProperties.cs (.../ProbabilisticPipingInputContextProperties.cs) (revision dc57cdbc78dd268f87c97fbb6f72b2a94391cc54) @@ -177,7 +177,7 @@ [PropertyOrder(selectedHydraulicBoundaryLocationPropertyIndex)] [Editor(typeof(HydraulicBoundaryLocationEditor), typeof(UITypeEditor))] - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_HydraulicData))] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_HydraulicData),1,4)] [ResourcesDisplayName(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.HydraulicBoundaryLocation_DisplayName))] [ResourcesDescription(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.HydraulicBoundaryLocation_Description_with_assessment_level))] public SelectableHydraulicBoundaryLocation SelectedHydraulicBoundaryLocation @@ -199,7 +199,7 @@ [PropertyOrder(dampingFactorExitPropertyIndex)] [TypeConverter(typeof(ExpandableObjectConverter))] - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_HydraulicData))] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_HydraulicData), 1, 4)] [ResourcesDisplayName(typeof(Resources), nameof(Resources.PipingInput_DampingFactorExit_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.PipingInput_DampingFactorExit_Description))] public LogNormalDistributionProperties DampingFactorExit @@ -214,7 +214,7 @@ [PropertyOrder(phreaticLevelExitPropertyIndex)] [TypeConverter(typeof(ExpandableObjectConverter))] - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_HydraulicData))] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_HydraulicData), 1, 4)] [ResourcesDisplayName(typeof(Resources), nameof(Resources.PipingInput_PhreaticLevelExit_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.PipingInput_PhreaticLevelExit_Description))] public NormalDistributionProperties PhreaticLevelExit @@ -228,7 +228,7 @@ } [PropertyOrder(piezometricHeadExitPropertyIndex)] - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_HydraulicData))] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_HydraulicData), 1, 4)] [ResourcesDisplayName(typeof(Resources), nameof(Resources.PipingInput_PiezometricHeadExit_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.PipingInput_PiezometricHeadExit_Description))] public RoundedDouble PiezometricHeadExit @@ -245,7 +245,7 @@ [PropertyOrder(surfaceLinePropertyIndex)] [Editor(typeof(PipingInputContextSurfaceLineSelectionEditor), typeof(UITypeEditor))] - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization))] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization), 2, 4)] [ResourcesDisplayName(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.SurfaceLine_DisplayName))] [ResourcesDescription(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.SurfaceLine_Description))] public PipingSurfaceLine SurfaceLine @@ -269,7 +269,7 @@ [PropertyOrder(stochasticSoilModelPropertyIndex)] [Editor(typeof(PipingInputContextStochasticSoilModelSelectionEditor), typeof(UITypeEditor))] - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization))] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization), 2, 4)] [ResourcesDisplayName(typeof(Resources), nameof(Resources.PipingInput_StochasticSoilModel_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.PipingInput_StochasticSoilModel_Description))] public PipingStochasticSoilModel StochasticSoilModel @@ -293,7 +293,7 @@ [PropertyOrder(stochasticSoilProfilePropertyIndex)] [Editor(typeof(PipingInputContextStochasticSoilProfileSelectionEditor), typeof(UITypeEditor))] - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization))] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization), 2, 4)] [ResourcesDisplayName(typeof(Resources), nameof(Resources.PipingInput_StochasticSoilProfile_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.PipingInput_StochasticSoilProfile_Description))] public PipingStochasticSoilProfile StochasticSoilProfile @@ -313,7 +313,7 @@ [DynamicReadOnly] [PropertyOrder(entryPointLPropertyIndex)] - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization))] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization), 2, 4)] [ResourcesDisplayName(typeof(Resources), nameof(Resources.PipingInput_EntryPointL_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.PipingInput_EntryPointL_Description))] public RoundedDouble EntryPointL @@ -330,7 +330,7 @@ [DynamicReadOnly] [PropertyOrder(exitPointLPropertyIndex)] - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization))] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization), 2, 4)] [ResourcesDisplayName(typeof(Resources), nameof(Resources.PipingInput_ExitPointL_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.PipingInput_ExitPointL_Description))] public RoundedDouble ExitPointL @@ -347,7 +347,7 @@ [PropertyOrder(seepageLengthPropertyIndex)] [TypeConverter(typeof(ExpandableObjectConverter))] - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization))] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization), 2, 4)] [ResourcesDisplayName(typeof(Resources), nameof(Resources.PipingInput_SeepageLength_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.PipingInput_SeepageLength_Description))] public VariationCoefficientLogNormalDistributionProperties SeepageLength @@ -360,7 +360,7 @@ [PropertyOrder(thicknessCoverageLayerPropertyIndex)] [TypeConverter(typeof(ExpandableObjectConverter))] - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization))] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization), 2, 4)] [ResourcesDisplayName(typeof(Resources), nameof(Resources.PipingInput_ThicknessCoverageLayer_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.PipingInput_ThicknessCoverageLayer_Description))] public LogNormalDistributionProperties ThicknessCoverageLayer @@ -373,7 +373,7 @@ [PropertyOrder(effectiveThicknessCoverageLayerPropertyIndex)] [TypeConverter(typeof(ExpandableObjectConverter))] - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization))] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization), 2, 4)] [ResourcesDisplayName(typeof(Resources), nameof(Resources.PipingInput_EffectiveThicknessCoverageLayer_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.PipingInput_EffectiveThicknessCoverageLayer_Description))] public LogNormalDistributionProperties EffectiveThicknessCoverageLayer @@ -386,7 +386,7 @@ [PropertyOrder(thicknessAquiferLayerPropertyIndex)] [TypeConverter(typeof(ExpandableObjectConverter))] - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization))] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization), 2, 4)] [ResourcesDisplayName(typeof(Resources), nameof(Resources.PipingInput_ThicknessAquiferLayer_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.PipingInput_ThicknessAquiferLayer_Description))] public LogNormalDistributionProperties ThicknessAquiferLayer @@ -399,7 +399,7 @@ [PropertyOrder(darcyPermeabilityPropertyIndex)] [TypeConverter(typeof(ExpandableObjectConverter))] - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization))] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization), 2, 4)] [ResourcesDisplayName(typeof(Resources), nameof(Resources.PipingInput_DarcyPermeability_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.PipingInput_DarcyPermeability_Description))] public VariationCoefficientLogNormalDistributionProperties DarcyPermeability @@ -412,7 +412,7 @@ [PropertyOrder(diameter70PropertyIndex)] [TypeConverter(typeof(ExpandableObjectConverter))] - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization))] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization), 2, 4)] [ResourcesDisplayName(typeof(Resources), nameof(Resources.PipingInput_Diameter70_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.PipingInput_Diameter70_Description))] public VariationCoefficientLogNormalDistributionProperties Diameter70 @@ -425,7 +425,7 @@ [PropertyOrder(saturatedVolumicWeightOfCoverageLayerPropertyIndex)] [TypeConverter(typeof(ExpandableObjectConverter))] - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization))] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization), 2, 4)] [ResourcesDisplayName(typeof(Resources), nameof(Resources.PipingInput_SaturatedVolumicWeightOfCoverageLayer_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.PipingInput_SaturatedVolumicWeightOfCoverageLayer_Description))] public ShiftedLogNormalDistributionProperties SaturatedVolumicWeightOfCoverageLayer @@ -442,7 +442,7 @@ [DynamicReadOnly] [PropertyOrder(sectionNamePropertyIndex)] - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.SectionInformation))] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.SectionInformation), 3, 4)] [ResourcesDisplayName(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.FailureMechanismSection_Name_DisplayName))] [ResourcesDescription(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.FailureMechanismSection_Name_Description))] public string SectionName @@ -456,7 +456,7 @@ [DynamicReadOnly] [PropertyOrder(sectionLengthPropertyIndex)] - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.SectionInformation))] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.SectionInformation), 3, 4)] [ResourcesDisplayName(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.SectionLength_DisplayName))] [ResourcesDescription(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.SectionLength_Description))] public double SectionLength @@ -473,7 +473,7 @@ #region Output [PropertyOrder(shouldIllustrationPointsBeCalculatedPropertyIndex)] - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_OutputSettings))] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_OutputSettings), 4, 4)] [ResourcesDisplayName(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.ShouldIllustrationPointsBeCalculated_DisplayName))] [ResourcesDescription(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.ShouldIllustrationPointsBeCalculated_Description))] public bool ShouldIllustrationPointsBeCalculated Index: Riskeer/Piping/test/Riskeer.Piping.Forms.Test/PropertyClasses/Probabilistic/ProbabilisticPipingInputContextPropertiesTest.cs =================================================================== diff -u -r54618fcc9b0507af8a105314b5fae6e805b7e700 -rdc57cdbc78dd268f87c97fbb6f72b2a94391cc54 --- Riskeer/Piping/test/Riskeer.Piping.Forms.Test/PropertyClasses/Probabilistic/ProbabilisticPipingInputContextPropertiesTest.cs (.../ProbabilisticPipingInputContextPropertiesTest.cs) (revision 54618fcc9b0507af8a105314b5fae6e805b7e700) +++ Riskeer/Piping/test/Riskeer.Piping.Forms.Test/PropertyClasses/Probabilistic/ProbabilisticPipingInputContextPropertiesTest.cs (.../ProbabilisticPipingInputContextPropertiesTest.cs) (revision dc57cdbc78dd268f87c97fbb6f72b2a94391cc54) @@ -31,6 +31,7 @@ using NUnit.Framework; using Rhino.Mocks; using Riskeer.Common.Data.AssessmentSection; +using Riskeer.Common.Data.FailureMechanism; using Riskeer.Common.Data.Hydraulics; using Riskeer.Common.Data.Probabilistics; using Riskeer.Common.Data.TestUtil; @@ -560,6 +561,10 @@ Assert.AreSame(hydraulicBoundaryLocation, properties.SelectedHydraulicBoundaryLocation.HydraulicBoundaryLocation); + Assert.AreEqual("-", properties.SectionName); + Assert.AreEqual(0.0, properties.SectionLength); + Assert.AreEqual(inputParameters.ShouldIllustrationPointsBeCalculated, properties.ShouldIllustrationPointsBeCalculated); + mocks.VerifyAll(); } @@ -582,6 +587,14 @@ Enumerable.Empty(), failureMechanism, assessmentSection); + context.FailureMechanism.SetSections(new[] + { + new FailureMechanismSection("Section", new[] + { + new Point2D(0.0, 0.0), + new Point2D(5.0, 0.0) + }) + }, "path/to/sections"); var handler = new ObservablePropertyChangeHandler(calculationItem, calculationItem.InputParameters); var properties = new ProbabilisticPipingInputContextProperties(context, @@ -605,7 +618,7 @@ Mean = (RoundedDouble) 1.55, StandardDeviation = (RoundedDouble) 0.22 }); - + // When properties.SurfaceLine = surfaceLine; properties.EntryPointL = (RoundedDouble) entryPointL; @@ -616,6 +629,7 @@ properties.DampingFactorExit.StandardDeviation = dampingFactorExit.Distribution.StandardDeviation; properties.PhreaticLevelExit.Mean = phreaticLevelExit.Distribution.Mean; properties.PhreaticLevelExit.StandardDeviation = phreaticLevelExit.Distribution.StandardDeviation; + properties.ShouldIllustrationPointsBeCalculated = true; // Then Assert.AreEqual(entryPointL, inputParameters.EntryPointL, @@ -627,6 +641,11 @@ Assert.AreSame(soilProfile, inputParameters.StochasticSoilProfile); DistributionAssert.AreEqual(dampingFactorExit.Distribution, inputParameters.DampingFactorExit); DistributionAssert.AreEqual(phreaticLevelExit.Distribution, inputParameters.PhreaticLevelExit); + + Assert.AreEqual("Section", properties.SectionName); + Assert.AreEqual(5.0, properties.SectionLength); + Assert.AreEqual(true, properties.ShouldIllustrationPointsBeCalculated); + mocks.VerifyAll(); } @@ -1719,6 +1738,7 @@ new Point3D(xMin, 0.0, 0.0), new Point3D(xMax, 0.0, 1.0) }); + surfaceLine.ReferenceLineIntersectionWorldPoint = new Point2D(2.0,0.0); return surfaceLine; } }