Index: Riskeer/Integration/src/Riskeer.Integration.Forms/Properties/Resources.Designer.cs =================================================================== diff -u -rb0b8ed98bdefa41a1c250ed464a3616fd23c2d65 -r4a18e700834ec14e178ca85eb85f3bf09a6677dc --- Riskeer/Integration/src/Riskeer.Integration.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision b0b8ed98bdefa41a1c250ed464a3616fd23c2d65) +++ Riskeer/Integration/src/Riskeer.Integration.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 4a18e700834ec14e178ca85eb85f3bf09a6677dc) @@ -626,6 +626,24 @@ } /// + /// Looks up a localized string similar to Versie van HRD bestand. + /// + public static string HydraulicDatabase_Version_Description { + get { + return ResourceManager.GetString("HydraulicDatabase_Version_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Versie. + /// + public static string HydraulicDatabase_Version_DisplayName { + get { + return ResourceManager.GetString("HydraulicDatabase_Version_DisplayName", resourceCulture); + } + } + + /// /// Looks up a localized string similar to Locatie van de bestandsmap.. /// public static string HydraulicDatabase_WorkingDirectory_Description { Index: Riskeer/Integration/src/Riskeer.Integration.Forms/Properties/Resources.resx =================================================================== diff -u -rb0b8ed98bdefa41a1c250ed464a3616fd23c2d65 -r4a18e700834ec14e178ca85eb85f3bf09a6677dc --- Riskeer/Integration/src/Riskeer.Integration.Forms/Properties/Resources.resx (.../Resources.resx) (revision b0b8ed98bdefa41a1c250ed464a3616fd23c2d65) +++ Riskeer/Integration/src/Riskeer.Integration.Forms/Properties/Resources.resx (.../Resources.resx) (revision 4a18e700834ec14e178ca85eb85f3bf09a6677dc) @@ -414,4 +414,10 @@ Selecteer een andere bestandsmap. + + Versie + + + Versie van HRD bestand + \ No newline at end of file Index: Riskeer/Integration/src/Riskeer.Integration.Forms/PropertyClasses/HydraulicBoundaryDatabaseProperties.cs =================================================================== diff -u -rb0b8ed98bdefa41a1c250ed464a3616fd23c2d65 -r4a18e700834ec14e178ca85eb85f3bf09a6677dc --- Riskeer/Integration/src/Riskeer.Integration.Forms/PropertyClasses/HydraulicBoundaryDatabaseProperties.cs (.../HydraulicBoundaryDatabaseProperties.cs) (revision b0b8ed98bdefa41a1c250ed464a3616fd23c2d65) +++ Riskeer/Integration/src/Riskeer.Integration.Forms/PropertyClasses/HydraulicBoundaryDatabaseProperties.cs (.../HydraulicBoundaryDatabaseProperties.cs) (revision 4a18e700834ec14e178ca85eb85f3bf09a6677dc) @@ -20,8 +20,10 @@ // All rights reserved. using System; +using System.ComponentModel; using Core.Common.Util.Attributes; using Core.Gui.Attributes; +using Core.Gui.Converters; using Core.Gui.PropertyBag; using Riskeer.Common.Data.Hydraulics; using Riskeer.Integration.Forms.Properties; @@ -35,6 +37,8 @@ public class HydraulicBoundaryDatabaseProperties : ObjectProperties { private const int usePreprocessorClosurePropertyIndex = 0; + private const int locationsPropertyIndex = 1; + private const int versionPropertyIndex = 2; /// /// Creates a new instance of . @@ -62,5 +66,30 @@ return data.UsePreprocessorClosure; } } + + [PropertyOrder(locationsPropertyIndex)] + [TypeConverter(typeof(ExpandableArrayConverter))] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_General))] + [ResourcesDisplayName(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.HydraulicBoundaryDatabase_Locations_DisplayName))] + [ResourcesDescription(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.HydraulicBoundaryDatabase_Locations_Description))] + public HydraulicBoundaryLocation[] Locations + { + get + { + return data.Locations.ToArray(); + } + } + + [PropertyOrder(versionPropertyIndex)] + [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_General))] + [ResourcesDisplayName(typeof(Resources), nameof(Resources.HydraulicDatabase_Version_DisplayName))] + [ResourcesDescription(typeof(Resources), nameof(Resources.HydraulicDatabase_Version_Description))] + public string Version + { + get + { + return data.Version; + } + } } } \ No newline at end of file Index: Riskeer/Integration/test/Riskeer.Integration.Forms.Test/PropertyClasses/HydraulicBoundaryDatabasePropertiesTest.cs =================================================================== diff -u -rb0b8ed98bdefa41a1c250ed464a3616fd23c2d65 -r4a18e700834ec14e178ca85eb85f3bf09a6677dc --- Riskeer/Integration/test/Riskeer.Integration.Forms.Test/PropertyClasses/HydraulicBoundaryDatabasePropertiesTest.cs (.../HydraulicBoundaryDatabasePropertiesTest.cs) (revision b0b8ed98bdefa41a1c250ed464a3616fd23c2d65) +++ Riskeer/Integration/test/Riskeer.Integration.Forms.Test/PropertyClasses/HydraulicBoundaryDatabasePropertiesTest.cs (.../HydraulicBoundaryDatabasePropertiesTest.cs) (revision 4a18e700834ec14e178ca85eb85f3bf09a6677dc) @@ -34,6 +34,8 @@ public class HydraulicBoundaryDatabasePropertiesTest { private const int usePreprocessorClosurePropertyIndex = 0; + private const int locationsPropertyIndex = 1; + private const int versionPropertyIndex = 2; [Test] public void Constructor_HydraulicBoundaryDatabaseNull_ThrowsArgumentNullException() @@ -85,7 +87,7 @@ // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); - Assert.AreEqual(1, dynamicProperties.Count); + Assert.AreEqual(3, dynamicProperties.Count); const string expectedCategory = "Algemeen"; @@ -95,6 +97,20 @@ "Gebruik preprocessor sluitregime database", "Gebruik de preprocessor sluitregime database bij het uitvoeren van een berekening.", true); + + PropertyDescriptor locationsProperty = dynamicProperties[locationsPropertyIndex]; + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(locationsProperty, + expectedCategory, + "Locaties", + "Locaties uit de hydraulische belastingendatabase.", + true); + + PropertyDescriptor versionProperty = dynamicProperties[versionPropertyIndex]; + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(versionProperty, + expectedCategory, + "Versie", + "Versie van HRD bestand", + true); } } } \ No newline at end of file