Index: Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Forms/Views/StabilityPointStructuresScenariosView.Designer.cs
===================================================================
diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -rc2eca5bce82fe3b24899de033edd326dc75376ee
--- Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Forms/Views/StabilityPointStructuresScenariosView.Designer.cs (.../StabilityPointStructuresScenariosView.Designer.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea)
+++ Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Forms/Views/StabilityPointStructuresScenariosView.Designer.cs (.../StabilityPointStructuresScenariosView.Designer.cs) (revision c2eca5bce82fe3b24899de033edd326dc75376ee)
@@ -36,31 +36,8 @@
///
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;
- //
- // StabilityPointStructuresScenariosView
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.AutoScroll = true;
- this.Controls.Add(this.scenarioSelectionControl);
- this.Name = "StabilityPointStructuresScenariosView";
- this.ResumeLayout(false);
-
}
#endregion
-
- private Common.Forms.ScenarioSelectionControl scenarioSelectionControl;
}
}
Index: Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Forms/Views/StabilityPointStructuresScenariosView.cs
===================================================================
diff -u -r1247659c87fbaeb6c5d0c29b9bb64aafd9adbac5 -rc2eca5bce82fe3b24899de033edd326dc75376ee
--- Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Forms/Views/StabilityPointStructuresScenariosView.cs (.../StabilityPointStructuresScenariosView.cs) (revision 1247659c87fbaeb6c5d0c29b9bb64aafd9adbac5)
+++ Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Forms/Views/StabilityPointStructuresScenariosView.cs (.../StabilityPointStructuresScenariosView.cs) (revision c2eca5bce82fe3b24899de033edd326dc75376ee)
@@ -22,120 +22,58 @@
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.Common.Data.AssessmentSection;
using Riskeer.Common.Data.Calculation;
+using Riskeer.Common.Data.FailureMechanism;
using Riskeer.Common.Data.Structures;
-using Riskeer.Common.Util;
+using Riskeer.Common.Forms.Views;
using Riskeer.StabilityPointStructures.Data;
namespace Riskeer.StabilityPointStructures.Forms.Views
{
///
- /// View for configuring scenarios for the stability point structures failure mechanism.
- /// Shows a grid view where for each failure mechanism section, a calculation within the section
- /// can be selected.
+ /// View for configuring stability point structures scenarios.
///
- public partial class StabilityPointStructuresScenariosView : UserControl, IView
+ public partial class StabilityPointStructuresScenariosView : ScenariosView, StabilityPointStructuresInput,
+ StabilityPointStructuresScenarioRow, StabilityPointStructuresFailureMechanism>
{
- private readonly RecursiveObserver calculationInputObserver;
- private readonly RecursiveObserver calculationGroupObserver;
- private readonly Observer failureMechanismObserver;
- private StabilityPointStructuresFailureMechanism failureMechanism;
- private CalculationGroup data;
+ private readonly IAssessmentSection assessmentSection;
///
/// Creates a new instance of .
///
- public StabilityPointStructuresScenariosView()
+ /// 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 StabilityPointStructuresScenariosView(CalculationGroup calculationGroup, StabilityPointStructuresFailureMechanism 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