Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PresentationObjects/ClosingStructuresInputContext.cs
===================================================================
diff -u
--- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PresentationObjects/ClosingStructuresInputContext.cs (revision 0)
+++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PresentationObjects/ClosingStructuresInputContext.cs (revision ee5ab18ca7554ffb2ce9546dd72b341da59f0345)
@@ -0,0 +1,46 @@
+// Copyright (C) Stichting Deltares 2016. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+using Ringtoets.ClosingStructures.Data;
+using Ringtoets.Common.Data.AssessmentSection;
+
+namespace Ringtoets.ClosingStructures.Forms.PresentationObjects
+{
+ ///
+ /// Presentation object for all data required to configure an instance of
+ /// in order to be able to configure height structures calculations.
+ ///
+ public class ClosingStructuresInputContext : ClosingStructuresContextBase
+ {
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The height structures input instance wrapped by this context object.
+ /// The failure mechanism which the context belongs to.
+ /// The assessment section which the context belongs to.
+ /// When any input argument is null.
+ public ClosingStructuresInputContext(ClosingStructuresInput input,
+ ClosingStructuresFailureMechanism failureMechanism,
+ IAssessmentSection assessmentSection)
+ : base(input, failureMechanism, assessmentSection) {}
+ }
+}
\ No newline at end of file
Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Properties/Resources.Designer.cs
===================================================================
diff -u -r8587508c66a1bc0938465e97cf365cc1ef254f53 -ree5ab18ca7554ffb2ce9546dd72b341da59f0345
--- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 8587508c66a1bc0938465e97cf365cc1ef254f53)
+++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision ee5ab18ca7554ffb2ce9546dd72b341da59f0345)
@@ -22,7 +22,7 @@
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
+// Runtime Version:4.0.30319.17929
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -89,5 +89,14 @@
return ResourceManager.GetString("ClosingStructuresContextBase_DataDescription_ClosingStructuresFailureMechanism", resourceCulture);
}
}
+
+ ///
+ /// Looks up a localized string similar to Invoer.
+ ///
+ public static string ClosingStructuresInputContext_NodeDisplayName {
+ get {
+ return ResourceManager.GetString("ClosingStructuresInputContext_NodeDisplayName", resourceCulture);
+ }
+ }
}
}
Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Properties/Resources.resx
===================================================================
diff -u -r8587508c66a1bc0938465e97cf365cc1ef254f53 -ree5ab18ca7554ffb2ce9546dd72b341da59f0345
--- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Properties/Resources.resx (.../Resources.resx) (revision 8587508c66a1bc0938465e97cf365cc1ef254f53)
+++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Properties/Resources.resx (.../Resources.resx) (revision ee5ab18ca7554ffb2ce9546dd72b341da59f0345)
@@ -120,4 +120,7 @@
Het sluitings kunstwerk toetsspoor
+
+ Invoer
+
\ No newline at end of file
Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Ringtoets.ClosingStructures.Forms.csproj
===================================================================
diff -u -r9214f74184b5923e0fb04b86d50c5bf8e5e57cdc -ree5ab18ca7554ffb2ce9546dd72b341da59f0345
--- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Ringtoets.ClosingStructures.Forms.csproj (.../Ringtoets.ClosingStructures.Forms.csproj) (revision 9214f74184b5923e0fb04b86d50c5bf8e5e57cdc)
+++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Ringtoets.ClosingStructures.Forms.csproj (.../Ringtoets.ClosingStructures.Forms.csproj) (revision ee5ab18ca7554ffb2ce9546dd72b341da59f0345)
@@ -46,6 +46,7 @@
+ True
Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Plugin/ClosingStructuresPlugin.cs
===================================================================
diff -u -r9214f74184b5923e0fb04b86d50c5bf8e5e57cdc -ree5ab18ca7554ffb2ce9546dd72b341da59f0345
--- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Plugin/ClosingStructuresPlugin.cs (.../ClosingStructuresPlugin.cs) (revision 9214f74184b5923e0fb04b86d50c5bf8e5e57cdc)
+++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Plugin/ClosingStructuresPlugin.cs (.../ClosingStructuresPlugin.cs) (revision ee5ab18ca7554ffb2ce9546dd72b341da59f0345)
@@ -33,12 +33,14 @@
using Ringtoets.Common.Data;
using Ringtoets.Common.Data.AssessmentSection;
using Ringtoets.Common.Data.Calculation;
+using Ringtoets.Common.Data.Probability;
using Ringtoets.Common.Forms.Helpers;
using Ringtoets.Common.Forms.PresentationObjects;
using Ringtoets.Common.Forms.TreeNodeInfos;
using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources;
using RingtoetsCommonIOResources = Ringtoets.Common.IO.Properties.Resources;
using ClosingStructuresDataResources = Ringtoets.ClosingStructures.Data.Properties.Resources;
+using ClosingStructuresFormsResources = Ringtoets.ClosingStructures.Forms.Properties.Resources;
namespace Ringtoets.ClosingStructures.Plugin
{
@@ -76,9 +78,9 @@
CalculationGroupContextOnNodeRemoved);
yield return RingtoetsTreeNodeInfoFactory.CreateCalculationContextTreeNodeInfo(
- null,
- null,
- null);
+ CalculationContextChildNodeObjects,
+ CalculationContextContextMenuStrip,
+ CalculationContextOnNodeRemoved);
yield return new TreeNodeInfo>
{
@@ -89,7 +91,7 @@
.Build()
};
- yield return new TreeNodeInfo()
+ yield return new TreeNodeInfo
{
Text = context => RingtoetsCommonFormsResources.StructuresCollection_DisplayName,
Image = context => RingtoetsCommonFormsResources.GeneralFolderIcon,
@@ -102,6 +104,15 @@
.AddCollapseAllItem()
.Build()
};
+
+ yield return new TreeNodeInfo
+ {
+ Text = inputContext => ClosingStructuresFormsResources.ClosingStructuresInputContext_NodeDisplayName,
+ Image = inputContext => RingtoetsCommonFormsResources.GenericInputOutputIcon,
+ ContextMenuStrip = (nodeData, parentData, treeViewControl) => Gui.Get(nodeData, treeViewControl)
+ .AddPropertiesItem()
+ .Build()
+ };
}
public override IEnumerable GetImportInfos()
@@ -318,7 +329,7 @@
CalculateAll(context.FailureMechanism, group.GetCalculations().OfType());
}
- private void AddCalculation(ClosingStructuresCalculationGroupContext context)
+ private static void AddCalculation(ClosingStructuresCalculationGroupContext context)
{
var calculation = new ClosingStructuresCalculation
{
@@ -338,8 +349,43 @@
#endregion
+ #region ClosingStructuresCalculationContext TreeNodeInfo
+
+ private static object[] CalculationContextChildNodeObjects(ClosingStructuresCalculationContext context)
+ {
+ var childNodes = new List