Index: Core/Components/src/Core.Components.Charting/Core.Components.Charting.csproj =================================================================== diff -u -r344646a09ee37435dd7b82f80e69f62c0f1bd128 -r4ae122e1d83aaf61af8aec92f0b26ecd72d1adac --- Core/Components/src/Core.Components.Charting/Core.Components.Charting.csproj (.../Core.Components.Charting.csproj) (revision 344646a09ee37435dd7b82f80e69f62c0f1bd128) +++ Core/Components/src/Core.Components.Charting/Core.Components.Charting.csproj (.../Core.Components.Charting.csproj) (revision 4ae122e1d83aaf61af8aec92f0b26ecd72d1adac) @@ -48,6 +48,11 @@ + + True + True + Resources.resx + @@ -59,12 +64,23 @@ Core.Common.Base False + + {F49BD8B2-332A-4C91-A196-8CCE0A2C7D98} + Core.Common.Utils + False + Copying.Lesser.licenseheader + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Cirkel + + + Ruit + + + Vierkant + + + Ster + + + Driehoek + + \ No newline at end of file Index: Core/Components/src/Core.Components.Charting/Styles/ChartPointSymbol.cs =================================================================== diff -u -r67284323e2785c651633d9c52049ba12a9c70e6a -r4ae122e1d83aaf61af8aec92f0b26ecd72d1adac --- Core/Components/src/Core.Components.Charting/Styles/ChartPointSymbol.cs (.../ChartPointSymbol.cs) (revision 67284323e2785c651633d9c52049ba12a9c70e6a) +++ Core/Components/src/Core.Components.Charting/Styles/ChartPointSymbol.cs (.../ChartPointSymbol.cs) (revision 4ae122e1d83aaf61af8aec92f0b26ecd72d1adac) @@ -19,17 +19,25 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using Core.Common.Utils.Attributes; +using Core.Components.Charting.Properties; + namespace Core.Components.Charting.Styles { /// /// All symbols supported by . /// public enum ChartPointSymbol { - None, + [ResourcesDisplayName(typeof(Resources), nameof(Resources.Circle_DisplayName))] Circle, + [ResourcesDisplayName(typeof(Resources), nameof(Resources.Square_DisplayName))] Square, + [ResourcesDisplayName(typeof(Resources), nameof(Resources.Diamond_DisplayName))] Diamond, - Triangle + [ResourcesDisplayName(typeof(Resources), nameof(Resources.Triangle_DisplayName))] + Triangle, + [ResourcesDisplayName(typeof(Resources), nameof(Resources.Star_DisplayName))] + Star } } \ No newline at end of file Index: Core/Components/src/Core.Components.OxyPlot/Converter/ChartDataHelper.cs =================================================================== diff -u -r5fb13b35ed6bba8b867b95826e85dddb064b7036 -r4ae122e1d83aaf61af8aec92f0b26ecd72d1adac --- Core/Components/src/Core.Components.OxyPlot/Converter/ChartDataHelper.cs (.../ChartDataHelper.cs) (revision 5fb13b35ed6bba8b867b95826e85dddb064b7036) +++ Core/Components/src/Core.Components.OxyPlot/Converter/ChartDataHelper.cs (.../ChartDataHelper.cs) (revision 4ae122e1d83aaf61af8aec92f0b26ecd72d1adac) @@ -61,7 +61,7 @@ lineStyle = LineStyle.DashDotDot; break; default: - throw new InvalidEnumArgumentException("dashStyle", + throw new InvalidEnumArgumentException(nameof(dashStyle), (int) dashStyle, typeof(DashStyle)); } @@ -80,9 +80,6 @@ MarkerType markerType; switch (symbol) { - case ChartPointSymbol.None: - markerType = MarkerType.None; - break; case ChartPointSymbol.Circle: markerType = MarkerType.Circle; break; @@ -95,6 +92,9 @@ case ChartPointSymbol.Triangle: markerType = MarkerType.Triangle; break; + case ChartPointSymbol.Star: + markerType = MarkerType.Star; + break; default: throw new InvalidEnumArgumentException(nameof(symbol), (int) symbol, Index: Core/Components/test/Core.Components.Charting.Test/Core.Components.Charting.Test.csproj =================================================================== diff -u -r320aceee6e754aa37aa80a80b371a0150cbf2496 -r4ae122e1d83aaf61af8aec92f0b26ecd72d1adac --- Core/Components/test/Core.Components.Charting.Test/Core.Components.Charting.Test.csproj (.../Core.Components.Charting.Test.csproj) (revision 320aceee6e754aa37aa80a80b371a0150cbf2496) +++ Core/Components/test/Core.Components.Charting.Test/Core.Components.Charting.Test.csproj (.../Core.Components.Charting.Test.csproj) (revision 4ae122e1d83aaf61af8aec92f0b26ecd72d1adac) @@ -58,6 +58,7 @@ + Index: Core/Components/test/Core.Components.Charting.Test/Data/ChartPointSymbolTest.cs =================================================================== diff -u --- Core/Components/test/Core.Components.Charting.Test/Data/ChartPointSymbolTest.cs (revision 0) +++ Core/Components/test/Core.Components.Charting.Test/Data/ChartPointSymbolTest.cs (revision 4ae122e1d83aaf61af8aec92f0b26ecd72d1adac) @@ -0,0 +1,82 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System.Collections.Generic; +using Core.Common.TestUtil; +using Core.Components.Charting.Styles; +using NUnit.Framework; + +namespace Core.Components.Charting.Test.Data +{ + [TestFixture] + public class ChartPointSymbolTest : EnumTestFixture + { + protected override IDictionary ExpectedDisplayNameForEnumValues + { + get + { + return new Dictionary + { + { + ChartPointSymbol.Circle, "Cirkel" + }, + { + ChartPointSymbol.Square, "Vierkant" + }, + { + ChartPointSymbol.Diamond, "Ruit" + }, + { + ChartPointSymbol.Triangle, "Driehoek" + }, + { + ChartPointSymbol.Star, "Ster" + } + }; + } + } + + protected override IDictionary ExpectedValueForEnumValues + { + get + { + return new Dictionary + { + { + ChartPointSymbol.Circle, 0 + }, + { + ChartPointSymbol.Square, 1 + }, + { + ChartPointSymbol.Diamond, 2 + }, + { + ChartPointSymbol.Triangle, 3 + }, + { + ChartPointSymbol.Star, 4 + } + }; + } + } + } +} \ No newline at end of file Index: Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartDataHelperTest.cs =================================================================== diff -u -r67284323e2785c651633d9c52049ba12a9c70e6a -r4ae122e1d83aaf61af8aec92f0b26ecd72d1adac --- Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartDataHelperTest.cs (.../ChartDataHelperTest.cs) (revision 67284323e2785c651633d9c52049ba12a9c70e6a) +++ Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartDataHelperTest.cs (.../ChartDataHelperTest.cs) (revision 4ae122e1d83aaf61af8aec92f0b26ecd72d1adac) @@ -120,16 +120,6 @@ #region Convert ChartPointSymbol [Test] - public void Convert_None_ReturnsNone() - { - // Call - MarkerType markerType = ChartDataHelper.Convert(ChartPointSymbol.None); - - // Assert - Assert.AreEqual(MarkerType.None, markerType); - } - - [Test] public void Convert_Circle_ReturnsCircle() { // Call @@ -170,6 +160,16 @@ } [Test] + public void Convert_Star_ReturnsStar() + { + // Call + MarkerType markerType = ChartDataHelper.Convert(ChartPointSymbol.Star); + + // Assert + Assert.AreEqual(MarkerType.Star, markerType); + } + + [Test] public void Convert_UnknownChartPointSymbol_ThrowsInvalidEnumArgumentException() { // Call Index: Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartPointDataConverterTest.cs =================================================================== diff -u -r8616c7f9f5791dff264dc5fe8ce598dbfe6ecb03 -r4ae122e1d83aaf61af8aec92f0b26ecd72d1adac --- Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartPointDataConverterTest.cs (.../ChartPointDataConverterTest.cs) (revision 8616c7f9f5791dff264dc5fe8ce598dbfe6ecb03) +++ Core/Components/test/Core.Components.OxyPlot.Test/Converter/ChartPointDataConverterTest.cs (.../ChartPointDataConverterTest.cs) (revision 4ae122e1d83aaf61af8aec92f0b26ecd72d1adac) @@ -149,11 +149,11 @@ } [Test] - [TestCase(ChartPointSymbol.None, MarkerType.None)] [TestCase(ChartPointSymbol.Circle, MarkerType.Circle)] [TestCase(ChartPointSymbol.Square, MarkerType.Square)] [TestCase(ChartPointSymbol.Diamond, MarkerType.Diamond)] [TestCase(ChartPointSymbol.Triangle, MarkerType.Triangle)] + [TestCase(ChartPointSymbol.Star, MarkerType.Star)] public void ConvertSeriesProperties_ChartPointStyleSetWithDifferentChartPointSymbols_AppliesStyleToSeries(ChartPointSymbol symbol, MarkerType expectedMarkerType) { // Setup