Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/PropertyClasses/GrassCoverErosionOutwardsDesignWaterLevelLocationProperties.cs =================================================================== diff -u -r12472a63885e4314aae3ed0df76bc9ebaf54e91f -r004bbd352a22299358396d752e97971453095361 --- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/PropertyClasses/GrassCoverErosionOutwardsDesignWaterLevelLocationProperties.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationProperties.cs) (revision 12472a63885e4314aae3ed0df76bc9ebaf54e91f) +++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/PropertyClasses/GrassCoverErosionOutwardsDesignWaterLevelLocationProperties.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationProperties.cs) (revision 004bbd352a22299358396d752e97971453095361) @@ -26,7 +26,7 @@ using Core.Common.Util; using Core.Common.Util.Attributes; using Ringtoets.Common.Data.Hydraulics; -using Ringtoets.Common.Data.IllustrationPoints; +using Ringtoets.Common.Forms.PropertyClasses; using Ringtoets.Common.Forms.TypeConverters; using Ringtoets.GrassCoverErosionOutwards.Data; using Ringtoets.GrassCoverErosionOutwards.Forms.Properties; @@ -38,24 +38,15 @@ /// ViewModel of with a design water level calculation result /// for properties panel of the . /// - public class GrassCoverErosionOutwardsDesignWaterLevelLocationProperties : GrassCoverErosionOutwardsHydraulicBoundaryLocationProperties + public class GrassCoverErosionOutwardsDesignWaterLevelLocationProperties : HydraulicBoundaryLocationProperties { /// /// Creates a new instance of . /// /// The hydraulic boundary location calculation. /// Thrown when is null. public GrassCoverErosionOutwardsDesignWaterLevelLocationProperties(HydraulicBoundaryLocationCalculation hydraulicBoundaryLocationCalculation) - : base(hydraulicBoundaryLocationCalculation, new ConstructionProperties - { - IdIndex = 1, - NameIndex = 2, - LocationIndex = 3, - GoverningWindDirectionIndex = 11, - StochastsIndex = 12, - DurationsIndex = 13, - IllustrationPointsIndex = 14 - }) {} + : base(hydraulicBoundaryLocationCalculation) {} [PropertyOrder(4)] [TypeConverter(typeof(NoValueRoundedDoubleConverter))] @@ -70,58 +61,6 @@ } } - [PropertyOrder(5)] - [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_Result))] - [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.CalculationOutput_TargetProbability_DisplayName))] - [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.CalculationOutput_TargetProbability_Description))] - [TypeConverter(typeof(NoProbabilityValueDoubleConverter))] - public double TargetProbability - { - get - { - return data.Output?.TargetProbability ?? double.NaN; - } - } - - [PropertyOrder(6)] - [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_Result))] - [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.CalculationOutput_TargetReliability_DisplayName))] - [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.CalculationOutput_TargetReliability_Description))] - [TypeConverter(typeof(NoValueRoundedDoubleConverter))] - public RoundedDouble TargetReliability - { - get - { - return data.Output?.TargetReliability ?? RoundedDouble.NaN; - } - } - - [PropertyOrder(7)] - [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_Result))] - [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.CalculationOutput_CalculatedProbability_DisplayName))] - [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.CalculationOutput_CalculatedProbability_Description))] - [TypeConverter(typeof(NoProbabilityValueDoubleConverter))] - public double CalculatedProbability - { - get - { - return data.Output?.CalculatedProbability ?? double.NaN; - } - } - - [PropertyOrder(8)] - [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_Result))] - [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.CalculationOutput_CalculatedReliability_DisplayName))] - [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.CalculationOutput_CalculatedReliability_Description))] - [TypeConverter(typeof(NoValueRoundedDoubleConverter))] - public RoundedDouble CalculatedReliability - { - get - { - return data.Output?.CalculatedReliability ?? RoundedDouble.NaN; - } - } - [PropertyOrder(9)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_Result))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.CalculationOutput_Convergence_DisplayName))] @@ -134,32 +73,5 @@ return new EnumDisplayWrapper(convergence).DisplayName; } } - - [PropertyOrder(10)] - [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_IllustrationPoints))] - [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.ShouldIllustrationPointsBeCalculated_DisplayName))] - [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.ShouldIllustrationPointsBeCalculated_Description))] - public bool ShouldIllustrationPointsBeCalculated - { - get - { - return data.InputParameters.ShouldIllustrationPointsBeCalculated; - } - set - { - data.InputParameters.ShouldIllustrationPointsBeCalculated = value; - data.NotifyObservers(); - } - } - - protected override GeneralResult GetGeneralResult() - { - if (data.HasOutput && data.Output.HasGeneralResult) - { - return data.Output.GeneralResult; - } - - return null; - } } } \ No newline at end of file Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/PropertyClasses/GrassCoverErosionOutwardsWaveHeightLocationProperties.cs =================================================================== diff -u -r12472a63885e4314aae3ed0df76bc9ebaf54e91f -r004bbd352a22299358396d752e97971453095361 --- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/PropertyClasses/GrassCoverErosionOutwardsWaveHeightLocationProperties.cs (.../GrassCoverErosionOutwardsWaveHeightLocationProperties.cs) (revision 12472a63885e4314aae3ed0df76bc9ebaf54e91f) +++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/PropertyClasses/GrassCoverErosionOutwardsWaveHeightLocationProperties.cs (.../GrassCoverErosionOutwardsWaveHeightLocationProperties.cs) (revision 004bbd352a22299358396d752e97971453095361) @@ -26,7 +26,7 @@ using Core.Common.Util; using Core.Common.Util.Attributes; using Ringtoets.Common.Data.Hydraulics; -using Ringtoets.Common.Data.IllustrationPoints; +using Ringtoets.Common.Forms.PropertyClasses; using Ringtoets.Common.Forms.TypeConverters; using Ringtoets.GrassCoverErosionOutwards.Data; using Ringtoets.GrassCoverErosionOutwards.Forms.Properties; @@ -38,24 +38,15 @@ /// ViewModel of with a wave height calculation result /// for properties panel of the . /// - public class GrassCoverErosionOutwardsWaveHeightLocationProperties : GrassCoverErosionOutwardsHydraulicBoundaryLocationProperties + public class GrassCoverErosionOutwardsWaveHeightLocationProperties : HydraulicBoundaryLocationProperties { /// /// Creates a new instance of . /// /// The hydraulic boundary location calculation. /// Thrown when is null. public GrassCoverErosionOutwardsWaveHeightLocationProperties(HydraulicBoundaryLocationCalculation hydraulicBoundaryLocationCalculation) - : base(hydraulicBoundaryLocationCalculation, new ConstructionProperties - { - IdIndex = 1, - NameIndex = 2, - LocationIndex = 3, - GoverningWindDirectionIndex = 11, - StochastsIndex = 12, - DurationsIndex = 13, - IllustrationPointsIndex = 14 - }) {} + : base(hydraulicBoundaryLocationCalculation) {} [PropertyOrder(4)] [TypeConverter(typeof(NoValueRoundedDoubleConverter))] @@ -70,58 +61,6 @@ } } - [PropertyOrder(5)] - [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_Result))] - [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.CalculationOutput_TargetProbability_DisplayName))] - [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.CalculationOutput_TargetProbability_Description))] - [TypeConverter(typeof(NoProbabilityValueDoubleConverter))] - public double TargetProbability - { - get - { - return data.Output?.TargetProbability ?? double.NaN; - } - } - - [PropertyOrder(6)] - [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_Result))] - [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.CalculationOutput_TargetReliability_DisplayName))] - [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.CalculationOutput_TargetReliability_Description))] - [TypeConverter(typeof(NoValueRoundedDoubleConverter))] - public RoundedDouble TargetReliability - { - get - { - return data.Output?.TargetReliability ?? RoundedDouble.NaN; - } - } - - [PropertyOrder(7)] - [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_Result))] - [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.CalculationOutput_CalculatedProbability_DisplayName))] - [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.CalculationOutput_CalculatedProbability_Description))] - [TypeConverter(typeof(NoProbabilityValueDoubleConverter))] - public double CalculatedProbability - { - get - { - return data.Output?.CalculatedProbability ?? double.NaN; - } - } - - [PropertyOrder(8)] - [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_Result))] - [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.CalculationOutput_CalculatedReliability_DisplayName))] - [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.CalculationOutput_CalculatedReliability_Description))] - [TypeConverter(typeof(NoValueRoundedDoubleConverter))] - public RoundedDouble CalculatedReliability - { - get - { - return data.Output?.CalculatedReliability ?? RoundedDouble.NaN; - } - } - [PropertyOrder(9)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_Result))] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.CalculationOutput_Convergence_DisplayName))] @@ -134,32 +73,5 @@ return new EnumDisplayWrapper(convergence).DisplayName; } } - - [PropertyOrder(10)] - [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_IllustrationPoints))] - [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.ShouldIllustrationPointsBeCalculated_DisplayName))] - [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.ShouldIllustrationPointsBeCalculated_Description))] - public bool ShouldIllustrationPointsBeCalculated - { - get - { - return data.InputParameters.ShouldIllustrationPointsBeCalculated; - } - set - { - data.InputParameters.ShouldIllustrationPointsBeCalculated = value; - data.NotifyObservers(); - } - } - - protected override GeneralResult GetGeneralResult() - { - if (data.HasOutput && data.Output.HasGeneralResult) - { - return data.Output.GeneralResult; - } - - return null; - } } } \ No newline at end of file