Index: Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/Views/GrassCoverErosionInwardsCalculationRow.cs
===================================================================
diff -u -r950c2bc06cda222b149f4663db732cf1c4554dbe -r57b1f9d0d5418954bff8306c01b2c5c4e5930e1c
--- Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/Views/GrassCoverErosionInwardsCalculationRow.cs (.../GrassCoverErosionInwardsCalculationRow.cs) (revision 950c2bc06cda222b149f4663db732cf1c4554dbe)
+++ Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/Views/GrassCoverErosionInwardsCalculationRow.cs (.../GrassCoverErosionInwardsCalculationRow.cs) (revision 57b1f9d0d5418954bff8306c01b2c5c4e5930e1c)
@@ -44,6 +44,9 @@
private const int useForeshoreColumnIndex = 6;
private readonly IObservablePropertyChangeHandler propertyChangeHandler;
+ public event EventHandler RowUpdated;
+ public event EventHandler RowUpdateDone;
+
///
/// Creates a new instance of .
///
@@ -139,11 +142,8 @@
get => GrassCoverErosionInwardsCalculationScenario.InputParameters.UseBreakWater;
set
{
- if (!GrassCoverErosionInwardsCalculationScenario.InputParameters.UseBreakWater.Equals(value))
- {
- PropertyChangeHelper.ChangePropertyAndNotify(() => GrassCoverErosionInwardsCalculationScenario.InputParameters.UseBreakWater = value, propertyChangeHandler);
- UpdateUseBreakWaterColumnStateDefinitions();
- }
+ PropertyChangeHelper.ChangePropertyAndNotify(() => GrassCoverErosionInwardsCalculationScenario.InputParameters.UseBreakWater = value, propertyChangeHandler);
+ UpdateUseBreakWaterColumnStateDefinitions();
}
}
Index: Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/Views/GrassCoverErosionInwardsCalculationsView.cs
===================================================================
diff -u -r71cb488334fbc9d5aa764ac9ccd8fe64872928fe -r57b1f9d0d5418954bff8306c01b2c5c4e5930e1c
--- Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/Views/GrassCoverErosionInwardsCalculationsView.cs (.../GrassCoverErosionInwardsCalculationsView.cs) (revision 71cb488334fbc9d5aa764ac9ccd8fe64872928fe)
+++ Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/Views/GrassCoverErosionInwardsCalculationsView.cs (.../GrassCoverErosionInwardsCalculationsView.cs) (revision 57b1f9d0d5418954bff8306c01b2c5c4e5930e1c)
@@ -66,88 +66,76 @@
///
/// Creates a new instance of .
///
- public GrassCoverErosionInwardsCalculationsView()
+ public GrassCoverErosionInwardsCalculationsView(CalculationGroup data, GrassCoverErosionInwardsFailureMechanism failureMechanism, IAssessmentSection assessmentSection)
{
InitializeComponent();
InitializeDataGridView();
InitializeListBox();
- failureMechanismObserver = new Observer(OnFailureMechanismUpdate);
- hydraulicBoundaryLocationsObserver = new Observer(UpdateSelectableHydraulicBoundaryLocationsColumn);
- dikeProfilesObserver = new Observer(UpdateDikeProfilesColumn);
+ if (data == null)
+ {
+ throw new ArgumentNullException(nameof(data));
+ }
+ if (failureMechanism == null)
+ {
+ throw new ArgumentNullException(nameof(failureMechanism));
+ }
+ if (assessmentSection == null)
+ {
+ throw new ArgumentNullException(nameof(assessmentSection));
+ }
- // The concat is needed to observe the input of calculations in child groups.
- inputObserver = new RecursiveObserver(UpdateDataGridViewDataSource, pcg => pcg.Children.Concat