Index: Riskeer/Common/src/Riskeer.Common.Forms/Properties/Resources.Designer.cs
===================================================================
diff -u -rb685b7897863f95c9b3ed34a67c020681ec152a0 -r628f2f0fb1146e8b4bce994f9d81971adf6791b7
--- Riskeer/Common/src/Riskeer.Common.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision b685b7897863f95c9b3ed34a67c020681ec152a0)
+++ Riskeer/Common/src/Riskeer.Common.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 628f2f0fb1146e8b4bce994f9d81971adf6791b7)
@@ -4164,6 +4164,15 @@
}
///
+ /// Looks up a localized string similar to Overschrijdingskans waarvoor de golfhoogten worden berekend..
+ ///
+ public static string TargetProbability_WaveHeights_Description {
+ get {
+ return ResourceManager.GetString("TargetProbability_WaveHeights_Description", resourceCulture);
+ }
+ }
+
+ ///
/// Looks up a localized string similar to {0} ({1}).
///
public static string TopLevelSubMechanismIllustrationPointProperties_ToString_WindDirectionName_0_ClosingSituation_1 {
Index: Riskeer/Common/src/Riskeer.Common.Forms/Properties/Resources.resx
===================================================================
diff -u -rb685b7897863f95c9b3ed34a67c020681ec152a0 -r628f2f0fb1146e8b4bce994f9d81971adf6791b7
--- Riskeer/Common/src/Riskeer.Common.Forms/Properties/Resources.resx (.../Resources.resx) (revision b685b7897863f95c9b3ed34a67c020681ec152a0)
+++ Riskeer/Common/src/Riskeer.Common.Forms/Properties/Resources.resx (.../Resources.resx) (revision 628f2f0fb1146e8b4bce994f9d81971adf6791b7)
@@ -1619,4 +1619,7 @@
Overschrijdingskans waarvoor de waterstanden worden berekend.
+
+ Overschrijdingskans waarvoor de golfhoogten worden berekend.
+
\ No newline at end of file
Index: Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/WaveHeightCalculationsForUserDefinedTargetProbabilityProperties.cs
===================================================================
diff -u
--- Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/WaveHeightCalculationsForUserDefinedTargetProbabilityProperties.cs (revision 0)
+++ Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/WaveHeightCalculationsForUserDefinedTargetProbabilityProperties.cs (revision 628f2f0fb1146e8b4bce994f9d81971adf6791b7)
@@ -0,0 +1,76 @@
+// Copyright (C) Stichting Deltares 2021. All rights reserved.
+//
+// This file is part of Riskeer.
+//
+// Riskeer is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+using Core.Common.Util.Attributes;
+using Core.Gui.Attributes;
+using Riskeer.Common.Data.Hydraulics;
+using Riskeer.Common.Forms.Properties;
+using Riskeer.Common.Forms.TypeConverters;
+
+namespace Riskeer.Common.Forms.PropertyClasses
+{
+ ///
+ /// ViewModel of a collection of with a user specified
+ /// target probability based wave height calculation result for properties panel.
+ ///
+ public class WaveHeightCalculationsForUserDefinedTargetProbabilityProperties : WaveHeightCalculationsProperties
+ {
+ private const int targetProbabilityPropertyIndex = 1;
+ private const int calculationsPropertyIndex = 2;
+
+ private static readonly NoProbabilityValueDoubleConverter noProbabilityValueDoubleConverter = new NoProbabilityValueDoubleConverter();
+
+ private readonly HydraulicBoundaryLocationCalculationsForTargetProbability calculationsForTargetProbability;
+
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The to show the properties for.
+ /// Thrown when is null.
+ public WaveHeightCalculationsForUserDefinedTargetProbabilityProperties(HydraulicBoundaryLocationCalculationsForTargetProbability calculationsForTargetProbability)
+ : base(calculationsForTargetProbability?.HydraulicBoundaryLocationCalculations ?? throw new ArgumentNullException(nameof(calculationsForTargetProbability)))
+ {
+ this.calculationsForTargetProbability = calculationsForTargetProbability;
+ }
+
+ [PropertyOrder(calculationsPropertyIndex)]
+ public override WaveHeightCalculationProperties[] Calculations
+ {
+ get
+ {
+ return base.Calculations;
+ }
+ }
+
+ [PropertyOrder(targetProbabilityPropertyIndex)]
+ [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_General))]
+ [ResourcesDisplayName(typeof(Resources), nameof(Resources.TargetProbability_DisplayName))]
+ [ResourcesDescription(typeof(Resources), nameof(Resources.TargetProbability_WaveHeights_Description))]
+ public string TargetProbability
+ {
+ get
+ {
+ return noProbabilityValueDoubleConverter.ConvertToString(calculationsForTargetProbability.TargetProbability);
+ }
+ }
+ }
+}
\ No newline at end of file
Index: Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/WaveHeightCalculationsProperties.cs
===================================================================
diff -u -ref9f41ef150aee02d286c53de24660a19d948e02 -r628f2f0fb1146e8b4bce994f9d81971adf6791b7
--- Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/WaveHeightCalculationsProperties.cs (.../WaveHeightCalculationsProperties.cs) (revision ef9f41ef150aee02d286c53de24660a19d948e02)
+++ Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/WaveHeightCalculationsProperties.cs (.../WaveHeightCalculationsProperties.cs) (revision 628f2f0fb1146e8b4bce994f9d81971adf6791b7)
@@ -46,7 +46,7 @@
[ResourcesCategory(typeof(Resources), nameof(Resources.Categories_General))]
[ResourcesDisplayName(typeof(Resources), nameof(Resources.HydraulicBoundaryDatabase_Locations_DisplayName))]
[ResourcesDescription(typeof(Resources), nameof(Resources.HydraulicBoundaryDatabase_Locations_Description))]
- public WaveHeightCalculationProperties[] Calculations
+ public virtual WaveHeightCalculationProperties[] Calculations
{
get
{