Index: Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Forms/Views/ClosingStructuresScenariosView.Designer.cs
===================================================================
diff -u -rf5cd3b2ee9b7436f606ee6bc027b795accf0549d -r38a2fc76e88b63b2a680e9ceb2a77a9aa5509918
--- Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Forms/Views/ClosingStructuresScenariosView.Designer.cs (.../ClosingStructuresScenariosView.Designer.cs) (revision f5cd3b2ee9b7436f606ee6bc027b795accf0549d)
+++ Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Forms/Views/ClosingStructuresScenariosView.Designer.cs (.../ClosingStructuresScenariosView.Designer.cs) (revision 38a2fc76e88b63b2a680e9ceb2a77a9aa5509918)
@@ -36,31 +36,9 @@
///
private void InitializeComponent()
{
- this.scenarioSelectionControl = new Riskeer.Common.Forms.ScenarioSelectionControl();
- this.SuspendLayout();
- //
- // scenarioSelectionControl
- //
- this.scenarioSelectionControl.AutoScroll = true;
- this.scenarioSelectionControl.Dock = System.Windows.Forms.DockStyle.Fill;
- this.scenarioSelectionControl.Location = new System.Drawing.Point(0, 0);
- this.scenarioSelectionControl.Name = "scenarioSelectionControl";
- this.scenarioSelectionControl.Size = new System.Drawing.Size(150, 150);
- this.scenarioSelectionControl.TabIndex = 0;
- //
- // ClosingStructuresScenariosView
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.Controls.Add(this.scenarioSelectionControl);
- this.Name = "ClosingStructuresScenariosView";
- this.ResumeLayout(false);
- this.AutoScroll = true;
-
+
}
#endregion
-
- private Common.Forms.ScenarioSelectionControl scenarioSelectionControl;
}
}
Index: Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Forms/Views/ClosingStructuresScenariosView.cs
===================================================================
diff -u -rf5cd3b2ee9b7436f606ee6bc027b795accf0549d -r38a2fc76e88b63b2a680e9ceb2a77a9aa5509918
--- Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Forms/Views/ClosingStructuresScenariosView.cs (.../ClosingStructuresScenariosView.cs) (revision f5cd3b2ee9b7436f606ee6bc027b795accf0549d)
+++ Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Forms/Views/ClosingStructuresScenariosView.cs (.../ClosingStructuresScenariosView.cs) (revision 38a2fc76e88b63b2a680e9ceb2a77a9aa5509918)
@@ -22,120 +22,67 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using System.Windows.Forms;
-using Core.Common.Base;
-using Core.Common.Controls.Views;
+using Core.Common.Base.Geometry;
using Riskeer.ClosingStructures.Data;
+using Riskeer.Common.Data.AssessmentSection;
using Riskeer.Common.Data.Calculation;
+using Riskeer.Common.Data.DikeProfiles;
+using Riskeer.Common.Data.FailureMechanism;
using Riskeer.Common.Data.Structures;
-using Riskeer.Common.Util;
+using Riskeer.Common.Forms.Views;
namespace Riskeer.ClosingStructures.Forms.Views
{
///
- /// View for configuring scenarios for the closing structures failure mechanism.
- /// Shows a grid view where for each failure mechanism section, a calculation within the section
- /// can be selected.
+ /// View for configuring closing structures scenarios.
///
- public partial class ClosingStructuresScenariosView : UserControl, IView
+ public partial class ClosingStructuresScenariosView : ScenariosView, ClosingStructuresInput, ClosingStructuresScenarioRow, ClosingStructuresFailureMechanism>
{
- private readonly RecursiveObserver calculationInputObserver;
- private readonly RecursiveObserver calculationGroupObserver;
- private readonly Observer failureMechanismObserver;
- private ClosingStructuresFailureMechanism failureMechanism;
- private CalculationGroup data;
+ private readonly IAssessmentSection assessmentSection;
///
/// Creates a new instance of .
///
- public ClosingStructuresScenariosView()
+ /// The data to show in this view.
+ /// The
+ /// the belongs to.
+ /// The assessment section the scenarios belong to.
+ /// Thrown when any parameter
+ /// is null.
+ public ClosingStructuresScenariosView(CalculationGroup calculationGroup, ClosingStructuresFailureMechanism failureMechanism, IAssessmentSection assessmentSection)
+ : base(calculationGroup, failureMechanism)
{
- InitializeComponent();
-
- failureMechanismObserver = new Observer(UpdateDataGridViewDataSource);
-
- // The concat is needed to observe the input of calculations in child groups.
- calculationInputObserver = new RecursiveObserver(
- UpdateDataGridViewDataSource, cg => cg.Children.Concat