Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Properties/Resources.Designer.cs =================================================================== diff -u -r0764f95727a4586e2b566d1e66c989a6327f3e2b -r3b1b80d82960d3bfa4906e06e37e73e4729eb3ad --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 0764f95727a4586e2b566d1e66c989a6327f3e2b) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 3b1b80d82960d3bfa4906e06e37e73e4729eb3ad) @@ -22,7 +22,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.18444 +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -136,6 +136,42 @@ } /// + /// Looks up a localized string similar to Afvoercoëfficient.. + /// + public static string DrainCoefficient_Description { + get { + return ResourceManager.GetString("DrainCoefficient_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Afvoercoëfficient [-]. + /// + public static string DrainCoefficient_DisplayName { + get { + return ResourceManager.GetString("DrainCoefficient_DisplayName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Factor voor stormduur hoogwater gegeven geopend kunstwerk.. + /// + public static string FactorStormDurationOpenStructure_Description { + get { + return ResourceManager.GetString("FactorStormDurationOpenStructure_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Factor voor stormduur hoogwater [-]. + /// + public static string FactorStormDurationOpenStructure_DisplayName { + get { + return ResourceManager.GetString("FactorStormDurationOpenStructure_DisplayName", resourceCulture); + } + } + + /// /// Looks up a localized string similar to Kans op mislukken sluiting van geopend kunstwerk.. /// public static string FailureProbabilityOpenStructure_Description { Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Properties/Resources.resx =================================================================== diff -u -r0764f95727a4586e2b566d1e66c989a6327f3e2b -r3b1b80d82960d3bfa4906e06e37e73e4729eb3ad --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Properties/Resources.resx (.../Resources.resx) (revision 0764f95727a4586e2b566d1e66c989a6327f3e2b) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Properties/Resources.resx (.../Resources.resx) (revision 3b1b80d82960d3bfa4906e06e37e73e4729eb3ad) @@ -165,4 +165,16 @@ 2NA [-] + + Afvoercoëfficient. + + + Afvoercoëfficient [-] + + + Factor voor stormduur hoogwater gegeven geopend kunstwerk. + + + Factor voor stormduur hoogwater [-] + \ No newline at end of file Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PropertyClasses/ClosingStructuresInputContextProperties.cs =================================================================== diff -u -rc233c9cd52d8f6c85328fe4a88d1644c5baf4fe5 -r3b1b80d82960d3bfa4906e06e37e73e4729eb3ad --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PropertyClasses/ClosingStructuresInputContextProperties.cs (.../ClosingStructuresInputContextProperties.cs) (revision c233c9cd52d8f6c85328fe4a88d1644c5baf4fe5) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PropertyClasses/ClosingStructuresInputContextProperties.cs (.../ClosingStructuresInputContextProperties.cs) (revision 3b1b80d82960d3bfa4906e06e37e73e4729eb3ad) @@ -19,14 +19,19 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using System; using System.Collections.Generic; +using System.ComponentModel; using Core.Common.Base.Data; using Core.Common.Gui.Attributes; +using Core.Common.Utils; using Core.Common.Utils.Attributes; using Ringtoets.ClosingStructures.Data; using Ringtoets.ClosingStructures.Forms.PresentationObjects; +using Ringtoets.ClosingStructures.Forms.Properties; using Ringtoets.ClosingStructures.Utils; using Ringtoets.Common.Data.DikeProfiles; +using Ringtoets.Common.Forms.Helpers; using Ringtoets.Common.Forms.PropertyClasses; using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; @@ -37,22 +42,33 @@ /// public class ClosingStructuresInputContextProperties : StructuresInputBaseProperties { - private const int structurePropertyIndex = 1; - private const int structureLocationPropertyIndex = 2; - private const int structureNormalOrientationPropertyIndex = 3; - private const int flowWidthAtBottomProtectionPropertyIndex = 4; - private const int widthFlowAperturesPropertyIndex = 5; - private const int storageStructureAreaPropertyIndex = 6; - private const int allowedLevelIncreaseStoragePropertyIndex = 7; - private const int criticalOvertoppingDischargePropertyIndex = 9; - private const int failureProbabilityStructureWithErosionPropertyIndex = 10; - private const int foreshoreProfilePropertyIndex = 11; - private const int useBreakWaterPropertyIndex = 12; - private const int useForeshorePropertyIndex = 13; - private const int modelFactorSuperCriticalFlowPropertyIndex = 14; - private const int hydraulicBoundaryLocationPropertyIndex = 15; - private const int stormDurationPropertyIndex = 16; - private const int deviationWaveDirectionPropertyIndex = 17; + private const int hydraulicBoundaryLocationPropertyIndex = 1; + private const int stormDurationPropertyIndex = 2; + private const int deviationWaveDirectionPropertyIndex = 3; + private const int insideWaterLevelPropertyIndex = 4; + private const int structurePropertyIndex = 5; + private const int structureLocationPropertyIndex = 6; + private const int structureNormalOrientationPropertyIndex = 7; + private const int inflowModelTypePropertyIndex = 8; + private const int widthFlowAperturesPropertyIndex = 9; + private const int areaFlowAperturesPropertyIndex = 10; + private const int identicalAperturesPropertyIndex = 11; + private const int flowWidthAtBottomProtectionPropertyIndex = 12; + private const int storageStructureAreaPropertyIndex = 13; + private const int allowedLevelIncreaseStoragePropertyIndex = 14; + private const int levelCrestStructureNotClosingPropertyIndex = 15; + private const int thresholdHeightOpenWeirPropertyIndex = 16; + private const int criticalOvertoppingDischargePropertyIndex = 17; + private const int probabilityOpenStructureBeforeFloodingPropertyIndex = 18; + private const int failureProbabilityOpenStructurePropertyIndex = 19; + private const int failureProbabilityReparationPropertyIndex = 20; + private const int failureProbabilityStructureWithErosionPropertyIndex = 21; + private const int foreshoreProfilePropertyIndex = 22; + private const int useBreakWaterPropertyIndex = 23; + private const int useForeshorePropertyIndex = 24; + private const int modelFactorSuperCriticalFlowPropertyIndex = 25; + private const int drainCoefficientPropertyIndex = 26; + private const int factorStormDurationOpenStructurePropertyIndex = 27; /// /// Creates a new instance of the class. @@ -76,8 +92,39 @@ StormDurationPropertyIndex = stormDurationPropertyIndex }) {} + public override IEnumerable GetAvailableForeshoreProfiles() + { + return data.FailureMechanism.ForeshoreProfiles; + } + + public override IEnumerable GetAvailableStructures() + { + return data.FailureMechanism.ClosingStructures; + } + + protected override void AfterSettingStructure() + { + ClosingStructuresHelper.Update(data.FailureMechanism.SectionResults, data.Calculation); + } + #region Hydraulic data + [PropertyOrder(insideWaterLevelPropertyIndex)] + [TypeConverter(typeof(ExpandableObjectConverter))] + [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_HydraulicData")] + [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), "Structure_InsideWaterLevel_DisplayName")] + [ResourcesDescription(typeof(RingtoetsCommonFormsResources), "Structure_InsideWaterLevel_Description")] + public NormalDistributionProperties InsideWaterLevel + { + get + { + return new NormalDistributionProperties(DistributionPropertiesReadOnly.None, data.WrappedData) + { + Data = data.WrappedData.InsideWaterLevel + }; + } + } + [PropertyOrder(deviationWaveDirectionPropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_HydraulicData")] [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), "Structure_DeviationWaveDirection_DisplayName")] @@ -97,23 +144,224 @@ #endregion - public override IEnumerable GetAvailableForeshoreProfiles() + #region Model factors + + [PropertyOrder(drainCoefficientPropertyIndex)] + [TypeConverter(typeof(ExpandableObjectConverter))] + [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_ModelSettings")] + [ResourcesDisplayName(typeof(Resources), "DrainCoefficient_DisplayName")] + [ResourcesDescription(typeof(Resources), "DrainCoefficient_Description")] + public NormalDistributionProperties DrainCoefficient { - return data.FailureMechanism.ForeshoreProfiles; + get + { + return new NormalDistributionProperties(DistributionPropertiesReadOnly.StandardDeviation, data.WrappedData) + { + Data = data.WrappedData.DrainCoefficient + }; + } } - public override IEnumerable GetAvailableStructures() + [PropertyOrder(factorStormDurationOpenStructurePropertyIndex)] + [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_ModelSettings")] + [ResourcesDisplayName(typeof(Resources), "FactorStormDurationOpenStructure_DisplayName")] + [ResourcesDescription(typeof(Resources), "FactorStormDurationOpenStructure_Description")] + public RoundedDouble FactorStormDurationOpenStructure { - return data.FailureMechanism.ClosingStructures; + get + { + return data.WrappedData.FactorStormDurationOpenStructure; + } + set + { + data.WrappedData.FactorStormDurationOpenStructure = value; + data.WrappedData.NotifyObservers(); + } } - protected override void AfterSettingStructure() + #endregion + + #region Schematization + + [PropertyOrder(inflowModelTypePropertyIndex)] + [TypeConverter(typeof(EnumTypeConverter))] + [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_Schematization")] + [ResourcesDisplayName(typeof(Resources), "ClosingStructureInflowModelType_DisplayName")] + [ResourcesDescription(typeof(Resources), "ClosingStructureInflowModelType_Description")] + public ClosingStructureInflowModelType InflowModelType { - ClosingStructuresHelper.Update(data.FailureMechanism.SectionResults, data.Calculation); + get + { + return data.WrappedData.InflowModelType; + } + set + { + data.WrappedData.InflowModelType = value; + data.WrappedData.NotifyObservers(); + } } - #region Schematization + [PropertyOrder(thresholdHeightOpenWeirPropertyIndex)] + [TypeConverter(typeof(ExpandableObjectConverter))] + [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_Schematization")] + [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), "Structure_ThresholdHeightOpenWeir_DisplayName")] + [ResourcesDescription(typeof(RingtoetsCommonFormsResources), "Structure_ThresholdHeightOpenWeir_Description")] + public NormalDistributionProperties ThresholdHeightOpenWeir + { + get + { + return new NormalDistributionProperties(DistributionPropertiesReadOnly.None, data.WrappedData) + { + Data = data.WrappedData.ThresholdHeightOpenWeir + }; + } + } + [PropertyOrder(areaFlowAperturesPropertyIndex)] + [TypeConverter(typeof(ExpandableObjectConverter))] + [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_Schematization")] + [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), "Structure_AreaFlowApertures_DisplayName")] + [ResourcesDescription(typeof(RingtoetsCommonFormsResources), "Structure_AreaFlowApertures_Description")] + public LogNormalDistributionProperties AreaFlowApertures + { + get + { + return new LogNormalDistributionProperties(DistributionPropertiesReadOnly.None, data.WrappedData) + { + Data = data.WrappedData.AreaFlowApertures + }; + } + } + + [PropertyOrder(failureProbabilityOpenStructurePropertyIndex)] + [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_Schematization")] + [ResourcesDisplayName(typeof(Resources), "FailureProbabilityOpenStructure_DisplayName")] + [ResourcesDescription(typeof(Resources), "FailureProbabilityOpenStructure_Description")] + public string FailureProbabilityOpenStructure + { + get + { + return ProbabilityFormattingHelper.Format(data.WrappedData.FailureProbabilityOpenStructure); + } + set + { + if (value == null) + { + throw new ArgumentNullException("value", RingtoetsCommonFormsResources.FailureProbability_Value_cannot_be_null); + } + try + { + data.WrappedData.FailureProbabilityOpenStructure = (RoundedDouble) double.Parse(value); + } + catch (OverflowException) + { + throw new ArgumentException(RingtoetsCommonFormsResources.FailureProbability_Value_too_large); + } + catch (FormatException) + { + throw new ArgumentException(RingtoetsCommonFormsResources.FailureProbability_Could_not_parse_string_to_double_value); + } + data.WrappedData.NotifyObservers(); + } + } + + [PropertyOrder(failureProbabilityReparationPropertyIndex)] + [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_Schematization")] + [ResourcesDisplayName(typeof(Resources), "FailureProbabilityReparation_DisplayName")] + [ResourcesDescription(typeof(Resources), "FailureProbabilityReparation_Description")] + public string FailureProbabilityReparation + { + get + { + return ProbabilityFormattingHelper.Format(data.WrappedData.FailureProbabilityReparation); + } + set + { + if (value == null) + { + throw new ArgumentNullException("value", RingtoetsCommonFormsResources.FailureProbability_Value_cannot_be_null); + } + try + { + data.WrappedData.FailureProbabilityReparation = (RoundedDouble) double.Parse(value); + } + catch (OverflowException) + { + throw new ArgumentException(RingtoetsCommonFormsResources.FailureProbability_Value_too_large); + } + catch (FormatException) + { + throw new ArgumentException(RingtoetsCommonFormsResources.FailureProbability_Could_not_parse_string_to_double_value); + } + data.WrappedData.NotifyObservers(); + } + } + + [PropertyOrder(identicalAperturesPropertyIndex)] + [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_Schematization")] + [ResourcesDisplayName(typeof(Resources), "IdenticalApertures_DisplayName")] + [ResourcesDescription(typeof(Resources), "IdenticalApertures_Description")] + public int IdenticalApertures + { + get + { + return data.WrappedData.IdenticalApertures; + } + set + { + data.WrappedData.IdenticalApertures = value; + data.WrappedData.NotifyObservers(); + } + } + + [PropertyOrder(levelCrestStructureNotClosingPropertyIndex)] + [TypeConverter(typeof(ExpandableObjectConverter))] + [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_Schematization")] + [ResourcesDisplayName(typeof(Resources), "LevelCrestStructureNotClosing_DisplayName")] + [ResourcesDescription(typeof(Resources), "LevelCrestStructureNotClosing_Description")] + public NormalDistributionProperties LevelCrestStructureNotClosing + { + get + { + return new NormalDistributionProperties(DistributionPropertiesReadOnly.None, data.WrappedData) + { + Data = data.WrappedData.LevelCrestStructureNotClosing + }; + } + } + + [PropertyOrder(probabilityOpenStructureBeforeFloodingPropertyIndex)] + [ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_Schematization")] + [ResourcesDisplayName(typeof(Resources), "ProbabilityOpenStructureBeforeFlooding_DisplayName")] + [ResourcesDescription(typeof(Resources), "ProbabilityOpenStructureBeforeFlooding_Description")] + public string ProbabilityOpenStructureBeforeFlooding + { + get + { + return ProbabilityFormattingHelper.Format(data.WrappedData.ProbabilityOpenStructureBeforeFlooding); + } + set + { + if (value == null) + { + throw new ArgumentNullException("value", RingtoetsCommonFormsResources.FailureProbability_Value_cannot_be_null); + } + try + { + data.WrappedData.ProbabilityOpenStructureBeforeFlooding = (RoundedDouble) double.Parse(value); + } + catch (OverflowException) + { + throw new ArgumentException(RingtoetsCommonFormsResources.FailureProbability_Value_too_large); + } + catch (FormatException) + { + throw new ArgumentException(RingtoetsCommonFormsResources.FailureProbability_Could_not_parse_string_to_double_value); + } + data.WrappedData.NotifyObservers(); + } + } + #endregion } } \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Properties/Resources.Designer.cs =================================================================== diff -u -r94280a98283d1dbe5381cbc46f59b996f5f43b19 -r3b1b80d82960d3bfa4906e06e37e73e4729eb3ad --- Ringtoets/Common/src/Ringtoets.Common.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 94280a98283d1dbe5381cbc46f59b996f5f43b19) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 3b1b80d82960d3bfa4906e06e37e73e4729eb3ad) @@ -956,27 +956,27 @@ /// /// Looks up a localized string similar to De waarde voor de faalkans kon niet geïnterpreteerd worden als een getal.. /// - public static string FailureProbabilityStructureWithErosion_Could_not_parse_string_to_double_value { + public static string FailureProbability_Could_not_parse_string_to_double_value { get { - return ResourceManager.GetString("FailureProbabilityStructureWithErosion_Could_not_parse_string_to_double_value", resourceCulture); + return ResourceManager.GetString("FailureProbability_Could_not_parse_string_to_double_value", resourceCulture); } } /// /// Looks up a localized string similar to De waarde voor de faalkans moet ingevuld zijn.. /// - public static string FailureProbabilityStructureWithErosion_Value_cannot_be_null { + public static string FailureProbability_Value_cannot_be_null { get { - return ResourceManager.GetString("FailureProbabilityStructureWithErosion_Value_cannot_be_null", resourceCulture); + return ResourceManager.GetString("FailureProbability_Value_cannot_be_null", resourceCulture); } } /// /// Looks up a localized string similar to De waarde voor de faalkans is te groot of te klein.. /// - public static string FailureProbabilityStructureWithErosion_Value_too_large { + public static string FailureProbability_Value_too_large { get { - return ResourceManager.GetString("FailureProbabilityStructureWithErosion_Value_too_large", resourceCulture); + return ResourceManager.GetString("FailureProbability_Value_too_large", resourceCulture); } } Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Properties/Resources.resx =================================================================== diff -u -r94280a98283d1dbe5381cbc46f59b996f5f43b19 -r3b1b80d82960d3bfa4906e06e37e73e4729eb3ad --- Ringtoets/Common/src/Ringtoets.Common.Forms/Properties/Resources.resx (.../Resources.resx) (revision 94280a98283d1dbe5381cbc46f59b996f5f43b19) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Properties/Resources.resx (.../Resources.resx) (revision 3b1b80d82960d3bfa4906e06e37e73e4729eb3ad) @@ -766,13 +766,13 @@ Modelfactor voor onvolkomen stroming [-] - + De waarde voor de faalkans kon niet geïnterpreteerd worden als een getal. - + De waarde voor de faalkans moet ingevuld zijn. - + De waarde voor de faalkans is te groot of te klein. Index: Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/StructuresInputBaseProperties.cs =================================================================== diff -u -r46ef6c094cc1589938bc88bee6f5bdac70233462 -r3b1b80d82960d3bfa4906e06e37e73e4729eb3ad --- Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/StructuresInputBaseProperties.cs (.../StructuresInputBaseProperties.cs) (revision 46ef6c094cc1589938bc88bee6f5bdac70233462) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/StructuresInputBaseProperties.cs (.../StructuresInputBaseProperties.cs) (revision 3b1b80d82960d3bfa4906e06e37e73e4729eb3ad) @@ -413,19 +413,19 @@ { if (value == null) { - throw new ArgumentNullException("value", Resources.FailureProbabilityStructureWithErosion_Value_cannot_be_null); + throw new ArgumentNullException("value", Resources.FailureProbability_Value_cannot_be_null); } try { data.WrappedData.FailureProbabilityStructureWithErosion = (RoundedDouble) double.Parse(value); } catch (OverflowException) { - throw new ArgumentException(Resources.FailureProbabilityStructureWithErosion_Value_too_large); + throw new ArgumentException(Resources.FailureProbability_Value_too_large); } catch (FormatException) { - throw new ArgumentException(Resources.FailureProbabilityStructureWithErosion_Could_not_parse_string_to_double_value); + throw new ArgumentException(Resources.FailureProbability_Could_not_parse_string_to_double_value); } data.WrappedData.NotifyObservers(); }