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