Index: Ringtoets/Asphalt/src/Ringtoets.Asphalt.Data/WaveImpactAsphaltCoverFailureMechanism.cs =================================================================== diff -u -re05b8947a4f5a41c2cb8b3f5460daf20ab77b2c8 -r35e7ce9a8fc466c028bf48609a7314f4f416583e --- Ringtoets/Asphalt/src/Ringtoets.Asphalt.Data/WaveImpactAsphaltCoverFailureMechanism.cs (.../WaveImpactAsphaltCoverFailureMechanism.cs) (revision e05b8947a4f5a41c2cb8b3f5460daf20ab77b2c8) +++ Ringtoets/Asphalt/src/Ringtoets.Asphalt.Data/WaveImpactAsphaltCoverFailureMechanism.cs (.../WaveImpactAsphaltCoverFailureMechanism.cs) (revision 35e7ce9a8fc466c028bf48609a7314f4f416583e) @@ -20,8 +20,10 @@ // All rights reserved. using System.Collections.Generic; +using Core.Common.Base; using Ringtoets.Asphalt.Data.Properties; using Ringtoets.Common.Data.Calculation; +using Ringtoets.Common.Data.DikeProfiles; using Ringtoets.Common.Data.FailureMechanism; namespace Ringtoets.Asphalt.Data @@ -41,6 +43,7 @@ : base(Resources.WaveImpactAsphaltCoverFailureMechanism_DisplayName, Resources.WaveImpactAsphaltCoverFailureMechanism_Code) { sectionResults = new List(); + ForeShores = new ObservableList(); } public override IEnumerable Calculations @@ -59,6 +62,8 @@ } } + public ObservableList ForeShores { get; private set; } + public override void AddSection(FailureMechanismSection section) { base.AddSection(section); Index: Ringtoets/Asphalt/src/Ringtoets.Asphalt.Plugin/WaveImpactAsphaltCoverPlugin.cs =================================================================== diff -u -re05b8947a4f5a41c2cb8b3f5460daf20ab77b2c8 -r35e7ce9a8fc466c028bf48609a7314f4f416583e --- Ringtoets/Asphalt/src/Ringtoets.Asphalt.Plugin/WaveImpactAsphaltCoverPlugin.cs (.../WaveImpactAsphaltCoverPlugin.cs) (revision e05b8947a4f5a41c2cb8b3f5460daf20ab77b2c8) +++ Ringtoets/Asphalt/src/Ringtoets.Asphalt.Plugin/WaveImpactAsphaltCoverPlugin.cs (.../WaveImpactAsphaltCoverPlugin.cs) (revision 35e7ce9a8fc466c028bf48609a7314f4f416583e) @@ -21,6 +21,7 @@ using System.Collections; using System.Collections.Generic; +using System.Drawing; using System.Linq; using System.Windows.Forms; using Core.Common.Controls.TreeView; @@ -70,6 +71,24 @@ FailureMechanismEnabledContextMenuStrip, FailureMechanismDisabledContextMenuStrip); + yield return new TreeNodeInfo + { + Text = context => RingtoetsCommonFormsResources.Plugin_GetTreeNodeInfos_ForeShores, + Image = context => RingtoetsCommonFormsResources.GeneralFolderIcon, + ForeColor = context => context.WrappedData.Any() ? + Color.FromKnownColor(KnownColor.ControlText) : + Color.FromKnownColor(KnownColor.GrayText), + ChildNodeObjects = context => context.WrappedData + .Cast() + .ToArray(), + ContextMenuStrip = (nodeData, parentData, treeViewControl) => Gui.Get(nodeData, treeViewControl) + .AddImportItem() + .AddSeparator() + .AddCollapseAllItem() + .AddExpandAllItem() + .Build() + }; + yield return new TreeNodeInfo> { Text = context => RingtoetsCommonDataResources.FailureMechanism_AssessmentResult_DisplayName, @@ -136,6 +155,7 @@ return new ArrayList { new FailureMechanismSectionsContext(failureMechanism, assessmentSection), + new ForeShoresContext(failureMechanism.ForeShores), new CommentContext(failureMechanism) }; } Index: Ringtoets/Asphalt/test/Ringtoets.Asphalt.Data.Test/WaveImpactAsphaltCoverFailureMechanismTest.cs =================================================================== diff -u -re05b8947a4f5a41c2cb8b3f5460daf20ab77b2c8 -r35e7ce9a8fc466c028bf48609a7314f4f416583e --- Ringtoets/Asphalt/test/Ringtoets.Asphalt.Data.Test/WaveImpactAsphaltCoverFailureMechanismTest.cs (.../WaveImpactAsphaltCoverFailureMechanismTest.cs) (revision e05b8947a4f5a41c2cb8b3f5460daf20ab77b2c8) +++ Ringtoets/Asphalt/test/Ringtoets.Asphalt.Data.Test/WaveImpactAsphaltCoverFailureMechanismTest.cs (.../WaveImpactAsphaltCoverFailureMechanismTest.cs) (revision 35e7ce9a8fc466c028bf48609a7314f4f416583e) @@ -40,6 +40,7 @@ Assert.AreEqual("Dijken en dammen - Golfklappen op asfaltbekleding", failureMechanism.Name); Assert.AreEqual("AGK", failureMechanism.Code); CollectionAssert.IsEmpty(failureMechanism.Sections); + CollectionAssert.IsEmpty(failureMechanism.ForeShores); } [Test] Index: Ringtoets/Asphalt/test/Ringtoets.Asphalt.Plugin.Test/WaveImpactAsphaltCoverPluginTest.cs =================================================================== diff -u -re05b8947a4f5a41c2cb8b3f5460daf20ab77b2c8 -r35e7ce9a8fc466c028bf48609a7314f4f416583e --- Ringtoets/Asphalt/test/Ringtoets.Asphalt.Plugin.Test/WaveImpactAsphaltCoverPluginTest.cs (.../WaveImpactAsphaltCoverPluginTest.cs) (revision e05b8947a4f5a41c2cb8b3f5460daf20ab77b2c8) +++ Ringtoets/Asphalt/test/Ringtoets.Asphalt.Plugin.Test/WaveImpactAsphaltCoverPluginTest.cs (.../WaveImpactAsphaltCoverPluginTest.cs) (revision 35e7ce9a8fc466c028bf48609a7314f4f416583e) @@ -83,8 +83,9 @@ TreeNodeInfo[] treeNodeInfos = plugin.GetTreeNodeInfos().ToArray(); // Assert - Assert.AreEqual(2, treeNodeInfos.Length); + Assert.AreEqual(3, treeNodeInfos.Length); Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(WaveImpactAsphaltCoverFailureMechanismContext))); + Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(ForeShoresContext))); Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(FailureMechanismSectionResultContext))); } } Index: Ringtoets/Common/src/Ringtoets.Common.Data/DikeProfiles/ForeShore.cs =================================================================== diff -u --- Ringtoets/Common/src/Ringtoets.Common.Data/DikeProfiles/ForeShore.cs (revision 0) +++ Ringtoets/Common/src/Ringtoets.Common.Data/DikeProfiles/ForeShore.cs (revision 35e7ce9a8fc466c028bf48609a7314f4f416583e) @@ -0,0 +1,28 @@ +// 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. + +namespace Ringtoets.Common.Data.DikeProfiles +{ + /// + /// Definition for a foreshore for a failure mechanism. + /// + public class ForeShore {} +} \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj =================================================================== diff -u -r30b8231f92b90ea4b05e98e3d0285368f6dfe2e4 -r35e7ce9a8fc466c028bf48609a7314f4f416583e --- Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj (.../Ringtoets.Common.Data.csproj) (revision 30b8231f92b90ea4b05e98e3d0285368f6dfe2e4) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj (.../Ringtoets.Common.Data.csproj) (revision 35e7ce9a8fc466c028bf48609a7314f4f416583e) @@ -45,6 +45,7 @@ + Index: Ringtoets/Common/src/Ringtoets.Common.Forms/PresentationObjects/ForeShoresContext.cs =================================================================== diff -u --- Ringtoets/Common/src/Ringtoets.Common.Forms/PresentationObjects/ForeShoresContext.cs (revision 0) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/PresentationObjects/ForeShoresContext.cs (revision 35e7ce9a8fc466c028bf48609a7314f4f416583e) @@ -0,0 +1,40 @@ +// 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 Core.Common.Base; +using Core.Common.Controls.PresentationObjects; +using Ringtoets.Common.Data.DikeProfiles; + +namespace Ringtoets.Common.Forms.PresentationObjects +{ + /// + /// This is a presentation object for for elements + /// of type . + /// + public class ForeShoresContext : ObservableWrappedObjectContextBase> + { + /// + /// Initializes a new instance of the class. + /// + /// The observable list of foreshores. + public ForeShoresContext(ObservableList wrappedData) : base(wrappedData) {} + } +} \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Properties/Resources.Designer.cs =================================================================== diff -u -rf3b13cad3bbf455b19eee8eafe349a55a5cefdaa -r35e7ce9a8fc466c028bf48609a7314f4f416583e --- Ringtoets/Common/src/Ringtoets.Common.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision f3b13cad3bbf455b19eee8eafe349a55a5cefdaa) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 35e7ce9a8fc466c028bf48609a7314f4f416583e) @@ -22,7 +22,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.18444 +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -841,6 +841,15 @@ } /// + /// Looks up a localized string similar to Voorlanden. + /// + public static string Plugin_GetTreeNodeInfos_ForeShores { + get { + return ResourceManager.GetString("Plugin_GetTreeNodeInfos_ForeShores", resourceCulture); + } + } + + /// /// Looks up a localized string similar to De veiligheidsfactor voor deze berekening.. /// public static string ProbabilityAssessmentOutput_FactorOfSafety_Description { Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Properties/Resources.resx =================================================================== diff -u -rf3b13cad3bbf455b19eee8eafe349a55a5cefdaa -r35e7ce9a8fc466c028bf48609a7314f4f416583e --- Ringtoets/Common/src/Ringtoets.Common.Forms/Properties/Resources.resx (.../Resources.resx) (revision f3b13cad3bbf455b19eee8eafe349a55a5cefdaa) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Properties/Resources.resx (.../Resources.resx) (revision 35e7ce9a8fc466c028bf48609a7314f4f416583e) @@ -442,4 +442,7 @@ Genereer &berekeningen... + + Voorlanden + \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Ringtoets.Common.Forms.csproj =================================================================== diff -u -rb1b25abeb595bff11389bbf0e695851995ef5221 -r35e7ce9a8fc466c028bf48609a7314f4f416583e --- Ringtoets/Common/src/Ringtoets.Common.Forms/Ringtoets.Common.Forms.csproj (.../Ringtoets.Common.Forms.csproj) (revision b1b25abeb595bff11389bbf0e695851995ef5221) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Ringtoets.Common.Forms.csproj (.../Ringtoets.Common.Forms.csproj) (revision 35e7ce9a8fc466c028bf48609a7314f4f416583e) @@ -44,6 +44,7 @@ + Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/DikeProfiles/ForeShoreTest.cs =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.Data.Test/DikeProfiles/ForeShoreTest.cs (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/DikeProfiles/ForeShoreTest.cs (revision 35e7ce9a8fc466c028bf48609a7314f4f416583e) @@ -0,0 +1,28 @@ +// 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 NUnit.Framework; + +namespace Ringtoets.Common.Data.Test.DikeProfiles +{ + [TestFixture] + public class ForeShoreTest {} +} \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj =================================================================== diff -u -r30b8231f92b90ea4b05e98e3d0285368f6dfe2e4 -r35e7ce9a8fc466c028bf48609a7314f4f416583e --- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj (.../Ringtoets.Common.Data.Test.csproj) (revision 30b8231f92b90ea4b05e98e3d0285368f6dfe2e4) +++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj (.../Ringtoets.Common.Data.Test.csproj) (revision 35e7ce9a8fc466c028bf48609a7314f4f416583e) @@ -59,6 +59,7 @@ + Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PresentationObjects/ForeShoresContextTest.cs =================================================================== diff -u --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PresentationObjects/ForeShoresContextTest.cs (revision 0) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PresentationObjects/ForeShoresContextTest.cs (revision 35e7ce9a8fc466c028bf48609a7314f4f416583e) @@ -0,0 +1,59 @@ +// 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 Core.Common.Base; +using Core.Common.Controls.PresentationObjects; +using NUnit.Framework; +using Ringtoets.Common.Data.DikeProfiles; +using Ringtoets.Common.Forms.PresentationObjects; + +namespace Ringtoets.Common.Forms.Test.PresentationObjects +{ + [TestFixture] + public class ForeShoresContextTest + { + [Test] + public void Constructor_ValidValues_ExpectedValues() + { + // Setup + var foreshoresList = new ObservableList(); + + // Call + var context = new ForeShoresContext(foreshoresList); + + // Assert + Assert.IsInstanceOf>>(context); + Assert.AreSame(foreshoresList, context.WrappedData); + } + + [Test] + public void Constructor_ObservableListIsNull_ThrowArgumentNullException() + { + // Call + TestDelegate call = () => new ForeShoresContext(null); + + // Assert + string paramName = Assert.Throws(call).ParamName; + Assert.AreEqual("wrappedData", paramName); + } + } +} \ No newline at end of file Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Ringtoets.Common.Forms.Test.csproj =================================================================== diff -u -rb1b25abeb595bff11389bbf0e695851995ef5221 -r35e7ce9a8fc466c028bf48609a7314f4f416583e --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Ringtoets.Common.Forms.Test.csproj (.../Ringtoets.Common.Forms.Test.csproj) (revision b1b25abeb595bff11389bbf0e695851995ef5221) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Ringtoets.Common.Forms.Test.csproj (.../Ringtoets.Common.Forms.Test.csproj) (revision 35e7ce9a8fc466c028bf48609a7314f4f416583e) @@ -67,6 +67,7 @@ +