Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Properties/Resources.Designer.cs =================================================================== diff -u -r9f61d93bd5ff6bd9ffdf384d633d008ff43187cb -r5a89ab5ef9ddfed831b2ef5ca2ce980a4735bc71 --- Ringtoets/Common/src/Ringtoets.Common.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 9f61d93bd5ff6bd9ffdf384d633d008ff43187cb) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 5a89ab5ef9ddfed831b2ef5ca2ce980a4735bc71) @@ -954,6 +954,33 @@ } /// + /// 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 { + get { + return ResourceManager.GetString("FailureProbabilityStructureWithErosion_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 { + get { + return ResourceManager.GetString("FailureProbabilityStructureWithErosion_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 { + get { + return ResourceManager.GetString("FailureProbabilityStructureWithErosion_Value_too_large", resourceCulture); + } + } + + /// /// Looks up a localized string similar to Voorlandprofiel. /// public static string Foreshore_DisplayName { Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Properties/Resources.resx =================================================================== diff -u -r9f61d93bd5ff6bd9ffdf384d633d008ff43187cb -r5a89ab5ef9ddfed831b2ef5ca2ce980a4735bc71 --- Ringtoets/Common/src/Ringtoets.Common.Forms/Properties/Resources.resx (.../Resources.resx) (revision 9f61d93bd5ff6bd9ffdf384d633d008ff43187cb) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Properties/Resources.resx (.../Resources.resx) (revision 5a89ab5ef9ddfed831b2ef5ca2ce980a4735bc71) @@ -766,4 +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. + \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/StructuresInputBaseProperties.cs =================================================================== diff -u -raa4899eb4a07b597cc32661378b2b40b55ea86fe -r5a89ab5ef9ddfed831b2ef5ca2ce980a4735bc71 --- Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/StructuresInputBaseProperties.cs (.../StructuresInputBaseProperties.cs) (revision aa4899eb4a07b597cc32661378b2b40b55ea86fe) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/StructuresInputBaseProperties.cs (.../StructuresInputBaseProperties.cs) (revision 5a89ab5ef9ddfed831b2ef5ca2ce980a4735bc71) @@ -21,13 +21,21 @@ using System; using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing.Design; +using Core.Common.Base.Data; +using Core.Common.Base.Geometry; +using Core.Common.Gui.Attributes; using Core.Common.Gui.PropertyBag; +using Core.Common.Utils.Attributes; using Ringtoets.Common.Data; using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.DikeProfiles; using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.Structures; +using Ringtoets.Common.Forms.Helpers; using Ringtoets.Common.Forms.PresentationObjects; +using Ringtoets.Common.Forms.Properties; using Ringtoets.Common.Forms.UITypeEditors; using Ringtoets.HydraRing.Data; @@ -67,27 +75,291 @@ this.constructionProperties = constructionProperties; } - public ForeshoreProfile ForeshoreProfile { get; private set; } + #region Model factors - public HydraulicBoundaryLocation HydraulicBoundaryLocation { get; private set; } + [DynamicPropertyOrder] + [TypeConverter(typeof(ExpandableObjectConverter))] + [ResourcesCategory(typeof(Resources), "Categories_ModelSettings")] + [ResourcesDisplayName(typeof(Resources), "ModelFactorSuperCriticalFlow_DisplayName")] + [ResourcesDescription(typeof(Resources), "ModelFactorSuperCriticalFlow_Description")] + public NormalDistributionProperties ModelFactorSuperCriticalFlow + { + get + { + return new NormalDistributionProperties(DistributionPropertiesReadOnly.StandardDeviation, data.WrappedData) + { + Data = data.WrappedData.ModelFactorSuperCriticalFlow + }; + } + } - public TStructure Structure { get; private set; } + #endregion - public IEnumerable GetAvailableForeshoreProfiles() + public abstract IEnumerable GetAvailableForeshoreProfiles(); + + public IEnumerable GetAvailableHydraulicBoundaryLocations() { - throw new NotImplementedException(); + return data.AvailableHydraulicBoundaryLocations; } - public IEnumerable GetAvailableHydraulicBoundaryLocations() + public abstract IEnumerable GetAvailableStructures(); + + /// + /// The action to perform after setting the property. + /// + protected abstract void AfterSettingStructure(); + + #region Schematization + + [DynamicPropertyOrder] + [Editor(typeof(StructureEditor), typeof(UITypeEditor))] + [ResourcesCategory(typeof(Resources), "Categories_Schematization")] + [ResourcesDisplayName(typeof(Resources), "Structure_DisplayName")] + [ResourcesDescription(typeof(Resources), "Structure_Description")] + public TStructure Structure { - throw new NotImplementedException(); + get + { + return data.WrappedData.Structure; + } + set + { + data.WrappedData.Structure = value; + AfterSettingStructure(); + data.WrappedData.NotifyObservers(); + } } - public IEnumerable GetAvailableStructures() + [DynamicPropertyOrder] + [ResourcesCategory(typeof(Resources), "Categories_Schematization")] + [ResourcesDisplayName(typeof(Resources), "Structure_Location_DisplayName")] + [ResourcesDescription(typeof(Resources), "Structure_Location_Description")] + public Point2D HeightStructureLocation { - throw new NotImplementedException(); + get + { + return data.WrappedData.Structure == null ? null : + new Point2D( + new RoundedDouble(0, data.WrappedData.Structure.Location.X), + new RoundedDouble(0, data.WrappedData.Structure.Location.Y)); + } } + [DynamicPropertyOrder] + [ResourcesCategory(typeof(Resources), "Categories_Schematization")] + [ResourcesDisplayName(typeof(Resources), "Structure_StructureNormalOrientation_DisplayName")] + [ResourcesDescription(typeof(Resources), "Structure_StructureNormalOrientation_Description")] + public RoundedDouble StructureNormalOrientation + { + get + { + return data.WrappedData.StructureNormalOrientation; + } + set + { + data.WrappedData.StructureNormalOrientation = value; + data.WrappedData.NotifyObservers(); + } + } + + [DynamicPropertyOrder] + [TypeConverter(typeof(ExpandableObjectConverter))] + [ResourcesCategory(typeof(Resources), "Categories_Schematization")] + [ResourcesDisplayName(typeof(Resources), "Structure_FlowWidthAtBottomProtection_DisplayName")] + [ResourcesDescription(typeof(Resources), "Structure_FlowWidthAtBottomProtection_Description")] + public LogNormalDistributionProperties FlowWidthAtBottomProtection + { + get + { + return new LogNormalDistributionProperties(DistributionPropertiesReadOnly.None, data.WrappedData) + { + Data = data.WrappedData.FlowWidthAtBottomProtection + }; + } + } + + [DynamicPropertyOrder] + [TypeConverter(typeof(ExpandableObjectConverter))] + [ResourcesCategory(typeof(Resources), "Categories_Schematization")] + [ResourcesDisplayName(typeof(Resources), "Structure_WidthFlowApertures_DisplayName")] + [ResourcesDescription(typeof(Resources), "Structure_WidthFlowApertures_Description")] + public VariationCoefficientNormalDistributionProperties WidthFlowApertures + { + get + { + return new VariationCoefficientNormalDistributionProperties(VariationCoefficientDistributionPropertiesReadOnly.None, data.WrappedData) + { + Data = data.WrappedData.WidthFlowApertures + }; + } + } + + [DynamicPropertyOrder] + [TypeConverter(typeof(ExpandableObjectConverter))] + [ResourcesCategory(typeof(Resources), "Categories_Schematization")] + [ResourcesDisplayName(typeof(Resources), "Structure_StorageStructureArea_DisplayName")] + [ResourcesDescription(typeof(Resources), "Structure_StorageStructureArea_Description")] + public VariationCoefficientLogNormalDistributionProperties StorageStructureArea + { + get + { + return new VariationCoefficientLogNormalDistributionProperties(VariationCoefficientDistributionPropertiesReadOnly.None, data.WrappedData) + { + Data = data.WrappedData.StorageStructureArea + }; + } + } + + [DynamicPropertyOrder] + [TypeConverter(typeof(ExpandableObjectConverter))] + [ResourcesCategory(typeof(Resources), "Categories_Schematization")] + [ResourcesDisplayName(typeof(Resources), "Structure_AllowedLevelIncreaseStorage_DisplayName")] + [ResourcesDescription(typeof(Resources), "Structure_AllowedLevelIncreaseStorage_Description")] + public LogNormalDistributionProperties AllowedLevelIncreaseStorage + { + get + { + return new LogNormalDistributionProperties(DistributionPropertiesReadOnly.None, data.WrappedData) + { + Data = data.WrappedData.AllowedLevelIncreaseStorage + }; + } + } + + [DynamicPropertyOrder] + [TypeConverter(typeof(ExpandableObjectConverter))] + [ResourcesCategory(typeof(Resources), "Categories_Schematization")] + [ResourcesDisplayName(typeof(Resources), "Structure_CriticalOvertoppingDischarge_DisplayName")] + [ResourcesDescription(typeof(Resources), "Structure_CriticalOvertoppingDischarge_Description")] + public VariationCoefficientLogNormalDistributionProperties CriticalOvertoppingDischarge + { + get + { + return new VariationCoefficientLogNormalDistributionProperties(VariationCoefficientDistributionPropertiesReadOnly.None, data.WrappedData) + { + Data = data.WrappedData.CriticalOvertoppingDischarge + }; + } + } + + [DynamicPropertyOrder] + [ResourcesCategory(typeof(Resources), "Categories_Schematization")] + [ResourcesDisplayName(typeof(Resources), "FailureProbabilityStructureWithErosion_DisplayName")] + [ResourcesDescription(typeof(Resources), "FailureProbabilityStructureWithErosion_Description")] + public string FailureProbabilityStructureWithErosion + { + get + { + return ProbabilityFormattingHelper.Format(data.WrappedData.FailureProbabilityStructureWithErosion); + } + set + { + if (value == null) + { + throw new ArgumentNullException("value", Resources.FailureProbabilityStructureWithErosion_Value_cannot_be_null); + } + try + { + data.WrappedData.FailureProbabilityStructureWithErosion = (RoundedDouble)double.Parse(value); + } + catch (OverflowException) + { + throw new ArgumentException(Resources.FailureProbabilityStructureWithErosion_Value_too_large); + } + catch (FormatException) + { + throw new ArgumentException(Resources.FailureProbabilityStructureWithErosion_Could_not_parse_string_to_double_value); + } + data.WrappedData.NotifyObservers(); + } + } + + [DynamicPropertyOrder] + [Editor(typeof(ForeshoreProfileEditor), typeof(UITypeEditor))] + [ResourcesCategory(typeof(Resources), "Categories_Schematization")] + [ResourcesDisplayName(typeof(Resources), "ForeshoreProfile_DisplayName")] + [ResourcesDescription(typeof(Resources), "ForeshoreProfile_Description")] + public ForeshoreProfile ForeshoreProfile + { + get + { + return data.WrappedData.ForeshoreProfile; + } + set + { + data.WrappedData.ForeshoreProfile = value; + data.WrappedData.NotifyObservers(); + } + } + + [DynamicPropertyOrder] + [TypeConverter(typeof(ExpandableObjectConverter))] + [ResourcesCategory(typeof(Resources), "Categories_Schematization")] + [ResourcesDisplayName(typeof(Resources), "BreakWaterProperties_DisplayName")] + [ResourcesDescription(typeof(Resources), "BreakWaterProperties_Description")] + public UseBreakWaterProperties UseBreakWater + { + get + { + return data.WrappedData.ForeshoreProfile == null ? + new UseBreakWaterProperties(null) : + new UseBreakWaterProperties(data.WrappedData); + } + } + + [DynamicPropertyOrder] + [TypeConverter(typeof(ExpandableObjectConverter))] + [ResourcesCategory(typeof(Resources), "Categories_Schematization")] + [ResourcesDisplayName(typeof(Resources), "ForeshoreProperties_DisplayName")] + [ResourcesDescription(typeof(Resources), "ForeshoreProperties_Description")] + public UseForeshoreProperties UseForeshore + { + get + { + return new UseForeshoreProperties(data.WrappedData); + } + } + + #endregion + + #region Hydraulic data + + [DynamicPropertyOrder] + [Editor(typeof(HydraulicBoundaryLocationEditor), typeof(UITypeEditor))] + [ResourcesCategory(typeof(Resources), "Categories_HydraulicData")] + [ResourcesDisplayName(typeof(Resources), "HydraulicBoundaryLocation_DisplayName")] + [ResourcesDescription(typeof(Resources), "HydraulicBoundaryLocation_Description")] + public HydraulicBoundaryLocation HydraulicBoundaryLocation + { + get + { + return data.WrappedData.HydraulicBoundaryLocation; + } + set + { + data.WrappedData.HydraulicBoundaryLocation = value; + data.WrappedData.NotifyObservers(); + } + } + + [DynamicPropertyOrder] + [TypeConverter(typeof(ExpandableObjectConverter))] + [ResourcesCategory(typeof(Resources), "Categories_HydraulicData")] + [ResourcesDisplayName(typeof(Resources), "StormDuration_DisplayName")] + [ResourcesDescription(typeof(Resources), "StormDuration_Description")] + public VariationCoefficientLogNormalDistributionProperties StormDuration + { + get + { + return new VariationCoefficientLogNormalDistributionProperties(VariationCoefficientDistributionPropertiesReadOnly.CoefficientOfVariation, data.WrappedData) + { + Data = data.WrappedData.StormDuration + }; + } + } + + #endregion + /// /// Class holding the various construction parameters for . /// Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Properties/Resources.Designer.cs =================================================================== diff -u -r76bf9c7fbdfb0822c5d7e6bb7ee221467ec8734b -r5a89ab5ef9ddfed831b2ef5ca2ce980a4735bc71 --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 76bf9c7fbdfb0822c5d7e6bb7ee221467ec8734b) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 5a89ab5ef9ddfed831b2ef5ca2ce980a4735bc71) @@ -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. @@ -100,15 +100,6 @@ } /// - /// 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 { - get { - return ResourceManager.GetString("FailureProbabilityStructureWithErosion_Could_not_parse_string_to_double_value", resourceCulture); - } - } - - /// /// Looks up a localized string similar to Faalkans kunstwerk gegeven erosie bodem.. /// public static string FailureProbabilityStructureWithErosion_Description { @@ -127,24 +118,6 @@ } /// - /// Looks up a localized string similar to De waarde voor de faalkans moet ingevuld zijn.. - /// - public static string FailureProbabilityStructureWithErosion_Value_cannot_be_null { - get { - return ResourceManager.GetString("FailureProbabilityStructureWithErosion_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 { - get { - return ResourceManager.GetString("FailureProbabilityStructureWithErosion_Value_too_large", resourceCulture); - } - } - - /// /// Looks up a localized string similar to De schematisatie van het voorlandprofiel.. /// public static string ForeshoreProfile_Description { Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Properties/Resources.resx =================================================================== diff -u -r76bf9c7fbdfb0822c5d7e6bb7ee221467ec8734b -r5a89ab5ef9ddfed831b2ef5ca2ce980a4735bc71 --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Properties/Resources.resx (.../Resources.resx) (revision 76bf9c7fbdfb0822c5d7e6bb7ee221467ec8734b) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Properties/Resources.resx (.../Resources.resx) (revision 5a89ab5ef9ddfed831b2ef5ca2ce980a4735bc71) @@ -135,15 +135,6 @@ Stormduur [uur] - - De waarde voor de faalkans kon niet geïnterpreteerd worden als een getal. - - - De waarde voor de faalkans is te groot of te klein. - - - De waarde voor de faalkans moet ingevuld zijn. - Het kunstwerk dat gebruikt wordt in de berekening. Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PropertyClasses/HeightStructuresInputContextProperties.cs =================================================================== diff -u -rcb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e -r5a89ab5ef9ddfed831b2ef5ca2ce980a4735bc71 --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PropertyClasses/HeightStructuresInputContextProperties.cs (.../HeightStructuresInputContextProperties.cs) (revision cb4c5e6cd9a0478a8afe7d653bb7467b3c1a2b4e) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PropertyClasses/HeightStructuresInputContextProperties.cs (.../HeightStructuresInputContextProperties.cs) (revision 5a89ab5ef9ddfed831b2ef5ca2ce980a4735bc71) @@ -265,19 +265,19 @@ { if (value == null) { - throw new ArgumentNullException("value", Resources.FailureProbabilityStructureWithErosion_Value_cannot_be_null); + throw new ArgumentNullException("value", RingtoetsCommonFormsResources.FailureProbabilityStructureWithErosion_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(RingtoetsCommonFormsResources.FailureProbabilityStructureWithErosion_Value_too_large); } catch (FormatException) { - throw new ArgumentException(Resources.FailureProbabilityStructureWithErosion_Could_not_parse_string_to_double_value); + throw new ArgumentException(RingtoetsCommonFormsResources.FailureProbabilityStructureWithErosion_Could_not_parse_string_to_double_value); } data.WrappedData.NotifyObservers(); }