Index: Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Forms/PropertyClasses/ClosingStructuresCalculationsProperties.cs =================================================================== diff -u -r240b188f86b1a819b9d8deba075589446e60b9fa -r7945259f4e52c395014118b00edbcd64d0c1bb9b --- Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Forms/PropertyClasses/ClosingStructuresCalculationsProperties.cs (.../ClosingStructuresCalculationsProperties.cs) (revision 240b188f86b1a819b9d8deba075589446e60b9fa) +++ Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Forms/PropertyClasses/ClosingStructuresCalculationsProperties.cs (.../ClosingStructuresCalculationsProperties.cs) (revision 7945259f4e52c395014118b00edbcd64d0c1bb9b) @@ -37,13 +37,12 @@ { private const int namePropertyIndex = 1; private const int codePropertyIndex = 2; - private const int groupPropertyIndex = 3; - private const int gravitationalAccelerationPropertyIndex = 4; + private const int gravitationalAccelerationPropertyIndex = 3; - private const int modelFactorOvertoppingFlowPropertyIndex = 5; - private const int modelFactorStorageVolumePropertyIndex = 6; - private const int modelFactorLongThresholdPropertyIndex = 7; - private const int modelFactorInflowVolumePropertyIndex = 8; + private const int modelFactorOvertoppingFlowPropertyIndex = 4; + private const int modelFactorStorageVolumePropertyIndex = 5; + private const int modelFactorLongThresholdPropertyIndex = 6; + private const int modelFactorInflowVolumePropertyIndex = 7; /// /// Creates a new instance of . @@ -53,8 +52,7 @@ public ClosingStructuresCalculationsProperties(ClosingStructuresFailureMechanism data) : base(data, new ConstructionProperties { NamePropertyIndex = namePropertyIndex, - CodePropertyIndex = codePropertyIndex, - GroupPropertyIndex = groupPropertyIndex + CodePropertyIndex = codePropertyIndex }) {} #region General Index: Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Forms/PropertyClasses/ClosingStructuresFailureMechanismProperties.cs =================================================================== diff -u -r240b188f86b1a819b9d8deba075589446e60b9fa -r7945259f4e52c395014118b00edbcd64d0c1bb9b --- Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Forms/PropertyClasses/ClosingStructuresFailureMechanismProperties.cs (.../ClosingStructuresFailureMechanismProperties.cs) (revision 240b188f86b1a819b9d8deba075589446e60b9fa) +++ Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Forms/PropertyClasses/ClosingStructuresFailureMechanismProperties.cs (.../ClosingStructuresFailureMechanismProperties.cs) (revision 7945259f4e52c395014118b00edbcd64d0c1bb9b) @@ -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/ClosingStructures/src/Riskeer.ClosingStructures.Forms/PropertyClasses/ClosingStructuresFailurePathProperties.cs =================================================================== diff -u -r2232ff8b2af8d6a7a9005b2f2e0566ebcba2b1e9 -r7945259f4e52c395014118b00edbcd64d0c1bb9b --- Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Forms/PropertyClasses/ClosingStructuresFailurePathProperties.cs (.../ClosingStructuresFailurePathProperties.cs) (revision 2232ff8b2af8d6a7a9005b2f2e0566ebcba2b1e9) +++ Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Forms/PropertyClasses/ClosingStructuresFailurePathProperties.cs (.../ClosingStructuresFailurePathProperties.cs) (revision 7945259f4e52c395014118b00edbcd64d0c1bb9b) @@ -39,7 +39,7 @@ private const int groupPropertyIndex = 3; private const int contributionPropertyIndex = 4; private const int inAssemblyPropertyIndex = 5; - + private const int cPropertyIndex = 6; private const int n2APropertyIndex = 7; private const int nPropertyIndex = 8; @@ -52,8 +52,7 @@ public ClosingStructuresFailurePathProperties(ClosingStructuresFailureMechanism data) : base(data, new ConstructionProperties { NamePropertyIndex = namePropertyIndex, - CodePropertyIndex = codePropertyIndex, - GroupPropertyIndex = groupPropertyIndex + CodePropertyIndex = codePropertyIndex }) {} [DynamicVisibleValidationMethod] @@ -70,9 +69,20 @@ || 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))] @@ -84,7 +94,7 @@ return data.InAssembly; } } - + [DynamicVisible] [PropertyOrder(contributionPropertyIndex)] [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_General))] Index: Riskeer/ClosingStructures/test/Riskeer.ClosingStructures.Forms.Test/PropertyClasses/ClosingStructuresCalculationsPropertiesTest.cs =================================================================== diff -u -r240b188f86b1a819b9d8deba075589446e60b9fa -r7945259f4e52c395014118b00edbcd64d0c1bb9b --- Riskeer/ClosingStructures/test/Riskeer.ClosingStructures.Forms.Test/PropertyClasses/ClosingStructuresCalculationsPropertiesTest.cs (.../ClosingStructuresCalculationsPropertiesTest.cs) (revision 240b188f86b1a819b9d8deba075589446e60b9fa) +++ Riskeer/ClosingStructures/test/Riskeer.ClosingStructures.Forms.Test/PropertyClasses/ClosingStructuresCalculationsPropertiesTest.cs (.../ClosingStructuresCalculationsPropertiesTest.cs) (revision 7945259f4e52c395014118b00edbcd64d0c1bb9b) @@ -33,13 +33,12 @@ { private const int namePropertyIndex = 0; private const int codePropertyIndex = 1; - private const int groupPropertyIndex = 2; - private const int gravitationalAccelerationPropertyIndex = 3; + private const int gravitationalAccelerationPropertyIndex = 2; - private const int modelFactorOvertoppingFlowPropertyIndex = 4; - private const int modelFactorStorageVolumePropertyIndex = 5; - private const int modelFactorLongThresholdPropertyIndex = 6; - private const int modelFactorInflowVolumePropertyIndex = 7; + private const int modelFactorOvertoppingFlowPropertyIndex = 3; + private const int modelFactorStorageVolumePropertyIndex = 4; + private const int modelFactorLongThresholdPropertyIndex = 5; + private const int modelFactorInflowVolumePropertyIndex = 6; [Test] public void Constructor_DataNull_ThrowArgumentNullException() @@ -66,7 +65,6 @@ Assert.AreSame(failureMechanism, properties.Data); Assert.AreEqual(failureMechanism.Name, properties.Name); Assert.AreEqual(failureMechanism.Code, properties.Code); - Assert.AreEqual(failureMechanism.Group, properties.Group); GeneralClosingStructuresInput generalInput = failureMechanism.GeneralInput; Assert.AreEqual(generalInput.GravitationalAcceleration, @@ -92,7 +90,7 @@ const string modelSettingsCategory = "Modelinstellingen"; PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); - Assert.AreEqual(8, dynamicProperties.Count); + Assert.AreEqual(7, dynamicProperties.Count); PropertyDescriptor nameProperty = dynamicProperties[namePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nameProperty, @@ -108,13 +106,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/ClosingStructures/test/Riskeer.ClosingStructures.Forms.Test/PropertyClasses/ClosingStructuresFailureMechanismPropertiesTest.cs =================================================================== diff -u -r240b188f86b1a819b9d8deba075589446e60b9fa -r7945259f4e52c395014118b00edbcd64d0c1bb9b --- Riskeer/ClosingStructures/test/Riskeer.ClosingStructures.Forms.Test/PropertyClasses/ClosingStructuresFailureMechanismPropertiesTest.cs (.../ClosingStructuresFailureMechanismPropertiesTest.cs) (revision 240b188f86b1a819b9d8deba075589446e60b9fa) +++ Riskeer/ClosingStructures/test/Riskeer.ClosingStructures.Forms.Test/PropertyClasses/ClosingStructuresFailureMechanismPropertiesTest.cs (.../ClosingStructuresFailureMechanismPropertiesTest.cs) (revision 7945259f4e52c395014118b00edbcd64d0c1bb9b) @@ -31,9 +31,8 @@ { public class ClosingStructuresFailureMechanismPropertiesTest { - 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() @@ -71,7 +70,6 @@ Assert.AreSame(failureMechanism, properties.Data); Assert.AreEqual(failureMechanism.Name, properties.Name); Assert.AreEqual(failureMechanism.Code, properties.Code); - Assert.AreEqual(failureMechanism.Group, properties.Group); } [Test] @@ -81,15 +79,14 @@ var properties = new ClosingStructuresFailureMechanismProperties(new ClosingStructuresFailureMechanism(), new ClosingStructuresFailureMechanismProperties.ConstructionProperties { NamePropertyIndex = namePropertyIndex, - CodePropertyIndex = codePropertyIndex, - GroupPropertyIndex = groupPropertyIndex + CodePropertyIndex = codePropertyIndex }); // Assert const string generalCategory = "Algemeen"; PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); - Assert.AreEqual(3, dynamicProperties.Count); + Assert.AreEqual(2, dynamicProperties.Count); PropertyDescriptor nameProperty = dynamicProperties[namePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nameProperty, @@ -104,13 +101,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