Index: Riskeer/Piping/src/Riskeer.Piping.Data/Properties/Resources.Designer.cs =================================================================== diff -u -r9339a780307cdb21ebe38cbd3aa8811e2c98d980 -rea96684dcf2b359c99a821958190dd4e05bb3b17 --- Riskeer/Piping/src/Riskeer.Piping.Data/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 9339a780307cdb21ebe38cbd3aa8811e2c98d980) +++ Riskeer/Piping/src/Riskeer.Piping.Data/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision ea96684dcf2b359c99a821958190dd4e05bb3b17) @@ -1,28 +1,6 @@ -// Copyright (C) Stichting Deltares and State of the Netherlands 2026. All rights reserved. -// -// This file is part of Riskeer. -// -// Riskeer is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -// -// All names, logos, and references to "Deltares" are registered trademarks of -// Stichting Deltares and remain full property of Stichting Deltares at all times. -// All rights reserved. - -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -82,7 +60,7 @@ } /// - /// Looks up a localized string similar to De waarde moet binnen het bereik {0} liggen.. + /// Looks up a localized string similar to De waarde van volumiek gewicht van water moet binnen het bereik {0} liggen.. /// public static string GeneralPipingInput_WaterVolumetricWeight_must_be_in_Range_0_ { get { @@ -113,8 +91,8 @@ /// public static string PipingFailureMechanismScenarioConfigurationType_PerFailureMechanismSection_DisplayName { get { - return ResourceManager.GetString("PipingFailureMechanismScenarioConfigurationType_PerFailureMechanismSection_Displa" + - "yName", resourceCulture); + return ResourceManager.GetString(("PipingFailureMechanismScenarioConfigurationType_PerFailureMechanismSection_Displa" + + "yName"), resourceCulture); } } Index: Riskeer/Piping/src/Riskeer.Piping.Data/Properties/Resources.resx =================================================================== diff -u -r943dcd0f78d271e0c3975767bdb0f24163c72b3a -rea96684dcf2b359c99a821958190dd4e05bb3b17 --- Riskeer/Piping/src/Riskeer.Piping.Data/Properties/Resources.resx (.../Resources.resx) (revision 943dcd0f78d271e0c3975767bdb0f24163c72b3a) +++ Riskeer/Piping/src/Riskeer.Piping.Data/Properties/Resources.resx (.../Resources.resx) (revision ea96684dcf2b359c99a821958190dd4e05bb3b17) @@ -1,17 +1,17 @@  - @@ -130,7 +130,7 @@ Het gespecificeerde punt moet op het profiel liggen (bereik {0}). - De waarde moet binnen het bereik {0} liggen. + De waarde van volumiek gewicht van water moet binnen het bereik {0} liggen. naam Index: Riskeer/Piping/test/Riskeer.Piping.Data.Test/GeneralPipingInputTest.cs =================================================================== diff -u -r9339a780307cdb21ebe38cbd3aa8811e2c98d980 -rea96684dcf2b359c99a821958190dd4e05bb3b17 --- Riskeer/Piping/test/Riskeer.Piping.Data.Test/GeneralPipingInputTest.cs (.../GeneralPipingInputTest.cs) (revision 9339a780307cdb21ebe38cbd3aa8811e2c98d980) +++ Riskeer/Piping/test/Riskeer.Piping.Data.Test/GeneralPipingInputTest.cs (.../GeneralPipingInputTest.cs) (revision ea96684dcf2b359c99a821958190dd4e05bb3b17) @@ -6,7 +6,7 @@ // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// +// // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -91,7 +91,7 @@ TestDelegate test = () => inputParameters.WaterVolumetricWeight = (RoundedDouble) newValue; // Assert - TestHelper.AssertThrowsArgumentExceptionAndTestMessage(test, "De waarde moet binnen het bereik [0,00, 20,00] liggen."); + TestHelper.AssertThrowsArgumentExceptionAndTestMessage(test, "De waarde van volumiek gewicht van water moet binnen het bereik [0,00, 20,00] liggen."); } [Test] Index: Riskeer/Piping/test/Riskeer.Piping.Forms.Test/PropertyClasses/CalculationsState/PipingFailureMechanismPropertiesTest.cs =================================================================== diff -u -r9339a780307cdb21ebe38cbd3aa8811e2c98d980 -rea96684dcf2b359c99a821958190dd4e05bb3b17 --- Riskeer/Piping/test/Riskeer.Piping.Forms.Test/PropertyClasses/CalculationsState/PipingFailureMechanismPropertiesTest.cs (.../PipingFailureMechanismPropertiesTest.cs) (revision 9339a780307cdb21ebe38cbd3aa8811e2c98d980) +++ Riskeer/Piping/test/Riskeer.Piping.Forms.Test/PropertyClasses/CalculationsState/PipingFailureMechanismPropertiesTest.cs (.../PipingFailureMechanismPropertiesTest.cs) (revision ea96684dcf2b359c99a821958190dd4e05bb3b17) @@ -6,7 +6,7 @@ // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// +// // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -258,11 +258,11 @@ var properties = new PipingFailureMechanismProperties(failureMechanism, handler); - // Call + // Call void Call() => properties.WaterVolumetricWeight = roundedValue; // Assert - const string expectedMessage = "De waarde moet binnen het bereik [0,00, 20,00] liggen."; + const string expectedMessage = "De waarde van volumiek gewicht van water moet binnen het bereik [0,00, 20,00] liggen."; TestHelper.AssertThrowsArgumentExceptionAndTestMessage(Call, expectedMessage); Assert.IsTrue(handler.Called); @@ -294,7 +294,7 @@ var properties = new PipingFailureMechanismProperties(failureMechanism, handler); - // Call + // Call properties.WaterVolumetricWeight = roundedValue; // Assert Index: Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Data/GeneralWaveImpactAsphaltCoverWaveConditionsInput.cs =================================================================== diff -u -r7ff7777db991e744cb7f4fc885613f1166b1a91a -rea96684dcf2b359c99a821958190dd4e05bb3b17 --- Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Data/GeneralWaveImpactAsphaltCoverWaveConditionsInput.cs (.../GeneralWaveImpactAsphaltCoverWaveConditionsInput.cs) (revision 7ff7777db991e744cb7f4fc885613f1166b1a91a) +++ Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Data/GeneralWaveImpactAsphaltCoverWaveConditionsInput.cs (.../GeneralWaveImpactAsphaltCoverWaveConditionsInput.cs) (revision ea96684dcf2b359c99a821958190dd4e05bb3b17) @@ -20,6 +20,8 @@ // All rights reserved. using Core.Common.Base.Data; +using System; +using Riskeer.WaveImpactAsphaltCover.Data.Properties; namespace Riskeer.WaveImpactAsphaltCover.Data { @@ -28,14 +30,17 @@ /// public class GeneralWaveImpactAsphaltCoverWaveConditionsInput { + private const int waveImpactAphaltNumberOfDecimalPlaces = 2; + private RoundedDouble c; + /// /// Creates a new instance of . /// public GeneralWaveImpactAsphaltCoverWaveConditionsInput() { - A = new RoundedDouble(2, 1.0); - B = new RoundedDouble(2); - C = new RoundedDouble(2); + A = new RoundedDouble(waveImpactAphaltNumberOfDecimalPlaces, 1.0); + B = new RoundedDouble(waveImpactAphaltNumberOfDecimalPlaces); + c = new RoundedDouble(waveImpactAphaltNumberOfDecimalPlaces); } /// @@ -48,9 +53,31 @@ /// public RoundedDouble B { get; } + private static readonly Range waveImpactAphaltCValidityRange = + new Range(new RoundedDouble(waveImpactAphaltNumberOfDecimalPlaces), + new RoundedDouble(waveImpactAphaltNumberOfDecimalPlaces, 2.0)); + /// /// Gets and sets the 'c' parameter used in wave impact asphalt cover wave conditions calculations. /// - public RoundedDouble C { get; set; } + public RoundedDouble C + { + get + { + return c; + } + set + { + RoundedDouble newValue = value.ToPrecision(waveImpactAphaltNumberOfDecimalPlaces); + + if (!waveImpactAphaltCValidityRange.InRange(newValue)) + { + throw new ArgumentOutOfRangeException(nameof(value), string.Format(Resources.WaveImpactAsphaltParamC_must_be_in_Range_0_, + waveImpactAphaltCValidityRange)); + } + + c = newValue; + } + } } } \ No newline at end of file Index: Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Data/Properties/Resources.Designer.cs =================================================================== diff -u -r9339a780307cdb21ebe38cbd3aa8811e2c98d980 -rea96684dcf2b359c99a821958190dd4e05bb3b17 --- Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Data/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 9339a780307cdb21ebe38cbd3aa8811e2c98d980) +++ Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Data/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision ea96684dcf2b359c99a821958190dd4e05bb3b17) @@ -1,28 +1,6 @@ -// Copyright (C) Stichting Deltares and State of the Netherlands 2026. All rights reserved. -// -// This file is part of Riskeer. -// -// Riskeer is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . -// -// All names, logos, and references to "Deltares" are registered trademarks of -// Stichting Deltares and remain full property of Stichting Deltares at all times. -// All rights reserved. - -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -98,5 +76,14 @@ return ResourceManager.GetString("WaveImpactAsphaltCoverFailureMechanism_DisplayName", resourceCulture); } } + + /// + /// Looks up a localized string similar to De waarde van asphalt parameter C moet binnen het bereik {0} liggen.. + /// + public static string WaveImpactAsphaltParamC_must_be_in_Range_0_ { + get { + return ResourceManager.GetString("WaveImpactAsphaltParamC_must_be_in_Range_0_", resourceCulture); + } + } } } Index: Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Data/Properties/Resources.resx =================================================================== diff -u -rc2a04321c2aa2333a8324ad13f1fe753f51c62a3 -rea96684dcf2b359c99a821958190dd4e05bb3b17 --- Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Data/Properties/Resources.resx (.../Resources.resx) (revision c2a04321c2aa2333a8324ad13f1fe753f51c62a3) +++ Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Data/Properties/Resources.resx (.../Resources.resx) (revision ea96684dcf2b359c99a821958190dd4e05bb3b17) @@ -1,17 +1,17 @@  - @@ -123,4 +123,7 @@ Golfklappen op asfaltbekleding + + De waarde van asphalt parameter C moet binnen het bereik {0} liggen. + \ No newline at end of file Index: Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Forms/PropertyClasses/HydraulicLoadsState/WaveImpactAsphaltCoverFailureMechanismProperties.cs =================================================================== diff -u -r4b4b8a9607ac669b026a57a90cbd6b9c1d1856b2 -rea96684dcf2b359c99a821958190dd4e05bb3b17 --- Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Forms/PropertyClasses/HydraulicLoadsState/WaveImpactAsphaltCoverFailureMechanismProperties.cs (.../WaveImpactAsphaltCoverFailureMechanismProperties.cs) (revision 4b4b8a9607ac669b026a57a90cbd6b9c1d1856b2) +++ Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Forms/PropertyClasses/HydraulicLoadsState/WaveImpactAsphaltCoverFailureMechanismProperties.cs (.../WaveImpactAsphaltCoverFailureMechanismProperties.cs) (revision ea96684dcf2b359c99a821958190dd4e05bb3b17) @@ -104,28 +104,15 @@ } set { - RoundedDouble newC = value.ToPrecision(data.GeneralInput.C.NumberOfDecimalPlaces); - - ValidateParamC(newC); - IEnumerable affectedObjects = propertyChangeHandler.SetPropertyValueAfterConfirmation( data, - newC, + value, (f, v) => f.GeneralInput.C = v); NotifyAffectedObjects(affectedObjects); } } - private static void ValidateParamC(RoundedDouble newC) - { - if (double.IsNaN(newC) || newC < 0.0 || newC > 2.0) - { - throw new ArgumentOutOfRangeException(null, - Resources.WaveImpactAsphaltCoverWaveConditionsInputContextProperties_RevetmentType); - } - } - private static void NotifyAffectedObjects(IEnumerable affectedObjects) { foreach (IObservable affectedObject in affectedObjects) @@ -134,7 +121,6 @@ } } - #endregion } } \ No newline at end of file