Index: Core/Plugins/src/Core.Plugins.Map/Properties/Resources.Designer.cs =================================================================== diff -u -rca77db5948e6c622ea1fb3092917341ba1234711 -r4df1384a923e755db9c0f8a35eab038a8b4046fe --- Core/Plugins/src/Core.Plugins.Map/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision ca77db5948e6c622ea1fb3092917341ba1234711) +++ Core/Plugins/src/Core.Plugins.Map/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 4df1384a923e755db9c0f8a35eab038a8b4046fe) @@ -22,7 +22,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.42000 +// Runtime Version:4.0.30319.17929 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -147,6 +147,24 @@ } /// + /// Looks up a localized string similar to Toont de eigenschap op basis waarvan labels op de geselecteerde kaartlaag worden weergegeven.. + /// + public static string Mapdata_SelectedMetaDataAttribute_Description { + get { + return ResourceManager.GetString("Mapdata_SelectedMetaDataAttribute_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Op basis van. + /// + public static string Mapdata_SelectedMetaDataAttribute_DisplayName { + get { + return ResourceManager.GetString("Mapdata_SelectedMetaDataAttribute_DisplayName", resourceCulture); + } + } + + /// /// Looks up a localized string similar to Geeft aan of op deze kaartlaag labels moeten worden weergegeven.. /// public static string MapData_ShowLabels_Description { Index: Core/Plugins/src/Core.Plugins.Map/Properties/Resources.resx =================================================================== diff -u -rca77db5948e6c622ea1fb3092917341ba1234711 -r4df1384a923e755db9c0f8a35eab038a8b4046fe --- Core/Plugins/src/Core.Plugins.Map/Properties/Resources.resx (.../Resources.resx) (revision ca77db5948e6c622ea1fb3092917341ba1234711) +++ Core/Plugins/src/Core.Plugins.Map/Properties/Resources.resx (.../Resources.resx) (revision 4df1384a923e755db9c0f8a35eab038a8b4046fe) @@ -244,4 +244,10 @@ Polygonen + + Toont de eigenschap op basis waarvan labels op de geselecteerde kaartlaag worden weergegeven. + + + Op basis van + \ No newline at end of file Index: Core/Plugins/src/Core.Plugins.Map/PropertyClasses/MapPointDataProperties.cs =================================================================== diff -u -r7956ca0b04c6022c8a55d6ef7a282e7ac2364a74 -r4df1384a923e755db9c0f8a35eab038a8b4046fe --- Core/Plugins/src/Core.Plugins.Map/PropertyClasses/MapPointDataProperties.cs (.../MapPointDataProperties.cs) (revision 7956ca0b04c6022c8a55d6ef7a282e7ac2364a74) +++ Core/Plugins/src/Core.Plugins.Map/PropertyClasses/MapPointDataProperties.cs (.../MapPointDataProperties.cs) (revision 4df1384a923e755db9c0f8a35eab038a8b4046fe) @@ -39,6 +39,7 @@ private const int namePropertyIndex = 0; private const int typePropertyIndex = 1; private const int showLabelsPropertyIndex = 2; + private const int selectedMetaDataAttributePropertyIndex = 3; [PropertyOrder(namePropertyIndex)] [ResourcesCategory(typeof(Resources), "Categories_General")] @@ -86,8 +87,11 @@ return data.MetaData; } + [PropertyOrder(selectedMetaDataAttributePropertyIndex)] [Editor(typeof(MetaDataAttributeEditor), typeof(UITypeEditor))] [ResourcesCategory(typeof(Resources), "Categories_Label")] + [ResourcesDisplayName(typeof(Resources), "Mapdata_SelectedMetaDataAttribute_DisplayName")] + [ResourcesDescription(typeof(Resources), "Mapdata_SelectedMetaDataAttribute_Description")] public string SelectedMetaDataAttribute { get Index: Core/Plugins/test/Core.Plugins.Map.Test/PropertyClasses/MapPointDataPropertiesTest.cs =================================================================== diff -u -r85bd9b0f9d23da455c7445094c7ce192c56d64b8 -r4df1384a923e755db9c0f8a35eab038a8b4046fe --- Core/Plugins/test/Core.Plugins.Map.Test/PropertyClasses/MapPointDataPropertiesTest.cs (.../MapPointDataPropertiesTest.cs) (revision 85bd9b0f9d23da455c7445094c7ce192c56d64b8) +++ Core/Plugins/test/Core.Plugins.Map.Test/PropertyClasses/MapPointDataPropertiesTest.cs (.../MapPointDataPropertiesTest.cs) (revision 4df1384a923e755db9c0f8a35eab038a8b4046fe) @@ -36,6 +36,7 @@ private const int namePropertyIndex = 0; private const int typePropertyIndex = 1; private const int showLabelsPropertyIndex = 2; + private const int selectedMetaDataAttributePropertyIndex = 3; [Test] public void Constructor_ExpectedValues() @@ -78,7 +79,7 @@ // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); - Assert.AreEqual(3, dynamicProperties.Count); + Assert.AreEqual(4, dynamicProperties.Count); const string generalCategory = "Algemeen"; const string labelCategory = "Label"; @@ -102,15 +103,22 @@ labelCategory, "Weergeven", "Geeft aan of op deze kaartlaag labels moeten worden weergegeven."); + + PropertyDescriptor selectedMetaDataAttributeProperty = dynamicProperties[selectedMetaDataAttributePropertyIndex]; + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(selectedMetaDataAttributeProperty, + labelCategory, + "Op basis van", + "Toont de eigenschap op basis waarvan labels op de geselecteerde kaartlaag worden weergegeven."); } [Test] public void SetProperties_IndividualProperties_UpdateDataAndNotifyObservers() { // Setup + const int numberOfChangedProperties = 2; var mocks = new MockRepository(); var observerMock = mocks.StrictMock(); - observerMock.Expect(o => o.UpdateObserver()); + observerMock.Expect(o => o.UpdateObserver()).Repeat.Times(numberOfChangedProperties); mocks.ReplayAll(); MapPointData mapPointData = new MapPointData("Test") @@ -127,9 +135,11 @@ // Call properties.ShowLabels = false; + properties.SelectedMetaDataAttribute = "ID"; // Assert Assert.AreEqual(properties.ShowLabels, mapPointData.ShowLabels); + Assert.AreEqual(properties.SelectedMetaDataAttribute, mapPointData.SelectedMetaDataAttribute); mocks.VerifyAll(); } }