Index: Core/Components/src/Core.Components.Chart/Core.Components.Chart.csproj =================================================================== diff -u -r4a60f6ca9a08736cfaf0fac6e6f2e89e9fa59aae -r3c63884513338c4730c05ae9634f23bfe48293aa --- Core/Components/src/Core.Components.Chart/Core.Components.Chart.csproj (.../Core.Components.Chart.csproj) (revision 4a60f6ca9a08736cfaf0fac6e6f2e89e9fa59aae) +++ Core/Components/src/Core.Components.Chart/Core.Components.Chart.csproj (.../Core.Components.Chart.csproj) (revision 3c63884513338c4730c05ae9634f23bfe48293aa) @@ -53,6 +53,7 @@ True Resources.resx + Index: Core/Components/src/Core.Components.Chart/Styles/ChartAreaStyle.cs =================================================================== diff -u -r4a60f6ca9a08736cfaf0fac6e6f2e89e9fa59aae -r3c63884513338c4730c05ae9634f23bfe48293aa --- Core/Components/src/Core.Components.Chart/Styles/ChartAreaStyle.cs (.../ChartAreaStyle.cs) (revision 4a60f6ca9a08736cfaf0fac6e6f2e89e9fa59aae) +++ Core/Components/src/Core.Components.Chart/Styles/ChartAreaStyle.cs (.../ChartAreaStyle.cs) (revision 3c63884513338c4730c05ae9634f23bfe48293aa) @@ -29,7 +29,7 @@ /// /// This class represents styling of a area on a chart. /// - public class ChartAreaStyle + public class ChartAreaStyle : ChartStyle { private readonly Range strokeThicknessValidityRange = new Range(0, 48); private int strokeThickness; Index: Core/Components/src/Core.Components.Chart/Styles/ChartLineStyle.cs =================================================================== diff -u -r4a60f6ca9a08736cfaf0fac6e6f2e89e9fa59aae -r3c63884513338c4730c05ae9634f23bfe48293aa --- Core/Components/src/Core.Components.Chart/Styles/ChartLineStyle.cs (.../ChartLineStyle.cs) (revision 4a60f6ca9a08736cfaf0fac6e6f2e89e9fa59aae) +++ Core/Components/src/Core.Components.Chart/Styles/ChartLineStyle.cs (.../ChartLineStyle.cs) (revision 3c63884513338c4730c05ae9634f23bfe48293aa) @@ -29,7 +29,7 @@ /// /// This class represents styling of a line on a chart. /// - public class ChartLineStyle + public class ChartLineStyle : ChartStyle { private readonly Range widthValidityRange = new Range(0, 48); private int width; Index: Core/Components/src/Core.Components.Chart/Styles/ChartPointStyle.cs =================================================================== diff -u -r4a60f6ca9a08736cfaf0fac6e6f2e89e9fa59aae -r3c63884513338c4730c05ae9634f23bfe48293aa --- Core/Components/src/Core.Components.Chart/Styles/ChartPointStyle.cs (.../ChartPointStyle.cs) (revision 4a60f6ca9a08736cfaf0fac6e6f2e89e9fa59aae) +++ Core/Components/src/Core.Components.Chart/Styles/ChartPointStyle.cs (.../ChartPointStyle.cs) (revision 3c63884513338c4730c05ae9634f23bfe48293aa) @@ -29,7 +29,7 @@ /// /// This class represents styling of a point on a chart. /// - public class ChartPointStyle + public class ChartPointStyle : ChartStyle { private readonly Range strokeThicknessValidityRange = new Range(0, 48); private readonly Range sizeValidityRange = new Range(0, 48); Index: Core/Components/src/Core.Components.Chart/Styles/ChartStyle.cs =================================================================== diff -u --- Core/Components/src/Core.Components.Chart/Styles/ChartStyle.cs (revision 0) +++ Core/Components/src/Core.Components.Chart/Styles/ChartStyle.cs (revision 3c63884513338c4730c05ae9634f23bfe48293aa) @@ -0,0 +1,34 @@ +// 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. + +namespace Core.Components.Chart.Styles +{ + /// + /// This base class represents styling of an item on a chart. + /// + public abstract class ChartStyle + { + /// + /// Gets or sets a value indicating whether the is editable in a property panel. + /// + public bool IsEditable { get; set; } + } +} \ No newline at end of file Index: Core/Components/test/Core.Components.Chart.Test/Data/ChartAreaDataTest.cs =================================================================== diff -u -rfe90a6d174a01975381e6cda55ed1f7f4e831a51 -r3c63884513338c4730c05ae9634f23bfe48293aa --- Core/Components/test/Core.Components.Chart.Test/Data/ChartAreaDataTest.cs (.../ChartAreaDataTest.cs) (revision fe90a6d174a01975381e6cda55ed1f7f4e831a51) +++ Core/Components/test/Core.Components.Chart.Test/Data/ChartAreaDataTest.cs (.../ChartAreaDataTest.cs) (revision 3c63884513338c4730c05ae9634f23bfe48293aa) @@ -44,6 +44,7 @@ Assert.AreEqual(Color.Gray, data.Style.FillColor); Assert.AreEqual(Color.Black, data.Style.StrokeColor); Assert.AreEqual(2, data.Style.StrokeThickness); + Assert.AreEqual(false, data.Style.IsEditable); } [Test] @@ -92,7 +93,8 @@ { FillColor = Color.Red, StrokeColor = Color.Fuchsia, - StrokeThickness = 3 + StrokeThickness = 3, + IsEditable = true }; // Call Index: Core/Components/test/Core.Components.Chart.Test/Data/ChartLineDataTest.cs =================================================================== diff -u -rfe90a6d174a01975381e6cda55ed1f7f4e831a51 -r3c63884513338c4730c05ae9634f23bfe48293aa --- Core/Components/test/Core.Components.Chart.Test/Data/ChartLineDataTest.cs (.../ChartLineDataTest.cs) (revision fe90a6d174a01975381e6cda55ed1f7f4e831a51) +++ Core/Components/test/Core.Components.Chart.Test/Data/ChartLineDataTest.cs (.../ChartLineDataTest.cs) (revision 3c63884513338c4730c05ae9634f23bfe48293aa) @@ -44,6 +44,7 @@ Assert.AreEqual(Color.Black, data.Style.Color); Assert.AreEqual(2, data.Style.Width); Assert.AreEqual(ChartLineDashStyle.Solid, data.Style.DashStyle); + Assert.AreEqual(false, data.Style.IsEditable); } [Test] @@ -92,7 +93,8 @@ { Color = Color.Red, Width = 3, - DashStyle = ChartLineDashStyle.DashDot + DashStyle = ChartLineDashStyle.DashDot, + IsEditable = true }; // Call Index: Core/Components/test/Core.Components.Chart.Test/Data/ChartMultipleAreaDataTest.cs =================================================================== diff -u -r649b688bb0d390ae15d74c39d34df8d293059b8f -r3c63884513338c4730c05ae9634f23bfe48293aa --- Core/Components/test/Core.Components.Chart.Test/Data/ChartMultipleAreaDataTest.cs (.../ChartMultipleAreaDataTest.cs) (revision 649b688bb0d390ae15d74c39d34df8d293059b8f) +++ Core/Components/test/Core.Components.Chart.Test/Data/ChartMultipleAreaDataTest.cs (.../ChartMultipleAreaDataTest.cs) (revision 3c63884513338c4730c05ae9634f23bfe48293aa) @@ -45,6 +45,7 @@ Assert.AreEqual(Color.Gray, data.Style.FillColor); Assert.AreEqual(Color.Black, data.Style.StrokeColor); Assert.AreEqual(2, data.Style.StrokeThickness); + Assert.AreEqual(false, data.Style.IsEditable); } [Test] @@ -93,7 +94,8 @@ { FillColor = Color.Red, StrokeColor = Color.Fuchsia, - StrokeThickness = 3 + StrokeThickness = 3, + IsEditable = true }; // Call Index: Core/Components/test/Core.Components.Chart.Test/Data/ChartMultipleLineDataTest.cs =================================================================== diff -u -r649b688bb0d390ae15d74c39d34df8d293059b8f -r3c63884513338c4730c05ae9634f23bfe48293aa --- Core/Components/test/Core.Components.Chart.Test/Data/ChartMultipleLineDataTest.cs (.../ChartMultipleLineDataTest.cs) (revision 649b688bb0d390ae15d74c39d34df8d293059b8f) +++ Core/Components/test/Core.Components.Chart.Test/Data/ChartMultipleLineDataTest.cs (.../ChartMultipleLineDataTest.cs) (revision 3c63884513338c4730c05ae9634f23bfe48293aa) @@ -45,6 +45,7 @@ Assert.AreEqual(Color.Black, data.Style.Color); Assert.AreEqual(2, data.Style.Width); Assert.AreEqual(ChartLineDashStyle.Solid, data.Style.DashStyle); + Assert.AreEqual(false, data.Style.IsEditable); } [Test] @@ -79,7 +80,8 @@ { Color = Color.Red, Width = 3, - DashStyle = ChartLineDashStyle.DashDot + DashStyle = ChartLineDashStyle.DashDot, + IsEditable = true }; // Call Index: Core/Components/test/Core.Components.Chart.Test/Data/ChartPointDataTest.cs =================================================================== diff -u -rfe90a6d174a01975381e6cda55ed1f7f4e831a51 -r3c63884513338c4730c05ae9634f23bfe48293aa --- Core/Components/test/Core.Components.Chart.Test/Data/ChartPointDataTest.cs (.../ChartPointDataTest.cs) (revision fe90a6d174a01975381e6cda55ed1f7f4e831a51) +++ Core/Components/test/Core.Components.Chart.Test/Data/ChartPointDataTest.cs (.../ChartPointDataTest.cs) (revision 3c63884513338c4730c05ae9634f23bfe48293aa) @@ -46,6 +46,7 @@ Assert.AreEqual(ChartPointSymbol.Square, data.Style.Symbol); Assert.AreEqual(Color.Black, data.Style.StrokeColor); Assert.AreEqual(1, data.Style.StrokeThickness); + Assert.AreEqual(false, data.Style.IsEditable); } [Test] @@ -96,7 +97,8 @@ StrokeColor = Color.Blue, Size = 2, StrokeThickness = 2, - Symbol = ChartPointSymbol.Circle + Symbol = ChartPointSymbol.Circle, + IsEditable = true }; // Call Index: Core/Components/test/Core.Components.Chart.Test/Styles/ChartAreaStyleTest.cs =================================================================== diff -u -r4a60f6ca9a08736cfaf0fac6e6f2e89e9fa59aae -r3c63884513338c4730c05ae9634f23bfe48293aa --- Core/Components/test/Core.Components.Chart.Test/Styles/ChartAreaStyleTest.cs (.../ChartAreaStyleTest.cs) (revision 4a60f6ca9a08736cfaf0fac6e6f2e89e9fa59aae) +++ Core/Components/test/Core.Components.Chart.Test/Styles/ChartAreaStyleTest.cs (.../ChartAreaStyleTest.cs) (revision 3c63884513338c4730c05ae9634f23bfe48293aa) @@ -43,13 +43,15 @@ { FillColor = fillColor, StrokeColor = strokeColor, - StrokeThickness = width + StrokeThickness = width, + IsEditable = true }; // Assert Assert.AreEqual(fillColor, areaStyle.FillColor); Assert.AreEqual(strokeColor, areaStyle.StrokeColor); Assert.AreEqual(width, areaStyle.StrokeThickness); + Assert.IsTrue(areaStyle.IsEditable); } [Test] Index: Core/Components/test/Core.Components.Chart.Test/Styles/ChartLineStyleTest.cs =================================================================== diff -u -r4a60f6ca9a08736cfaf0fac6e6f2e89e9fa59aae -r3c63884513338c4730c05ae9634f23bfe48293aa --- Core/Components/test/Core.Components.Chart.Test/Styles/ChartLineStyleTest.cs (.../ChartLineStyleTest.cs) (revision 4a60f6ca9a08736cfaf0fac6e6f2e89e9fa59aae) +++ Core/Components/test/Core.Components.Chart.Test/Styles/ChartLineStyleTest.cs (.../ChartLineStyleTest.cs) (revision 3c63884513338c4730c05ae9634f23bfe48293aa) @@ -43,13 +43,15 @@ { Color = color, Width = width, - DashStyle = style + DashStyle = style, + IsEditable = true }; // Assert Assert.AreEqual(color, lineStyle.Color); Assert.AreEqual(width, lineStyle.Width); Assert.AreEqual(style, lineStyle.DashStyle); + Assert.IsTrue(lineStyle.IsEditable); } [Test] Index: Core/Components/test/Core.Components.Chart.Test/Styles/ChartPointStyleTest.cs =================================================================== diff -u -r4a60f6ca9a08736cfaf0fac6e6f2e89e9fa59aae -r3c63884513338c4730c05ae9634f23bfe48293aa --- Core/Components/test/Core.Components.Chart.Test/Styles/ChartPointStyleTest.cs (.../ChartPointStyleTest.cs) (revision 4a60f6ca9a08736cfaf0fac6e6f2e89e9fa59aae) +++ Core/Components/test/Core.Components.Chart.Test/Styles/ChartPointStyleTest.cs (.../ChartPointStyleTest.cs) (revision 3c63884513338c4730c05ae9634f23bfe48293aa) @@ -47,7 +47,8 @@ StrokeColor = strokeColor, Size = size, StrokeThickness = strokeThickness, - Symbol = symbol + Symbol = symbol, + IsEditable = true }; // Assert @@ -56,6 +57,7 @@ Assert.AreEqual(strokeColor, pointStyle.StrokeColor); Assert.AreEqual(strokeThickness, pointStyle.StrokeThickness); Assert.AreEqual(symbol, pointStyle.Symbol); + Assert.IsTrue(pointStyle.IsEditable); } [Test] Index: Core/Plugins/src/Core.Plugins.Chart/PropertyClasses/ChartAreaDataProperties.cs =================================================================== diff -u -r93036b575ee81b4517b29db51f1eadf81454fb93 -r3c63884513338c4730c05ae9634f23bfe48293aa --- Core/Plugins/src/Core.Plugins.Chart/PropertyClasses/ChartAreaDataProperties.cs (.../ChartAreaDataProperties.cs) (revision 93036b575ee81b4517b29db51f1eadf81454fb93) +++ Core/Plugins/src/Core.Plugins.Chart/PropertyClasses/ChartAreaDataProperties.cs (.../ChartAreaDataProperties.cs) (revision 3c63884513338c4730c05ae9634f23bfe48293aa) @@ -36,7 +36,16 @@ /// public class ChartAreaDataProperties : ChartDataProperties { + public override string Type + { + get + { + return Resources.ChartDataProperties_Type_Areas; + } + } + [PropertyOrder(3)] + [DynamicReadOnly] [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Styling))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.ChartData_Color_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.ChartAreaData_FillColor_Description))] @@ -56,6 +65,7 @@ } [PropertyOrder(4)] + [DynamicReadOnly] [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Styling))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.ChartData_StrokeColor_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.ChartAreaData_StrokeColor_Description))] @@ -75,6 +85,7 @@ } [PropertyOrder(5)] + [DynamicReadOnly] [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Styling))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.ChartData_StrokeThickness_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.ChartAreaData_StrokeThickness_Description))] @@ -91,12 +102,10 @@ } } - public override string Type + [DynamicReadOnlyValidationMethod] + public bool DynamicReadOnlyValidation(string propertyName) { - get - { - return Resources.ChartDataProperties_Type_Areas; - } + return !data.Style.IsEditable; } } } \ No newline at end of file Index: Core/Plugins/src/Core.Plugins.Chart/PropertyClasses/ChartLineDataProperties.cs =================================================================== diff -u -r93036b575ee81b4517b29db51f1eadf81454fb93 -r3c63884513338c4730c05ae9634f23bfe48293aa --- Core/Plugins/src/Core.Plugins.Chart/PropertyClasses/ChartLineDataProperties.cs (.../ChartLineDataProperties.cs) (revision 93036b575ee81b4517b29db51f1eadf81454fb93) +++ Core/Plugins/src/Core.Plugins.Chart/PropertyClasses/ChartLineDataProperties.cs (.../ChartLineDataProperties.cs) (revision 3c63884513338c4730c05ae9634f23bfe48293aa) @@ -38,7 +38,16 @@ /// public class ChartLineDataProperties : ChartDataProperties { + public override string Type + { + get + { + return Resources.ChartDataProperties_Type_Lines; + } + } + [PropertyOrder(3)] + [DynamicReadOnly] [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Styling))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.ChartData_Color_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.ChartLineData_Color_Description))] @@ -58,6 +67,7 @@ } [PropertyOrder(4)] + [DynamicReadOnly] [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Styling))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.ChartData_StrokeThickness_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.ChartLineData_Width_Description))] @@ -75,6 +85,7 @@ } [PropertyOrder(5)] + [DynamicReadOnly] [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Styling))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.ChartLineData_DashStyle_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.ChartLineData_DashStyle_Description))] @@ -92,12 +103,10 @@ } } - public override string Type + [DynamicReadOnlyValidationMethod] + public bool DynamicReadOnlyValidation(string propertyName) { - get - { - return Resources.ChartDataProperties_Type_Lines; - } + return !data.Style.IsEditable; } } } \ No newline at end of file Index: Core/Plugins/src/Core.Plugins.Chart/PropertyClasses/ChartMultipleAreaDataProperties.cs =================================================================== diff -u -r93036b575ee81b4517b29db51f1eadf81454fb93 -r3c63884513338c4730c05ae9634f23bfe48293aa --- Core/Plugins/src/Core.Plugins.Chart/PropertyClasses/ChartMultipleAreaDataProperties.cs (.../ChartMultipleAreaDataProperties.cs) (revision 93036b575ee81b4517b29db51f1eadf81454fb93) +++ Core/Plugins/src/Core.Plugins.Chart/PropertyClasses/ChartMultipleAreaDataProperties.cs (.../ChartMultipleAreaDataProperties.cs) (revision 3c63884513338c4730c05ae9634f23bfe48293aa) @@ -36,7 +36,16 @@ /// public class ChartMultipleAreaDataProperties : ChartDataProperties { + public override string Type + { + get + { + return Resources.ChartDataProperties_Type_Areas; + } + } + [PropertyOrder(3)] + [DynamicReadOnly] [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Styling))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.ChartData_Color_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.ChartAreaData_FillColor_Description))] @@ -56,6 +65,7 @@ } [PropertyOrder(4)] + [DynamicReadOnly] [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Styling))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.ChartData_StrokeColor_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.ChartAreaData_StrokeColor_Description))] @@ -75,6 +85,7 @@ } [PropertyOrder(5)] + [DynamicReadOnly] [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Styling))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.ChartData_StrokeThickness_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.ChartAreaData_StrokeThickness_Description))] @@ -91,12 +102,10 @@ } } - public override string Type + [DynamicReadOnlyValidationMethod] + public bool DynamicReadOnlyValidation(string propertyName) { - get - { - return Resources.ChartDataProperties_Type_Areas; - } + return !data.Style.IsEditable; } } } \ No newline at end of file Index: Core/Plugins/src/Core.Plugins.Chart/PropertyClasses/ChartMultipleLineDataProperties.cs =================================================================== diff -u -r93036b575ee81b4517b29db51f1eadf81454fb93 -r3c63884513338c4730c05ae9634f23bfe48293aa --- Core/Plugins/src/Core.Plugins.Chart/PropertyClasses/ChartMultipleLineDataProperties.cs (.../ChartMultipleLineDataProperties.cs) (revision 93036b575ee81b4517b29db51f1eadf81454fb93) +++ Core/Plugins/src/Core.Plugins.Chart/PropertyClasses/ChartMultipleLineDataProperties.cs (.../ChartMultipleLineDataProperties.cs) (revision 3c63884513338c4730c05ae9634f23bfe48293aa) @@ -38,7 +38,16 @@ /// public class ChartMultipleLineDataProperties : ChartDataProperties { + public override string Type + { + get + { + return Resources.ChartDataProperties_Type_Lines; + } + } + [PropertyOrder(3)] + [DynamicReadOnly] [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Styling))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.ChartData_Color_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.ChartLineData_Color_Description))] @@ -58,6 +67,7 @@ } [PropertyOrder(4)] + [DynamicReadOnly] [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Styling))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.ChartData_StrokeThickness_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.ChartLineData_Width_Description))] @@ -75,6 +85,7 @@ } [PropertyOrder(5)] + [DynamicReadOnly] [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Styling))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.ChartLineData_DashStyle_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.ChartLineData_DashStyle_Description))] @@ -92,12 +103,10 @@ } } - public override string Type + [DynamicReadOnlyValidationMethod] + public bool DynamicReadOnlyValidation(string propertyName) { - get - { - return Resources.ChartDataProperties_Type_Lines; - } + return !data.Style.IsEditable; } } } \ No newline at end of file Index: Core/Plugins/src/Core.Plugins.Chart/PropertyClasses/ChartPointDataProperties.cs =================================================================== diff -u -r93036b575ee81b4517b29db51f1eadf81454fb93 -r3c63884513338c4730c05ae9634f23bfe48293aa --- Core/Plugins/src/Core.Plugins.Chart/PropertyClasses/ChartPointDataProperties.cs (.../ChartPointDataProperties.cs) (revision 93036b575ee81b4517b29db51f1eadf81454fb93) +++ Core/Plugins/src/Core.Plugins.Chart/PropertyClasses/ChartPointDataProperties.cs (.../ChartPointDataProperties.cs) (revision 3c63884513338c4730c05ae9634f23bfe48293aa) @@ -38,7 +38,16 @@ /// public class ChartPointDataProperties : ChartDataProperties { + public override string Type + { + get + { + return Resources.ChartDataProperties_Type_Points; + } + } + [PropertyOrder(3)] + [DynamicReadOnly] [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Styling))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.ChartData_Color_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.ChartPointData_Color_Description))] @@ -58,6 +67,7 @@ } [PropertyOrder(4)] + [DynamicReadOnly] [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Styling))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.ChartData_StrokeColor_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.ChartPointData_StrokeColor_Description))] @@ -77,6 +87,7 @@ } [PropertyOrder(5)] + [DynamicReadOnly] [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Styling))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.ChartData_StrokeThickness_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.ChartPointData_StrokeThickness_Description))] @@ -94,6 +105,7 @@ } [PropertyOrder(6)] + [DynamicReadOnly] [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Styling))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.ChartPointData_Size_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.ChartPointData_Size_Description))] @@ -111,6 +123,7 @@ } [PropertyOrder(7)] + [DynamicReadOnly] [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Styling))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.ChartPointData_Symbol_DisplayName))] [ResourcesDescription(typeof(Resources), nameof(Resources.ChartPointData_Symbol_Description))] @@ -128,12 +141,10 @@ } } - public override string Type + [DynamicReadOnlyValidationMethod] + public bool DynamicReadOnlyValidation(string propertyName) { - get - { - return Resources.ChartDataProperties_Type_Points; - } + return !data.Style.IsEditable; } } } \ No newline at end of file Index: Core/Plugins/test/Core.Plugins.Chart.Test/PropertyClasses/ChartAreaDataPropertiesTest.cs =================================================================== diff -u -r3178e116f5e59e03078d465efeb303c5e232c7bf -r3c63884513338c4730c05ae9634f23bfe48293aa --- Core/Plugins/test/Core.Plugins.Chart.Test/PropertyClasses/ChartAreaDataPropertiesTest.cs (.../ChartAreaDataPropertiesTest.cs) (revision 3178e116f5e59e03078d465efeb303c5e232c7bf) +++ Core/Plugins/test/Core.Plugins.Chart.Test/PropertyClasses/ChartAreaDataPropertiesTest.cs (.../ChartAreaDataPropertiesTest.cs) (revision 3c63884513338c4730c05ae9634f23bfe48293aa) @@ -52,10 +52,15 @@ } [Test] - public void Constructor_Always_PropertiesHaveExpectedAttributesValues() + [TestCase(true)] + [TestCase(false)] + public void Constructor_Always_PropertiesHaveExpectedAttributesValues(bool isEditable) { // Setup - var chartAreaData = new ChartAreaData("Test"); + var chartAreaData = new ChartAreaData("Test", new ChartAreaStyle + { + IsEditable = isEditable + }); // Call var properties = new ChartAreaDataProperties @@ -74,20 +79,23 @@ PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(fillColorProperty, styleCategory, "Kleur", - "De kleur van de vlakken waarmee deze gegevensreeks wordt weergegeven."); + "De kleur van de vlakken waarmee deze gegevensreeks wordt weergegeven.", + !isEditable); PropertyDescriptor strokeColorProperty = dynamicProperties[strokeColorPropertyIndex]; Assert.IsInstanceOf(fillColorProperty.Converter); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(strokeColorProperty, styleCategory, "Lijnkleur", - "De kleur van de lijn van de vlakken waarmee deze gegevensreeks wordt weergegeven."); + "De kleur van de lijn van de vlakken waarmee deze gegevensreeks wordt weergegeven.", + !isEditable); PropertyDescriptor strokeThicknessProperty = dynamicProperties[strokeThicknessPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(strokeThicknessProperty, styleCategory, "Lijndikte", - "De dikte van de lijn van de vlakken waarmee deze gegevensreeks wordt weergegeven."); + "De dikte van de lijn van de vlakken waarmee deze gegevensreeks wordt weergegeven.", + !isEditable); } [Test] @@ -104,10 +112,12 @@ StrokeColor = strokeColor, StrokeThickness = strokeThickness }); - var properties = new ChartAreaDataProperties(); // Call - properties.Data = chartAreaData; + var properties = new ChartAreaDataProperties + { + Data = chartAreaData + }; // Assert Assert.AreEqual(fillColor, properties.FillColor); Index: Core/Plugins/test/Core.Plugins.Chart.Test/PropertyClasses/ChartLineDataPropertiesTest.cs =================================================================== diff -u -r3178e116f5e59e03078d465efeb303c5e232c7bf -r3c63884513338c4730c05ae9634f23bfe48293aa --- Core/Plugins/test/Core.Plugins.Chart.Test/PropertyClasses/ChartLineDataPropertiesTest.cs (.../ChartLineDataPropertiesTest.cs) (revision 3178e116f5e59e03078d465efeb303c5e232c7bf) +++ Core/Plugins/test/Core.Plugins.Chart.Test/PropertyClasses/ChartLineDataPropertiesTest.cs (.../ChartLineDataPropertiesTest.cs) (revision 3c63884513338c4730c05ae9634f23bfe48293aa) @@ -53,10 +53,15 @@ } [Test] - public void Constructor_Always_PropertiesHaveExpectedAttributesValues() + [TestCase(true)] + [TestCase(false)] + public void Constructor_Always_PropertiesHaveExpectedAttributesValues(bool isEditable) { // Setup - var chartLineData = new ChartLineData("Test"); + var chartLineData = new ChartLineData("Test", new ChartLineStyle + { + IsEditable = isEditable + }); // Call var properties = new ChartLineDataProperties @@ -75,20 +80,23 @@ PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(colorProperty, styleCategory, "Kleur", - "De kleur van de lijnen waarmee deze gegevensreeks wordt weergegeven."); + "De kleur van de lijnen waarmee deze gegevensreeks wordt weergegeven.", + !isEditable); PropertyDescriptor widthProperty = dynamicProperties[widthPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(widthProperty, styleCategory, "Lijndikte", - "De dikte van de lijnen waarmee deze gegevensreeks wordt weergegeven."); + "De dikte van de lijnen waarmee deze gegevensreeks wordt weergegeven.", + !isEditable); PropertyDescriptor styleProperty = dynamicProperties[stylePropertyIndex]; Assert.IsInstanceOf(styleProperty.Converter); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(styleProperty, styleCategory, "Lijnstijl", - "De stijl van de lijnen waarmee deze gegevensreeks wordt weergegeven."); + "De stijl van de lijnen waarmee deze gegevensreeks wordt weergegeven.", + !isEditable); } [Test] Index: Core/Plugins/test/Core.Plugins.Chart.Test/PropertyClasses/ChartMultipleAreaDataPropertiesTest.cs =================================================================== diff -u -r3178e116f5e59e03078d465efeb303c5e232c7bf -r3c63884513338c4730c05ae9634f23bfe48293aa --- Core/Plugins/test/Core.Plugins.Chart.Test/PropertyClasses/ChartMultipleAreaDataPropertiesTest.cs (.../ChartMultipleAreaDataPropertiesTest.cs) (revision 3178e116f5e59e03078d465efeb303c5e232c7bf) +++ Core/Plugins/test/Core.Plugins.Chart.Test/PropertyClasses/ChartMultipleAreaDataPropertiesTest.cs (.../ChartMultipleAreaDataPropertiesTest.cs) (revision 3c63884513338c4730c05ae9634f23bfe48293aa) @@ -52,10 +52,15 @@ } [Test] - public void Constructor_Always_PropertiesHaveExpectedAttributesValues() + [TestCase(true)] + [TestCase(false)] + public void Constructor_Always_PropertiesHaveExpectedAttributesValues(bool isEditable) { // Setup - var chartAreaData = new ChartMultipleAreaData("Test"); + var chartAreaData = new ChartMultipleAreaData("Test", new ChartAreaStyle + { + IsEditable = isEditable + }); // Call var properties = new ChartMultipleAreaDataProperties @@ -74,20 +79,23 @@ PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(fillColorProperty, styleCategory, "Kleur", - "De kleur van de vlakken waarmee deze gegevensreeks wordt weergegeven."); + "De kleur van de vlakken waarmee deze gegevensreeks wordt weergegeven.", + !isEditable); PropertyDescriptor strokeColorProperty = dynamicProperties[strokeColorPropertyIndex]; Assert.IsInstanceOf(strokeColorProperty.Converter); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(strokeColorProperty, styleCategory, "Lijnkleur", - "De kleur van de lijn van de vlakken waarmee deze gegevensreeks wordt weergegeven."); + "De kleur van de lijn van de vlakken waarmee deze gegevensreeks wordt weergegeven.", + !isEditable); PropertyDescriptor strokeThicknessProperty = dynamicProperties[strokeThicknessPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(strokeThicknessProperty, styleCategory, "Lijndikte", - "De dikte van de lijn van de vlakken waarmee deze gegevensreeks wordt weergegeven."); + "De dikte van de lijn van de vlakken waarmee deze gegevensreeks wordt weergegeven.", + !isEditable); } [Test] Index: Core/Plugins/test/Core.Plugins.Chart.Test/PropertyClasses/ChartMultipleLineDataPropertiesTest.cs =================================================================== diff -u -r3178e116f5e59e03078d465efeb303c5e232c7bf -r3c63884513338c4730c05ae9634f23bfe48293aa --- Core/Plugins/test/Core.Plugins.Chart.Test/PropertyClasses/ChartMultipleLineDataPropertiesTest.cs (.../ChartMultipleLineDataPropertiesTest.cs) (revision 3178e116f5e59e03078d465efeb303c5e232c7bf) +++ Core/Plugins/test/Core.Plugins.Chart.Test/PropertyClasses/ChartMultipleLineDataPropertiesTest.cs (.../ChartMultipleLineDataPropertiesTest.cs) (revision 3c63884513338c4730c05ae9634f23bfe48293aa) @@ -53,10 +53,15 @@ } [Test] - public void Constructor_Always_PropertiesHaveExpectedAttributesValues() + [TestCase(true)] + [TestCase(false)] + public void Constructor_Always_PropertiesHaveExpectedAttributesValues(bool isEditable) { // Setup - var chartLineData = new ChartMultipleLineData("Test"); + var chartLineData = new ChartMultipleLineData("Test", new ChartLineStyle + { + IsEditable = isEditable + }); // Call var properties = new ChartMultipleLineDataProperties @@ -71,24 +76,27 @@ const string styleCategory = "Stijl"; PropertyDescriptor colorProperty = dynamicProperties[colorPropertyIndex]; - Assert.IsInstanceOf(colorProperty.Converter); + Assert.IsInstanceOf(colorProperty.Converter); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(colorProperty, styleCategory, "Kleur", - "De kleur van de lijnen waarmee deze gegevensreeks wordt weergegeven."); + "De kleur van de lijnen waarmee deze gegevensreeks wordt weergegeven.", + !isEditable); PropertyDescriptor widthProperty = dynamicProperties[widthPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(widthProperty, styleCategory, "Lijndikte", - "De dikte van de lijnen waarmee deze gegevensreeks wordt weergegeven."); + "De dikte van de lijnen waarmee deze gegevensreeks wordt weergegeven.", + !isEditable); PropertyDescriptor styleProperty = dynamicProperties[stylePropertyIndex]; Assert.IsInstanceOf(styleProperty.Converter); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(styleProperty, styleCategory, "Lijnstijl", - "De stijl van de lijnen waarmee deze gegevensreeks wordt weergegeven."); + "De stijl van de lijnen waarmee deze gegevensreeks wordt weergegeven.", + !isEditable); } [Test] Index: Core/Plugins/test/Core.Plugins.Chart.Test/PropertyClasses/ChartPointDataPropertiesTest.cs =================================================================== diff -u -r3178e116f5e59e03078d465efeb303c5e232c7bf -r3c63884513338c4730c05ae9634f23bfe48293aa --- Core/Plugins/test/Core.Plugins.Chart.Test/PropertyClasses/ChartPointDataPropertiesTest.cs (.../ChartPointDataPropertiesTest.cs) (revision 3178e116f5e59e03078d465efeb303c5e232c7bf) +++ Core/Plugins/test/Core.Plugins.Chart.Test/PropertyClasses/ChartPointDataPropertiesTest.cs (.../ChartPointDataPropertiesTest.cs) (revision 3c63884513338c4730c05ae9634f23bfe48293aa) @@ -55,10 +55,15 @@ } [Test] - public void Constructor_Always_PropertiesHaveExpectedAttributesValues() + [TestCase(true)] + [TestCase(false)] + public void Constructor_Always_PropertiesHaveExpectedAttributesValues(bool isEditable) { // Setup - var chartPointData = new ChartPointData("Test"); + var chartPointData = new ChartPointData("Test", new ChartPointStyle + { + IsEditable = isEditable + }); // Call var properties = new ChartPointDataProperties @@ -77,33 +82,38 @@ PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(colorProperty, styleCategory, "Kleur", - "De kleur van de symbolen waarmee deze gegevensreeks wordt weergegeven."); + "De kleur van de symbolen waarmee deze gegevensreeks wordt weergegeven.", + !isEditable); PropertyDescriptor strokeColorProperty = dynamicProperties[strokeColorPropertyIndex]; Assert.IsInstanceOf(strokeColorProperty.Converter); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(strokeColorProperty, styleCategory, "Lijnkleur", - "De kleur van de lijn van de symbolen waarmee deze gegevensreeks wordt weergegeven."); + "De kleur van de lijn van de symbolen waarmee deze gegevensreeks wordt weergegeven.", + !isEditable); PropertyDescriptor strokeThicknessProperty = dynamicProperties[strokeThicknessPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(strokeThicknessProperty, styleCategory, "Lijndikte", - "De dikte van de lijn van de symbolen waarmee deze gegevensreeks wordt weergegeven."); + "De dikte van de lijn van de symbolen waarmee deze gegevensreeks wordt weergegeven.", + !isEditable); PropertyDescriptor sizeProperty = dynamicProperties[sizePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(sizeProperty, styleCategory, "Grootte", - "De grootte van de symbolen waarmee deze gegevensreeks wordt weergegeven."); + "De grootte van de symbolen waarmee deze gegevensreeks wordt weergegeven.", + !isEditable); PropertyDescriptor symbolProperty = dynamicProperties[symbolPropertyIndex]; Assert.IsInstanceOf(symbolProperty.Converter); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(symbolProperty, styleCategory, "Symbool", - "Het symbool waarmee deze gegevensreeks wordt weergegeven."); + "Het symbool waarmee deze gegevensreeks wordt weergegeven.", + !isEditable); } [Test] Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Factories/RingtoetsChartDataFactory.cs =================================================================== diff -u -r2fc082ea75494a149eca240146035aa8fa7f9e1c -r3c63884513338c4730c05ae9634f23bfe48293aa --- Ringtoets/Common/src/Ringtoets.Common.Forms/Factories/RingtoetsChartDataFactory.cs (.../RingtoetsChartDataFactory.cs) (revision 2fc082ea75494a149eca240146035aa8fa7f9e1c) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Factories/RingtoetsChartDataFactory.cs (.../RingtoetsChartDataFactory.cs) (revision 3c63884513338c4730c05ae9634f23bfe48293aa) @@ -43,7 +43,8 @@ { Color = Color.DarkOrange, Width = 2, - DashStyle = ChartLineDashStyle.Solid + DashStyle = ChartLineDashStyle.Solid, + IsEditable = true }); } @@ -58,7 +59,8 @@ { Color = Color.Sienna, Width = 2, - DashStyle = ChartLineDashStyle.Solid + DashStyle = ChartLineDashStyle.Solid, + IsEditable = true }); } @@ -157,7 +159,8 @@ StrokeColor = strokeColor, Size = 8, StrokeThickness = strokeColor == Color.Transparent ? 0 : 1, - Symbol = symbol + Symbol = symbol, + IsEditable = true }; } } Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Factories/RingtoetsChartDataFactoryTest.cs =================================================================== diff -u -rfe90a6d174a01975381e6cda55ed1f7f4e831a51 -r3c63884513338c4730c05ae9634f23bfe48293aa --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Factories/RingtoetsChartDataFactoryTest.cs (.../RingtoetsChartDataFactoryTest.cs) (revision fe90a6d174a01975381e6cda55ed1f7f4e831a51) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Factories/RingtoetsChartDataFactoryTest.cs (.../RingtoetsChartDataFactoryTest.cs) (revision 3c63884513338c4730c05ae9634f23bfe48293aa) @@ -31,27 +31,27 @@ public class RingtoetsChartDataFactoryTest { [Test] - public void CreateForeshoreGeometryChartData_ReturnsChartDataWithDefaultStyling() + public void CreateForeshoreGeometryChartData_ReturnsChartDataWithEditableStyling() { // Call ChartLineData data = RingtoetsChartDataFactory.CreateForeshoreGeometryChartData(); // Assert CollectionAssert.IsEmpty(data.Points); Assert.AreEqual("Voorlandprofiel", data.Name); - AssertEqualStyle(data.Style, Color.DarkOrange, 2, ChartLineDashStyle.Solid); + AssertEqualStyle(data.Style, Color.DarkOrange, 2, ChartLineDashStyle.Solid, true); } [Test] - public void CreateSurfaceLineChartData_ReturnsChartLineDataWithDefaultStyling() + public void CreateSurfaceLineChartData_ReturnsChartLineDataWithEditableStyling() { // Call ChartLineData data = RingtoetsChartDataFactory.CreateSurfaceLineChartData(); // Assert CollectionAssert.IsEmpty(data.Points); Assert.AreEqual("Profielschematisatie", data.Name); - AssertEqualStyle(data.Style, Color.Sienna, 2, ChartLineDashStyle.Solid); + AssertEqualStyle(data.Style, Color.Sienna, 2, ChartLineDashStyle.Solid, true); } [Test] @@ -66,92 +66,94 @@ } [Test] - public void CreateDitchPolderSideChartData_ReturnsChartPointDataWithDefaultStyling() + public void CreateDitchPolderSideChartData_ReturnsChartPointDataWithEditableStyling() { // Call ChartPointData data = RingtoetsChartDataFactory.CreateDitchPolderSideChartData(); // Assert Assert.IsFalse(data.HasData); Assert.AreEqual("Insteek sloot polderzijde", data.Name); - AssertEqualStyle(data.Style, Color.IndianRed, 8, Color.Transparent, 0, ChartPointSymbol.Circle); + AssertEqualStyle(data.Style, Color.IndianRed, 8, Color.Transparent, 0, ChartPointSymbol.Circle, true); } [Test] - public void CreateBottomDitchPolderSideChartData_ReturnsChartPointDataWithDefaultStyling() + public void CreateBottomDitchPolderSideChartData_ReturnsChartPointDataWithEditableStyling() { // Call ChartPointData data = RingtoetsChartDataFactory.CreateBottomDitchPolderSideChartData(); // Assert Assert.IsFalse(data.HasData); Assert.AreEqual("Slootbodem polderzijde", data.Name); - AssertEqualStyle(data.Style, Color.Teal, 8, Color.Transparent, 0, ChartPointSymbol.Circle); + AssertEqualStyle(data.Style, Color.Teal, 8, Color.Transparent, 0, ChartPointSymbol.Circle, true); } [Test] - public void CreateBottomDitchDikeSideChartData_ReturnsChartPointDataWithDefaultStyling() + public void CreateBottomDitchDikeSideChartData_ReturnsChartPointDataWithEditableStyling() { // Call ChartPointData data = RingtoetsChartDataFactory.CreateBottomDitchDikeSideChartData(); // Assert Assert.IsFalse(data.HasData); Assert.AreEqual("Slootbodem dijkzijde", data.Name); - AssertEqualStyle(data.Style, Color.DarkSeaGreen, 8, Color.Transparent, 0, ChartPointSymbol.Circle); + AssertEqualStyle(data.Style, Color.DarkSeaGreen, 8, Color.Transparent, 0, ChartPointSymbol.Circle, true); } [Test] - public void CreateDitchDikeSideChartData_ReturnsChartPointDataWithDefaultStyling() + public void CreateDitchDikeSideChartData_ReturnsChartPointDataWithEditableStyling() { // Call ChartPointData data = RingtoetsChartDataFactory.CreateDitchDikeSideChartData(); // Assert Assert.IsFalse(data.HasData); Assert.AreEqual("Insteek sloot dijkzijde", data.Name); - AssertEqualStyle(data.Style, Color.MediumPurple, 8, Color.Transparent, 0, ChartPointSymbol.Circle); + AssertEqualStyle(data.Style, Color.MediumPurple, 8, Color.Transparent, 0, ChartPointSymbol.Circle, true); } [Test] - public void CreateDikeToeAtPolderChartData_ReturnsChartPointDataWithDefaultStyling() + public void CreateDikeToeAtPolderChartData_ReturnsChartPointDataWithEditableStyling() { // Call ChartPointData data = RingtoetsChartDataFactory.CreateDikeToeAtPolderChartData(); // Assert Assert.IsFalse(data.HasData); Assert.AreEqual("Teen dijk binnenwaarts", data.Name); - AssertEqualStyle(data.Style, Color.LightGray, 8, Color.Black, 1, ChartPointSymbol.Square); + AssertEqualStyle(data.Style, Color.LightGray, 8, Color.Black, 1, ChartPointSymbol.Square, true); } [Test] - public void CreateDikeToeAtRiverChartData_ReturnsChartPointDataWithDefaultStyling() + public void CreateDikeToeAtRiverChartData_ReturnsChartPointDataWithEditableStyling() { // Call ChartPointData data = RingtoetsChartDataFactory.CreateDikeToeAtRiverChartData(); // Assert Assert.IsFalse(data.HasData); Assert.AreEqual("Teen dijk buitenwaarts", data.Name); - AssertEqualStyle(data.Style, Color.DarkGray, 8, Color.Black, 1, ChartPointSymbol.Square); + AssertEqualStyle(data.Style, Color.DarkGray, 8, Color.Black, 1, ChartPointSymbol.Square, true); } private static void AssertEqualStyle(ChartPointStyle pointStyle, Color fillColor, int size, - Color strokeColor, int strokeThickness, ChartPointSymbol symbol) + Color strokeColor, int strokeThickness, ChartPointSymbol symbol, bool isEditable) { Assert.AreEqual(fillColor, pointStyle.Color); Assert.AreEqual(size, pointStyle.Size); Assert.AreEqual(strokeColor, pointStyle.StrokeColor); Assert.AreEqual(strokeThickness, pointStyle.StrokeThickness); Assert.AreEqual(symbol, pointStyle.Symbol); + Assert.AreEqual(isEditable, pointStyle.IsEditable); } - private static void AssertEqualStyle(ChartLineStyle lineStyle, Color color, int width, ChartLineDashStyle style) + private static void AssertEqualStyle(ChartLineStyle lineStyle, Color color, int width, ChartLineDashStyle style, bool isEditable) { Assert.AreEqual(color, lineStyle.Color); Assert.AreEqual(width, lineStyle.Width); Assert.AreEqual(style, lineStyle.DashStyle); + Assert.AreEqual(isEditable, lineStyle.IsEditable); } } } \ No newline at end of file Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Factories/GrassCoverErosionInwardsChartDataFactory.cs =================================================================== diff -u -r93036b575ee81b4517b29db51f1eadf81454fb93 -r3c63884513338c4730c05ae9634f23bfe48293aa --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Factories/GrassCoverErosionInwardsChartDataFactory.cs (.../GrassCoverErosionInwardsChartDataFactory.cs) (revision 93036b575ee81b4517b29db51f1eadf81454fb93) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Factories/GrassCoverErosionInwardsChartDataFactory.cs (.../GrassCoverErosionInwardsChartDataFactory.cs) (revision 3c63884513338c4730c05ae9634f23bfe48293aa) @@ -47,7 +47,8 @@ { Color = Color.SaddleBrown, Width = 2, - DashStyle = ChartLineDashStyle.Solid + DashStyle = ChartLineDashStyle.Solid, + IsEditable = true }); } @@ -62,7 +63,8 @@ { Color = Color.MediumSeaGreen, Width = 2, - DashStyle = ChartLineDashStyle.Dash + DashStyle = ChartLineDashStyle.Dash, + IsEditable = true }); } Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Factories/GrassCoverErosionInwardsChartDataFactoryTest.cs =================================================================== diff -u -r93036b575ee81b4517b29db51f1eadf81454fb93 -r3c63884513338c4730c05ae9634f23bfe48293aa --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Factories/GrassCoverErosionInwardsChartDataFactoryTest.cs (.../GrassCoverErosionInwardsChartDataFactoryTest.cs) (revision 93036b575ee81b4517b29db51f1eadf81454fb93) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Factories/GrassCoverErosionInwardsChartDataFactoryTest.cs (.../GrassCoverErosionInwardsChartDataFactoryTest.cs) (revision 3c63884513338c4730c05ae9634f23bfe48293aa) @@ -34,25 +34,25 @@ public class GrassCoverErosionInwardsChartDataFactoryTest { [Test] - public void CreateDikeGeometryChartData_ReturnsChartDataWithDefaultStyling() + public void CreateDikeGeometryChartData_ReturnsChartDataWithEditableStyling() { // Call ChartLineData data = GrassCoverErosionInwardsChartDataFactory.CreateDikeGeometryChartData(); // Assert Assert.AreEqual("Dijkprofiel", data.Name); - AssertEqualStyle(data.Style, Color.SaddleBrown, 2, ChartLineDashStyle.Solid); + AssertEqualStyle(data.Style, Color.SaddleBrown, 2, ChartLineDashStyle.Solid, true); } [Test] - public void CreateDikeHeightChartData_ReturnsChartDataWithDefaultStyling() + public void CreateDikeHeightChartData_ReturnsChartDataWithEditableStyling() { // Call ChartLineData data = GrassCoverErosionInwardsChartDataFactory.CreateDikeHeightChartData(); // Assert Assert.AreEqual("Dijkhoogte", data.Name); - AssertEqualStyle(data.Style, Color.MediumSeaGreen, 2, ChartLineDashStyle.Dash); + AssertEqualStyle(data.Style, Color.MediumSeaGreen, 2, ChartLineDashStyle.Dash, true); } [Test] @@ -150,11 +150,12 @@ Assert.AreEqual(expectedName, chartData.Name); } - private static void AssertEqualStyle(ChartLineStyle lineStyle, Color color, int width, ChartLineDashStyle style) + private static void AssertEqualStyle(ChartLineStyle lineStyle, Color color, int width, ChartLineDashStyle style, bool isEditable) { Assert.AreEqual(color, lineStyle.Color); Assert.AreEqual(width, lineStyle.Width); Assert.AreEqual(style, lineStyle.DashStyle); + Assert.AreEqual(isEditable, lineStyle.IsEditable); } } } \ No newline at end of file Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Factories/MacroStabilityInwardsChartDataFactory.cs =================================================================== diff -u -r677ec9937ae7eff73a09bf937804ad22e0dc5a4b -r3c63884513338c4730c05ae9634f23bfe48293aa --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Factories/MacroStabilityInwardsChartDataFactory.cs (.../MacroStabilityInwardsChartDataFactory.cs) (revision 677ec9937ae7eff73a09bf937804ad22e0dc5a4b) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Factories/MacroStabilityInwardsChartDataFactory.cs (.../MacroStabilityInwardsChartDataFactory.cs) (revision 3c63884513338c4730c05ae9634f23bfe48293aa) @@ -193,7 +193,8 @@ StrokeThickness = strokeColor == Color.Transparent ? 0 : 1, - Symbol = symbol + Symbol = symbol, + IsEditable = true }; } } Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Factories/MacroStabilityInwardsChartDataFactoryTest.cs =================================================================== diff -u -rfe90a6d174a01975381e6cda55ed1f7f4e831a51 -r3c63884513338c4730c05ae9634f23bfe48293aa --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Factories/MacroStabilityInwardsChartDataFactoryTest.cs (.../MacroStabilityInwardsChartDataFactoryTest.cs) (revision fe90a6d174a01975381e6cda55ed1f7f4e831a51) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Factories/MacroStabilityInwardsChartDataFactoryTest.cs (.../MacroStabilityInwardsChartDataFactoryTest.cs) (revision 3c63884513338c4730c05ae9634f23bfe48293aa) @@ -35,87 +35,87 @@ public class MacroStabilityInwardsChartDataFactoryTest { [Test] - public void CreateShoulderBaseInsideChartData_ReturnsChartPointDataWithDefaultStyling() + public void CreateShoulderBaseInsideChartData_ReturnsChartPointDataWithEditableStyling() { // Call ChartPointData data = MacroStabilityInwardsChartDataFactory.CreateShoulderBaseInsideChartData(); // Assert Assert.IsFalse(data.HasData); Assert.AreEqual("Insteek binnenberm", data.Name); - AssertEqualStyle(data.Style, Color.BlueViolet, 8, Color.SeaGreen, 1, ChartPointSymbol.Triangle); + AssertEqualStyle(data.Style, Color.BlueViolet, 8, Color.SeaGreen, 1, ChartPointSymbol.Triangle, true); } [Test] - public void CreateDikeTopAtPolderChartData_ReturnsChartPointDataWithDefaultStyling() + public void CreateDikeTopAtPolderChartData_ReturnsChartPointDataWithEditableStyling() { // Call ChartPointData data = MacroStabilityInwardsChartDataFactory.CreateDikeTopAtPolderChartData(); // Assert Assert.IsFalse(data.HasData); Assert.AreEqual("Kruin binnentalud", data.Name); - AssertEqualStyle(data.Style, Color.LightSkyBlue, 8, Color.SeaGreen, 1, ChartPointSymbol.Triangle); + AssertEqualStyle(data.Style, Color.LightSkyBlue, 8, Color.SeaGreen, 1, ChartPointSymbol.Triangle, true); } [Test] - public void CreateShoulderTopInsideChartData_ReturnsChartPointDataWithDefaultStyling() + public void CreateShoulderTopInsideChartData_ReturnsChartPointDataWithEditableStyling() { // Call ChartPointData data = MacroStabilityInwardsChartDataFactory.CreateShoulderTopInsideChartData(); // Assert Assert.IsFalse(data.HasData); Assert.AreEqual("Kruin binnenberm", data.Name); - AssertEqualStyle(data.Style, Color.DeepSkyBlue, 8, Color.SeaGreen, 1, ChartPointSymbol.Triangle); + AssertEqualStyle(data.Style, Color.DeepSkyBlue, 8, Color.SeaGreen, 1, ChartPointSymbol.Triangle, true); } [Test] - public void CreateSurfaceLevelInsideChartData_ReturnsChartPointDataWithDefaultStyling() + public void CreateSurfaceLevelInsideChartData_ReturnsChartPointDataWithEditableStyling() { // Call ChartPointData data = MacroStabilityInwardsChartDataFactory.CreateSurfaceLevelInsideChartData(); // Assert Assert.IsFalse(data.HasData); Assert.AreEqual("Maaiveld binnenwaarts", data.Name); - AssertEqualStyle(data.Style, Color.ForestGreen, 8, Color.Black, 1, ChartPointSymbol.Square); + AssertEqualStyle(data.Style, Color.ForestGreen, 8, Color.Black, 1, ChartPointSymbol.Square, true); } [Test] - public void CreateSurfaceLevelOutsideChartData_ReturnsChartPointDataWithDefaultStyling() + public void CreateSurfaceLevelOutsideChartData_ReturnsChartPointDataWithEditableStyling() { // Call ChartPointData data = MacroStabilityInwardsChartDataFactory.CreateSurfaceLevelOutsideChartData(); // Assert Assert.IsFalse(data.HasData); Assert.AreEqual("Maaiveld buitenwaarts", data.Name); - AssertEqualStyle(data.Style, Color.LightSeaGreen, 8, Color.Black, 1, ChartPointSymbol.Square); + AssertEqualStyle(data.Style, Color.LightSeaGreen, 8, Color.Black, 1, ChartPointSymbol.Square, true); } [Test] - public void CreateTrafficLoadInsideChartData_ReturnsChartPointDataWithDefaultStyling() + public void CreateTrafficLoadInsideChartData_ReturnsChartPointDataWithEditableStyling() { // Call ChartPointData data = MacroStabilityInwardsChartDataFactory.CreateTrafficLoadInsideChartData(); // Assert Assert.IsFalse(data.HasData); Assert.AreEqual("Verkeersbelasting kant binnenwaarts", data.Name); - AssertEqualStyle(data.Style, Color.LightSlateGray, 8, Color.White, 1, ChartPointSymbol.Circle); + AssertEqualStyle(data.Style, Color.LightSlateGray, 8, Color.White, 1, ChartPointSymbol.Circle, true); } [Test] - public void CreateTrafficLoadOutsideChartData_ReturnsChartPointDataWithDefaultStyling() + public void CreateTrafficLoadOutsideChartData_ReturnsChartPointDataWithEditableStyling() { // Call ChartPointData data = MacroStabilityInwardsChartDataFactory.CreateTrafficLoadOutsideChartData(); // Assert Assert.IsFalse(data.HasData); Assert.AreEqual("Verkeersbelasting kant buitenwaarts", data.Name); - AssertEqualStyle(data.Style, Color.DarkSlateGray, 8, Color.White, 1, ChartPointSymbol.Circle); + AssertEqualStyle(data.Style, Color.DarkSlateGray, 8, Color.White, 1, ChartPointSymbol.Circle, true); } [Test] @@ -164,7 +164,7 @@ // Assert CollectionAssert.IsEmpty(data.Areas); Assert.AreEqual($"{soilLayerIndex + 1} {name}", data.Name); - AssertEqualStyle(data.Style, Color.Aquamarine, Color.Black, 1); + AssertEqualStyle(data.Style, Color.Aquamarine, Color.Black, 1, false); } [Test] @@ -250,20 +250,22 @@ } private static void AssertEqualStyle(ChartPointStyle pointStyle, Color fillColor, int size, - Color strokeColor, int strokeThickness, ChartPointSymbol symbol) + Color strokeColor, int strokeThickness, ChartPointSymbol symbol, bool isEditable) { Assert.AreEqual(fillColor, pointStyle.Color); Assert.AreEqual(size, pointStyle.Size); Assert.AreEqual(strokeColor, pointStyle.StrokeColor); Assert.AreEqual(strokeThickness, pointStyle.StrokeThickness); Assert.AreEqual(symbol, pointStyle.Symbol); + Assert.AreEqual(isEditable, pointStyle.IsEditable); } - private static void AssertEqualStyle(ChartAreaStyle areaStyle, Color fillColor, Color strokeColor, int width) + private static void AssertEqualStyle(ChartAreaStyle areaStyle, Color fillColor, Color strokeColor, int width, bool isEditable) { Assert.AreEqual(fillColor, areaStyle.FillColor); Assert.AreEqual(strokeColor, areaStyle.StrokeColor); Assert.AreEqual(width, areaStyle.StrokeThickness); + Assert.AreEqual(isEditable, areaStyle.IsEditable); } } } \ No newline at end of file Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/Factories/PipingChartDataFactory.cs =================================================================== diff -u -rd6fe8399e8398224cf1bda9259052232d85b85a4 -r3c63884513338c4730c05ae9634f23bfe48293aa --- Ringtoets/Piping/src/Ringtoets.Piping.Forms/Factories/PipingChartDataFactory.cs (.../PipingChartDataFactory.cs) (revision d6fe8399e8398224cf1bda9259052232d85b85a4) +++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/Factories/PipingChartDataFactory.cs (.../PipingChartDataFactory.cs) (revision 3c63884513338c4730c05ae9634f23bfe48293aa) @@ -120,7 +120,8 @@ StrokeColor = Color.Transparent, Size = 8, StrokeThickness = 0, - Symbol = ChartPointSymbol.Triangle + Symbol = ChartPointSymbol.Triangle, + IsEditable = true }; } } Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Factories/PipingChartDataFactoryTest.cs =================================================================== diff -u -rfe90a6d174a01975381e6cda55ed1f7f4e831a51 -r3c63884513338c4730c05ae9634f23bfe48293aa --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Factories/PipingChartDataFactoryTest.cs (.../PipingChartDataFactoryTest.cs) (revision fe90a6d174a01975381e6cda55ed1f7f4e831a51) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Factories/PipingChartDataFactoryTest.cs (.../PipingChartDataFactoryTest.cs) (revision 3c63884513338c4730c05ae9634f23bfe48293aa) @@ -35,27 +35,27 @@ public class PipingChartDataFactoryTest { [Test] - public void CreateEntryPointChartData_ReturnsEmptyChartPointDataWithDefaultStyling() + public void CreateEntryPointChartData_ReturnsEmptyChartPointDataWithEditableStyling() { // Call ChartPointData data = PipingChartDataFactory.CreateEntryPointChartData(); // Assert CollectionAssert.IsEmpty(data.Points); Assert.AreEqual("Intredepunt", data.Name); - AssertEqualStyle(data.Style, Color.Gold, 8, Color.Transparent, 0, ChartPointSymbol.Triangle); + AssertEqualStyle(data.Style, Color.Gold, 8, Color.Transparent, 0, ChartPointSymbol.Triangle, true); } [Test] - public void CreateExitPointChartData_ReturnsEmptyChartPointDataWithDefaultStyling() + public void CreateExitPointChartData_ReturnsEmptyChartPointDataWithEditableStyling() { // Call ChartPointData data = PipingChartDataFactory.CreateExitPointChartData(); // Assert CollectionAssert.IsEmpty(data.Points); Assert.AreEqual("Uittredepunt", data.Name); - AssertEqualStyle(data.Style, Color.Tomato, 8, Color.Transparent, 0, ChartPointSymbol.Triangle); + AssertEqualStyle(data.Style, Color.Tomato, 8, Color.Transparent, 0, ChartPointSymbol.Triangle, true); } [Test] @@ -101,7 +101,7 @@ // Assert CollectionAssert.IsEmpty(data.Areas); Assert.AreEqual($"{soilLayerIndex + 1} {name}", data.Name); - AssertEqualStyle(data.Style, Color.Aquamarine, Color.Black, 1); + AssertEqualStyle(data.Style, Color.Aquamarine, Color.Black, 1, false); } [Test] @@ -186,20 +186,22 @@ Assert.AreEqual("soilLayerIndex", paramName); } - private static void AssertEqualStyle(ChartPointStyle pointStyle, Color color, int size, Color strokeColor, int strokeThickness, ChartPointSymbol symbol) + private static void AssertEqualStyle(ChartPointStyle pointStyle, Color color, int size, Color strokeColor, int strokeThickness, ChartPointSymbol symbol, bool isEditable) { Assert.AreEqual(color, pointStyle.Color); Assert.AreEqual(size, pointStyle.Size); Assert.AreEqual(strokeColor, pointStyle.StrokeColor); Assert.AreEqual(strokeThickness, pointStyle.StrokeThickness); Assert.AreEqual(symbol, pointStyle.Symbol); + Assert.AreEqual(isEditable, pointStyle.IsEditable); } - private static void AssertEqualStyle(ChartAreaStyle areaStyle, Color fillColor, Color strokeColor, int width) + private static void AssertEqualStyle(ChartAreaStyle areaStyle, Color fillColor, Color strokeColor, int width, bool isEditable) { Assert.AreEqual(fillColor, areaStyle.FillColor); Assert.AreEqual(strokeColor, areaStyle.StrokeColor); Assert.AreEqual(width, areaStyle.StrokeThickness); + Assert.AreEqual(isEditable, areaStyle.IsEditable); } } } \ No newline at end of file Index: Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/Factories/WaveConditionsChartDataFactory.cs =================================================================== diff -u -r93036b575ee81b4517b29db51f1eadf81454fb93 -r3c63884513338c4730c05ae9634f23bfe48293aa --- Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/Factories/WaveConditionsChartDataFactory.cs (.../WaveConditionsChartDataFactory.cs) (revision 93036b575ee81b4517b29db51f1eadf81454fb93) +++ Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/Factories/WaveConditionsChartDataFactory.cs (.../WaveConditionsChartDataFactory.cs) (revision 3c63884513338c4730c05ae9634f23bfe48293aa) @@ -73,7 +73,8 @@ { Color = lineColor, Width = revetmentThickness, - DashStyle = ChartLineDashStyle.Solid + DashStyle = ChartLineDashStyle.Solid, + IsEditable = true }); } @@ -89,7 +90,8 @@ { Color = Color.FromArgb(120, lineColor), Width = revetmentThickness, - DashStyle = ChartLineDashStyle.Dash + DashStyle = ChartLineDashStyle.Dash, + IsEditable = true }); } @@ -132,7 +134,8 @@ { Color = Color.LightCoral, Width = levelThickness, - DashStyle = ChartLineDashStyle.Solid + DashStyle = ChartLineDashStyle.Solid, + IsEditable = true }); } @@ -147,7 +150,8 @@ { Color = Color.DarkTurquoise, Width = levelThickness, - DashStyle = ChartLineDashStyle.DashDotDot + DashStyle = ChartLineDashStyle.DashDotDot, + IsEditable = true }); } @@ -178,7 +182,8 @@ { Color = lineColor, Width = levelThickness, - DashStyle = ChartLineDashStyle.Solid + DashStyle = ChartLineDashStyle.Solid, + IsEditable = true }; } @@ -188,7 +193,8 @@ { Color = Color.MediumBlue, Width = levelThickness, - DashStyle = ChartLineDashStyle.Solid + DashStyle = ChartLineDashStyle.Solid, + IsEditable = true }; } } Index: Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/Factories/WaveConditionsChartDataFactoryTest.cs =================================================================== diff -u -rfe90a6d174a01975381e6cda55ed1f7f4e831a51 -r3c63884513338c4730c05ae9634f23bfe48293aa --- Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/Factories/WaveConditionsChartDataFactoryTest.cs (.../WaveConditionsChartDataFactoryTest.cs) (revision fe90a6d174a01975381e6cda55ed1f7f4e831a51) +++ Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/Factories/WaveConditionsChartDataFactoryTest.cs (.../WaveConditionsChartDataFactoryTest.cs) (revision 3c63884513338c4730c05ae9634f23bfe48293aa) @@ -34,7 +34,7 @@ public class WaveConditionsChartDataFactoryTest { [Test] - public void CreateLowerRevetmentBoundaryChartData_ReturnsEmptyChartLineDataWithDefaultStyling() + public void CreateLowerRevetmentBoundaryChartData_ReturnsEmptyChartLineDataWithEditableStyling() { // Setup Color lineColor = Color.Gray; @@ -45,11 +45,11 @@ // Assert CollectionAssert.IsEmpty(data.Points); Assert.AreEqual("Ondergrens bekleding", data.Name); - AssertEqualStyle(data.Style, lineColor, 3, ChartLineDashStyle.Solid); + AssertEqualStyle(data.Style, lineColor, 3, ChartLineDashStyle.Solid, true); } [Test] - public void CreateUpperRevetmentBoundaryChartData_ReturnsEmptyChartLineDataWithDefaultStyling() + public void CreateUpperRevetmentBoundaryChartData_ReturnsEmptyChartLineDataWithEditableStyling() { // Setup Color lineColor = Color.Gray; @@ -60,11 +60,11 @@ // Assert CollectionAssert.IsEmpty(data.Points); Assert.AreEqual("Bovengrens bekleding", data.Name); - AssertEqualStyle(data.Style, lineColor, 3, ChartLineDashStyle.Solid); + AssertEqualStyle(data.Style, lineColor, 3, ChartLineDashStyle.Solid, true); } [Test] - public void CreateRevetmentChartData_ReturnsEmptyChartLineDataWithDefaultStyling() + public void CreateRevetmentChartData_ReturnsEmptyChartLineDataWithEditableStyling() { // Setup Color lineColor = Color.Gray; @@ -75,11 +75,11 @@ // Assert CollectionAssert.IsEmpty(data.Points); Assert.AreEqual("Bekleding", data.Name); - AssertEqualStyle(data.Style, lineColor, 8, ChartLineDashStyle.Solid); + AssertEqualStyle(data.Style, lineColor, 8, ChartLineDashStyle.Solid, true); } [Test] - public void CreateRevetmentBaseChartData_ReturnsEmptyChartLineDataWithDefaultStyling() + public void CreateRevetmentBaseChartData_ReturnsEmptyChartLineDataWithEditableStyling() { // Setup Color lineColor = Color.FromArgb(120, Color.Gray); @@ -90,31 +90,31 @@ // Assert CollectionAssert.IsEmpty(data.Points); Assert.AreEqual("Hulplijn bekleding", data.Name); - AssertEqualStyle(data.Style, lineColor, 8, ChartLineDashStyle.Dash); + AssertEqualStyle(data.Style, lineColor, 8, ChartLineDashStyle.Dash, true); } [Test] - public void CreateLowerWaterLevelsBoundaryChartData_ReturnsEmptyChartLineDataWithDefaultStyling() + public void CreateLowerWaterLevelsBoundaryChartData_ReturnsEmptyChartLineDataWithEditableStyling() { // Call ChartLineData data = WaveConditionsChartDataFactory.CreateLowerWaterLevelsBoundaryChartData(); // Assert CollectionAssert.IsEmpty(data.Points); Assert.AreEqual("Ondergrens waterstanden", data.Name); - AssertEqualStyle(data.Style, Color.MediumBlue, 3, ChartLineDashStyle.Solid); + AssertEqualStyle(data.Style, Color.MediumBlue, 3, ChartLineDashStyle.Solid, true); } [Test] - public void CreateUpperWaterLevelsBoundaryChartData_ReturnsEmptyChartLineDataWithDefaultStyling() + public void CreateUpperWaterLevelsBoundaryChartData_ReturnsEmptyChartLineDataWithEditableStyling() { // Call ChartLineData data = WaveConditionsChartDataFactory.CreateUpperWaterLevelsBoundaryChartData(); // Assert CollectionAssert.IsEmpty(data.Points); Assert.AreEqual("Bovengrens waterstanden", data.Name); - AssertEqualStyle(data.Style, Color.MediumBlue, 3, ChartLineDashStyle.Solid); + AssertEqualStyle(data.Style, Color.MediumBlue, 3, ChartLineDashStyle.Solid, true); } [Test] @@ -129,7 +129,7 @@ } [Test] - public void CreateDesignWaterLevelChartData_ReturnsEmptyChartLineDataWithDefaultStyling() + public void CreateDesignWaterLevelChartData_ReturnsEmptyChartLineDataWithEditableStyling() { // Setup const string designWaterLevelName = "Toetspeil"; @@ -140,19 +140,19 @@ // Assert CollectionAssert.IsEmpty(data.Points); Assert.AreEqual(designWaterLevelName, data.Name); - AssertEqualStyle(data.Style, Color.LightCoral, 3, ChartLineDashStyle.Solid); + AssertEqualStyle(data.Style, Color.LightCoral, 3, ChartLineDashStyle.Solid, true); } [Test] - public void CreateWaterLevelsChartData_ReturnsEmptyChartMultipleLineDataWithDefaultStyling() + public void CreateWaterLevelsChartData_ReturnsEmptyChartMultipleLineDataWithEditableStyling() { // Call ChartMultipleLineData data = WaveConditionsChartDataFactory.CreateWaterLevelsChartData(); // Assert CollectionAssert.IsEmpty(data.Lines); Assert.AreEqual("Waterstanden in berekening", data.Name); - AssertEqualStyle(data.Style, Color.DarkTurquoise, 3, ChartLineDashStyle.DashDotDot); + AssertEqualStyle(data.Style, Color.DarkTurquoise, 3, ChartLineDashStyle.DashDotDot, true); } [Test] @@ -222,11 +222,12 @@ Assert.AreEqual(expectedName, chartData.Name); } - private static void AssertEqualStyle(ChartLineStyle lineStyle, Color color, int width, ChartLineDashStyle style) + private static void AssertEqualStyle(ChartLineStyle lineStyle, Color color, int width, ChartLineDashStyle style, bool isEditable) { Assert.AreEqual(color, lineStyle.Color); Assert.AreEqual(width, lineStyle.Width); Assert.AreEqual(style, lineStyle.DashStyle); + Assert.AreEqual(isEditable, lineStyle.IsEditable); } } } \ No newline at end of file