Index: Riskeer/HeightStructures/src/Riskeer.HeightStructures.Forms/PropertyClasses/HeightStructuresCalculationsProperties.cs =================================================================== diff -u -r818c24d35ba57363adc8064ea25a18521939d83e -r414a3017039cb070e1bd09082fdc236dada9c111 --- Riskeer/HeightStructures/src/Riskeer.HeightStructures.Forms/PropertyClasses/HeightStructuresCalculationsProperties.cs (.../HeightStructuresCalculationsProperties.cs) (revision 818c24d35ba57363adc8064ea25a18521939d83e) +++ Riskeer/HeightStructures/src/Riskeer.HeightStructures.Forms/PropertyClasses/HeightStructuresCalculationsProperties.cs (.../HeightStructuresCalculationsProperties.cs) (revision 414a3017039cb070e1bd09082fdc236dada9c111) @@ -37,10 +37,9 @@ { private const int namePropertyIndex = 1; private const int codePropertyIndex = 2; - private const int groupPropertyIndex = 3; - private const int gravitationalAccelerationPropertyIndex = 4; - private const int modelFactorOvertoppingFlowPropertyIndex = 5; - private const int modelFactorStorageVolumePropertyIndex = 6; + private const int gravitationalAccelerationPropertyIndex = 3; + private const int modelFactorOvertoppingFlowPropertyIndex = 4; + private const int modelFactorStorageVolumePropertyIndex = 5; /// /// Creates a new instance of . @@ -50,8 +49,7 @@ public HeightStructuresCalculationsProperties(HeightStructuresFailureMechanism data) : base(data, new ConstructionProperties { NamePropertyIndex = namePropertyIndex, - CodePropertyIndex = codePropertyIndex, - GroupPropertyIndex = groupPropertyIndex + CodePropertyIndex = codePropertyIndex }) {} #region General Index: Riskeer/HeightStructures/src/Riskeer.HeightStructures.Forms/PropertyClasses/HeightStructuresFailureMechanismProperties.cs =================================================================== diff -u -r818c24d35ba57363adc8064ea25a18521939d83e -r414a3017039cb070e1bd09082fdc236dada9c111 --- Riskeer/HeightStructures/src/Riskeer.HeightStructures.Forms/PropertyClasses/HeightStructuresFailureMechanismProperties.cs (.../HeightStructuresFailureMechanismProperties.cs) (revision 818c24d35ba57363adc8064ea25a18521939d83e) +++ Riskeer/HeightStructures/src/Riskeer.HeightStructures.Forms/PropertyClasses/HeightStructuresFailureMechanismProperties.cs (.../HeightStructuresFailureMechanismProperties.cs) (revision 414a3017039cb070e1bd09082fdc236dada9c111) @@ -64,9 +64,6 @@ }, { nameof(Code), constructionProperties.CodePropertyIndex - }, - { - nameof(Group), constructionProperties.GroupPropertyIndex } }; } @@ -96,11 +93,6 @@ /// public int CodePropertyIndex { get; set; } - /// - /// Gets or sets the property index for . - /// - public int GroupPropertyIndex { get; set; } - #endregion } @@ -130,18 +122,6 @@ } } - [DynamicPropertyOrder] - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_General))] - [ResourcesDisplayName(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.FailureMechanism_Group_DisplayName))] - [ResourcesDescription(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.FailureMechanism_Group_Description))] - public int Group - { - get - { - return data.Group; - } - } - #endregion } } \ No newline at end of file Index: Riskeer/HeightStructures/src/Riskeer.HeightStructures.Forms/PropertyClasses/HeightStructuresFailurePathProperties.cs =================================================================== diff -u -r2232ff8b2af8d6a7a9005b2f2e0566ebcba2b1e9 -r414a3017039cb070e1bd09082fdc236dada9c111 --- Riskeer/HeightStructures/src/Riskeer.HeightStructures.Forms/PropertyClasses/HeightStructuresFailurePathProperties.cs (.../HeightStructuresFailurePathProperties.cs) (revision 2232ff8b2af8d6a7a9005b2f2e0566ebcba2b1e9) +++ Riskeer/HeightStructures/src/Riskeer.HeightStructures.Forms/PropertyClasses/HeightStructuresFailurePathProperties.cs (.../HeightStructuresFailurePathProperties.cs) (revision 414a3017039cb070e1bd09082fdc236dada9c111) @@ -48,10 +48,31 @@ public HeightStructuresFailurePathProperties(HeightStructuresFailureMechanism data) : base(data, new ConstructionProperties { NamePropertyIndex = namePropertyIndex, - CodePropertyIndex = codePropertyIndex, - GroupPropertyIndex = groupPropertyIndex + CodePropertyIndex = codePropertyIndex }) {} + #region Length effect parameters + + [DynamicVisible] + [PropertyOrder(nPropertyIndex)] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_LengthEffect))] + [ResourcesDisplayName(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.FailureMechanism_N_DisplayName))] + [ResourcesDescription(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.FailureMechanism_N_Description))] + public RoundedDouble N + { + get + { + return data.GeneralInput.N; + } + set + { + data.GeneralInput.N = value; + data.NotifyObservers(); + } + } + + #endregion + [DynamicVisibleValidationMethod] public bool DynamicVisibleValidationMethod(string propertyName) { @@ -63,9 +84,21 @@ return nameof(Contribution).Equals(propertyName) || nameof(N).Equals(propertyName); } - + #region General + [PropertyOrder(groupPropertyIndex)] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_General))] + [ResourcesDisplayName(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.FailureMechanism_Group_DisplayName))] + [ResourcesDescription(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.FailureMechanism_Group_Description))] + public int Group + { + get + { + return data.Group; + } + } + [PropertyOrder(inAssemblyPropertyIndex)] [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_General))] [ResourcesDisplayName(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.FailurePath_InAssembly_DisplayName))] @@ -92,27 +125,5 @@ } #endregion - - #region Length effect parameters - - [DynamicVisible] - [PropertyOrder(nPropertyIndex)] - [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_LengthEffect))] - [ResourcesDisplayName(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.FailureMechanism_N_DisplayName))] - [ResourcesDescription(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.FailureMechanism_N_Description))] - public RoundedDouble N - { - get - { - return data.GeneralInput.N; - } - set - { - data.GeneralInput.N = value; - data.NotifyObservers(); - } - } - - #endregion } } \ No newline at end of file Index: Riskeer/HeightStructures/test/Riskeer.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresCalculationsPropertiesTest.cs =================================================================== diff -u -r818c24d35ba57363adc8064ea25a18521939d83e -r414a3017039cb070e1bd09082fdc236dada9c111 --- Riskeer/HeightStructures/test/Riskeer.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresCalculationsPropertiesTest.cs (.../HeightStructuresCalculationsPropertiesTest.cs) (revision 818c24d35ba57363adc8064ea25a18521939d83e) +++ Riskeer/HeightStructures/test/Riskeer.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresCalculationsPropertiesTest.cs (.../HeightStructuresCalculationsPropertiesTest.cs) (revision 414a3017039cb070e1bd09082fdc236dada9c111) @@ -33,10 +33,9 @@ { private const int namePropertyIndex = 0; private const int codePropertyIndex = 1; - private const int groupPropertyIndex = 2; - private const int gravitationalAccelerationPropertyIndex = 3; - private const int modelFactorOvertoppingFlowPropertyIndex = 4; - private const int modelFactorStorageVolumePropertyIndex = 5; + private const int gravitationalAccelerationPropertyIndex = 2; + private const int modelFactorOvertoppingFlowPropertyIndex = 3; + private const int modelFactorStorageVolumePropertyIndex = 4; [Test] public void Constructor_ExpectedValues() @@ -52,7 +51,6 @@ Assert.AreSame(failureMechanism, properties.Data); Assert.AreEqual(failureMechanism.Name, properties.Name); Assert.AreEqual(failureMechanism.Code, properties.Code); - Assert.AreEqual(failureMechanism.Group, properties.Group); GeneralHeightStructuresInput generalInput = failureMechanism.GeneralInput; Assert.AreEqual(generalInput.GravitationalAcceleration, properties.GravitationalAcceleration); @@ -75,7 +73,7 @@ const string modelSettingsCategory = "Modelinstellingen"; PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); - Assert.AreEqual(6, dynamicProperties.Count); + Assert.AreEqual(5, dynamicProperties.Count); PropertyDescriptor nameProperty = dynamicProperties[namePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nameProperty, @@ -91,13 +89,6 @@ "Het label van het toetsspoor.", true); - PropertyDescriptor groupProperty = dynamicProperties[groupPropertyIndex]; - PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(groupProperty, - generalCategory, - "Groep", - "De groep waar het toetsspoor toe behoort.", - true); - PropertyDescriptor gravitationalAccelerationProperty = dynamicProperties[gravitationalAccelerationPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(gravitationalAccelerationProperty, generalCategory, Index: Riskeer/HeightStructures/test/Riskeer.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresFailureMechanismPropertiesTest.cs =================================================================== diff -u -r818c24d35ba57363adc8064ea25a18521939d83e -r414a3017039cb070e1bd09082fdc236dada9c111 --- Riskeer/HeightStructures/test/Riskeer.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresFailureMechanismPropertiesTest.cs (.../HeightStructuresFailureMechanismPropertiesTest.cs) (revision 818c24d35ba57363adc8064ea25a18521939d83e) +++ Riskeer/HeightStructures/test/Riskeer.HeightStructures.Forms.Test/PropertyClasses/HeightStructuresFailureMechanismPropertiesTest.cs (.../HeightStructuresFailureMechanismPropertiesTest.cs) (revision 414a3017039cb070e1bd09082fdc236dada9c111) @@ -31,9 +31,8 @@ { public class HeightStructuresFailureMechanismPropertiesTest { - private const int namePropertyIndex = 2; - private const int codePropertyIndex = 1; - private const int groupPropertyIndex = 0; + private const int namePropertyIndex = 1; + private const int codePropertyIndex = 0; [Test] public void Constructor_DataNull_ThrowArgumentNullException() @@ -70,7 +69,6 @@ Assert.IsInstanceOf>(properties); Assert.AreEqual(failureMechanism.Name, properties.Name); Assert.AreEqual(failureMechanism.Code, properties.Code); - Assert.AreEqual(failureMechanism.Group, properties.Group); } [Test] @@ -83,13 +81,12 @@ var properties = new HeightStructuresFailureMechanismProperties(failureMechanism, new HeightStructuresFailureMechanismProperties.ConstructionProperties { NamePropertyIndex = namePropertyIndex, - CodePropertyIndex = codePropertyIndex, - GroupPropertyIndex = groupPropertyIndex + CodePropertyIndex = codePropertyIndex }); // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); - Assert.AreEqual(3, dynamicProperties.Count); + Assert.AreEqual(2, dynamicProperties.Count); const string generalCategory = "Algemeen"; @@ -106,13 +103,6 @@ "Label", "Het label van het toetsspoor.", true); - - PropertyDescriptor groupProperty = dynamicProperties[groupPropertyIndex]; - PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(groupProperty, - generalCategory, - "Groep", - "De groep waar het toetsspoor toe behoort.", - true); } } } \ No newline at end of file