Index: Ringtoets/StabilityStoneCover/src/Ringtoets.StabilityStoneCover.Forms/PropertyClasses/StabilityStoneCoverFailureMechanismProperties.cs =================================================================== diff -u -rac96d7c315129af851634ed5a4a6800b59ede718 -rac74205f3a29ca5bce4772b38e365f85fa9ba0bc --- Ringtoets/StabilityStoneCover/src/Ringtoets.StabilityStoneCover.Forms/PropertyClasses/StabilityStoneCoverFailureMechanismProperties.cs (.../StabilityStoneCoverFailureMechanismProperties.cs) (revision ac96d7c315129af851634ed5a4a6800b59ede718) +++ Ringtoets/StabilityStoneCover/src/Ringtoets.StabilityStoneCover.Forms/PropertyClasses/StabilityStoneCoverFailureMechanismProperties.cs (.../StabilityStoneCoverFailureMechanismProperties.cs) (revision ac74205f3a29ca5bce4772b38e365f85fa9ba0bc) @@ -19,7 +19,9 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using System; using System.ComponentModel; +using Core.Common.Base.Data; using Core.Common.Gui.Attributes; using Core.Common.Gui.PropertyBag; using Core.Common.Util.Attributes; @@ -35,20 +37,58 @@ /// public class StabilityStoneCoverFailureMechanismProperties : ObjectProperties { + /// + /// Creates a new instance of . + /// + /// The instance to show the properties of. + /// Thrown when any input parameter is null. + public StabilityStoneCoverFailureMechanismProperties(StabilityStoneCoverFailureMechanism data) + { + if (data == null) + { + throw new ArgumentNullException(nameof(data)); + } + + Data = data; + } + + #region Length effect parameters + + [DynamicVisible] + [PropertyOrder(6)] + [ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_LengthEffect))] + [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_N_DisplayName))] + [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.FailureMechanism_N_Description))] + public RoundedDouble N + { + get + { + return data.GeneralInput.N; + } + set + { + data.GeneralInput.N = value; + } + } + + #endregion + [DynamicVisibleValidationMethod] public bool DynamicVisibleValidationMethod(string propertyName) { if (!data.IsRelevant && ShouldHidePropertyWhenFailureMechanismIrrelevant(propertyName)) { return false; } + return true; } private bool ShouldHidePropertyWhenFailureMechanismIrrelevant(string propertyName) { return nameof(Blocks).Equals(propertyName) - || nameof(Columns).Equals(propertyName); + || nameof(Columns).Equals(propertyName) + || nameof(N).Equals(propertyName); } #region General