Index: Ringtoets/Common/src/Ringtoets.Common.Forms/ChangeHandlers/PropertyChangeHelper.cs =================================================================== diff -u -rd5a0bce3d53deb3aef237c365018096e9bc83bb1 -re6cb95313c163aebfb0f01470855068785ce61bb --- Ringtoets/Common/src/Ringtoets.Common.Forms/ChangeHandlers/PropertyChangeHelper.cs (.../PropertyChangeHelper.cs) (revision d5a0bce3d53deb3aef237c365018096e9bc83bb1) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/ChangeHandlers/PropertyChangeHelper.cs (.../PropertyChangeHelper.cs) (revision e6cb95313c163aebfb0f01470855068785ce61bb) @@ -37,6 +37,7 @@ /// /// The property change action. /// The handler which is responsible for determining changes due to the property change. + /// Thrown when any parameter is null. public static void ChangePropertyAndNotify(SetObservablePropertyValueDelegate setPropertyDelegate, IObservablePropertyChangeHandler changeHandler) { if (setPropertyDelegate == null) Index: Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/StructuresInputBaseProperties.cs =================================================================== diff -u -r0eef796eb9da995e56fd1e4a61296ec3c25dcfad -re6cb95313c163aebfb0f01470855068785ce61bb --- Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/StructuresInputBaseProperties.cs (.../StructuresInputBaseProperties.cs) (revision 0eef796eb9da995e56fd1e4a61296ec3c25dcfad) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/StructuresInputBaseProperties.cs (.../StructuresInputBaseProperties.cs) (revision e6cb95313c163aebfb0f01470855068785ce61bb) @@ -23,7 +23,6 @@ using System.Collections.Generic; using System.ComponentModel; using System.Drawing.Design; -using Core.Common.Base; using Core.Common.Base.Data; using Core.Common.Base.Geometry; using Core.Common.Gui.Attributes; Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingCalculationRow.cs =================================================================== diff -u -r37fc59cc0f3becb92e14b8263bd8e9fc71aa0e79 -re6cb95313c163aebfb0f01470855068785ce61bb --- Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingCalculationRow.cs (.../PipingCalculationRow.cs) (revision 37fc59cc0f3becb92e14b8263bd8e9fc71aa0e79) +++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingCalculationRow.cs (.../PipingCalculationRow.cs) (revision e6cb95313c163aebfb0f01470855068785ce61bb) @@ -20,12 +20,11 @@ // All rights reserved. using System; -using System.Collections.Generic; using System.Globalization; -using Core.Common.Base; using Core.Common.Base.Data; using Core.Common.Controls.DataGrid; using Ringtoets.Common.Data.Hydraulics; +using Ringtoets.Common.Forms.ChangeHandlers; using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.Common.Forms.PropertyClasses; using Ringtoets.Piping.Data; @@ -97,7 +96,7 @@ StochasticSoilModel valueToSet = value?.WrappedObject; if (!ReferenceEquals(PipingCalculation.InputParameters.StochasticSoilModel, valueToSet)) { - ChangePropertyValueAndNotifyAffectedObjects(() => PipingCalculation.InputParameters.StochasticSoilModel = valueToSet); + PropertyChangeHelper.ChangePropertyAndNotify(() => PipingCalculation.InputParameters.StochasticSoilModel = valueToSet, propertyChangeHandler); } } } @@ -116,7 +115,7 @@ StochasticSoilProfile valueToSet = value?.WrappedObject; if (!ReferenceEquals(PipingCalculation.InputParameters.StochasticSoilProfile, valueToSet)) { - ChangePropertyValueAndNotifyAffectedObjects(() => PipingCalculation.InputParameters.StochasticSoilProfile = valueToSet); + PropertyChangeHelper.ChangePropertyAndNotify(() => PipingCalculation.InputParameters.StochasticSoilProfile = valueToSet, propertyChangeHandler); } } } @@ -155,7 +154,7 @@ HydraulicBoundaryLocation valueToSet = value?.WrappedObject?.HydraulicBoundaryLocation; if (!ReferenceEquals(PipingCalculation.InputParameters.HydraulicBoundaryLocation, valueToSet)) { - ChangePropertyValueAndNotifyAffectedObjects(() => PipingCalculation.InputParameters.HydraulicBoundaryLocation = valueToSet); + PropertyChangeHelper.ChangePropertyAndNotify(() => PipingCalculation.InputParameters.HydraulicBoundaryLocation = valueToSet, propertyChangeHandler); } } } @@ -173,7 +172,7 @@ { if (!PipingCalculation.InputParameters.DampingFactorExit.Mean.Equals(value)) { - ChangePropertyValueAndNotifyAffectedObjects(() => PipingCalculation.InputParameters.DampingFactorExit.Mean = value); + PropertyChangeHelper.ChangePropertyAndNotify(() => PipingCalculation.InputParameters.DampingFactorExit.Mean = value, propertyChangeHandler); } } } @@ -191,7 +190,7 @@ { if (!PipingCalculation.InputParameters.PhreaticLevelExit.Mean.Equals(value)) { - ChangePropertyValueAndNotifyAffectedObjects(() => PipingCalculation.InputParameters.PhreaticLevelExit.Mean = value); + PropertyChangeHelper.ChangePropertyAndNotify(() => PipingCalculation.InputParameters.PhreaticLevelExit.Mean = value, propertyChangeHandler); } } } @@ -209,7 +208,7 @@ { if (!PipingCalculation.InputParameters.EntryPointL.Equals(value)) { - ChangePropertyValueAndNotifyAffectedObjects(() => PipingCalculation.InputParameters.EntryPointL = value); + PropertyChangeHelper.ChangePropertyAndNotify(() => PipingCalculation.InputParameters.EntryPointL = value, propertyChangeHandler); } } } @@ -227,24 +226,9 @@ { if (!PipingCalculation.InputParameters.ExitPointL.Equals(value)) { - ChangePropertyValueAndNotifyAffectedObjects(() => PipingCalculation.InputParameters.ExitPointL = value); + PropertyChangeHelper.ChangePropertyAndNotify(() => PipingCalculation.InputParameters.ExitPointL = value, propertyChangeHandler); } } } - - private void ChangePropertyValueAndNotifyAffectedObjects(SetObservablePropertyValueDelegate setPropertyValue) - { - IEnumerable affectedObjects = propertyChangeHandler.SetPropertyValueAfterConfirmation(setPropertyValue); - - NotifyAffectedObjects(affectedObjects); - } - - private static void NotifyAffectedObjects(IEnumerable affectedObjects) - { - foreach (var affectedObject in affectedObjects) - { - affectedObject.NotifyObservers(); - } - } } } \ No newline at end of file Index: Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/PropertyClasses/WaveConditionsInputContextProperties.cs =================================================================== diff -u -rd5a0bce3d53deb3aef237c365018096e9bc83bb1 -re6cb95313c163aebfb0f01470855068785ce61bb --- Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/PropertyClasses/WaveConditionsInputContextProperties.cs (.../WaveConditionsInputContextProperties.cs) (revision d5a0bce3d53deb3aef237c365018096e9bc83bb1) +++ Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/PropertyClasses/WaveConditionsInputContextProperties.cs (.../WaveConditionsInputContextProperties.cs) (revision e6cb95313c163aebfb0f01470855068785ce61bb) @@ -24,7 +24,6 @@ using System.ComponentModel; using System.Drawing.Design; using System.Linq; -using Core.Common.Base; using Core.Common.Base.Data; using Core.Common.Base.Geometry; using Core.Common.Gui.Attributes;