Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Properties/Resources.Designer.cs =================================================================== diff -u -ra3357275af675af3714fc89b99c554c288759ae2 -ra6b3a4921ffd42f54f6be60ebc2eef3c12cab10e --- Ringtoets/Common/src/Ringtoets.Common.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision a3357275af675af3714fc89b99c554c288759ae2) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision a6b3a4921ffd42f54f6be60ebc2eef3c12cab10e) @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.17929 +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -574,6 +574,16 @@ /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// + public static System.Drawing.Bitmap GeneralOutputIcon { + get { + object obj = ResourceManager.GetObject("GeneralOutputIcon", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// public static System.Drawing.Bitmap GenericInputOutputIcon { get { object obj = ResourceManager.GetObject("GenericInputOutputIcon", resourceCulture); Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Properties/Resources.resx =================================================================== diff -u -ra3357275af675af3714fc89b99c554c288759ae2 -ra6b3a4921ffd42f54f6be60ebc2eef3c12cab10e --- Ringtoets/Common/src/Ringtoets.Common.Forms/Properties/Resources.resx (.../Resources.resx) (revision a3357275af675af3714fc89b99c554c288759ae2) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Properties/Resources.resx (.../Resources.resx) (revision a6b3a4921ffd42f54f6be60ebc2eef3c12cab10e) @@ -325,4 +325,7 @@ Herstellen van de verbinding met de hydraulische randvoorwaarden database is mislukt. {0} + + ..\Resources\table.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Resources/table.png =================================================================== diff -u Binary files differ Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Ringtoets.Common.Forms.csproj =================================================================== diff -u -r41fac7fff0a505c08945108d795dcb877f10b816 -ra6b3a4921ffd42f54f6be60ebc2eef3c12cab10e --- Ringtoets/Common/src/Ringtoets.Common.Forms/Ringtoets.Common.Forms.csproj (.../Ringtoets.Common.Forms.csproj) (revision 41fac7fff0a505c08945108d795dcb877f10b816) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Ringtoets.Common.Forms.csproj (.../Ringtoets.Common.Forms.csproj) (revision a6b3a4921ffd42f54f6be60ebc2eef3c12cab10e) @@ -160,6 +160,7 @@ + Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Properties/Resources.Designer.cs =================================================================== diff -u -r1415a03f7cf9716016602784586b8f5da3cf4def -ra6b3a4921ffd42f54f6be60ebc2eef3c12cab10e --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 1415a03f7cf9716016602784586b8f5da3cf4def) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision a6b3a4921ffd42f54f6be60ebc2eef3c12cab10e) @@ -152,6 +152,15 @@ } /// + /// Looks up a localized string similar to Grasbekleding erosie kruin en binnentalud. + /// + public static string Categories_GrassCoverErosionInwards { + get { + return ResourceManager.GetString("Categories_GrassCoverErosionInwards", resourceCulture); + } + } + + /// /// Looks up a localized string similar to Hydraulische gegevens. /// public static string Categories_HydraulicData { @@ -488,6 +497,96 @@ } /// + /// Looks up a localized string similar to De veiligheidsfactor voor deze berekening.. + /// + public static string GrassCoverErosionInwardsOutput_FactorOfSafety_Description { + get { + return ResourceManager.GetString("GrassCoverErosionInwardsOutput_FactorOfSafety_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Veiligheidsfactor [-]. + /// + public static string GrassCoverErosionInwardsOutput_FactorOfSafety_Displayname { + get { + return ResourceManager.GetString("GrassCoverErosionInwardsOutput_FactorOfSafety_Displayname", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to De faalkans voor deze berekening.. + /// + public static string GrassCoverErosionInwardsOutput_Probability_Description { + get { + return ResourceManager.GetString("GrassCoverErosionInwardsOutput_Probability_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Faalkans [1/year]. + /// + public static string GrassCoverErosionInwardsOutput_Probability_Displayname { + get { + return ResourceManager.GetString("GrassCoverErosionInwardsOutput_Probability_Displayname", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to De betrouwbaarheidsindex van de faalkans voor deze berekening.. + /// + public static string GrassCoverErosionInwardsOutput_Reliability_Description { + get { + return ResourceManager.GetString("GrassCoverErosionInwardsOutput_Reliability_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Betrouwbaarheidsindex faalkans [-]. + /// + public static string GrassCoverErosionInwardsOutput_Reliability_Displayname { + get { + return ResourceManager.GetString("GrassCoverErosionInwardsOutput_Reliability_Displayname", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to De kans dat het toetsspoor grasbekleding erosie kruin en binnentalud optreedt voor deze berekening.. + /// + public static string GrassCoverErosionInwardsOutput_RequiredProbability_Description { + get { + return ResourceManager.GetString("GrassCoverErosionInwardsOutput_RequiredProbability_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Faalkanseis [1/year]. + /// + public static string GrassCoverErosionInwardsOutput_RequiredProbability_Displayname { + get { + return ResourceManager.GetString("GrassCoverErosionInwardsOutput_RequiredProbability_Displayname", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to De betrouwbaarheidsindex van de faalkanseis voor deze berekening.. + /// + public static string GrassCoverErosionInwardsOutput_RequiredReliability_Description { + get { + return ResourceManager.GetString("GrassCoverErosionInwardsOutput_RequiredReliability_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Betrouwbaarheidsindex faalkanseis [-]. + /// + public static string GrassCoverErosionInwardsOutput_RequiredReliability_Displayname { + get { + return ResourceManager.GetString("GrassCoverErosionInwardsOutput_RequiredReliability_Displayname", resourceCulture); + } + } + + /// /// Looks up a localized string similar to De locatie met hydraulische randvoorwaarden die gebruikt wordt tijdens de berekening.. /// public static string HydraulicBoundaryLocation_Description { Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Properties/Resources.resx =================================================================== diff -u -r1415a03f7cf9716016602784586b8f5da3cf4def -ra6b3a4921ffd42f54f6be60ebc2eef3c12cab10e --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Properties/Resources.resx (.../Resources.resx) (revision 1415a03f7cf9716016602784586b8f5da3cf4def) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Properties/Resources.resx (.../Resources.resx) (revision a6b3a4921ffd42f54f6be60ebc2eef3c12cab10e) @@ -295,4 +295,37 @@ Locatie met hydraulische randvoorwaarden + + Grasbekleding erosie kruin en binnentalud + + + De veiligheidsfactor voor deze berekening. + + + Veiligheidsfactor [-] + + + De faalkans voor deze berekening. + + + Faalkans [1/year] + + + De betrouwbaarheidsindex van de faalkans voor deze berekening. + + + Betrouwbaarheidsindex faalkans [-] + + + De kans dat het toetsspoor grasbekleding erosie kruin en binnentalud optreedt voor deze berekening. + + + Faalkanseis [1/year] + + + De betrouwbaarheidsindex van de faalkanseis voor deze berekening. + + + Betrouwbaarheidsindex faalkanseis [-] + \ No newline at end of file Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PropertyClasses/GrassCoverErosionInwardsOutputProperties.cs =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PropertyClasses/GrassCoverErosionInwardsOutputProperties.cs (revision 0) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PropertyClasses/GrassCoverErosionInwardsOutputProperties.cs (revision a6b3a4921ffd42f54f6be60ebc2eef3c12cab10e) @@ -0,0 +1,101 @@ +// 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; +using Core.Common.Gui.Attributes; +using Core.Common.Gui.PropertyBag; +using Core.Common.Utils.Attributes; +using Ringtoets.GrassCoverErosionInwards.Data; +using Ringtoets.GrassCoverErosionInwards.Forms.Properties; + +namespace Ringtoets.GrassCoverErosionInwards.Forms.PropertyClasses +{ + /// + /// ViewModel of for properties panel. + /// + public class GrassCoverErosionInwardsOutputProperties : ObjectProperties + { + [PropertyOrder(1)] + [ResourcesCategory(typeof(Resources), "Categories_GrassCoverErosionInwards")] + [ResourcesDisplayName(typeof(Resources), "GrassCoverErosionInwardsOutput_RequiredProbability_Displayname")] + [ResourcesDescription(typeof(Resources), "GrassCoverErosionInwardsOutput_RequiredProbability_Description")] + public string RequiredProbability + { + get + { + return ToProbabilityFormat(data.RequiredProbability); + } + } + + [PropertyOrder(2)] + [ResourcesCategory(typeof(Resources), "Categories_GrassCoverErosionInwards")] + [ResourcesDisplayName(typeof(Resources), "GrassCoverErosionInwardsOutput_RequiredReliability_Displayname")] + [ResourcesDescription(typeof(Resources), "GrassCoverErosionInwardsOutput_RequiredReliability_Description")] + public RoundedDouble RequiredReliability + { + get + { + return data.RequiredReliability; + } + } + + [PropertyOrder(3)] + [ResourcesCategory(typeof(Resources), "Categories_GrassCoverErosionInwards")] + [ResourcesDisplayName(typeof(Resources), "GrassCoverErosionInwardsOutput_Probability_Displayname")] + [ResourcesDescription(typeof(Resources), "GrassCoverErosionInwardsOutput_Probability_Description")] + public string Probability + { + get + { + return ToProbabilityFormat(data.Probability); + } + } + + [PropertyOrder(4)] + [ResourcesCategory(typeof(Resources), "Categories_GrassCoverErosionInwards")] + [ResourcesDisplayName(typeof(Resources), "GrassCoverErosionInwardsOutput_Reliability_Displayname")] + [ResourcesDescription(typeof(Resources), "GrassCoverErosionInwardsOutput_Reliability_Description")] + public RoundedDouble Reliability + { + get + { + return data.Reliability; + } + } + + [PropertyOrder(5)] + [ResourcesCategory(typeof(Resources), "Categories_GrassCoverErosionInwards")] + [ResourcesDisplayName(typeof(Resources), "GrassCoverErosionInwardsOutput_FactorOfSafety_Displayname")] + [ResourcesDescription(typeof(Resources), "GrassCoverErosionInwardsOutput_FactorOfSafety_Description")] + public RoundedDouble FactorOfSafety + { + get + { + return data.FactorOfSafety; + } + } + + private static string ToProbabilityFormat(RoundedDouble probability) + { + return string.Format(Core.Common.Base.Properties.Resources.ProbabilityPerYearFormat, probability); + } + } +} \ No newline at end of file Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Ringtoets.GrassCoverErosionInwards.Forms.csproj =================================================================== diff -u -r209bfd7b71ef53a57e1a52337f1333d38122282f -ra6b3a4921ffd42f54f6be60ebc2eef3c12cab10e --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Ringtoets.GrassCoverErosionInwards.Forms.csproj (.../Ringtoets.GrassCoverErosionInwards.Forms.csproj) (revision 209bfd7b71ef53a57e1a52337f1333d38122282f) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Ringtoets.GrassCoverErosionInwards.Forms.csproj (.../Ringtoets.GrassCoverErosionInwards.Forms.csproj) (revision a6b3a4921ffd42f54f6be60ebc2eef3c12cab10e) @@ -61,6 +61,7 @@ + Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Plugin/GrassCoverErosionInwardsGuiPlugin.cs =================================================================== diff -u -r41fac7fff0a505c08945108d795dcb877f10b816 -ra6b3a4921ffd42f54f6be60ebc2eef3c12cab10e --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Plugin/GrassCoverErosionInwardsGuiPlugin.cs (.../GrassCoverErosionInwardsGuiPlugin.cs) (revision 41fac7fff0a505c08945108d795dcb877f10b816) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Plugin/GrassCoverErosionInwardsGuiPlugin.cs (.../GrassCoverErosionInwardsGuiPlugin.cs) (revision a6b3a4921ffd42f54f6be60ebc2eef3c12cab10e) @@ -65,6 +65,7 @@ yield return new PropertyInfo(); yield return new PropertyInfo(); yield return new PropertyInfo(); + yield return new PropertyInfo(); } public override IEnumerable GetViewInfos() @@ -123,10 +124,21 @@ .Build() }; + yield return new TreeNodeInfo + { + Text = pipingOutput => RingtoetsCommonFormsResources.CalculationOutput_DisplayName, + Image = pipingOutput => RingtoetsCommonFormsResources.GeneralOutputIcon, + ContextMenuStrip = (nodeData, parentData, treeViewControl) => Gui.Get(nodeData, treeViewControl) + .AddExportItem() + .AddSeparator() + .AddPropertiesItem() + .Build() + }; + yield return new TreeNodeInfo { Text = emptyOutput => RingtoetsCommonFormsResources.CalculationOutput_DisplayName, - Image = emptyOutput => RingtoetsCommonFormsResources.GenericInputOutputIcon, + Image = emptyOutput => RingtoetsCommonFormsResources.GeneralOutputIcon, ForeColor = emptyOutput => Color.FromKnownColor(KnownColor.GrayText), ContextMenuStrip = (nodeData, parentData, treeViewControl) => Gui.Get(nodeData, treeViewControl) .AddExportItem() @@ -212,6 +224,7 @@ if (output != null) { GrassCoverErosionInwardsOutputCalculationService.Calculate(calculation, norm, output.Beta); + calculation.NotifyObservers(); } else { @@ -474,8 +487,12 @@ calculationContext.AssessmentSection) }; - if (!calculationContext.WrappedData.HasOutput) + if (calculationContext.WrappedData.HasOutput) { + childNodes.Add(calculationContext.WrappedData.Output); + } + else + { childNodes.Add(new EmptyGrassCoverErosionInwardsOutput()); } Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsOutputPropertiesTest.cs =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsOutputPropertiesTest.cs (revision 0) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsOutputPropertiesTest.cs (revision a6b3a4921ffd42f54f6be60ebc2eef3c12cab10e) @@ -0,0 +1,169 @@ +// 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.Gui.PropertyBag; +using NUnit.Framework; +using Rhino.Mocks; +using Ringtoets.GrassCoverErosionInwards.Data; +using Ringtoets.GrassCoverErosionInwards.Forms.PropertyClasses; + +namespace Ringtoets.GrassCoverErosionInwards.Forms.Test.PropertyClasses +{ + [TestFixture] + public class GrassCoverErosionInwardsOutputPropertiesTest + { + private MockRepository mockRepository; + + [SetUp] + public void SetUp() + { + mockRepository = new MockRepository(); + } + + [Test] + public void Constructor_ExpectedValues() + { + // Call + var properties = new GrassCoverErosionInwardsOutputProperties(); + + // Assert + Assert.IsInstanceOf>(properties); + Assert.IsNull(properties.Data); + } + + [Test] + public void GetProperties_WithData_ReturnExpectedValues() + { + // Setup + var random = new Random(22); + var bigFactor = 1000000; + double requiredProbability = random.NextDouble()*bigFactor; + double requiredReliability = random.NextDouble(); + double probability = random.NextDouble()*bigFactor; + double reliability = random.NextDouble(); + double factorOfSafety = random.NextDouble(); + + var output = new GrassCoverErosionInwardsOutput(requiredProbability, requiredReliability, probability, reliability, factorOfSafety); + + // Call + var properties = new GrassCoverErosionInwardsOutputProperties + { + Data = output + }; + + // Assert + var probabilityFormat = "1/{0:n0}"; + Assert.AreEqual(string.Format(probabilityFormat, requiredProbability), properties.RequiredProbability); + Assert.AreEqual(requiredReliability, properties.RequiredReliability, 1e-3); + Assert.AreEqual(string.Format(probabilityFormat, probability), properties.Probability); + Assert.AreEqual(reliability, properties.Reliability, 1e-3); + Assert.AreEqual(factorOfSafety, properties.FactorOfSafety, 1e-3); + } + + [Test] + public void GetProperties_WithInfinityValues_ReturnTranslatedFormat() + { + // Setup + var random = new Random(22); + double requiredProbability = double.PositiveInfinity; + double requiredReliability = random.NextDouble(); + double probability = double.PositiveInfinity; + double reliability = random.NextDouble(); + double factorOfSafety = random.NextDouble(); + + var output = new GrassCoverErosionInwardsOutput(requiredProbability, requiredReliability, probability, reliability, factorOfSafety); + + // Call + var properties = new GrassCoverErosionInwardsOutputProperties + { + Data = output + }; + + // Assert + var expectedProbabilityText = "1/Oneindig"; + Assert.AreEqual(expectedProbabilityText, properties.RequiredProbability); + Assert.AreEqual(expectedProbabilityText, properties.Probability); + } + + [Test] + public void PropertyAttributes_ReturnExpectedValues() + { + // Setup + var output = new GrassCoverErosionInwardsOutput(double.NaN, double.NaN, double.NaN, double.NaN, double.NaN); + + // Call + var properties = new GrassCoverErosionInwardsOutputProperties + { + Data = output + }; + + // Assert + var dynamicPropertyBag = new DynamicPropertyBag(properties); + PropertyDescriptorCollection dynamicProperties = dynamicPropertyBag.GetProperties(); + Assert.AreEqual(6, dynamicProperties.Count); + + PropertyDescriptor requiredProbabilityProperty = dynamicProperties[requiredProbabilityPropertyIndex]; + Assert.IsNotNull(requiredProbabilityProperty); + Assert.IsTrue(requiredProbabilityProperty.IsReadOnly); + Assert.AreEqual("Grasbekleding erosie kruin en binnentalud", requiredProbabilityProperty.Category); + Assert.AreEqual("Faalkanseis [1/year]", requiredProbabilityProperty.DisplayName); + Assert.AreEqual("De kans dat het toetsspoor grasbekleding erosie kruin en binnentalud optreedt voor deze berekening.", requiredProbabilityProperty.Description); + + PropertyDescriptor requiredReliabilityProperty = dynamicProperties[requiredReliabilityPropertyIndex]; + Assert.IsNotNull(requiredReliabilityProperty); + Assert.IsTrue(requiredReliabilityProperty.IsReadOnly); + Assert.AreEqual("Grasbekleding erosie kruin en binnentalud", requiredReliabilityProperty.Category); + Assert.AreEqual("Betrouwbaarheidsindex faalkanseis [-]", requiredReliabilityProperty.DisplayName); + Assert.AreEqual("De betrouwbaarheidsindex van de faalkanseis voor deze berekening.", requiredReliabilityProperty.Description); + + PropertyDescriptor probabilityProperty = dynamicProperties[probabilityPropertyIndex]; + Assert.IsNotNull(probabilityProperty); + Assert.IsTrue(probabilityProperty.IsReadOnly); + Assert.AreEqual("Grasbekleding erosie kruin en binnentalud", probabilityProperty.Category); + Assert.AreEqual("Faalkans [1/year]", probabilityProperty.DisplayName); + Assert.AreEqual("De faalkans voor deze berekening.", probabilityProperty.Description); + + PropertyDescriptor reliabilityProperty = dynamicProperties[reliabilityPropertyIndex]; + Assert.IsNotNull(reliabilityProperty); + Assert.IsTrue(reliabilityProperty.IsReadOnly); + Assert.AreEqual("Grasbekleding erosie kruin en binnentalud", reliabilityProperty.Category); + Assert.AreEqual("Betrouwbaarheidsindex faalkans [-]", reliabilityProperty.DisplayName); + Assert.AreEqual("De betrouwbaarheidsindex van de faalkans voor deze berekening.", reliabilityProperty.Description); + + PropertyDescriptor factorOfSafetyProperty = dynamicProperties[factorOfSafetyPropertyIndex]; + Assert.IsNotNull(factorOfSafetyProperty); + Assert.IsTrue(factorOfSafetyProperty.IsReadOnly); + Assert.AreEqual("Grasbekleding erosie kruin en binnentalud", factorOfSafetyProperty.Category); + Assert.AreEqual("Veiligheidsfactor [-]", factorOfSafetyProperty.DisplayName); + Assert.AreEqual("De veiligheidsfactor voor deze berekening.", factorOfSafetyProperty.Description); + + mockRepository.VerifyAll(); + } + + private const int requiredProbabilityPropertyIndex = 0; + private const int requiredReliabilityPropertyIndex = 1; + private const int probabilityPropertyIndex = 2; + private const int reliabilityPropertyIndex = 3; + private const int factorOfSafetyPropertyIndex = 4; + } +} \ No newline at end of file Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj =================================================================== diff -u -r33efdf255d012f47a045c7f3181487e0453cf5e2 -ra6b3a4921ffd42f54f6be60ebc2eef3c12cab10e --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj (.../Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj) (revision 33efdf255d012f47a045c7f3181487e0453cf5e2) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj (.../Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj) (revision a6b3a4921ffd42f54f6be60ebc2eef3c12cab10e) @@ -81,6 +81,7 @@ + Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/Properties/Resources.Designer.cs =================================================================== diff -u -r5e537f15a48228799cd7c965cfb7ab144763bbf8 -ra6b3a4921ffd42f54f6be60ebc2eef3c12cab10e --- Ringtoets/Piping/src/Ringtoets.Piping.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 5e537f15a48228799cd7c965cfb7ab144763bbf8) +++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision a6b3a4921ffd42f54f6be60ebc2eef3c12cab10e) @@ -1078,16 +1078,6 @@ } /// - /// Looks up a localized resource of type System.Drawing.Bitmap. - /// - public static System.Drawing.Bitmap PipingOutputIcon { - get { - object obj = ResourceManager.GetObject("PipingOutputIcon", resourceCulture); - return ((System.Drawing.Bitmap)(obj)); - } - } - - /// /// Looks up a localized string similar to Heave. /// public static string PipingSemiProbabilisticOutput_Categories_Heave { Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/Properties/Resources.resx =================================================================== diff -u -r5e537f15a48228799cd7c965cfb7ab144763bbf8 -ra6b3a4921ffd42f54f6be60ebc2eef3c12cab10e --- Ringtoets/Piping/src/Ringtoets.Piping.Forms/Properties/Resources.resx (.../Resources.resx) (revision 5e537f15a48228799cd7c965cfb7ab144763bbf8) +++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/Properties/Resources.resx (.../Resources.resx) (revision a6b3a4921ffd42f54f6be60ebc2eef3c12cab10e) @@ -370,9 +370,6 @@ De hoeveelheid waarmee de kansverdeling naar rechts (richting van positieve X-as) verschoven is. - - ..\Resources\table.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - Lognormaal Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/Resources/table.png =================================================================== diff -u -r7c544bdc0a35c6f193d1e786b8c001e9977c50d1 -ra6b3a4921ffd42f54f6be60ebc2eef3c12cab10e Binary files differ Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/Ringtoets.Piping.Forms.csproj =================================================================== diff -u -r4539b4546747c257739b1695b9ebc9c29e393ffe -ra6b3a4921ffd42f54f6be60ebc2eef3c12cab10e --- Ringtoets/Piping/src/Ringtoets.Piping.Forms/Ringtoets.Piping.Forms.csproj (.../Ringtoets.Piping.Forms.csproj) (revision 4539b4546747c257739b1695b9ebc9c29e393ffe) +++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/Ringtoets.Piping.Forms.csproj (.../Ringtoets.Piping.Forms.csproj) (revision a6b3a4921ffd42f54f6be60ebc2eef3c12cab10e) @@ -244,7 +244,6 @@ - Index: Ringtoets/Piping/src/Ringtoets.Piping.Plugin/PipingGuiPlugin.cs =================================================================== diff -u -r41fac7fff0a505c08945108d795dcb877f10b816 -ra6b3a4921ffd42f54f6be60ebc2eef3c12cab10e --- Ringtoets/Piping/src/Ringtoets.Piping.Plugin/PipingGuiPlugin.cs (.../PipingGuiPlugin.cs) (revision 41fac7fff0a505c08945108d795dcb877f10b816) +++ Ringtoets/Piping/src/Ringtoets.Piping.Plugin/PipingGuiPlugin.cs (.../PipingGuiPlugin.cs) (revision a6b3a4921ffd42f54f6be60ebc2eef3c12cab10e) @@ -213,7 +213,7 @@ yield return new TreeNodeInfo { Text = pipingOutput => RingtoetsCommonFormsResources.CalculationOutput_DisplayName, - Image = pipingOutput => PipingFormsResources.PipingOutputIcon, + Image = pipingOutput => RingtoetsCommonFormsResources.GeneralOutputIcon, ContextMenuStrip = (nodeData, parentData, treeViewControl) => Gui.Get(nodeData, treeViewControl) .AddExportItem() .AddSeparator() @@ -224,7 +224,7 @@ yield return new TreeNodeInfo { Text = emptyPipingOutput => RingtoetsCommonFormsResources.CalculationOutput_DisplayName, - Image = emptyPipingOutput => PipingFormsResources.PipingOutputIcon, + Image = emptyPipingOutput => RingtoetsCommonFormsResources.GeneralOutputIcon, ForeColor = emptyPipingOutput => Color.FromKnownColor(KnownColor.GrayText), ContextMenuStrip = (nodeData, parentData, treeViewControl) => Gui.Get(nodeData, treeViewControl) .AddExportItem() Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/EmptyPipingOutputTreeNodeInfoTest.cs =================================================================== diff -u -r062281754a35164e1095479c9f1ccb8ee821f939 -ra6b3a4921ffd42f54f6be60ebc2eef3c12cab10e --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/EmptyPipingOutputTreeNodeInfoTest.cs (.../EmptyPipingOutputTreeNodeInfoTest.cs) (revision 062281754a35164e1095479c9f1ccb8ee821f939) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/EmptyPipingOutputTreeNodeInfoTest.cs (.../EmptyPipingOutputTreeNodeInfoTest.cs) (revision a6b3a4921ffd42f54f6be60ebc2eef3c12cab10e) @@ -59,13 +59,13 @@ } [Test] - public void Image_Always_ReturnsPipingOutputIcon() + public void Image_Always_ReturnsGeneralOutputIcon() { // Call var image = info.Image(null); // Assert - TestHelper.AssertImagesAreEqual(PipingFormsResources.PipingOutputIcon, image); + TestHelper.AssertImagesAreEqual(RingtoetsCommonFormsResources.GeneralOutputIcon, image); } [Test] Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingSemiProbabilisticOutputTreeNodeInfoTest.cs =================================================================== diff -u -r7343a55e81349863d0e5d7bec5c7f0b3577adf65 -ra6b3a4921ffd42f54f6be60ebc2eef3c12cab10e --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingSemiProbabilisticOutputTreeNodeInfoTest.cs (.../PipingSemiProbabilisticOutputTreeNodeInfoTest.cs) (revision 7343a55e81349863d0e5d7bec5c7f0b3577adf65) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingSemiProbabilisticOutputTreeNodeInfoTest.cs (.../PipingSemiProbabilisticOutputTreeNodeInfoTest.cs) (revision a6b3a4921ffd42f54f6be60ebc2eef3c12cab10e) @@ -6,9 +6,7 @@ using NUnit.Framework; using Rhino.Mocks; using Ringtoets.Piping.Data; -using Ringtoets.Piping.Forms.Properties; using Ringtoets.Piping.Plugin; - using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; namespace Ringtoets.Piping.Forms.Test.TreeNodeInfos @@ -78,7 +76,7 @@ var image = info.Image(pipingOutput); // Assert - TestHelper.AssertImagesAreEqual(Resources.PipingOutputIcon, image); + TestHelper.AssertImagesAreEqual(RingtoetsCommonFormsResources.GeneralOutputIcon, image); mocks.VerifyAll(); }