Index: Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Forms/PropertyClasses/ClosingStructuresInputContextProperties.cs =================================================================== diff -u -r9a761050d58b4d776bcb40a9be8798fb6f2e2b3b -rc1bdf7aebfd7e5f1c39905ea60904ecc97d1b7f4 --- Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Forms/PropertyClasses/ClosingStructuresInputContextProperties.cs (.../ClosingStructuresInputContextProperties.cs) (revision 9a761050d58b4d776bcb40a9be8798fb6f2e2b3b) +++ Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Forms/PropertyClasses/ClosingStructuresInputContextProperties.cs (.../ClosingStructuresInputContextProperties.cs) (revision c1bdf7aebfd7e5f1c39905ea60904ecc97d1b7f4) @@ -50,6 +50,14 @@ StructuresCalculation, ClosingStructuresFailureMechanism> { + private const int generalDataCategoryIndex = 1; + private const int modelFactorsCategoryIndex = 2; + private const int schematizationClosureCategoryIndex = 3; + private const int schematizationIncomingFlowCategoryIndex = 4; + private const int schematizationGroundErosionCategoryIndex = 5; + private const int schematizationStorageStructureCategoryIndex = 6; + private const int foreshoreCategoryIndex = 7; + private const int outputSettingsCategoryIndex = 8; private const int totalNrOfCategories = 8; private const int hydraulicBoundaryLocationPropertyIndex = 0; @@ -110,12 +118,31 @@ StormDurationPropertyIndex = stormDurationPropertyIndex }, propertyChangeHandler) {} + #region Output Settings + + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_OutputSettings), + outputSettingsCategoryIndex, totalNrOfCategories)] + public override bool ShouldIllustrationPointsBeCalculated + { + get + { + return base.ShouldIllustrationPointsBeCalculated; + } + set + { + base.ShouldIllustrationPointsBeCalculated = value; + } + } + + #endregion + #region Model factors [DynamicVisible] [PropertyOrder(modelFactorSuperCriticalFlowPropertyIndex)] [TypeConverter(typeof(ExpandableObjectConverter))] - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_ModelFactors), 2, totalNrOfCategories)] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_ModelFactors), + modelFactorsCategoryIndex, totalNrOfCategories)] [ResourcesDisplayName(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Structure_ModelFactorSuperCriticalFlow_DisplayName))] [ResourcesDescription(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Structure_ModelFactorSuperCriticalFlow_Description))] public NormalDistributionProperties ModelFactorSuperCriticalFlow @@ -211,7 +238,8 @@ #region General data - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_GeneralData), 1, totalNrOfCategories)] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_GeneralData), + generalDataCategoryIndex, totalNrOfCategories)] public override SelectableHydraulicBoundaryLocation SelectedHydraulicBoundaryLocation { get @@ -224,7 +252,8 @@ } } - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_GeneralData), 1, totalNrOfCategories)] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_GeneralData), + generalDataCategoryIndex, totalNrOfCategories)] public override ClosingStructure Structure { get @@ -237,7 +266,8 @@ } } - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_GeneralData), 1, totalNrOfCategories)] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_GeneralData), + generalDataCategoryIndex, totalNrOfCategories)] public override Point2D StructureLocation { get @@ -254,7 +284,8 @@ [DynamicReadOnly] [PropertyOrder(identicalAperturesPropertyIndex)] - [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Schematization_Closure), 3, totalNrOfCategories)] + [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Schematization_Closure), + schematizationClosureCategoryIndex, totalNrOfCategories)] [ResourcesDisplayName(typeof(Resources), nameof(Resources.IdenticalApertures_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.IdenticalApertures_Description))] public int IdenticalApertures @@ -272,7 +303,8 @@ [DynamicReadOnly] [PropertyOrder(failureProbabilityOpenStructurePropertyIndex)] [TypeConverter(typeof(NoProbabilityValueDoubleConverter))] - [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Schematization_Closure), 3, totalNrOfCategories)] + [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Schematization_Closure), + schematizationClosureCategoryIndex, totalNrOfCategories)] [ResourcesDisplayName(typeof(Resources), nameof(Resources.FailureProbabilityOpenStructure_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.FailureProbabilityOpenStructure_Description))] public double FailureProbabilityOpenStructure @@ -290,7 +322,8 @@ [DynamicReadOnly] [PropertyOrder(probabilityOpenStructureBeforeFloodingPropertyIndex)] [TypeConverter(typeof(NoProbabilityValueDoubleConverter))] - [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Schematization_Closure), 3, totalNrOfCategories)] + [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Schematization_Closure), + schematizationClosureCategoryIndex, totalNrOfCategories)] [ResourcesDisplayName(typeof(Resources), nameof(Resources.ProbabilityOpenStructureBeforeFlooding_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.ProbabilityOpenStructureBeforeFlooding_Description))] public double ProbabilityOpenStructureBeforeFlooding @@ -308,7 +341,8 @@ [DynamicReadOnly] [PropertyOrder(failureProbabilityReparationPropertyIndex)] [TypeConverter(typeof(NoProbabilityValueDoubleConverter))] - [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Schematization_Closure), 3, totalNrOfCategories)] + [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Schematization_Closure), + schematizationClosureCategoryIndex, totalNrOfCategories)] [ResourcesDisplayName(typeof(Resources), nameof(Resources.FailureProbabilityReparation_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.FailureProbabilityReparation_Description))] public double FailureProbabilityReparation @@ -330,7 +364,8 @@ [DynamicReadOnly] [PropertyOrder(inflowModelTypePropertyIndex)] [TypeConverter(typeof(EnumTypeConverter))] - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization_Incoming_flow), 4, totalNrOfCategories)] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization_Incoming_flow), + schematizationIncomingFlowCategoryIndex, totalNrOfCategories)] [ResourcesDisplayName(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Structure_InflowModelType_DisplayName))] [ResourcesDescription(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Structure_InflowModelType_Description))] public ClosingStructureInflowModelType InflowModelType @@ -346,7 +381,8 @@ } [DynamicVisible] - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization_Incoming_flow), 4, totalNrOfCategories)] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization_Incoming_flow), + schematizationIncomingFlowCategoryIndex, totalNrOfCategories)] public override RoundedDouble StructureNormalOrientation { get @@ -362,7 +398,8 @@ [DynamicVisible] [PropertyOrder(levelCrestStructureNotClosingPropertyIndex)] [TypeConverter(typeof(ExpandableObjectConverter))] - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization_Incoming_flow), 4, totalNrOfCategories)] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization_Incoming_flow), + schematizationIncomingFlowCategoryIndex, totalNrOfCategories)] [ResourcesDisplayName(typeof(Resources), nameof(Resources.LevelCrestStructureNotClosing_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.LevelCrestStructureNotClosing_Description))] public NormalDistributionProperties LevelCrestStructureNotClosing @@ -381,7 +418,8 @@ [DynamicVisible] [PropertyOrder(insideWaterLevelPropertyIndex)] [TypeConverter(typeof(ExpandableObjectConverter))] - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization_Incoming_flow), 4, totalNrOfCategories)] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization_Incoming_flow), + schematizationIncomingFlowCategoryIndex, totalNrOfCategories)] [ResourcesDisplayName(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Structure_InsideWaterLevel_DisplayName))] [ResourcesDescription(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Structure_InsideWaterLevel_Description))] public NormalDistributionProperties InsideWaterLevel @@ -400,7 +438,8 @@ [DynamicVisible] [PropertyOrder(thresholdHeightOpenWeirPropertyIndex)] [TypeConverter(typeof(ExpandableObjectConverter))] - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization_Incoming_flow), 4, totalNrOfCategories)] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization_Incoming_flow), + schematizationIncomingFlowCategoryIndex, totalNrOfCategories)] [ResourcesDisplayName(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Structure_ThresholdHeightOpenWeir_DisplayName))] [ResourcesDescription(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Structure_ThresholdHeightOpenWeir_Description))] public NormalDistributionProperties ThresholdHeightOpenWeir @@ -419,7 +458,8 @@ [DynamicVisible] [PropertyOrder(areaFlowAperturesPropertyIndex)] [TypeConverter(typeof(ExpandableObjectConverter))] - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization_Incoming_flow), 4, totalNrOfCategories)] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization_Incoming_flow), + schematizationIncomingFlowCategoryIndex, totalNrOfCategories)] [ResourcesDisplayName(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Structure_AreaFlowApertures_DisplayName))] [ResourcesDescription(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Structure_AreaFlowApertures_Description))] public LogNormalDistributionProperties AreaFlowApertures @@ -438,7 +478,8 @@ [DynamicVisible] [PropertyOrder(drainCoefficientPropertyIndex)] [TypeConverter(typeof(ExpandableObjectConverter))] - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization_Incoming_flow), 4, totalNrOfCategories)] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization_Incoming_flow), + schematizationIncomingFlowCategoryIndex, totalNrOfCategories)] [ResourcesDisplayName(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Structure_DrainCoefficient_DisplayName))] [ResourcesDescription(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Structure_DrainCoefficient_Description))] public NormalDistributionProperties DrainCoefficient @@ -453,7 +494,8 @@ } [DynamicVisible] - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization_Incoming_flow), 4, totalNrOfCategories)] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization_Incoming_flow), + schematizationIncomingFlowCategoryIndex, totalNrOfCategories)] public override NormalDistributionProperties WidthFlowApertures { get @@ -463,7 +505,8 @@ } [PropertyOrder(factorStormDurationOpenStructurePropertyIndex)] - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization_Incoming_flow), 4, totalNrOfCategories)] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization_Incoming_flow), + schematizationIncomingFlowCategoryIndex, totalNrOfCategories)] [ResourcesDisplayName(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Structure_FactorStormDurationOpenStructure_DisplayName))] [ResourcesDescription(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Structure_FactorStormDurationOpenStructure_Description))] public RoundedDouble FactorStormDurationOpenStructure @@ -478,7 +521,8 @@ } } - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization_Incoming_flow), 4, totalNrOfCategories)] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization_Incoming_flow), + schematizationIncomingFlowCategoryIndex, totalNrOfCategories)] public override VariationCoefficientLogNormalDistributionProperties StormDuration { get @@ -489,10 +533,10 @@ #endregion - #region Ground erosion - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization_Ground_erosion), 5, totalNrOfCategories)] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization_Ground_erosion), + schematizationGroundErosionCategoryIndex, totalNrOfCategories)] public override VariationCoefficientLogNormalDistributionProperties CriticalOvertoppingDischarge { get @@ -501,7 +545,8 @@ } } - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization_Ground_erosion), 5, totalNrOfCategories)] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization_Ground_erosion), + schematizationGroundErosionCategoryIndex, totalNrOfCategories)] public override LogNormalDistributionProperties FlowWidthAtBottomProtection { get @@ -510,7 +555,8 @@ } } - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization_Ground_erosion), 5, totalNrOfCategories)] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization_Ground_erosion), + schematizationGroundErosionCategoryIndex, totalNrOfCategories)] public override double FailureProbabilityStructureWithErosion { get @@ -527,7 +573,8 @@ #region Storage structure - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization_Storage_structure), 6, totalNrOfCategories)] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization_Storage_structure), + schematizationStorageStructureCategoryIndex, totalNrOfCategories)] public override VariationCoefficientLogNormalDistributionProperties StorageStructureArea { get @@ -536,7 +583,8 @@ } } - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization_Storage_structure), 6, totalNrOfCategories)] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Schematization_Storage_structure), + schematizationStorageStructureCategoryIndex, totalNrOfCategories)] public override LogNormalDistributionProperties AllowedLevelIncreaseStorage { get @@ -551,7 +599,8 @@ #region Foreshore profile - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Foreshore), 7, totalNrOfCategories)] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Foreshore), + foreshoreCategoryIndex, totalNrOfCategories)] public override ForeshoreProfile ForeshoreProfile { get @@ -566,7 +615,8 @@ [DynamicPropertyOrder] [TypeConverter(typeof(ExpandableObjectConverter))] - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Foreshore), 7, totalNrOfCategories)] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Foreshore), + foreshoreCategoryIndex, totalNrOfCategories)] public override UseBreakWaterProperties UseBreakWater { get @@ -577,7 +627,8 @@ [DynamicPropertyOrder] [TypeConverter(typeof(ExpandableObjectConverter))] - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Foreshore), 7, totalNrOfCategories)] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_Foreshore), + foreshoreCategoryIndex, totalNrOfCategories)] public override UseForeshoreProperties UseForeshore { get @@ -587,22 +638,5 @@ } #endregion - - #region Output Settings - - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_OutputSettings), 8, totalNrOfCategories)] - public override bool ShouldIllustrationPointsBeCalculated - { - get - { - return base.ShouldIllustrationPointsBeCalculated; - } - set - { - base.ShouldIllustrationPointsBeCalculated = value; - } - } - - #endregion } } \ No newline at end of file