Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs =================================================================== diff -u -r5b1276bcb70296a150fd4a26fbf8867e6f8aa0f2 -re5f4a598d201934e48ab71795fb3b19cb9a960b1 --- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs (.../RingtoetsPlugin.cs) (revision 5b1276bcb70296a150fd4a26fbf8867e6f8aa0f2) +++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs (.../RingtoetsPlugin.cs) (revision e5f4a598d201934e48ab71795fb3b19cb9a960b1) @@ -72,7 +72,6 @@ using Ringtoets.Piping.Data; using Ringtoets.Piping.Forms.PresentationObjects; using Ringtoets.StabilityPointStructures.Data; -using Ringtoets.StabilityPointStructures.Forms.Views; using Ringtoets.StabilityStoneCover.Data; using Ringtoets.StabilityStoneCover.Forms.PresentationObjects; using Ringtoets.WaveImpactAsphaltCover.Data; @@ -379,9 +378,6 @@ yield return CreateFailureMechanismResultViewInfo< MacrostabilityOutwardsFailureMechanismSectionResult, MacrostabilityOutwardsResultView>(); - yield return CreateFailureMechanismResultViewInfo< - StabilityPointStructuresFailureMechanismSectionResult, - StabilityPointStructuresResultView>(); yield return new ViewInfo, ICommentable, CommentView> { @@ -623,7 +619,6 @@ yield return CreateFailureMechanismSectionResultTreeNodeInfo(); yield return CreateFailureMechanismSectionResultTreeNodeInfo(); yield return CreateFailureMechanismSectionResultTreeNodeInfo(); - yield return CreateFailureMechanismSectionResultTreeNodeInfo(); yield return new TreeNodeInfo> { Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Ringtoets.Integration.Forms.Test.csproj =================================================================== diff -u -r5b1276bcb70296a150fd4a26fbf8867e6f8aa0f2 -re5f4a598d201934e48ab71795fb3b19cb9a960b1 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Ringtoets.Integration.Forms.Test.csproj (.../Ringtoets.Integration.Forms.Test.csproj) (revision 5b1276bcb70296a150fd4a26fbf8867e6f8aa0f2) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Ringtoets.Integration.Forms.Test.csproj (.../Ringtoets.Integration.Forms.Test.csproj) (revision e5f4a598d201934e48ab71795fb3b19cb9a960b1) @@ -112,7 +112,6 @@ - Fisheye: Tag e5f4a598d201934e48ab71795fb3b19cb9a960b1 refers to a dead (removed) revision in file `Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/TreeNodeInfos/StabilityPointStructuresFailureMechanismSectionResultContextTreeNodeInfoTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/Ringtoets.Integration.Plugin.Test.csproj =================================================================== diff -u -r5b1276bcb70296a150fd4a26fbf8867e6f8aa0f2 -re5f4a598d201934e48ab71795fb3b19cb9a960b1 --- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/Ringtoets.Integration.Plugin.Test.csproj (.../Ringtoets.Integration.Plugin.Test.csproj) (revision 5b1276bcb70296a150fd4a26fbf8867e6f8aa0f2) +++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/Ringtoets.Integration.Plugin.Test.csproj (.../Ringtoets.Integration.Plugin.Test.csproj) (revision e5f4a598d201934e48ab71795fb3b19cb9a960b1) @@ -92,7 +92,6 @@ - Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsPluginTest.cs =================================================================== diff -u -r5b1276bcb70296a150fd4a26fbf8867e6f8aa0f2 -re5f4a598d201934e48ab71795fb3b19cb9a960b1 --- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsPluginTest.cs (.../RingtoetsPluginTest.cs) (revision 5b1276bcb70296a150fd4a26fbf8867e6f8aa0f2) +++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsPluginTest.cs (.../RingtoetsPluginTest.cs) (revision e5f4a598d201934e48ab71795fb3b19cb9a960b1) @@ -54,8 +54,6 @@ using Ringtoets.Integration.Forms.PropertyClasses; using Ringtoets.Integration.Forms.Views; using Ringtoets.Integration.Forms.Views.SectionResultViews; -using Ringtoets.StabilityPointStructures.Data; -using Ringtoets.StabilityPointStructures.Forms.Views; using RingtoetsFormsResources = Ringtoets.Integration.Forms.Properties.Resources; using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; using RingtoetsCommonServiceResources = Ringtoets.Common.Service.Properties.Resources; @@ -333,7 +331,7 @@ ViewInfo[] viewInfos = plugin.GetViewInfos().ToArray(); // Assert - Assert.AreEqual(16, viewInfos.Length); + Assert.AreEqual(15, viewInfos.Length); var contributionViewInfo = viewInfos.Single(vi => vi.DataType == typeof(FailureMechanismContributionContext)); Assert.AreEqual(typeof(FailureMechanismContributionView), contributionViewInfo.ViewType); @@ -371,11 +369,6 @@ Assert.AreEqual(typeof(MacrostabilityInwardsResultView), macrostabilityInwardsResultViewInfo.ViewType); TestHelper.AssertImagesAreEqual(RingtoetsCommonFormsResources.FailureMechanismSectionResultIcon, macrostabilityInwardsResultViewInfo.Image); - var stabilityPointStructuresResultViewInfo = viewInfos.Single(vi => vi.DataType == typeof(FailureMechanismSectionResultContext)); - Assert.AreEqual(typeof(IEnumerable), stabilityPointStructuresResultViewInfo.ViewDataType); - Assert.AreEqual(typeof(StabilityPointStructuresResultView), stabilityPointStructuresResultViewInfo.ViewType); - TestHelper.AssertImagesAreEqual(RingtoetsCommonFormsResources.FailureMechanismSectionResultIcon, stabilityPointStructuresResultViewInfo.Image); - var duneErosionResultViewInfo = viewInfos.Single(vi => vi.DataType == typeof(FailureMechanismSectionResultContext)); Assert.AreEqual(typeof(IEnumerable), duneErosionResultViewInfo.ViewDataType); Assert.AreEqual(typeof(DuneErosionResultView), duneErosionResultViewInfo.ViewType); @@ -422,7 +415,7 @@ TreeNodeInfo[] treeNodeInfos = plugin.GetTreeNodeInfos().ToArray(); // Assert - Assert.AreEqual(26, treeNodeInfos.Length); + Assert.AreEqual(25, treeNodeInfos.Length); Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(AssessmentSection))); Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(ReferenceLineContext))); Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(FailureMechanismContext))); @@ -445,7 +438,6 @@ Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(FailureMechanismSectionResultContext))); Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(FailureMechanismSectionResultContext))); Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(FailureMechanismSectionResultContext))); - Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(FailureMechanismSectionResultContext))); Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(CommentContext))); Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(ProbabilityAssessmentOutput))); Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(RingtoetsProject))); Fisheye: Tag e5f4a598d201934e48ab71795fb3b19cb9a960b1 refers to a dead (removed) revision in file `Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/ViewInfos/StabilityPointStructuresResultViewInfoTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PresentationObjects/StabilityPointStructuresFailureMechanismContext.cs =================================================================== diff -u --- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PresentationObjects/StabilityPointStructuresFailureMechanismContext.cs (revision 0) +++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PresentationObjects/StabilityPointStructuresFailureMechanismContext.cs (revision e5f4a598d201934e48ab71795fb3b19cb9a960b1) @@ -0,0 +1,43 @@ +// 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.Common.Data.AssessmentSection; +using Ringtoets.Common.Forms.PresentationObjects; +using Ringtoets.StabilityPointStructures.Data; + +namespace Ringtoets.StabilityPointStructures.Forms.PresentationObjects +{ + /// + /// This class is a presentation object for an instance of . + /// + public class StabilityPointStructuresFailureMechanismContext : FailureMechanismContext + { + /// + /// Initializes a new instance of the class. + /// + /// The instance wrapped by this context object. + /// The assessment section which the failure mechanism belongs to. + /// When any input argument is null. + public StabilityPointStructuresFailureMechanismContext(StabilityPointStructuresFailureMechanism failureMechanism, IAssessmentSection assessmentSection) + : base(failureMechanism, assessmentSection) {} + } +} \ No newline at end of file Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/Ringtoets.StabilityPointStructures.Forms.csproj =================================================================== diff -u -rae14c5d4e4624fa87390e6d63bb419c648e12dda -re5f4a598d201934e48ab71795fb3b19cb9a960b1 --- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/Ringtoets.StabilityPointStructures.Forms.csproj (.../Ringtoets.StabilityPointStructures.Forms.csproj) (revision ae14c5d4e4624fa87390e6d63bb419c648e12dda) +++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/Ringtoets.StabilityPointStructures.Forms.csproj (.../Ringtoets.StabilityPointStructures.Forms.csproj) (revision e5f4a598d201934e48ab71795fb3b19cb9a960b1) @@ -40,11 +40,12 @@ Properties\GlobalAssembly.cs + - + UserControl - + Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/Views/StabilityPointStructuresFailureMechanismResultView.cs =================================================================== diff -u --- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/Views/StabilityPointStructuresFailureMechanismResultView.cs (revision 0) +++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/Views/StabilityPointStructuresFailureMechanismResultView.cs (revision e5f4a598d201934e48ab71795fb3b19cb9a960b1) @@ -0,0 +1,61 @@ +// 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.Utils.Reflection; +using Ringtoets.Common.Forms.Views; +using Ringtoets.StabilityPointStructures.Data; +using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; + +namespace Ringtoets.StabilityPointStructures.Forms.Views +{ + /// + /// The view for a collection of . + /// + public class StabilityPointStructuresFailureMechanismResultView : FailureMechanismResultView + { + /// + /// Creates a new instance of . + /// + public StabilityPointStructuresFailureMechanismResultView() + { + AddDataGridColumns(); + } + + protected override object CreateFailureMechanismSectionResultRow(StabilityPointStructuresFailureMechanismSectionResult sectionResult) + { + return new StabilityPointStructuresFailureMechanismSectionResultRow(sectionResult); + } + + private void AddDataGridColumns() + { + DataGridViewControl.AddTextBoxColumn( + TypeUtils.GetMemberName(sr => sr.Name), + RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Section_name, + true); + DataGridViewControl.AddTextBoxColumn( + TypeUtils.GetMemberName(sr => sr.AssessmentLayerTwoA), + RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_two_a); + DataGridViewControl.AddTextBoxColumn( + TypeUtils.GetMemberName(sr => sr.AssessmentLayerThree), + RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_three); + } + } +} \ No newline at end of file Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/Views/StabilityPointStructuresFailureMechanismSectionResultRow.cs =================================================================== diff -u --- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/Views/StabilityPointStructuresFailureMechanismSectionResultRow.cs (revision 0) +++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/Views/StabilityPointStructuresFailureMechanismSectionResultRow.cs (revision e5f4a598d201934e48ab71795fb3b19cb9a960b1) @@ -0,0 +1,98 @@ +// 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 System.ComponentModel; +using Core.Common.Base.Data; +using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Forms.TypeConverters; +using Ringtoets.StabilityPointStructures.Data; + +namespace Ringtoets.StabilityPointStructures.Forms.Views +{ + /// + /// Class for displaying as a row in a grid view. + /// + public class StabilityPointStructuresFailureMechanismSectionResultRow + { + private readonly StabilityPointStructuresFailureMechanismSectionResult sectionResult; + + /// + /// Creates a new instance of . + /// + /// The to wrap + /// so that it can be displayed as a row. + /// Thrown when is null. + public StabilityPointStructuresFailureMechanismSectionResultRow(StabilityPointStructuresFailureMechanismSectionResult sectionResult) + { + if (sectionResult == null) + { + throw new ArgumentNullException("sectionResult"); + } + this.sectionResult = sectionResult; + } + + /// + /// Gets the name of the . + /// + public string Name + { + get + { + return sectionResult.Section.Name; + } + } + + /// + /// Gets or sets the value representing the result of the . + /// + /// Thrown when is + /// not in the range [0,1]. + [TypeConverter(typeof(FailureMechanismSectionResultNoProbabilityValueDoubleConverter))] + public double AssessmentLayerTwoA + { + get + { + return sectionResult.AssessmentLayerTwoA; + } + set + { + sectionResult.AssessmentLayerTwoA = value; + } + } + + /// + /// Gets or sets the value representing the result of the . + /// + [TypeConverter(typeof(NoValueRoundedDoubleConverter))] + public RoundedDouble AssessmentLayerThree + { + get + { + return sectionResult.AssessmentLayerThree; + } + set + { + sectionResult.AssessmentLayerThree = value; + } + } + } +} \ No newline at end of file Fisheye: Tag e5f4a598d201934e48ab71795fb3b19cb9a960b1 refers to a dead (removed) revision in file `Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/Views/StabilityPointStructuresResultView.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag e5f4a598d201934e48ab71795fb3b19cb9a960b1 refers to a dead (removed) revision in file `Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/Views/StabilityPointStructuresSectionResultRow.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Plugin/Ringtoets.StabilityPointStructures.Plugin.csproj =================================================================== diff -u -rca5e7dfd4081b7caffd668eb40fe80ea20da6862 -re5f4a598d201934e48ab71795fb3b19cb9a960b1 --- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Plugin/Ringtoets.StabilityPointStructures.Plugin.csproj (.../Ringtoets.StabilityPointStructures.Plugin.csproj) (revision ca5e7dfd4081b7caffd668eb40fe80ea20da6862) +++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Plugin/Ringtoets.StabilityPointStructures.Plugin.csproj (.../Ringtoets.StabilityPointStructures.Plugin.csproj) (revision e5f4a598d201934e48ab71795fb3b19cb9a960b1) @@ -34,18 +34,63 @@ + + Properties\GlobalAssembly.cs + Copying.licenseheader + + + {3bbfd65b-b277-4e50-ae6d-bd24c3434609} + Core.Common.Base + False + + + {1D27F91F-4E62-4EAF-A0A8-A32708B9A9B1} + Core.Common.Controls.TreeView + False + + + {9a2d67e6-26ac-4d17-b11a-2b4372f2f572} + Core.Common.Controls + False + + + {30E4C2AE-719E-4D70-9FA9-668A9767FBFA} + Core.Common.Gui + False + + + {D4200F43-3F72-4F42-AF0A-8CED416A38EC} + Ringtoets.Common.Data + False + + + {4D840673-3812-4338-A352-84854E32B8A0} + Ringtoets.Common.Forms + False + + + {3D4B9740-8348-4434-8D77-B611FC6EE57F} + Ringtoets.StabilityPointStructures.Data + False + + + {D5F0A6B0-8710-4345-ABA1-D934C8E6783D} + Ringtoets.StabilityPointStructures.Forms + False + + + \ No newline at end of file Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Plugin.Test/Ringtoets.StabilityPointStructures.Plugin.Test.csproj =================================================================== diff -u -rca5e7dfd4081b7caffd668eb40fe80ea20da6862 -re5f4a598d201934e48ab71795fb3b19cb9a960b1 --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Plugin.Test/Ringtoets.StabilityPointStructures.Plugin.Test.csproj (.../Ringtoets.StabilityPointStructures.Plugin.Test.csproj) (revision ca5e7dfd4081b7caffd668eb40fe80ea20da6862) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Plugin.Test/Ringtoets.StabilityPointStructures.Plugin.Test.csproj (.../Ringtoets.StabilityPointStructures.Plugin.Test.csproj) (revision e5f4a598d201934e48ab71795fb3b19cb9a960b1) @@ -37,20 +37,75 @@ none + + ..\..\..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll + True + + + ..\..\..\..\packages\RhinoMocks.3.6.1\lib\net\Rhino.Mocks.dll + True + + + Properties\GlobalAssembly.cs + + Copying.licenseheader + + + + {3bbfd65b-b277-4e50-ae6d-bd24c3434609} + Core.Common.Base + + + {1D27F91F-4E62-4EAF-A0A8-A32708B9A9B1} + Core.Common.Controls.TreeView + + + {9a2d67e6-26ac-4d17-b11a-2b4372f2f572} + Core.Common.Controls + + + {30E4C2AE-719E-4D70-9FA9-668A9767FBFA} + Core.Common.Gui + + + {D749EE4C-CE50-4C17-BF01-9A953028C126} + Core.Common.TestUtil + + + {D4200F43-3F72-4F42-AF0A-8CED416A38EC} + Ringtoets.Common.Data + + + {4d840673-3812-4338-a352-84854e32b8a0} + Ringtoets.Common.Forms + + + {3D4B9740-8348-4434-8D77-B611FC6EE57F} + Ringtoets.StabilityPointStructures.Data + + + {D5F0A6B0-8710-4345-ABA1-D934C8E6783D} + Ringtoets.StabilityPointStructures.Forms + + + {E3DF5559-97D9-4038-BBE6-2E3DFB4F4C68} + Ringtoets.StabilityPointStructures.Plugin + + + + + + \ No newline at end of file