Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PropertyClasses/ClosingStructuresInputContextProperties.cs =================================================================== diff -u -rf3c7ae4cc9069268dba97e9dd691bf449fa393db -r449b5831547d5a6391da8ad825e7c845ef7ecc1c --- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PropertyClasses/ClosingStructuresInputContextProperties.cs (.../ClosingStructuresInputContextProperties.cs) (revision f3c7ae4cc9069268dba97e9dd691bf449fa393db) +++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PropertyClasses/ClosingStructuresInputContextProperties.cs (.../ClosingStructuresInputContextProperties.cs) (revision 449b5831547d5a6391da8ad825e7c845ef7ecc1c) @@ -258,6 +258,7 @@ } } + [DynamicReadOnly] [PropertyOrder(inflowModelTypePropertyIndex)] [TypeConverter(typeof(EnumTypeConverter))] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_Schematization))] @@ -313,6 +314,7 @@ } } + [DynamicReadOnly] [PropertyOrder(failureProbabilityOpenStructurePropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_Schematization))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.FailureProbabilityOpenStructure_DisplayName))] @@ -332,6 +334,7 @@ } } + [DynamicReadOnly] [PropertyOrder(failureProbabilityReparationPropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_Schematization))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.FailureProbabilityReparation_DisplayName))] @@ -351,6 +354,7 @@ } } + [DynamicReadOnly] [PropertyOrder(identicalAperturesPropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_Schematization))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.IdenticalApertures_DisplayName))] @@ -386,6 +390,7 @@ } } + [DynamicReadOnly] [PropertyOrder(probabilityOrFrequencyOpenStructureBeforeFloodingPropertyIndex)] [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_Schematization))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.ProbabilityOrFrequencyOpenStructureBeforeFlooding_DisplayName))] @@ -406,5 +411,31 @@ } #endregion + + public override bool IsReadOnly(string property) + { + if (property == nameof(InflowModelType)) + { + return !HasStructure(); + } + if (property == nameof(IdenticalApertures)) + { + return !HasStructure(); + } + if (property == nameof(ProbabilityOrFrequencyOpenStructureBeforeFlooding)) + { + return !HasStructure(); + } + if (property == nameof(FailureProbabilityOpenStructure)) + { + return !HasStructure(); + } + if (property == nameof(FailureProbabilityReparation)) + { + return !HasStructure(); + } + + return base.IsReadOnly(property); + } } } \ No newline at end of file