Index: Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/PropertyClasses/GrassCoverErosionInwardsCalculationsProperties.cs =================================================================== diff -u -r52ea2c5dba806b8ff57b8124428c162cb4cd87cf -rd87a755841251f5ef9da579d3370198e732789f0 --- Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/PropertyClasses/GrassCoverErosionInwardsCalculationsProperties.cs (.../GrassCoverErosionInwardsCalculationsProperties.cs) (revision 52ea2c5dba806b8ff57b8124428c162cb4cd87cf) +++ Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/PropertyClasses/GrassCoverErosionInwardsCalculationsProperties.cs (.../GrassCoverErosionInwardsCalculationsProperties.cs) (revision d87a755841251f5ef9da579d3370198e732789f0) @@ -37,11 +37,10 @@ { private const int namePropertyIndex = 1; private const int codePropertyIndex = 2; - private const int groupPropertyIndex = 3; - private const int frunupModelFactorPropertyIndex = 4; - private const int fbFactorPropertyIndex = 5; - private const int fnFactorPropertyIndex = 6; - private const int fshallowModelFactorPropertyIndex = 7; + private const int frunupModelFactorPropertyIndex = 3; + private const int fbFactorPropertyIndex = 4; + private const int fnFactorPropertyIndex = 5; + private const int fshallowModelFactorPropertyIndex = 6; /// /// Creates a new instance of . @@ -52,8 +51,7 @@ GrassCoverErosionInwardsFailureMechanism data) : base(data, new ConstructionProperties { NamePropertyIndex = namePropertyIndex, - CodePropertyIndex = codePropertyIndex, - GroupPropertyIndex = groupPropertyIndex + CodePropertyIndex = codePropertyIndex }) {} #region Model settings Index: Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/PropertyClasses/GrassCoverErosionInwardsFailureMechanismProperties.cs =================================================================== diff -u -r52ea2c5dba806b8ff57b8124428c162cb4cd87cf -rd87a755841251f5ef9da579d3370198e732789f0 --- Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/PropertyClasses/GrassCoverErosionInwardsFailureMechanismProperties.cs (.../GrassCoverErosionInwardsFailureMechanismProperties.cs) (revision 52ea2c5dba806b8ff57b8124428c162cb4cd87cf) +++ Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/PropertyClasses/GrassCoverErosionInwardsFailureMechanismProperties.cs (.../GrassCoverErosionInwardsFailureMechanismProperties.cs) (revision d87a755841251f5ef9da579d3370198e732789f0) @@ -65,9 +65,6 @@ }, { nameof(Code), constructionProperties.CodePropertyIndex - }, - { - nameof(Group), constructionProperties.GroupPropertyIndex } }; } @@ -97,11 +94,6 @@ /// public int CodePropertyIndex { get; set; } - /// - /// Gets or sets the property index for . - /// - public int GroupPropertyIndex { get; set; } - #endregion } @@ -131,18 +123,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/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/PropertyClasses/GrassCoverErosionInwardsFailurePathProperties.cs =================================================================== diff -u -r2232ff8b2af8d6a7a9005b2f2e0566ebcba2b1e9 -rd87a755841251f5ef9da579d3370198e732789f0 --- Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/PropertyClasses/GrassCoverErosionInwardsFailurePathProperties.cs (.../GrassCoverErosionInwardsFailurePathProperties.cs) (revision 2232ff8b2af8d6a7a9005b2f2e0566ebcba2b1e9) +++ Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/PropertyClasses/GrassCoverErosionInwardsFailurePathProperties.cs (.../GrassCoverErosionInwardsFailurePathProperties.cs) (revision d87a755841251f5ef9da579d3370198e732789f0) @@ -56,8 +56,7 @@ base(data, new ConstructionProperties { NamePropertyIndex = namePropertyIndex, - CodePropertyIndex = codePropertyIndex, - GroupPropertyIndex = groupPropertyIndex + CodePropertyIndex = codePropertyIndex }) { if (handler == null) @@ -68,7 +67,32 @@ propertyChangeHandler = handler; } - + #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 + { + IEnumerable affectedObjects = propertyChangeHandler.SetPropertyValueAfterConfirmation( + data, + value, + (f, v) => f.GeneralInput.N = v); + + NotifyAffectedObjects(affectedObjects); + } + } + + #endregion + [DynamicVisibleValidationMethod] public bool DynamicVisibleValidationMethod(string propertyName) { @@ -91,6 +115,18 @@ #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; + } + } + [DynamicVisible] [PropertyOrder(contributionPropertyIndex)] [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_General))] @@ -117,32 +153,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 - { - IEnumerable affectedObjects = propertyChangeHandler.SetPropertyValueAfterConfirmation( - data, - value, - (f, v) => f.GeneralInput.N = v); - - NotifyAffectedObjects(affectedObjects); - } - } - - #endregion - } } \ No newline at end of file Index: Riskeer/GrassCoverErosionInwards/test/Riskeer.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsCalculationsPropertiesTest.cs =================================================================== diff -u -r52ea2c5dba806b8ff57b8124428c162cb4cd87cf -rd87a755841251f5ef9da579d3370198e732789f0 --- Riskeer/GrassCoverErosionInwards/test/Riskeer.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsCalculationsPropertiesTest.cs (.../GrassCoverErosionInwardsCalculationsPropertiesTest.cs) (revision 52ea2c5dba806b8ff57b8124428c162cb4cd87cf) +++ Riskeer/GrassCoverErosionInwards/test/Riskeer.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsCalculationsPropertiesTest.cs (.../GrassCoverErosionInwardsCalculationsPropertiesTest.cs) (revision d87a755841251f5ef9da579d3370198e732789f0) @@ -32,11 +32,10 @@ { private const int namePropertyIndex = 0; private const int codePropertyIndex = 1; - private const int groupPropertyIndex = 2; - private const int frunupModelFactorPropertyIndex = 3; - private const int fbFactorPropertyIndex = 4; - private const int fnFactorPropertyIndex = 5; - private const int fshallowModelFactorPropertyIndex = 6; + private const int frunupModelFactorPropertyIndex = 2; + private const int fbFactorPropertyIndex = 3; + private const int fnFactorPropertyIndex = 4; + private const int fshallowModelFactorPropertyIndex = 5; [Test] public void Constructor_ExpectedValues() @@ -52,7 +51,6 @@ Assert.IsInstanceOf(properties); Assert.AreEqual(failureMechanism.Name, properties.Name); Assert.AreEqual(failureMechanism.Code, properties.Code); - Assert.AreEqual(failureMechanism.Group, properties.Group); GeneralGrassCoverErosionInwardsInput generalInput = failureMechanism.GeneralInput; @@ -84,7 +82,7 @@ const string modelSettingsCategory = "Modelinstellingen"; PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); - Assert.AreEqual(7, dynamicProperties.Count); + Assert.AreEqual(6, dynamicProperties.Count); PropertyDescriptor nameProperty = dynamicProperties[namePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nameProperty, @@ -100,13 +98,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 frunupModelFactorProperty = dynamicProperties[frunupModelFactorPropertyIndex]; Assert.IsInstanceOf(frunupModelFactorProperty.Converter); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(frunupModelFactorProperty, Index: Riskeer/GrassCoverErosionInwards/test/Riskeer.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsFailureMechanismPropertiesTest.cs =================================================================== diff -u -r52ea2c5dba806b8ff57b8124428c162cb4cd87cf -rd87a755841251f5ef9da579d3370198e732789f0 --- Riskeer/GrassCoverErosionInwards/test/Riskeer.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsFailureMechanismPropertiesTest.cs (.../GrassCoverErosionInwardsFailureMechanismPropertiesTest.cs) (revision 52ea2c5dba806b8ff57b8124428c162cb4cd87cf) +++ Riskeer/GrassCoverErosionInwards/test/Riskeer.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsFailureMechanismPropertiesTest.cs (.../GrassCoverErosionInwardsFailureMechanismPropertiesTest.cs) (revision d87a755841251f5ef9da579d3370198e732789f0) @@ -32,9 +32,8 @@ [TestFixture] public class GrassCoverErosionInwardsFailureMechanismPropertiesTest { - 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.IsInstanceOf>(properties); Assert.AreEqual(failureMechanism.Name, properties.Name); Assert.AreEqual(failureMechanism.Code, properties.Code); - Assert.AreEqual(failureMechanism.Group, properties.Group); } [Test] @@ -84,13 +82,12 @@ var properties = new GrassCoverErosionInwardsFailureMechanismProperties(failureMechanism, new GrassCoverErosionInwardsFailureMechanismProperties.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"; @@ -107,13 +104,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