Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/WaveHeightLocationsView.cs
===================================================================
diff -u -r8ba742d2139563c9571e32f074c7c4b3077f45ee -r0ce4c68a5285d7596b108dc1b42693970961bd50
--- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/WaveHeightLocationsView.cs (.../WaveHeightLocationsView.cs) (revision 8ba742d2139563c9571e32f074c7c4b3077f45ee)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/WaveHeightLocationsView.cs (.../WaveHeightLocationsView.cs) (revision 0ce4c68a5285d7596b108dc1b42693970961bd50)
@@ -19,6 +19,7 @@
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
+using System;
using System.Collections.Generic;
using System.Windows.Forms;
using Core.Common.Base;
@@ -39,35 +40,23 @@
{
private readonly Observer assessmentSectionObserver;
private readonly Observer hydraulicBoundaryDatabaseObserver;
- private IAssessmentSection assessmentSection;
///
/// Creates a new instance of .
///
- public WaveHeightLocationsView()
+ /// The assessment section which the locations belong to.
+ /// Thrown when
+ /// is null.
+ public WaveHeightLocationsView(IAssessmentSection assessmentSection)
+ : base(assessmentSection)
{
InitializeComponent();
assessmentSectionObserver = new Observer(UpdateHydraulicBoundaryDatabase);
hydraulicBoundaryDatabaseObserver = new Observer(HandleHydraulicBoundaryDatabaseUpdate);
- }
- public override IAssessmentSection AssessmentSection
- {
- get
- {
- return assessmentSection;
- }
- set
- {
- assessmentSection = value;
-
- if (assessmentSection != null)
- {
- assessmentSectionObserver.Observable = assessmentSection;
- hydraulicBoundaryDatabaseObserver.Observable = assessmentSection.HydraulicBoundaryDatabase;
- }
- }
+ assessmentSectionObserver.Observable = AssessmentSection;
+ hydraulicBoundaryDatabaseObserver.Observable = AssessmentSection.HydraulicBoundaryDatabase;
}
protected override object CreateSelectedItemFromCurrentRow()