Index: Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/WaterLevelCalculationsForUserDefinedTargetProbabilityProperties.cs =================================================================== diff -u -r5970157264549d811f0bfa9d195d9afb4331511e -re9a7cd0f9675981fcf2d27af141f04da4a17f55d --- Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/WaterLevelCalculationsForUserDefinedTargetProbabilityProperties.cs (.../WaterLevelCalculationsForUserDefinedTargetProbabilityProperties.cs) (revision 5970157264549d811f0bfa9d195d9afb4331511e) +++ Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/WaterLevelCalculationsForUserDefinedTargetProbabilityProperties.cs (.../WaterLevelCalculationsForUserDefinedTargetProbabilityProperties.cs) (revision e9a7cd0f9675981fcf2d27af141f04da4a17f55d) @@ -20,6 +20,7 @@ // All rights reserved. using System; +using System.ComponentModel; using Core.Common.Util.Attributes; using Core.Gui.Attributes; using Riskeer.Common.Data.Hydraulics; @@ -37,8 +38,6 @@ private const int targetProbabilityPropertyIndex = 1; private const int calculationsPropertyIndex = 2; - private static readonly NoProbabilityValueDoubleConverter noProbabilityValueDoubleConverter = new NoProbabilityValueDoubleConverter(); - private readonly HydraulicBoundaryLocationCalculationsForTargetProbability calculationsForTargetProbability; /// @@ -62,15 +61,20 @@ } [PropertyOrder(targetProbabilityPropertyIndex)] + [TypeConverter(typeof(NoProbabilityValueDoubleConverter))] [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_General))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.TargetProbability_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.TargetProbability_WaterLevels_Description))] - public string TargetProbability + public double TargetProbability { get { - return noProbabilityValueDoubleConverter.ConvertToString(calculationsForTargetProbability.TargetProbability); + return calculationsForTargetProbability.TargetProbability; } + set + { + calculationsForTargetProbability.TargetProbability = value; + } } } } \ No newline at end of file Index: Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/WaveHeightCalculationsForUserDefinedTargetProbabilityProperties.cs =================================================================== diff -u -r628f2f0fb1146e8b4bce994f9d81971adf6791b7 -re9a7cd0f9675981fcf2d27af141f04da4a17f55d --- Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/WaveHeightCalculationsForUserDefinedTargetProbabilityProperties.cs (.../WaveHeightCalculationsForUserDefinedTargetProbabilityProperties.cs) (revision 628f2f0fb1146e8b4bce994f9d81971adf6791b7) +++ Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/WaveHeightCalculationsForUserDefinedTargetProbabilityProperties.cs (.../WaveHeightCalculationsForUserDefinedTargetProbabilityProperties.cs) (revision e9a7cd0f9675981fcf2d27af141f04da4a17f55d) @@ -20,6 +20,7 @@ // All rights reserved. using System; +using System.ComponentModel; using Core.Common.Util.Attributes; using Core.Gui.Attributes; using Riskeer.Common.Data.Hydraulics; @@ -37,8 +38,6 @@ private const int targetProbabilityPropertyIndex = 1; private const int calculationsPropertyIndex = 2; - private static readonly NoProbabilityValueDoubleConverter noProbabilityValueDoubleConverter = new NoProbabilityValueDoubleConverter(); - private readonly HydraulicBoundaryLocationCalculationsForTargetProbability calculationsForTargetProbability; /// @@ -62,15 +61,20 @@ } [PropertyOrder(targetProbabilityPropertyIndex)] + [TypeConverter(typeof(NoProbabilityValueDoubleConverter))] [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 + public double TargetProbability { get { - return noProbabilityValueDoubleConverter.ConvertToString(calculationsForTargetProbability.TargetProbability); + return calculationsForTargetProbability.TargetProbability; } + set + { + calculationsForTargetProbability.TargetProbability = value; + } } } } \ No newline at end of file