Index: Ringtoets/StabilityStoneCover/src/Ringtoets.StabilityStoneCover.Forms/Views/StabilityStoneCoverFailureMechanismView.cs =================================================================== diff -u -rab44ffd44a9c83fb7947e86ea93d8a4e6d6643f4 -r76853a633e4f50f0059f9beedda3f85e3a602812 --- Ringtoets/StabilityStoneCover/src/Ringtoets.StabilityStoneCover.Forms/Views/StabilityStoneCoverFailureMechanismView.cs (.../StabilityStoneCoverFailureMechanismView.cs) (revision ab44ffd44a9c83fb7947e86ea93d8a4e6d6643f4) +++ Ringtoets/StabilityStoneCover/src/Ringtoets.StabilityStoneCover.Forms/Views/StabilityStoneCoverFailureMechanismView.cs (.../StabilityStoneCoverFailureMechanismView.cs) (revision 76853a633e4f50f0059f9beedda3f85e3a602812) @@ -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.Linq; using System.Windows.Forms; @@ -69,10 +70,27 @@ /// /// Creates a new instance of . /// - public StabilityStoneCoverFailureMechanismView() + /// The failure mechanism to show the data for. + /// The assessment section to show data for. + /// Thrown when any parameter is null. + public StabilityStoneCoverFailureMechanismView(StabilityStoneCoverFailureMechanism failureMechanism, + IAssessmentSection assessmentSection) { + if (failureMechanism == null) + { + throw new ArgumentNullException(nameof(failureMechanism)); + } + + if (assessmentSection == null) + { + throw new ArgumentNullException(nameof(assessmentSection)); + } + InitializeComponent(); + FailureMechanism = failureMechanism; + AssessmentSection = assessmentSection; + failureMechanismObserver = new Observer(UpdateMapData); assessmentSectionObserver = new Observer(UpdateMapData); hydraulicBoundaryLocationsObserver = new Observer(UpdateMapData); @@ -104,6 +122,16 @@ mapDataCollection.Add(calculationsMapData); } + /// + /// Gets the failure mechanism. + /// + public StabilityStoneCoverFailureMechanism FailureMechanism { get; } + + /// + /// Gets the assessment section. + /// + public IAssessmentSection AssessmentSection { get; } + public object Data { get