Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/FailureMechanismBaseCreateExtensions.cs
===================================================================
diff -u -r209bfd7b71ef53a57e1a52337f1333d38122282f -r41fac7fff0a505c08945108d795dcb877f10b816
--- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/FailureMechanismBaseCreateExtensions.cs (.../FailureMechanismBaseCreateExtensions.cs) (revision 209bfd7b71ef53a57e1a52337f1333d38122282f)
+++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/FailureMechanismBaseCreateExtensions.cs (.../FailureMechanismBaseCreateExtensions.cs) (revision 41fac7fff0a505c08945108d795dcb877f10b816)
@@ -27,12 +27,12 @@
namespace Application.Ringtoets.Storage.Create
{
///
- /// Extension methods for related to creating a .
+ /// Extension methods for related to creating a .
///
internal static class FailureMechanismBaseCreateExtensions
{
///
- /// Creates a based on the information of the .
+ /// Creates a based on the information of the .
///
/// The failure mechanism to create a database entity for.
/// The type of the failure mechanism that is being created.
@@ -59,7 +59,7 @@
}
///
- /// Creates instances based on the information of the .
+ /// Creates instances based on the information of the .
///
/// The failure mechanism to create a database failure mechanism section entities for.
/// The object keeping track of create operations.
Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Update/FailureMechanismBaseUpdateExtensions.cs
===================================================================
diff -u -r64d5609bb2912cd52dc74deffdd189222e240599 -r41fac7fff0a505c08945108d795dcb877f10b816
--- Application/Ringtoets/src/Application.Ringtoets.Storage/Update/FailureMechanismBaseUpdateExtensions.cs (.../FailureMechanismBaseUpdateExtensions.cs) (revision 64d5609bb2912cd52dc74deffdd189222e240599)
+++ Application/Ringtoets/src/Application.Ringtoets.Storage/Update/FailureMechanismBaseUpdateExtensions.cs (.../FailureMechanismBaseUpdateExtensions.cs) (revision 41fac7fff0a505c08945108d795dcb877f10b816)
@@ -27,13 +27,13 @@
namespace Application.Ringtoets.Storage.Update
{
///
- /// Extension methods for related to updating a .
+ /// Extension methods for related to updating a .
///
internal static class FailureMechanismBaseUpdateExtensions
{
///
/// Updates instances of a
- /// based on the sections defined on the .
+ /// based on the sections defined on the .
///
/// The failure mechanism to update the database failure mechanism section entities for.
/// The object keeping track of update operations.
Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/FailureMechanismBaseCreateExtensionsTest.cs
===================================================================
diff -u -r246ebb0ea665a568e9073717d4211816220ff0fc -r41fac7fff0a505c08945108d795dcb877f10b816
--- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/FailureMechanismBaseCreateExtensionsTest.cs (.../FailureMechanismBaseCreateExtensionsTest.cs) (revision 246ebb0ea665a568e9073717d4211816220ff0fc)
+++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/FailureMechanismBaseCreateExtensionsTest.cs (.../FailureMechanismBaseCreateExtensionsTest.cs) (revision 41fac7fff0a505c08945108d795dcb877f10b816)
@@ -90,7 +90,7 @@
Assert.AreEqual(1, failureMechanismEntity.FailureMechanismSectionEntities.Count);
}
- private class TestFailureMechanism : FailureMechanismBase
+ private class TestFailureMechanism : FailureMechanismBase
{
public TestFailureMechanism() : base("name", "code")
{ }
@@ -102,11 +102,6 @@
throw new NotImplementedException();
}
}
-
- protected override FailureMechanismSectionResult CreateFailureMechanismSectionResult(FailureMechanismSection section)
- {
- return new FailureMechanismSectionResult(section);
- }
}
}
}
\ No newline at end of file
Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Update/FailureMechanismBaseUpdateExtensionsTest.cs
===================================================================
diff -u -r35408ec0912670519b01cff44a19a3e2fb12d8d6 -r41fac7fff0a505c08945108d795dcb877f10b816
--- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Update/FailureMechanismBaseUpdateExtensionsTest.cs (.../FailureMechanismBaseUpdateExtensionsTest.cs) (revision 35408ec0912670519b01cff44a19a3e2fb12d8d6)
+++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Update/FailureMechanismBaseUpdateExtensionsTest.cs (.../FailureMechanismBaseUpdateExtensionsTest.cs) (revision 41fac7fff0a505c08945108d795dcb877f10b816)
@@ -167,7 +167,7 @@
}
}
- public class TestFailureMechanism : FailureMechanismBase
+ public class TestFailureMechanism : FailureMechanismBase
{
public TestFailureMechanism() : base("name", "code")
{}
@@ -179,10 +179,5 @@
throw new NotImplementedException();
}
}
-
- protected override FailureMechanismSectionResult CreateFailureMechanismSectionResult(FailureMechanismSection section)
- {
- return new FailureMechanismSectionResult(section);
- }
}
}
\ No newline at end of file
Index: Core/Common/test/Core.Common.Gui.Test/ContextMenu/ContextMenuBuilderTest.cs
===================================================================
diff -u -ref1c61d94f2aec3b4ff32fcf03253d7ad386c8e5 -r41fac7fff0a505c08945108d795dcb877f10b816
--- Core/Common/test/Core.Common.Gui.Test/ContextMenu/ContextMenuBuilderTest.cs (.../ContextMenuBuilderTest.cs) (revision ef1c61d94f2aec3b4ff32fcf03253d7ad386c8e5)
+++ Core/Common/test/Core.Common.Gui.Test/ContextMenu/ContextMenuBuilderTest.cs (.../ContextMenuBuilderTest.cs) (revision 41fac7fff0a505c08945108d795dcb877f10b816)
@@ -1,4 +1,25 @@
-using System.Windows.Forms;
+// 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 Lesser 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 Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser 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.Windows.Forms;
using Core.Common.Controls.TreeView;
using Core.Common.Gui.Commands;
using Core.Common.Gui.ContextMenu;
Index: Ringtoets/Common/src/Ringtoets.Common.Data/Contribution/OtherFailureMechanism.cs
===================================================================
diff -u -r209bfd7b71ef53a57e1a52337f1333d38122282f -r41fac7fff0a505c08945108d795dcb877f10b816
--- Ringtoets/Common/src/Ringtoets.Common.Data/Contribution/OtherFailureMechanism.cs (.../OtherFailureMechanism.cs) (revision 209bfd7b71ef53a57e1a52337f1333d38122282f)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/Contribution/OtherFailureMechanism.cs (.../OtherFailureMechanism.cs) (revision 41fac7fff0a505c08945108d795dcb877f10b816)
@@ -30,7 +30,7 @@
/// This class represents a failure mechanism which has no representative within Ringtoets but
/// contributes to the overall verdict nonetheless.
///
- public class OtherFailureMechanism : FailureMechanismBase
+ public class OtherFailureMechanism : FailureMechanismBase
{
///
/// Creates a new instance of .
@@ -44,10 +44,5 @@
yield break;
}
}
-
- protected override FailureMechanismSectionResult CreateFailureMechanismSectionResult(FailureMechanismSection section)
- {
- return null;
- }
}
}
\ No newline at end of file
Index: Ringtoets/Common/src/Ringtoets.Common.Data/FailureMechanism/AssessmentLayerTwoAResult.cs
===================================================================
diff -u
--- Ringtoets/Common/src/Ringtoets.Common.Data/FailureMechanism/AssessmentLayerTwoAResult.cs (revision 0)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/FailureMechanism/AssessmentLayerTwoAResult.cs (revision 41fac7fff0a505c08945108d795dcb877f10b816)
@@ -0,0 +1,36 @@
+// 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.Attributes;
+using Ringtoets.Common.Data.Properties;
+
+namespace Ringtoets.Common.Data.FailureMechanism
+{
+ public enum AssessmentLayerTwoAResult
+ {
+ [ResourcesDisplayName(typeof(Resources), "AssessmentLayerTwoAResult_NotCalculated")]
+ NotCalculated,
+ [ResourcesDisplayName(typeof(Resources), "AssessmentLayerTwoAResult_Failed")]
+ Failed,
+ [ResourcesDisplayName(typeof(Resources), "AssessmentLayerTwoAResult_Successful")]
+ Successful
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/src/Ringtoets.Common.Data/FailureMechanism/CustomFailureMechanismSectionResult.cs
===================================================================
diff -u
--- Ringtoets/Common/src/Ringtoets.Common.Data/FailureMechanism/CustomFailureMechanismSectionResult.cs (revision 0)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/FailureMechanism/CustomFailureMechanismSectionResult.cs (revision 41fac7fff0a505c08945108d795dcb877f10b816)
@@ -0,0 +1,58 @@
+// 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.Data;
+
+namespace Ringtoets.Common.Data.FailureMechanism
+{
+ ///
+ /// Class which represents a result for a failure mechanism section with a custom outcome
+ /// of a layer 2a assessment.
+ ///
+ public class CustomFailureMechanismSectionResult: FailureMechanismSectionResult
+ {
+ ///
+ /// Creates a new instance of
+ ///
+ /// The section for which to add the result.
+ public CustomFailureMechanismSectionResult(FailureMechanismSection section) : base(section) { }
+
+ ///
+ /// Gets or sets the state of the assessment layer one.
+ ///
+ public bool AssessmentLayerOne { get; set; }
+
+ ///
+ /// Gets the value of assessment layer two a.
+ ///
+ public RoundedDouble AssessmentLayerTwoA { get; set; }
+
+ ///
+ /// Gets or sets the value of assessment layer two b.
+ ///
+ public RoundedDouble AssessmentLayerTwoB { get; set; }
+
+ ///
+ /// Gets or sets the value of assessment layer three.
+ ///
+ public RoundedDouble AssessmentLayerThree { get; set; }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/src/Ringtoets.Common.Data/FailureMechanism/FailureMechanismBase.cs
===================================================================
diff -u -r209bfd7b71ef53a57e1a52337f1333d38122282f -r41fac7fff0a505c08945108d795dcb877f10b816
--- Ringtoets/Common/src/Ringtoets.Common.Data/FailureMechanism/FailureMechanismBase.cs (.../FailureMechanismBase.cs) (revision 209bfd7b71ef53a57e1a52337f1333d38122282f)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/FailureMechanism/FailureMechanismBase.cs (.../FailureMechanismBase.cs) (revision 41fac7fff0a505c08945108d795dcb877f10b816)
@@ -33,14 +33,13 @@
/// to implement can and should most likely inherit
/// from this class.
///
- public abstract class FailureMechanismBase : Observable, IFailureMechanism where T : FailureMechanismSectionResult
+ public abstract class FailureMechanismBase : Observable, IFailureMechanism
{
private readonly List sections;
private double contribution;
- private readonly IList sectionResults;
///
- /// Creates a new instance of the class.
+ /// Creates a new instance of the class.
///
/// The name of the failure mechanism.
/// The code of the failure mechanism.
@@ -57,7 +56,6 @@
Name = name;
Code = failureMechanismCode;
sections = new List();
- sectionResults = new List();
IsRelevant = true;
}
@@ -91,24 +89,13 @@
}
}
- ///
- /// Gets the failure mechanism section results.
- ///
- public IEnumerable SectionResults
- {
- get
- {
- return sectionResults;
- }
- }
-
public long StorageId { get; set; }
public string Comments { get; set; }
public bool IsRelevant { get; set; }
- public void AddSection(FailureMechanismSection section)
+ public virtual void AddSection(FailureMechanismSection section)
{
if (section == null)
{
@@ -123,16 +110,11 @@
{
InsertSectionWhileMaintainingConnectivityOrder(section);
}
-
- sectionResults.Add(CreateFailureMechanismSectionResult(section));
}
-
- protected abstract T CreateFailureMechanismSectionResult(FailureMechanismSection section);
-
- public void ClearAllSections()
+
+ public virtual void ClearAllSections()
{
sections.Clear();
- sectionResults.Clear();
}
private static void ValidateParameters(string failureMechanismName, string failureMechanismCode)
Index: Ringtoets/Common/src/Ringtoets.Common.Data/FailureMechanism/IHasSectionResults.cs
===================================================================
diff -u
--- Ringtoets/Common/src/Ringtoets.Common.Data/FailureMechanism/IHasSectionResults.cs (revision 0)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/FailureMechanism/IHasSectionResults.cs (revision 41fac7fff0a505c08945108d795dcb877f10b816)
@@ -0,0 +1,30 @@
+// 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.Collections.Generic;
+
+namespace Ringtoets.Common.Data.FailureMechanism
+{
+ public interface IHasSectionResults where T : FailureMechanismSectionResult
+ {
+ IEnumerable SectionResults { get; }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/src/Ringtoets.Common.Data/FailureMechanism/SimpleFailureMechanismSectionResult.cs
===================================================================
diff -u
--- Ringtoets/Common/src/Ringtoets.Common.Data/FailureMechanism/SimpleFailureMechanismSectionResult.cs (revision 0)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/FailureMechanism/SimpleFailureMechanismSectionResult.cs (revision 41fac7fff0a505c08945108d795dcb877f10b816)
@@ -0,0 +1,58 @@
+// 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.Data;
+
+namespace Ringtoets.Common.Data.FailureMechanism
+{
+ ///
+ /// Class which represents a result for a failure mechanism section with three possible outcomes
+ /// for a layer 2a assessment.
+ ///
+ public class SimpleFailureMechanismSectionResult : FailureMechanismSectionResult
+ {
+ ///
+ /// Creates a new instance of
+ ///
+ /// The section for which to add the result.
+ public SimpleFailureMechanismSectionResult(FailureMechanismSection section) : base(section) { }
+
+ ///
+ /// Gets or sets the state of the assessment layer one.
+ ///
+ public bool AssessmentLayerOne { get; set; }
+
+ ///
+ /// Gets the value of assessment layer two a.
+ ///
+ public AssessmentLayerTwoAResult AssessmentLayerTwoA { get; set; }
+
+ ///
+ /// Gets or sets the value of assessment layer two b.
+ ///
+ public RoundedDouble AssessmentLayerTwoB { get; set; }
+
+ ///
+ /// Gets or sets the value of assessment layer three.
+ ///
+ public RoundedDouble AssessmentLayerThree { get; set; }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.Designer.cs
===================================================================
diff -u -rd2f9b4f26f69988ea1c55caaa58af0831152458f -r41fac7fff0a505c08945108d795dcb877f10b816
--- Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision d2f9b4f26f69988ea1c55caaa58af0831152458f)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 41fac7fff0a505c08945108d795dcb877f10b816)
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
-// Runtime Version:4.0.30319.17929
+// Runtime Version:4.0.30319.34209
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -61,6 +61,33 @@
}
///
+ /// Looks up a localized string similar to Onvoldoende.
+ ///
+ public static string AssessmentLayerTwoAResult_Failed {
+ get {
+ return ResourceManager.GetString("AssessmentLayerTwoAResult_Failed", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Niet berekend.
+ ///
+ public static string AssessmentLayerTwoAResult_NotCalculated {
+ get {
+ return ResourceManager.GetString("AssessmentLayerTwoAResult_NotCalculated", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Voldoende.
+ ///
+ public static string AssessmentLayerTwoAResult_Successful {
+ get {
+ return ResourceManager.GetString("AssessmentLayerTwoAResult_Successful", resourceCulture);
+ }
+ }
+
+ ///
/// Looks up a localized string similar to Vak '{0}' sluit niet aan op de al gedefinieerde vakken van het toetsspoor..
///
public static string BaseFailureMechanism_AddSection_Section_0_must_connect_to_existing_sections {
Index: Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.resx
===================================================================
diff -u -rd2f9b4f26f69988ea1c55caaa58af0831152458f -r41fac7fff0a505c08945108d795dcb877f10b816
--- Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.resx (.../Resources.resx) (revision d2f9b4f26f69988ea1c55caaa58af0831152458f)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/Properties/Resources.resx (.../Resources.resx) (revision 41fac7fff0a505c08945108d795dcb877f10b816)
@@ -201,4 +201,13 @@
De waarde voor 'N' moet in interval [1,20] liggen.
+
+ Onvoldoende
+
+
+ Niet berekend
+
+
+ Voldoende
+
\ No newline at end of file
Index: Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj
===================================================================
diff -u -rd2f9b4f26f69988ea1c55caaa58af0831152458f -r41fac7fff0a505c08945108d795dcb877f10b816
--- Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj (.../Ringtoets.Common.Data.csproj) (revision d2f9b4f26f69988ea1c55caaa58af0831152458f)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj (.../Ringtoets.Common.Data.csproj) (revision 41fac7fff0a505c08945108d795dcb877f10b816)
@@ -50,6 +50,8 @@
+
+
@@ -58,6 +60,8 @@
+
+
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/PresentationObjects/FailureMechanismSectionResultContext.cs
===================================================================
diff -u -r64d5609bb2912cd52dc74deffdd189222e240599 -r41fac7fff0a505c08945108d795dcb877f10b816
--- Ringtoets/Common/src/Ringtoets.Common.Forms/PresentationObjects/FailureMechanismSectionResultContext.cs (.../FailureMechanismSectionResultContext.cs) (revision 64d5609bb2912cd52dc74deffdd189222e240599)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/PresentationObjects/FailureMechanismSectionResultContext.cs (.../FailureMechanismSectionResultContext.cs) (revision 41fac7fff0a505c08945108d795dcb877f10b816)
@@ -33,7 +33,7 @@
///
/// Creates a new instance of .
///
- /// The of to wrap.
+ /// The of to wrap.
/// The belongs to.
/// Thrown when or is null.
public FailureMechanismSectionResultContext(IEnumerable sectionResults, IFailureMechanism failureMechanism)
@@ -51,7 +51,7 @@
}
///
- /// Gets the wrapped of .
+ /// Gets the wrapped of .
///
public IEnumerable SectionResults { get; private set; }
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Ringtoets.Common.Forms.csproj
===================================================================
diff -u -r209bfd7b71ef53a57e1a52337f1333d38122282f -r41fac7fff0a505c08945108d795dcb877f10b816
--- Ringtoets/Common/src/Ringtoets.Common.Forms/Ringtoets.Common.Forms.csproj (.../Ringtoets.Common.Forms.csproj) (revision 209bfd7b71ef53a57e1a52337f1333d38122282f)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/Ringtoets.Common.Forms.csproj (.../Ringtoets.Common.Forms.csproj) (revision 41fac7fff0a505c08945108d795dcb877f10b816)
@@ -71,13 +71,14 @@
CommentView.cs
+ UserControlFailureMechanismResultView.cs
-
+
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Views/CustomFailureMechanismSectionResultRow.cs
===================================================================
diff -u
--- Ringtoets/Common/src/Ringtoets.Common.Forms/Views/CustomFailureMechanismSectionResultRow.cs (revision 0)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/Views/CustomFailureMechanismSectionResultRow.cs (revision 41fac7fff0a505c08945108d795dcb877f10b816)
@@ -0,0 +1,72 @@
+using Core.Common.Base.Data;
+using Ringtoets.Common.Data.FailureMechanism;
+
+namespace Ringtoets.Common.Forms.Views
+{
+ public class CustomFailureMechanismSectionResultRow
+ {
+ public CustomFailureMechanismSectionResultRow(CustomFailureMechanismSectionResult failureMechanismSectionResult)
+ {
+ FailureMechanismSectionResult = failureMechanismSectionResult;
+ }
+
+ private CustomFailureMechanismSectionResult FailureMechanismSectionResult { get; set; }
+
+ public string Name
+ {
+ get
+ {
+ return FailureMechanismSectionResult.Section.Name;
+ }
+ }
+
+ public bool AssessmentLayerOne
+ {
+ get
+ {
+ return FailureMechanismSectionResult.AssessmentLayerOne;
+ }
+ set
+ {
+ FailureMechanismSectionResult.AssessmentLayerOne = value;
+ FailureMechanismSectionResult.NotifyObservers();
+ }
+ }
+
+ public RoundedDouble AssessmentLayerTwoA
+ {
+ get
+ {
+ return FailureMechanismSectionResult.AssessmentLayerTwoA;
+ }
+ set
+ {
+ FailureMechanismSectionResult.AssessmentLayerTwoA = value;
+ }
+ }
+
+ public RoundedDouble AssessmentLayerTwoB
+ {
+ get
+ {
+ return FailureMechanismSectionResult.AssessmentLayerTwoB;
+ }
+ set
+ {
+ FailureMechanismSectionResult.AssessmentLayerTwoB = value;
+ }
+ }
+
+ public RoundedDouble AssessmentLayerThree
+ {
+ get
+ {
+ return FailureMechanismSectionResult.AssessmentLayerThree;
+ }
+ set
+ {
+ FailureMechanismSectionResult.AssessmentLayerThree = value;
+ }
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Views/FailureMechanismResultView.Designer.cs
===================================================================
diff -u -r64d5609bb2912cd52dc74deffdd189222e240599 -r41fac7fff0a505c08945108d795dcb877f10b816
--- Ringtoets/Common/src/Ringtoets.Common.Forms/Views/FailureMechanismResultView.Designer.cs (.../FailureMechanismResultView.Designer.cs) (revision 64d5609bb2912cd52dc74deffdd189222e240599)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/Views/FailureMechanismResultView.Designer.cs (.../FailureMechanismResultView.Designer.cs) (revision 41fac7fff0a505c08945108d795dcb877f10b816)
@@ -1,6 +1,6 @@
namespace Ringtoets.Common.Forms.Views
{
- partial class FailureMechanismResultView
+ partial class FailureMechanismResultView
{
///
/// Required designer variable.
@@ -15,25 +15,39 @@
///
private void InitializeComponent()
{
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
this.dataGridView = new System.Windows.Forms.DataGridView();
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
this.SuspendLayout();
//
// dataGridView
//
- this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+ this.dataGridView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells;
+ dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+ dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
+ dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
+ dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+ dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+ dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+ this.dataGridView.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
+ this.dataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.dataGridView.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnEnter;
this.dataGridView.Location = new System.Drawing.Point(0, 0);
this.dataGridView.Name = "dataGridView";
this.dataGridView.Size = new System.Drawing.Size(150, 150);
this.dataGridView.TabIndex = 0;
+ this.dataGridView.CellValidating += new System.Windows.Forms.DataGridViewCellValidatingEventHandler(this.DataGridViewCellValidating);
+ this.dataGridView.CurrentCellDirtyStateChanged += new System.EventHandler(this.DataGridViewCurrentCellDirtyStateChanged);
+ this.dataGridView.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.DataGridViewDataError);
//
// FailureMechanismResultView
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.dataGridView);
- this.Name = "PipingFailureMechanismResultView";
+ this.Name = "FailureMechanismResultView";
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).EndInit();
this.ResumeLayout(false);
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Views/FailureMechanismResultView.cs
===================================================================
diff -u -r209bfd7b71ef53a57e1a52337f1333d38122282f -r41fac7fff0a505c08945108d795dcb877f10b816
--- Ringtoets/Common/src/Ringtoets.Common.Forms/Views/FailureMechanismResultView.cs (.../FailureMechanismResultView.cs) (revision 209bfd7b71ef53a57e1a52337f1333d38122282f)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/Views/FailureMechanismResultView.cs (.../FailureMechanismResultView.cs) (revision 41fac7fff0a505c08945108d795dcb877f10b816)
@@ -34,14 +34,11 @@
///
/// The view for the .
///
- public partial class FailureMechanismResultView : UserControl, IView
+ public abstract partial class FailureMechanismResultView : UserControl, IView where T : FailureMechanismSectionResult
{
- private readonly Observer failureMechanismObserver;
- private readonly RecursiveObserver, FailureMechanismSectionResult> failureMechanismSectionResultObserver;
+ private IEnumerable failureMechanismSectionResult;
+ private IFailureMechanism failureMechanism;
- private IEnumerable failureMechanismSectionResult;
- private FailureMechanismBase failureMechanism;
-
///
/// Creates a new instance of .
///
@@ -50,25 +47,19 @@
InitializeComponent();
InitializeDataGridView();
- failureMechanismObserver = new Observer(UpdataDataGridViewDataSource);
- failureMechanismSectionResultObserver = new RecursiveObserver, FailureMechanismSectionResult>(RefreshDataGridView, mechanism => mechanism.SectionResults);
+ FailureMechanismObserver = new Observer(UpdataDataGridViewDataSource);
+ FailureMechanismSectionResultObservers = new List();
}
///
/// Gets or sets the failure mechanism.
///
public IFailureMechanism FailureMechanism
{
- get
- {
- return failureMechanism;
- }
set
{
- failureMechanism = value as FailureMechanismBase;
-
- failureMechanismObserver.Observable = failureMechanism;
- failureMechanismSectionResultObserver.Observable = failureMechanism;
+ failureMechanism = value;
+ FailureMechanismObserver.Observable = failureMechanism;
}
}
@@ -80,7 +71,7 @@
}
set
{
- failureMechanismSectionResult = value as IEnumerable;
+ FailureMechanismSectionResult = value as IEnumerable;
if (failureMechanismSectionResult != null)
{
@@ -96,34 +87,19 @@
protected override void Dispose(bool disposing)
{
FailureMechanism = null;
+ FailureMechanismSectionResult = null;
+ if (FailureMechanismObserver != null)
+ {
+ FailureMechanismObserver.Dispose();
+ }
- failureMechanismObserver.Dispose();
- failureMechanismSectionResultObserver.Dispose();
-
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
- private void InitializeDataGridView()
- {
- dataGridView.CurrentCellDirtyStateChanged += DataGridViewCurrentCellDirtyStateChanged;
- dataGridView.CellValidating += DataGridViewCellValidating;
- dataGridView.DataError += DataGridViewDataError;
- dataGridView.GotFocus += DataGridViewGotFocus;
-
- dataGridView.AutoGenerateColumns = false;
- dataGridView.Columns.AddRange(GetDataGridColumns().ToArray());
-
- foreach (var column in dataGridView.Columns.OfType())
- {
- column.AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells;
- column.HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter;
- }
- }
-
protected virtual IEnumerable GetDataGridColumns()
{
yield return new DataGridViewTextBoxColumn
@@ -134,29 +110,75 @@
};
}
- private void UpdataDataGridViewDataSource()
+ protected void UpdataDataGridViewDataSource()
{
EndEdit();
- dataGridView.DataSource = failureMechanismSectionResult.Select(sr => new FailureMechanismSectionResultRow(sr)).ToList();
+ dataGridView.DataSource = failureMechanismSectionResult.Select(sr => CreateFailureMechanismSectionResultRow(sr)).ToList();
}
+ protected abstract object CreateFailureMechanismSectionResultRow(T sectionResult);
+
+ protected void RefreshDataGridView()
+ {
+ dataGridView.Refresh();
+ dataGridView.AutoResizeColumns();
+ }
+
+ private IList FailureMechanismSectionResultObservers { get; set; }
+ private Observer FailureMechanismObserver { get; set; }
+
+ private IEnumerable FailureMechanismSectionResult
+ {
+ set
+ {
+ ClearSectionResultObservers();
+ failureMechanismSectionResult = value;
+
+ if (failureMechanismSectionResult != null)
+ {
+ AddSectionResultObservers();
+ }
+ }
+ }
+
+ private void AddSectionResultObservers()
+ {
+ foreach (var sectionResult in failureMechanismSectionResult)
+ {
+ FailureMechanismSectionResultObservers.Add(new Observer(RefreshDataGridView)
+ {
+ Observable = sectionResult
+ });
+ }
+ }
+
+ private void ClearSectionResultObservers()
+ {
+ foreach (var observer in FailureMechanismSectionResultObservers)
+ {
+ observer.Dispose();
+ }
+ FailureMechanismSectionResultObservers.Clear();
+ }
+
+ private void InitializeDataGridView()
+ {
+ dataGridView.GotFocus += DataGridViewGotFocus;
+ dataGridView.AutoGenerateColumns = false;
+ dataGridView.Columns.AddRange(GetDataGridColumns().ToArray());
+ }
+
private void EndEdit()
{
if (dataGridView.IsCurrentCellInEditMode)
{
dataGridView.CancelEdit();
- dataGridView.EndEdit();
+ dataGridView.EndEdit();
dataGridView.CurrentCell = null;
}
}
- private void RefreshDataGridView()
- {
- dataGridView.Refresh();
- dataGridView.AutoResizeColumns();
- }
-
#region Event handling
private void DataGridViewCurrentCellDirtyStateChanged(object sender, EventArgs e)
Fisheye: Tag 41fac7fff0a505c08945108d795dcb877f10b816 refers to a dead (removed) revision in file `Ringtoets/Common/src/Ringtoets.Common.Forms/Views/FailureMechanismSectionResultRow.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Views/SimpleFailureMechanismSectionResultRow.cs
===================================================================
diff -u
--- Ringtoets/Common/src/Ringtoets.Common.Forms/Views/SimpleFailureMechanismSectionResultRow.cs (revision 0)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/Views/SimpleFailureMechanismSectionResultRow.cs (revision 41fac7fff0a505c08945108d795dcb877f10b816)
@@ -0,0 +1,74 @@
+using System;
+using System.Reflection;
+using Core.Common.Base.Data;
+using Ringtoets.Common.Data.FailureMechanism;
+
+namespace Ringtoets.Common.Forms.Views
+{
+ public class SimpleFailureMechanismSectionResultRow
+ {
+ public SimpleFailureMechanismSectionResultRow(SimpleFailureMechanismSectionResult failureMechanismSectionResult)
+ {
+ FailureMechanismSectionResult = failureMechanismSectionResult;
+ }
+
+ private SimpleFailureMechanismSectionResult FailureMechanismSectionResult { get; set; }
+
+ public string Name
+ {
+ get
+ {
+ return FailureMechanismSectionResult.Section.Name;
+ }
+ }
+
+ public bool AssessmentLayerOne
+ {
+ get
+ {
+ return FailureMechanismSectionResult.AssessmentLayerOne;
+ }
+ set
+ {
+ FailureMechanismSectionResult.AssessmentLayerOne = value;
+ FailureMechanismSectionResult.NotifyObservers();
+ }
+ }
+
+ public AssessmentLayerTwoAResult AssessmentLayerTwoA
+ {
+ get
+ {
+ return FailureMechanismSectionResult.AssessmentLayerTwoA;
+ }
+ set
+ {
+ FailureMechanismSectionResult.AssessmentLayerTwoA = value;
+ }
+ }
+
+ public RoundedDouble AssessmentLayerTwoB
+ {
+ get
+ {
+ return FailureMechanismSectionResult.AssessmentLayerTwoB;
+ }
+ set
+ {
+ FailureMechanismSectionResult.AssessmentLayerTwoB = value;
+ }
+ }
+
+ public RoundedDouble AssessmentLayerThree
+ {
+ get
+ {
+ return FailureMechanismSectionResult.AssessmentLayerThree;
+ }
+ set
+ {
+ FailureMechanismSectionResult.AssessmentLayerThree = value;
+ }
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Contribution/OtherFailureMechanismTest.cs
===================================================================
diff -u -r266b001fc7fcb405383d2411a970efa735e3c66d -r41fac7fff0a505c08945108d795dcb877f10b816
--- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Contribution/OtherFailureMechanismTest.cs (.../OtherFailureMechanismTest.cs) (revision 266b001fc7fcb405383d2411a970efa735e3c66d)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Contribution/OtherFailureMechanismTest.cs (.../OtherFailureMechanismTest.cs) (revision 41fac7fff0a505c08945108d795dcb877f10b816)
@@ -37,7 +37,7 @@
// Assert
Assert.AreEqual("Overig", result.Name);
Assert.AreEqual("NWOoc", result.Code);
- Assert.IsInstanceOf>(result);
+ Assert.IsInstanceOf(result);
CollectionAssert.IsEmpty(result.Calculations);
}
}
Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/FailureMechanism/FailureMechanismBaseTest.cs
===================================================================
diff -u -r209bfd7b71ef53a57e1a52337f1333d38122282f -r41fac7fff0a505c08945108d795dcb877f10b816
--- Ringtoets/Common/test/Ringtoets.Common.Data.Test/FailureMechanism/FailureMechanismBaseTest.cs (.../FailureMechanismBaseTest.cs) (revision 209bfd7b71ef53a57e1a52337f1333d38122282f)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/FailureMechanism/FailureMechanismBaseTest.cs (.../FailureMechanismBaseTest.cs) (revision 41fac7fff0a505c08945108d795dcb877f10b816)
@@ -258,60 +258,6 @@
}
[Test]
- public void AddSection_SectionValid_SectionAddedSectionResults()
- {
- // Setup
- var failureMechanism = new SimpleFailureMechanismBase();
-
- var section = new FailureMechanismSection("A", new[]
- {
- new Point2D(1, 2),
- new Point2D(3, 4)
- });
-
- // Precondition
- Assert.AreEqual(0, failureMechanism.SectionResults.Count());
-
- // Call
- failureMechanism.AddSection(section);
-
- // Assert
- Assert.AreEqual(1, failureMechanism.SectionResults.Count());
- }
-
- [Test]
- public void SectionResults_Always_ReturnsExpectedSectionResultsAfterAddingSections()
- {
- // Setup
- var failureMechanism = new SimpleFailureMechanismBase();
-
- var section = new FailureMechanismSection("A", new[]
- {
- new Point2D(1, 2),
- new Point2D(3, 4)
- });
-
- var section2 = new FailureMechanismSection("B", new[]
- {
- new Point2D(3, 4),
- new Point2D(7, 8)
- });
-
- failureMechanism.AddSection(section);
- failureMechanism.AddSection(section2);
-
- // Call
- var data = failureMechanism.SectionResults.ToList();
-
- // Assert
- CollectionAssert.AreEqual(new[]
- {
- section,
- section2
- }, data.Select(d => d.Section));
- }
-
- [Test]
public void ClearAllSections_HasSections_ClearSections()
{
// Setup
@@ -331,7 +277,7 @@
CollectionAssert.IsEmpty(failureMechanism.Sections);
}
- private class SimpleFailureMechanismBase : FailureMechanismBase
+ private class SimpleFailureMechanismBase : FailureMechanismBase
{
public SimpleFailureMechanismBase(string name = "SomeName", string failureMechanismCode = "SomeCode") : base(name, failureMechanismCode) {}
@@ -342,11 +288,6 @@
throw new NotImplementedException();
}
}
-
- protected override FailureMechanismSectionResult CreateFailureMechanismSectionResult(FailureMechanismSection section)
- {
- return new FailureMechanismSectionResult(section);
- }
}
}
}
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/TreeNodeInfos/RingtoetsContextMenuBuilderTest.cs
===================================================================
diff -u -ra3357275af675af3714fc89b99c554c288759ae2 -r41fac7fff0a505c08945108d795dcb877f10b816
--- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/TreeNodeInfos/RingtoetsContextMenuBuilderTest.cs (.../RingtoetsContextMenuBuilderTest.cs) (revision a3357275af675af3714fc89b99c554c288759ae2)
+++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/TreeNodeInfos/RingtoetsContextMenuBuilderTest.cs (.../RingtoetsContextMenuBuilderTest.cs) (revision 41fac7fff0a505c08945108d795dcb877f10b816)
@@ -954,7 +954,7 @@
base(wrappedFailureMechanism, parent) { }
}
- private class TestFailureMechanism : FailureMechanismBase
+ private class TestFailureMechanism : FailureMechanismBase
{
private readonly IEnumerable calculations;
@@ -971,11 +971,6 @@
return calculations;
}
}
-
- protected override FailureMechanismSectionResult CreateFailureMechanismSectionResult(FailureMechanismSection section)
- {
- return null;
- }
}
private class TestCalculationGroupContext : Observable, ICalculationContext
Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/TreeNodeInfos/RingtoetsContextMenuItemFactoryTest.cs
===================================================================
diff -u -rc796a449aa7622c4c2386279a7f9fb410f610444 -r41fac7fff0a505c08945108d795dcb877f10b816
--- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/TreeNodeInfos/RingtoetsContextMenuItemFactoryTest.cs (.../RingtoetsContextMenuItemFactoryTest.cs) (revision c796a449aa7622c4c2386279a7f9fb410f610444)
+++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/TreeNodeInfos/RingtoetsContextMenuItemFactoryTest.cs (.../RingtoetsContextMenuItemFactoryTest.cs) (revision 41fac7fff0a505c08945108d795dcb877f10b816)
@@ -953,7 +953,7 @@
base(wrappedFailureMechanism, parent) {}
}
- private class TestFailureMechanism : FailureMechanismBase
+ private class TestFailureMechanism : FailureMechanismBase
{
private readonly IEnumerable calculations;
@@ -970,11 +970,6 @@
return calculations;
}
}
-
- protected override FailureMechanismSectionResult CreateFailureMechanismSectionResult(FailureMechanismSection section)
- {
- return null;
- }
}
private class TestCalculationGroupContext : Observable, ICalculationContext
Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/GrassCoverErosionInwardsFailureMechanism.cs
===================================================================
diff -u -rd2f9b4f26f69988ea1c55caaa58af0831152458f -r41fac7fff0a505c08945108d795dcb877f10b816
--- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/GrassCoverErosionInwardsFailureMechanism.cs (.../GrassCoverErosionInwardsFailureMechanism.cs) (revision d2f9b4f26f69988ea1c55caaa58af0831152458f)
+++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/GrassCoverErosionInwardsFailureMechanism.cs (.../GrassCoverErosionInwardsFailureMechanism.cs) (revision 41fac7fff0a505c08945108d795dcb877f10b816)
@@ -31,8 +31,10 @@
///
/// Model for performing grass cover erosion inwards calculations.
///
- public class GrassCoverErosionInwardsFailureMechanism : FailureMechanismBase, ICalculatableFailureMechanism
+ public class GrassCoverErosionInwardsFailureMechanism : FailureMechanismBase, ICalculatableFailureMechanism, IHasSectionResults
{
+ private readonly List sectionResults;
+
///
/// Initializes a new instance of the class.
///
@@ -42,6 +44,7 @@
CalculationsGroup = new CalculationGroup(RingtoetsCommonDataResources.FailureMechanism_Calculations_DisplayName, false);
GeneralInput = new GeneralGrassCoverErosionInwardsInput();
NormProbabilityInput = new GeneralNormProbabilityInput();
+ sectionResults = new List();
}
public override IEnumerable Calculations
@@ -52,11 +55,19 @@
}
}
- protected override GrassCoverErosionInwardsFailureMechanismSectionResult CreateFailureMechanismSectionResult(FailureMechanismSection section)
+ public override void AddSection(FailureMechanismSection section)
{
- return new GrassCoverErosionInwardsFailureMechanismSectionResult(section);
+ base.AddSection(section);
+
+ sectionResults.Add(new GrassCoverErosionInwardsFailureMechanismSectionResult(section));
}
+ public override void ClearAllSections()
+ {
+ base.ClearAllSections();
+ sectionResults.Clear();
+ }
+
///
/// Gets the general grass cover erosion inwards calculation input parameters that apply to each calculation.
///
@@ -68,5 +79,13 @@
public GeneralNormProbabilityInput NormProbabilityInput { get; private set; }
public CalculationGroup CalculationsGroup { get; private set; }
+
+ public IEnumerable SectionResults
+ {
+ get
+ {
+ return sectionResults;
+ }
+ }
}
}
\ No newline at end of file
Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Views/GrassCoverErosionInwardsFailureMechanismResultView.cs
===================================================================
diff -u -r209bfd7b71ef53a57e1a52337f1333d38122282f -r41fac7fff0a505c08945108d795dcb877f10b816
--- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Views/GrassCoverErosionInwardsFailureMechanismResultView.cs (.../GrassCoverErosionInwardsFailureMechanismResultView.cs) (revision 209bfd7b71ef53a57e1a52337f1333d38122282f)
+++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Views/GrassCoverErosionInwardsFailureMechanismResultView.cs (.../GrassCoverErosionInwardsFailureMechanismResultView.cs) (revision 41fac7fff0a505c08945108d795dcb877f10b816)
@@ -42,13 +42,13 @@
{
private const double tolerance = 1e-6;
private readonly Observer failureMechanismObserver;
- private readonly RecursiveObserver, GrassCoverErosionInwardsFailureMechanismSectionResult> failureMechanismSectionResultObserver;
+ private readonly RecursiveObserver failureMechanismSectionResultObserver;
private readonly RecursiveObserver calculationInputObserver;
private readonly RecursiveObserver calculationOutputObserver;
private readonly RecursiveObserver calculationGroupObserver;
private IEnumerable failureMechanismSectionResult;
- private FailureMechanismBase failureMechanism;
+ private GrassCoverErosionInwardsFailureMechanism failureMechanism;
private DataGridViewTextBoxColumn assessmentLayerTwoA;
private DataGridViewTextBoxColumn assessmentLayerTwoB;
private DataGridViewTextBoxColumn assessmentLayerThree;
@@ -62,7 +62,7 @@
InitializeDataGridView();
failureMechanismObserver = new Observer(UpdataDataGridViewDataSource);
- failureMechanismSectionResultObserver = new RecursiveObserver, GrassCoverErosionInwardsFailureMechanismSectionResult>(RefreshDataGridView, mechanism => mechanism.SectionResults);
+ failureMechanismSectionResultObserver = new RecursiveObserver(RefreshDataGridView, mechanism => mechanism.SectionResults);
// The concat is needed to observe the input of calculations in child groups.
calculationInputObserver = new RecursiveObserver(UpdataDataGridViewDataSource, cg => cg.Children.Concat