Index: Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Forms/PropertyClasses/HydraulicLoadsState/WaveImpactAsphaltCoverFailureMechanismProperties.cs =================================================================== diff -u -rc56dddb7f63e9297d0af54055bfda90a77d1c3dd -rdb6e1eda8b29e446c5ca5ba7aabce982faf585ce --- Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Forms/PropertyClasses/HydraulicLoadsState/WaveImpactAsphaltCoverFailureMechanismProperties.cs (.../WaveImpactAsphaltCoverFailureMechanismProperties.cs) (revision c56dddb7f63e9297d0af54055bfda90a77d1c3dd) +++ Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Forms/PropertyClasses/HydraulicLoadsState/WaveImpactAsphaltCoverFailureMechanismProperties.cs (.../WaveImpactAsphaltCoverFailureMechanismProperties.cs) (revision db6e1eda8b29e446c5ca5ba7aabce982faf585ce) @@ -24,6 +24,7 @@ using Core.Common.Util.Attributes; using Core.Gui.Attributes; using Riskeer.WaveImpactAsphaltCover.Data; +using Riskeer.WaveImpactAsphaltCover.Forms.Properties; using RiskeerCommonFormsResources = Riskeer.Common.Forms.Properties.Resources; using RiskeerRevetmentFormsResources = Riskeer.Revetment.Forms.Properties.Resources; @@ -89,10 +90,23 @@ } set { - data.GeneralInput.C = value; + RoundedDouble newC = value.ToPrecision(data.GeneralInput.C.NumberOfDecimalPlaces); + + ValidateParamC(newC); + + data.GeneralInput.C = newC; } } + private static void ValidateParamC(RoundedDouble newC) + { + if (double.IsNaN(newC) || newC < 0.0 || newC > 2.0) + { + throw new ArgumentOutOfRangeException(null, + Resources.WaveImpactAsphaltCoverWaveConditionsInputContextProperties_RevetmentType); + } + } + #endregion } } \ No newline at end of file