Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Plugin/ClosingStructuresPlugin.cs =================================================================== diff -u -r026cc14e6eb321e7e3e1c16d2e278cab74602339 -r58e63d129c58c0247ce8918486f4e68120876bd9 --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Plugin/ClosingStructuresPlugin.cs (.../ClosingStructuresPlugin.cs) (revision 026cc14e6eb321e7e3e1c16d2e278cab74602339) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Plugin/ClosingStructuresPlugin.cs (.../ClosingStructuresPlugin.cs) (revision 58e63d129c58c0247ce8918486f4e68120876bd9) @@ -41,6 +41,7 @@ using Ringtoets.Common.Data.Probability; using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms; +using Ringtoets.Common.Forms.ChangeHandlers; using Ringtoets.Common.Forms.Helpers; using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.Common.Forms.TreeNodeInfos; Index: Ringtoets/Common/src/Ringtoets.Common.Forms/ChangeHandlers/FailureMechanismPropertyChangeHandler.cs =================================================================== diff -u --- Ringtoets/Common/src/Ringtoets.Common.Forms/ChangeHandlers/FailureMechanismPropertyChangeHandler.cs (revision 0) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/ChangeHandlers/FailureMechanismPropertyChangeHandler.cs (revision 58e63d129c58c0247ce8918486f4e68120876bd9) @@ -0,0 +1,141 @@ +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets 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. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Forms; +using Core.Common.Base; +using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Forms.Properties; +using Ringtoets.Common.Forms.PropertyClasses; +using CoreCommonBaseResources = Core.Common.Base.Properties.Resources; + +namespace Ringtoets.Common.Forms.ChangeHandlers +{ + /// + /// Class which properly handles data model changes due to a change of a + /// failure mechanism property. + /// + public class FailureMechanismPropertyChangeHandler : IFailureMechanismPropertyChangeHandler where T : IFailureMechanism + { + public IEnumerable SetPropertyValueAfterConfirmation( + T failureMechanism, + TValue value, SetFailureMechanismPropertyValueDelegate setValue) + { + if (failureMechanism == null) + { + throw new ArgumentNullException(nameof(failureMechanism)); + } + if (value == null) + { + throw new ArgumentNullException(nameof(value)); + } + if (setValue == null) + { + throw new ArgumentNullException(nameof(setValue)); + } + + var changedObjects = new List(); + + if (RequiresConfirmation(failureMechanism)) + { + if (ConfirmPropertyChange()) + { + setValue(failureMechanism, value); + changedObjects.AddRange(PropertyChanged(failureMechanism)); + changedObjects.Add(failureMechanism); + } + } + else + { + setValue(failureMechanism, value); + changedObjects.Add(failureMechanism); + } + + return changedObjects; + } + + /// + /// Gets the message that is shown when conformation is inquired. + /// + protected virtual string ConfirmationMessage + { + get + { + return Resources.FailureMechanismPropertyChangeHandler_Confirm_change_composition_and_clear_dependent_data; + } + } + + /// + /// Checks whether a call to would have any effect in the given + /// . + /// + /// The failure mechanism to check for. + /// true if would result in changes, + /// false otherwise. + /// Thrown when + /// is null. + protected virtual bool RequiresConfirmation(T failureMechanism) + { + if (failureMechanism == null) + { + throw new ArgumentNullException(nameof(failureMechanism)); + } + return failureMechanism.Calculations.Any(c => c.HasOutput); + } + + /// + /// Propagates the necessary changes to underlying data structure when a property has + /// been changed for a failure mechanism. + /// + /// The failure mechanism to be updated. + /// All objects that have been affected by the change. + /// Thrown when + /// is null. + protected virtual IEnumerable PropertyChanged(T failureMechanism) + { + if (failureMechanism == null) + { + throw new ArgumentNullException(nameof(failureMechanism)); + } + var affected = new List(); + foreach (var calculation in failureMechanism.Calculations.Where(c => c.HasOutput)) + { + affected.Add(calculation); + calculation.ClearOutput(); + } + return affected; + } + + /// + /// Checks to see if the change of the failure mechanism property should occur or not. + /// + /// true if the change should occur, false otherwise. + private bool ConfirmPropertyChange() + { + DialogResult result = MessageBox.Show(ConfirmationMessage, + CoreCommonBaseResources.Confirm, + MessageBoxButtons.OKCancel); + return result == DialogResult.OK; + } + } +} \ No newline at end of file Fisheye: Tag 58e63d129c58c0247ce8918486f4e68120876bd9 refers to a dead (removed) revision in file `Ringtoets/Common/src/Ringtoets.Common.Forms/FailureMechanismPropertyChangeHandler.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/IFailureMechanismPropertyChangeHandler.cs =================================================================== diff -u -r1188217e2d4f0c433987018e1cd6eb85af9488c1 -r58e63d129c58c0247ce8918486f4e68120876bd9 --- Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/IFailureMechanismPropertyChangeHandler.cs (.../IFailureMechanismPropertyChangeHandler.cs) (revision 1188217e2d4f0c433987018e1cd6eb85af9488c1) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/IFailureMechanismPropertyChangeHandler.cs (.../IFailureMechanismPropertyChangeHandler.cs) (revision 58e63d129c58c0247ce8918486f4e68120876bd9) @@ -1,4 +1,25 @@ -using System; +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets 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. + +using System; using System.Collections.Generic; using Core.Common.Base; using Ringtoets.Common.Data.FailureMechanism; Index: Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/IPropertyChangeHandler.cs =================================================================== diff -u -rc0849c80b8bab9023c7df1e8402aa380891496d2 -r58e63d129c58c0247ce8918486f4e68120876bd9 --- Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/IPropertyChangeHandler.cs (.../IPropertyChangeHandler.cs) (revision c0849c80b8bab9023c7df1e8402aa380891496d2) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/IPropertyChangeHandler.cs (.../IPropertyChangeHandler.cs) (revision 58e63d129c58c0247ce8918486f4e68120876bd9) @@ -1,5 +1,26 @@ -using Core.Common.Gui.PropertyBag; +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets 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. +using Core.Common.Gui.PropertyBag; + namespace Ringtoets.Common.Forms.PropertyClasses { /// Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Ringtoets.Common.Forms.csproj =================================================================== diff -u -r888f6cdc81e8fb6d6a5b9baadf6395f209008836 -r58e63d129c58c0247ce8918486f4e68120876bd9 --- Ringtoets/Common/src/Ringtoets.Common.Forms/Ringtoets.Common.Forms.csproj (.../Ringtoets.Common.Forms.csproj) (revision 888f6cdc81e8fb6d6a5b9baadf6395f209008836) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Ringtoets.Common.Forms.csproj (.../Ringtoets.Common.Forms.csproj) (revision 58e63d129c58c0247ce8918486f4e68120876bd9) @@ -47,7 +47,7 @@ Properties\GlobalAssembly.cs - + Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Views/CalculatableView.Designer.cs =================================================================== diff -u -re468a5451f59115ec6ca32c014da1baaa38866e8 -r58e63d129c58c0247ce8918486f4e68120876bd9 --- Ringtoets/Common/src/Ringtoets.Common.Forms/Views/CalculatableView.Designer.cs (.../CalculatableView.Designer.cs) (revision e468a5451f59115ec6ca32c014da1baaa38866e8) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Views/CalculatableView.Designer.cs (.../CalculatableView.Designer.cs) (revision 58e63d129c58c0247ce8918486f4e68120876bd9) @@ -1,4 +1,25 @@ -namespace Ringtoets.Common.Forms.Views +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets 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. + +namespace Ringtoets.Common.Forms.Views { partial class CalculatableView { Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/ChangeHandlers/FailureMechanismPropertyChangeHandlerTest.cs =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/ChangeHandlers/FailureMechanismPropertyChangeHandlerTest.cs (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/ChangeHandlers/FailureMechanismPropertyChangeHandlerTest.cs (revision 58e63d129c58c0247ce8918486f4e68120876bd9) @@ -0,0 +1,300 @@ +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets 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. + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using Core.Common.Base; +using NUnit.Extensions.Forms; +using NUnit.Framework; +using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.TestUtil; +using Ringtoets.Common.Forms.ChangeHandlers; +using Ringtoets.Common.Forms.TestUtil; + +namespace Ringtoets.Common.Forms.Test.ChangeHandlers +{ + [TestFixture] + public class FailureMechanismPropertyChangeHandlerTest : NUnitFormTest + { + [Test] + public void SetPropertyValueAfterConfirmation_WithoutFailureMechanism_ThrowsArgumentNullException() + { + // Setup + var changeHandler = new FailureMechanismPropertyChangeHandler(); + + // Call + TestDelegate test = () => changeHandler.SetPropertyValueAfterConfirmation( + null, + 3, + (f, v) => { }); + + // Assert + string paramName = Assert.Throws(test).ParamName; + Assert.AreEqual("failureMechanism", paramName); + } + + [Test] + public void SetPropertyValueAfterConfirmation_WithoutValue_ThrowsArgumentNullException() + { + // Setup + var changeHandler = new FailureMechanismPropertyChangeHandler(); + + // Call + TestDelegate test = () => changeHandler.SetPropertyValueAfterConfirmation( + new TestFailureMechanism(), + null, + (f, v) => { }); + + // Assert + string paramName = Assert.Throws(test).ParamName; + Assert.AreEqual("value", paramName); + } + + [Test] + public void SetPropertyValueAfterConfirmation_WithoutSetProperty_ThrowsArgumentNullException() + { + // Setup + var changeHandler = new FailureMechanismPropertyChangeHandler(); + + // Call + TestDelegate test = () => changeHandler.SetPropertyValueAfterConfirmation( + new TestFailureMechanism(), + 3, + null); + + // Assert + string paramName = Assert.Throws(test).ParamName; + Assert.AreEqual("setValue", paramName); + } + + [Test] + [TestCaseSource(nameof(ChangePropertyTestCases))] + public void SetPropertyValueAfterConfirmation_IfConfirmationRequiredThenGiven_SetValueCalledAffectedObjectsReturned(ChangePropertyTestCase testCase) + { + // Setup + var dialogBoxWillBeShown = testCase.ExpectedAffectedCalculations.Any(); + + string title = ""; + string message = ""; + if (dialogBoxWillBeShown) + { + DialogBoxHandler = (name, wnd) => + { + var tester = new MessageBoxTester(wnd); + title = tester.Title; + message = tester.Text; + + tester.ClickOk(); + }; + } + + var testFailureMechanism = new TestFailureMechanism(testCase.Calculations); + var propertySet = 0; + + var changeHandler = new FailureMechanismPropertyChangeHandler(); + + // Call + var affectedObjects = changeHandler.SetPropertyValueAfterConfirmation( + testFailureMechanism, + 3, + (f, v) => propertySet++); + + // Assert + if (dialogBoxWillBeShown) + { + Assert.AreEqual("Bevestigen", title); + string expectedMessage = "Als u een parameter in een toetsspoor wijzigt, zal de uitvoer van alle berekeningen in dit toetsspoor verwijderd worden." + Environment.NewLine + + Environment.NewLine + + "Weet u zeker dat u wilt doorgaan?"; + Assert.AreEqual(expectedMessage, message); + } + Assert.AreEqual(1, propertySet); + var expectedAffectedObjects = new List(testCase.ExpectedAffectedCalculations); + expectedAffectedObjects.Add(testFailureMechanism); + CollectionAssert.AreEqual(expectedAffectedObjects, affectedObjects); + } + + [Test] + public void SetPropertyValueAfterConfirmation_ConfirmationRequiredButNotGiven_SetValueNotCalledNoAffectedObjectsReturned() + { + // Setup + DialogBoxHandler = (name, wnd) => + { + var tester = new MessageBoxTester(wnd); + tester.ClickCancel(); + }; + + var calculationWithOutput = CreateCalculationWithOutput(); + var calculationWithoutOutput = CreateCalculationWithoutOutput(); + + var testFailureMechanism = new TestFailureMechanism( + new[] + { + calculationWithOutput, + calculationWithoutOutput + }); + var propertySet = 0; + + var changeHandler = new FailureMechanismPropertyChangeHandler(); + + // Call + var affectedObjects = changeHandler.SetPropertyValueAfterConfirmation( + testFailureMechanism, + 3, + (f, v) => propertySet++); + + // Assert + Assert.AreEqual(0, propertySet); + CollectionAssert.IsEmpty(affectedObjects); + } + + [Test] + public void SetPropertyValueAfterConfirmation_ConfirmationRequiredAndGivenExceptionInSetValue_ExceptionBubbled() + { + // Setup + DialogBoxHandler = (name, wnd) => + { + var tester = new MessageBoxTester(wnd); + tester.ClickOk(); + }; + + var testFailureMechanism = new TestFailureMechanism( + new[] + { + CreateCalculationWithOutput(), + }); + + var changeHandler = new FailureMechanismPropertyChangeHandler(); + var expectedException = new Exception(); + + // Call + TestDelegate test = () => changeHandler.SetPropertyValueAfterConfirmation( + testFailureMechanism, + 3, + (f, v) => { throw expectedException; }); + + // Assert + var exception = Assert.Throws(test); + Assert.AreSame(expectedException, exception); + } + + [Test] + public void SetPropertyValueAfterConfirmation_ConfirmationNotRequiredExceptionInSetValue_ExceptionBubbled() + { + // Setup + var testFailureMechanism = new TestFailureMechanism(); + var changeHandler = new FailureMechanismPropertyChangeHandler(); + var expectedException = new Exception(); + + // Call + TestDelegate test = () => changeHandler.SetPropertyValueAfterConfirmation( + testFailureMechanism, + 3, + (f, v) => { throw expectedException; }); + + // Assert + var exception = Assert.Throws(test); + Assert.AreSame(expectedException, exception); + } + + public class ChangePropertyTestCase + { + public ChangePropertyTestCase(ICollection calculations) + { + Calculations = calculations; + ExpectedAffectedCalculations = calculations.Where(c => c.HasOutput).ToArray(); + } + + public ICollection Calculations { get; private set; } + public ICollection ExpectedAffectedCalculations { get; private set; } + } + + static IEnumerable ChangePropertyTestCases() + { + yield return new TestCaseData( + new ChangePropertyTestCase(new TestCalculation[0]) + + ).SetName("SetPropertyValueAfterConfirmation No calculations"); + + yield return new TestCaseData( + new ChangePropertyTestCase(new[] + { + CreateCalculationWithOutput() + }) + ).SetName("SetPropertyValueAfterConfirmation Single calculation with output"); + + yield return new TestCaseData( + new ChangePropertyTestCase(new[] + { + CreateCalculationWithoutOutput() + }) + ).SetName("SetPropertyValueAfterConfirmation Single calculation without output"); + + yield return new TestCaseData( + new ChangePropertyTestCase(new[] + { + CreateCalculationWithoutOutput(), + CreateCalculationWithoutOutput() + }) + ).SetName("SetPropertyValueAfterConfirmation Two calculations without output"); + + yield return new TestCaseData( + new ChangePropertyTestCase(new[] + { + CreateCalculationWithOutput(), + CreateCalculationWithoutOutput() + }) + ).SetName("SetPropertyValueAfterConfirmation Calculation without and calculation with output"); + + yield return new TestCaseData( + new ChangePropertyTestCase(new[] + { + CreateCalculationWithOutput(), + CreateCalculationWithOutput() + }) + ).SetName("SetPropertyValueAfterConfirmation Two calculations with output"); + + yield return new TestCaseData( + new ChangePropertyTestCase(new[] + { + CreateCalculationWithOutput(), + CreateCalculationWithOutput(), + CreateCalculationWithoutOutput() + }) + ).SetName("SetPropertyValueAfterConfirmation Two calculations with and one calculation without output"); + } + + private static TestCalculation CreateCalculationWithoutOutput() + { + return new TestCalculation(); + } + + private static TestCalculation CreateCalculationWithOutput() + { + return new TestCalculation + { + Output = new object() + }; + } + } +} \ No newline at end of file Fisheye: Tag 58e63d129c58c0247ce8918486f4e68120876bd9 refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.Forms.Test/FailureMechanismPropertyChangeHandlerTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Ringtoets.Common.Forms.Test.csproj =================================================================== diff -u -r737cd3675ab5bc1b6400e4a0b86ebd543eaee650 -r58e63d129c58c0247ce8918486f4e68120876bd9 --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Ringtoets.Common.Forms.Test.csproj (.../Ringtoets.Common.Forms.Test.csproj) (revision 737cd3675ab5bc1b6400e4a0b86ebd543eaee650) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Ringtoets.Common.Forms.Test.csproj (.../Ringtoets.Common.Forms.Test.csproj) (revision 58e63d129c58c0247ce8918486f4e68120876bd9) @@ -63,7 +63,7 @@ Properties\GlobalAssembly.cs - + Index: Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Forms/DuneErosionFailureMechanismPropertyChangeHandler.cs =================================================================== diff -u -r33996c939c8044f0e09d8b1f1ef69b5b5b1e28c3 -r58e63d129c58c0247ce8918486f4e68120876bd9 --- Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Forms/DuneErosionFailureMechanismPropertyChangeHandler.cs (.../DuneErosionFailureMechanismPropertyChangeHandler.cs) (revision 33996c939c8044f0e09d8b1f1ef69b5b5b1e28c3) +++ Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Forms/DuneErosionFailureMechanismPropertyChangeHandler.cs (.../DuneErosionFailureMechanismPropertyChangeHandler.cs) (revision 58e63d129c58c0247ce8918486f4e68120876bd9) @@ -23,6 +23,7 @@ using System.Linq; using Core.Common.Base; using Ringtoets.Common.Forms; +using Ringtoets.Common.Forms.ChangeHandlers; using Ringtoets.DuneErosion.Data; using Ringtoets.DuneErosion.Forms.Properties; using Ringtoets.DuneErosion.Service; Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Plugin/GrassCoverErosionInwardsPlugin.cs =================================================================== diff -u -r30ac0dd5ba8b2d4394fdcc734880bfb5006ad9f5 -r58e63d129c58c0247ce8918486f4e68120876bd9 --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Plugin/GrassCoverErosionInwardsPlugin.cs (.../GrassCoverErosionInwardsPlugin.cs) (revision 30ac0dd5ba8b2d4394fdcc734880bfb5006ad9f5) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Plugin/GrassCoverErosionInwardsPlugin.cs (.../GrassCoverErosionInwardsPlugin.cs) (revision 58e63d129c58c0247ce8918486f4e68120876bd9) @@ -34,6 +34,7 @@ using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.Probability; using Ringtoets.Common.Forms; +using Ringtoets.Common.Forms.ChangeHandlers; using Ringtoets.Common.Forms.Helpers; using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.Common.Forms.TreeNodeInfos; Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/GrassCoverErosionOutwardsFailureMechanismPropertyChangeHandler.cs =================================================================== diff -u -re853e0f8c9bfa09ee56ce3e323d82b1d42446e02 -r58e63d129c58c0247ce8918486f4e68120876bd9 --- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/GrassCoverErosionOutwardsFailureMechanismPropertyChangeHandler.cs (.../GrassCoverErosionOutwardsFailureMechanismPropertyChangeHandler.cs) (revision e853e0f8c9bfa09ee56ce3e323d82b1d42446e02) +++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/GrassCoverErosionOutwardsFailureMechanismPropertyChangeHandler.cs (.../GrassCoverErosionOutwardsFailureMechanismPropertyChangeHandler.cs) (revision 58e63d129c58c0247ce8918486f4e68120876bd9) @@ -3,6 +3,7 @@ using System.Linq; using Core.Common.Base; using Ringtoets.Common.Forms; +using Ringtoets.Common.Forms.ChangeHandlers; using Ringtoets.Common.Service; using Ringtoets.GrassCoverErosionOutwards.Data; using Ringtoets.GrassCoverErosionOutwards.Forms.Properties; Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Plugin/HeightStructuresPlugin.cs =================================================================== diff -u -r026cc14e6eb321e7e3e1c16d2e278cab74602339 -r58e63d129c58c0247ce8918486f4e68120876bd9 --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Plugin/HeightStructuresPlugin.cs (.../HeightStructuresPlugin.cs) (revision 026cc14e6eb321e7e3e1c16d2e278cab74602339) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Plugin/HeightStructuresPlugin.cs (.../HeightStructuresPlugin.cs) (revision 58e63d129c58c0247ce8918486f4e68120876bd9) @@ -35,6 +35,7 @@ using Ringtoets.Common.Data.Probability; using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms; +using Ringtoets.Common.Forms.ChangeHandlers; using Ringtoets.Common.Forms.Helpers; using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.Common.Forms.TreeNodeInfos; Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/FailureMechanismContributionProperties.cs =================================================================== diff -u -rb2b9fdf365e70928a05c57966eeed30d9050e528 -r58e63d129c58c0247ce8918486f4e68120876bd9 --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/FailureMechanismContributionProperties.cs (.../FailureMechanismContributionProperties.cs) (revision b2b9fdf365e70928a05c57966eeed30d9050e528) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/FailureMechanismContributionProperties.cs (.../FailureMechanismContributionProperties.cs) (revision 58e63d129c58c0247ce8918486f4e68120876bd9) @@ -23,7 +23,6 @@ using System.Collections.Generic; using System.ComponentModel; using Core.Common.Base; -using Core.Common.Gui.Attributes; using Core.Common.Gui.PropertyBag; using Core.Common.Utils; using Core.Common.Utils.Attributes; @@ -39,9 +38,9 @@ /// public class FailureMechanismContributionProperties : ObjectProperties { - private IFailureMechanismContributionNormChangeHandler normChangeHandler; - private IAssessmentSectionCompositionChangeHandler compositionChangeHandler; - private IAssessmentSection assessmentSection; + private readonly IFailureMechanismContributionNormChangeHandler normChangeHandler; + private readonly IAssessmentSectionCompositionChangeHandler compositionChangeHandler; + private readonly IAssessmentSection assessmentSection; /// /// Creates a new instance of . Index: Ringtoets/Piping/src/Ringtoets.Piping.Plugin/PipingPlugin.cs =================================================================== diff -u -r026cc14e6eb321e7e3e1c16d2e278cab74602339 -r58e63d129c58c0247ce8918486f4e68120876bd9 --- Ringtoets/Piping/src/Ringtoets.Piping.Plugin/PipingPlugin.cs (.../PipingPlugin.cs) (revision 026cc14e6eb321e7e3e1c16d2e278cab74602339) +++ Ringtoets/Piping/src/Ringtoets.Piping.Plugin/PipingPlugin.cs (.../PipingPlugin.cs) (revision 58e63d129c58c0247ce8918486f4e68120876bd9) @@ -34,6 +34,7 @@ using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Forms; +using Ringtoets.Common.Forms.ChangeHandlers; using Ringtoets.Common.Forms.Helpers; using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.Common.Forms.TreeNodeInfos; Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Plugin/StabilityPointStructuresPlugin.cs =================================================================== diff -u -r026cc14e6eb321e7e3e1c16d2e278cab74602339 -r58e63d129c58c0247ce8918486f4e68120876bd9 --- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Plugin/StabilityPointStructuresPlugin.cs (.../StabilityPointStructuresPlugin.cs) (revision 026cc14e6eb321e7e3e1c16d2e278cab74602339) +++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Plugin/StabilityPointStructuresPlugin.cs (.../StabilityPointStructuresPlugin.cs) (revision 58e63d129c58c0247ce8918486f4e68120876bd9) @@ -34,6 +34,7 @@ using Ringtoets.Common.Data.Probability; using Ringtoets.Common.Data.Structures; using Ringtoets.Common.Forms; +using Ringtoets.Common.Forms.ChangeHandlers; using Ringtoets.Common.Forms.Helpers; using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.Common.Forms.TreeNodeInfos;