Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PropertyClasses/ClosingStructuresInputContextProperties.cs
===================================================================
diff -u -r8e8f8c83c45656f65adaa8e47600379dc5ae8f61 -r242268fc2adc055cc3ac4f28b14b4db26251b30e
--- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PropertyClasses/ClosingStructuresInputContextProperties.cs (.../ClosingStructuresInputContextProperties.cs) (revision 8e8f8c83c45656f65adaa8e47600379dc5ae8f61)
+++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PropertyClasses/ClosingStructuresInputContextProperties.cs (.../ClosingStructuresInputContextProperties.cs) (revision 242268fc2adc055cc3ac4f28b14b4db26251b30e)
@@ -33,6 +33,7 @@
using Ringtoets.ClosingStructures.Forms.Properties;
using Ringtoets.Common.Data.DikeProfiles;
using Ringtoets.Common.Data.Structures;
+using Ringtoets.Common.Forms.ChangeHandlers;
using Ringtoets.Common.Forms.Helpers;
using Ringtoets.Common.Forms.PropertyClasses;
using Ringtoets.Common.Utils;
@@ -80,8 +81,9 @@
/// Creates a new instance of the class.
///
/// The instance to show the properties of.
- /// Thrown when is null.
- public ClosingStructuresInputContextProperties(ClosingStructuresInputContext data) :
+ /// The handler responsible for handling effects of a property change.
+ /// Thrown when any parameter is null.
+ public ClosingStructuresInputContextProperties(ClosingStructuresInputContext data, ICalculationInputPropertyChangeHandler propertyChangeHandler) :
base(data, new ConstructionProperties
{
StructurePropertyIndex = structurePropertyIndex,
@@ -99,7 +101,7 @@
ModelFactorSuperCriticalFlowPropertyIndex = modelFactorSuperCriticalFlowPropertyIndex,
HydraulicBoundaryLocationPropertyIndex = hydraulicBoundaryLocationPropertyIndex,
StormDurationPropertyIndex = stormDurationPropertyIndex
- }) {}
+ }, propertyChangeHandler) {}
#region Hydraulic data
@@ -187,7 +189,7 @@
#region Model factors
[DynamicVisible]
- public override NormalDistributionProperties ModelFactorSuperCriticalFlow
+ public override ConfirmingNormalDistributionProperties ModelFactorSuperCriticalFlow
{
get
{
@@ -224,8 +226,8 @@
}
set
{
- data.WrappedData.FactorStormDurationOpenStructure = value;
- ClearOutputAndNotifyPropertyChanged();
+ ChangePropertyAndNotify(
+ (input, newValue) => data.WrappedData.FactorStormDurationOpenStructure = newValue, value);
}
}
@@ -268,8 +270,8 @@
}
set
{
- data.WrappedData.InflowModelType = value;
- ClearOutputAndNotifyPropertyChanged();
+ ChangePropertyAndNotify(
+ (input, newValue) => data.WrappedData.InflowModelType = newValue, value);
}
}
@@ -319,8 +321,13 @@
}
set
{
- SetProbabilityValue(value, data.WrappedData, (wrappedData, parsedValue) => wrappedData.FailureProbabilityOpenStructure = parsedValue);
- ClearOutputAndNotifyPropertyChanged();
+ ChangePropertyAndNotify(
+ (input, newValue) =>
+ SetProbabilityValue(
+ newValue,
+ data.WrappedData,
+ (wrappedData, parsedValue) => wrappedData.FailureProbabilityOpenStructure = parsedValue),
+ value);
}
}
@@ -336,8 +343,13 @@
}
set
{
- SetProbabilityValue(value, data.WrappedData, (wrappedData, parsedValue) => wrappedData.FailureProbabilityReparation = parsedValue);
- ClearOutputAndNotifyPropertyChanged();
+ ChangePropertyAndNotify(
+ (input, newValue) =>
+ SetProbabilityValue(
+ newValue,
+ data.WrappedData,
+ (wrappedData, parsedValue) => wrappedData.FailureProbabilityReparation = parsedValue),
+ value);
}
}
@@ -353,8 +365,8 @@
}
set
{
- data.WrappedData.IdenticalApertures = value;
- ClearOutputAndNotifyPropertyChanged();
+ ChangePropertyAndNotify(
+ (input, newValue) => data.WrappedData.IdenticalApertures = newValue, value);
}
}
@@ -387,8 +399,13 @@
}
set
{
- SetProbabilityValue(value, data.WrappedData, (wrappedData, parsedValue) => wrappedData.ProbabilityOrFrequencyOpenStructureBeforeFlooding = parsedValue);
- ClearOutputAndNotifyPropertyChanged();
+ ChangePropertyAndNotify(
+ (input, newValue) =>
+ SetProbabilityValue(
+ newValue,
+ data.WrappedData,
+ (wrappedData, parsedValue) => wrappedData.ProbabilityOrFrequencyOpenStructureBeforeFlooding = parsedValue),
+ value);
}
}