Index: Core/Gui/src/Core.Gui/Properties/Resources.Designer.cs =================================================================== diff -u -rf869d21f23cf0986db9b2b68fd1aa2b9e7d28c9e -r985902680ffb75f3b9ee26b52725fe31916b6dec --- Core/Gui/src/Core.Gui/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision f869d21f23cf0986db9b2b68fd1aa2b9e7d28c9e) +++ Core/Gui/src/Core.Gui/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 985902680ffb75f3b9ee26b52725fe31916b6dec) @@ -40,7 +40,7 @@ // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class Resources { @@ -237,6 +237,15 @@ } /// + /// Looks up a localized string similar to Algemeen. + /// + public static string Categories_General { + get { + return ResourceManager.GetString("Categories_General", resourceCulture); + } + } + + /// /// Looks up a localized string similar to Labels. /// public static string Categories_Label { @@ -311,6 +320,141 @@ } /// + /// Looks up a localized string similar to De kleur van de vlakken waarmee deze gegevensreeks wordt weergegeven.. + /// + public static string ChartAreaData_FillColor_Description { + get { + return ResourceManager.GetString("ChartAreaData_FillColor_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to De kleur van de lijn van de vlakken waarmee deze gegevensreeks wordt weergegeven.. + /// + public static string ChartAreaData_StrokeColor_Description { + get { + return ResourceManager.GetString("ChartAreaData_StrokeColor_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to De dikte van de lijn van de vlakken waarmee deze gegevensreeks wordt weergegeven.. + /// + public static string ChartAreaData_StrokeThickness_Description { + get { + return ResourceManager.GetString("ChartAreaData_StrokeThickness_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Kleur. + /// + public static string ChartData_Color_DisplayName { + get { + return ResourceManager.GetString("ChartData_Color_DisplayName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Lijnkleur. + /// + public static string ChartData_StrokeColor_DisplayName { + get { + return ResourceManager.GetString("ChartData_StrokeColor_DisplayName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Lijndikte. + /// + public static string ChartData_StrokeThickness_DisplayName { + get { + return ResourceManager.GetString("ChartData_StrokeThickness_DisplayName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Geeft aan of de gegevensreeks wordt weergegeven.. + /// + public static string ChartDataProperties_IsVisible_Description { + get { + return ResourceManager.GetString("ChartDataProperties_IsVisible_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Weergeven. + /// + public static string ChartDataProperties_IsVisible_DisplayName { + get { + return ResourceManager.GetString("ChartDataProperties_IsVisible_DisplayName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to De naam van deze gegevensreeks.. + /// + public static string ChartDataProperties_Name_Description { + get { + return ResourceManager.GetString("ChartDataProperties_Name_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Naam. + /// + public static string ChartDataProperties_Name_DisplayName { + get { + return ResourceManager.GetString("ChartDataProperties_Name_DisplayName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Vlakken. + /// + public static string ChartDataProperties_Type_Areas { + get { + return ResourceManager.GetString("ChartDataProperties_Type_Areas", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Het type van de data die wordt weergegeven in de gegevensreeks.. + /// + public static string ChartDataProperties_Type_Description { + get { + return ResourceManager.GetString("ChartDataProperties_Type_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Type. + /// + public static string ChartDataProperties_Type_DisplayName { + get { + return ResourceManager.GetString("ChartDataProperties_Type_DisplayName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Lijnen. + /// + public static string ChartDataProperties_Type_Lines { + get { + return ResourceManager.GetString("ChartDataProperties_Type_Lines", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Punten. + /// + public static string ChartDataProperties_Type_Points { + get { + return ResourceManager.GetString("ChartDataProperties_Type_Points", resourceCulture); + } + } + + /// /// Looks up a localized string similar to Grafiek. /// public static string ChartLegendView_Chart_DisplayName { @@ -376,6 +520,105 @@ } /// + /// Looks up a localized string similar to De kleur van de lijnen waarmee deze gegevensreeks wordt weergegeven.. + /// + public static string ChartLineData_Color_Description { + get { + return ResourceManager.GetString("ChartLineData_Color_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to De stijl van de lijnen waarmee deze gegevensreeks wordt weergegeven.. + /// + public static string ChartLineData_DashStyle_Description { + get { + return ResourceManager.GetString("ChartLineData_DashStyle_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Lijnstijl. + /// + public static string ChartLineData_DashStyle_DisplayName { + get { + return ResourceManager.GetString("ChartLineData_DashStyle_DisplayName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to De dikte van de lijnen waarmee deze gegevensreeks wordt weergegeven.. + /// + public static string ChartLineData_Width_Description { + get { + return ResourceManager.GetString("ChartLineData_Width_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to De kleur van de symbolen waarmee deze gegevensreeks wordt weergegeven.. + /// + public static string ChartPointData_Color_Description { + get { + return ResourceManager.GetString("ChartPointData_Color_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to De grootte van de symbolen waarmee deze gegevensreeks wordt weergegeven.. + /// + public static string ChartPointData_Size_Description { + get { + return ResourceManager.GetString("ChartPointData_Size_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Grootte. + /// + public static string ChartPointData_Size_DisplayName { + get { + return ResourceManager.GetString("ChartPointData_Size_DisplayName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to De kleur van de lijn van de symbolen waarmee deze gegevensreeks wordt weergegeven.. + /// + public static string ChartPointData_StrokeColor_Description { + get { + return ResourceManager.GetString("ChartPointData_StrokeColor_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to De dikte van de lijn van de symbolen waarmee deze gegevensreeks wordt weergegeven.. + /// + public static string ChartPointData_StrokeThickness_Description { + get { + return ResourceManager.GetString("ChartPointData_StrokeThickness_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Het symbool waarmee deze gegevensreeks wordt weergegeven.. + /// + public static string ChartPointData_Symbol_Description { + get { + return ResourceManager.GetString("ChartPointData_Symbol_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Symbool. + /// + public static string ChartPointData_Symbol_DisplayName { + get { + return ResourceManager.GetString("ChartPointData_Symbol_DisplayName", resourceCulture); + } + } + + /// /// Looks up a localized string similar to Alles i&nklappen. /// public static string Collapse_all { Index: Core/Gui/src/Core.Gui/Properties/Resources.resx =================================================================== diff -u -rf869d21f23cf0986db9b2b68fd1aa2b9e7d28c9e -r985902680ffb75f3b9ee26b52725fe31916b6dec --- Core/Gui/src/Core.Gui/Properties/Resources.resx (.../Resources.resx) (revision f869d21f23cf0986db9b2b68fd1aa2b9e7d28c9e) +++ Core/Gui/src/Core.Gui/Properties/Resources.resx (.../Resources.resx) (revision 985902680ffb75f3b9ee26b52725fe31916b6dec) @@ -853,4 +853,85 @@ Grafiek + + Algemeen + + + De kleur van de vlakken waarmee deze gegevensreeks wordt weergegeven. + + + De kleur van de lijn van de vlakken waarmee deze gegevensreeks wordt weergegeven. + + + De dikte van de lijn van de vlakken waarmee deze gegevensreeks wordt weergegeven. + + + Geeft aan of de gegevensreeks wordt weergegeven. + + + Weergeven + + + De naam van deze gegevensreeks. + + + Naam + + + Vlakken + + + Het type van de data die wordt weergegeven in de gegevensreeks. + + + Type + + + Lijnen + + + Punten + + + Kleur + + + Lijnkleur + + + Lijndikte + + + De kleur van de lijnen waarmee deze gegevensreeks wordt weergegeven. + + + De stijl van de lijnen waarmee deze gegevensreeks wordt weergegeven. + + + Lijnstijl + + + De dikte van de lijnen waarmee deze gegevensreeks wordt weergegeven. + + + De kleur van de symbolen waarmee deze gegevensreeks wordt weergegeven. + + + De grootte van de symbolen waarmee deze gegevensreeks wordt weergegeven. + + + Grootte + + + De kleur van de lijn van de symbolen waarmee deze gegevensreeks wordt weergegeven. + + + De dikte van de lijn van de symbolen waarmee deze gegevensreeks wordt weergegeven. + + + Het symbool waarmee deze gegevensreeks wordt weergegeven. + + + Symbool + \ No newline at end of file Index: Core/Gui/src/Core.Gui/PropertyClasses/Chart/ChartAreaDataProperties.cs =================================================================== diff -u --- Core/Gui/src/Core.Gui/PropertyClasses/Chart/ChartAreaDataProperties.cs (revision 0) +++ Core/Gui/src/Core.Gui/PropertyClasses/Chart/ChartAreaDataProperties.cs (revision 985902680ffb75f3b9ee26b52725fe31916b6dec) @@ -0,0 +1,111 @@ +// Copyright (C) Stichting Deltares 2021. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer 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.ComponentModel; +using System.Drawing; +using System.Drawing.Design; +using Core.Common.Util.Attributes; +using Core.Components.Chart.Data; +using Core.Gui.Attributes; +using Core.Gui.Converters; +using Core.Gui.Properties; +using Core.Gui.UITypeEditors; + +namespace Core.Gui.PropertyClasses.Chart +{ + /// + /// ViewModel of for the property panel. + /// + 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))] + [Editor(typeof(ColorEditor), typeof(UITypeEditor))] + [TypeConverter(typeof(ColorTypeConverter))] + public Color FillColor + { + get + { + return data.Style.FillColor; + } + set + { + data.Style.FillColor = value; + data.NotifyObservers(); + } + } + + [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))] + [Editor(typeof(ColorEditor), typeof(UITypeEditor))] + [TypeConverter(typeof(ColorTypeConverter))] + public Color StrokeColor + { + get + { + return data.Style.StrokeColor; + } + set + { + data.Style.StrokeColor = value; + data.NotifyObservers(); + } + } + + [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))] + public int StrokeThickness + { + get + { + return data.Style.StrokeThickness; + } + set + { + data.Style.StrokeThickness = value; + data.NotifyObservers(); + } + } + + [DynamicReadOnlyValidationMethod] + public bool DynamicReadOnlyValidation(string propertyName) + { + return !data.Style.IsEditable; + } + } +} \ No newline at end of file Index: Core/Gui/src/Core.Gui/PropertyClasses/Chart/ChartDataCollectionProperties.cs =================================================================== diff -u --- Core/Gui/src/Core.Gui/PropertyClasses/Chart/ChartDataCollectionProperties.cs (revision 0) +++ Core/Gui/src/Core.Gui/PropertyClasses/Chart/ChartDataCollectionProperties.cs (revision 985902680ffb75f3b9ee26b52725fe31916b6dec) @@ -0,0 +1,45 @@ +// Copyright (C) Stichting Deltares 2021. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer 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 Core.Common.Util.Attributes; +using Core.Components.Chart.Data; +using Core.Gui.Properties; +using Core.Gui.PropertyBag; + +namespace Core.Gui.PropertyClasses.Chart +{ + /// + /// ViewModel of for properties panel. + /// + public class ChartDataCollectionProperties : ObjectProperties + { + [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_General))] + [ResourcesDisplayName(typeof(Resources), nameof(Resources.ChartDataProperties_Name_DisplayName))] + [ResourcesDescription(typeof(Resources), nameof(Resources.ChartDataProperties_Name_Description))] + public string Name + { + get + { + return data.Name; + } + } + } +} \ No newline at end of file Index: Core/Gui/src/Core.Gui/PropertyClasses/Chart/ChartDataProperties.cs =================================================================== diff -u --- Core/Gui/src/Core.Gui/PropertyClasses/Chart/ChartDataProperties.cs (revision 0) +++ Core/Gui/src/Core.Gui/PropertyClasses/Chart/ChartDataProperties.cs (revision 985902680ffb75f3b9ee26b52725fe31916b6dec) @@ -0,0 +1,72 @@ +// Copyright (C) Stichting Deltares 2021. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer 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 Core.Common.Util.Attributes; +using Core.Components.Chart.Data; +using Core.Gui.Attributes; +using Core.Gui.Properties; +using Core.Gui.PropertyBag; + +namespace Core.Gui.PropertyClasses.Chart +{ + public abstract class ChartDataProperties : ObjectProperties + where TChartData : ChartData + { + private const int namePropertyIndex = 0; + private const int typePropertyIndex = 1; + private const int isVisiblePropertyIndex = 2; + + [PropertyOrder(namePropertyIndex)] + [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_General))] + [ResourcesDisplayName(typeof(Resources), nameof(Resources.ChartDataProperties_Name_DisplayName))] + [ResourcesDescription(typeof(Resources), nameof(Resources.ChartDataProperties_Name_Description))] + public string Name + { + get + { + return data.Name; + } + } + + [PropertyOrder(typePropertyIndex)] + [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_General))] + [ResourcesDisplayName(typeof(Resources), nameof(Resources.ChartDataProperties_Type_DisplayName))] + [ResourcesDescription(typeof(Resources), nameof(Resources.ChartDataProperties_Type_Description))] + public abstract string Type { get; } + + [PropertyOrder(isVisiblePropertyIndex)] + [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_General))] + [ResourcesDisplayName(typeof(Resources), nameof(Resources.ChartDataProperties_IsVisible_DisplayName))] + [ResourcesDescription(typeof(Resources), nameof(Resources.ChartDataProperties_IsVisible_Description))] + public bool IsVisible + { + get + { + return data.IsVisible; + } + set + { + data.IsVisible = value; + data.NotifyObservers(); + } + } + } +} \ No newline at end of file Index: Core/Gui/src/Core.Gui/PropertyClasses/Chart/ChartLineDataProperties.cs =================================================================== diff -u --- Core/Gui/src/Core.Gui/PropertyClasses/Chart/ChartLineDataProperties.cs (revision 0) +++ Core/Gui/src/Core.Gui/PropertyClasses/Chart/ChartLineDataProperties.cs (revision 985902680ffb75f3b9ee26b52725fe31916b6dec) @@ -0,0 +1,112 @@ +// Copyright (C) Stichting Deltares 2021. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer 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.ComponentModel; +using System.Drawing; +using System.Drawing.Design; +using Core.Common.Util; +using Core.Common.Util.Attributes; +using Core.Components.Chart.Data; +using Core.Components.Chart.Styles; +using Core.Gui.Attributes; +using Core.Gui.Converters; +using Core.Gui.Properties; +using Core.Gui.UITypeEditors; + +namespace Core.Gui.PropertyClasses.Chart +{ + /// + /// ViewModel of for the property panel. + /// + 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))] + [Editor(typeof(ColorEditor), typeof(UITypeEditor))] + [TypeConverter(typeof(ColorTypeConverter))] + public Color Color + { + get + { + return data.Style.Color; + } + set + { + data.Style.Color = value; + data.NotifyObservers(); + } + } + + [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))] + public int Width + { + get + { + return data.Style.Width; + } + set + { + data.Style.Width = value; + data.NotifyObservers(); + } + } + + [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))] + [TypeConverter(typeof(EnumTypeConverter))] + public ChartLineDashStyle DashStyle + { + get + { + return data.Style.DashStyle; + } + set + { + data.Style.DashStyle = value; + data.NotifyObservers(); + } + } + + [DynamicReadOnlyValidationMethod] + public bool DynamicReadOnlyValidation(string propertyName) + { + return !data.Style.IsEditable; + } + } +} \ No newline at end of file Index: Core/Gui/src/Core.Gui/PropertyClasses/Chart/ChartMultipleAreaDataProperties.cs =================================================================== diff -u --- Core/Gui/src/Core.Gui/PropertyClasses/Chart/ChartMultipleAreaDataProperties.cs (revision 0) +++ Core/Gui/src/Core.Gui/PropertyClasses/Chart/ChartMultipleAreaDataProperties.cs (revision 985902680ffb75f3b9ee26b52725fe31916b6dec) @@ -0,0 +1,111 @@ +// Copyright (C) Stichting Deltares 2021. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer 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.ComponentModel; +using System.Drawing; +using System.Drawing.Design; +using Core.Common.Util.Attributes; +using Core.Components.Chart.Data; +using Core.Gui.Attributes; +using Core.Gui.Converters; +using Core.Gui.Properties; +using Core.Gui.UITypeEditors; + +namespace Core.Gui.PropertyClasses.Chart +{ + /// + /// ViewModel of for the property panel. + /// + 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))] + [Editor(typeof(ColorEditor), typeof(UITypeEditor))] + [TypeConverter(typeof(ColorTypeConverter))] + public Color FillColor + { + get + { + return data.Style.FillColor; + } + set + { + data.Style.FillColor = value; + data.NotifyObservers(); + } + } + + [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))] + [Editor(typeof(ColorEditor), typeof(UITypeEditor))] + [TypeConverter(typeof(ColorTypeConverter))] + public Color StrokeColor + { + get + { + return data.Style.StrokeColor; + } + set + { + data.Style.StrokeColor = value; + data.NotifyObservers(); + } + } + + [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))] + public int StrokeThickness + { + get + { + return data.Style.StrokeThickness; + } + set + { + data.Style.StrokeThickness = value; + data.NotifyObservers(); + } + } + + [DynamicReadOnlyValidationMethod] + public bool DynamicReadOnlyValidation(string propertyName) + { + return !data.Style.IsEditable; + } + } +} \ No newline at end of file Index: Core/Gui/src/Core.Gui/PropertyClasses/Chart/ChartMultipleLineDataProperties.cs =================================================================== diff -u --- Core/Gui/src/Core.Gui/PropertyClasses/Chart/ChartMultipleLineDataProperties.cs (revision 0) +++ Core/Gui/src/Core.Gui/PropertyClasses/Chart/ChartMultipleLineDataProperties.cs (revision 985902680ffb75f3b9ee26b52725fe31916b6dec) @@ -0,0 +1,112 @@ +// Copyright (C) Stichting Deltares 2021. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer 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.ComponentModel; +using System.Drawing; +using System.Drawing.Design; +using Core.Common.Util; +using Core.Common.Util.Attributes; +using Core.Components.Chart.Data; +using Core.Components.Chart.Styles; +using Core.Gui.Attributes; +using Core.Gui.Converters; +using Core.Gui.Properties; +using Core.Gui.UITypeEditors; + +namespace Core.Gui.PropertyClasses.Chart +{ + /// + /// ViewModel of for the property panel. + /// + 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))] + [Editor(typeof(ColorEditor), typeof(UITypeEditor))] + [TypeConverter(typeof(ColorTypeConverter))] + public Color Color + { + get + { + return data.Style.Color; + } + set + { + data.Style.Color = value; + data.NotifyObservers(); + } + } + + [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))] + public int Width + { + get + { + return data.Style.Width; + } + set + { + data.Style.Width = value; + data.NotifyObservers(); + } + } + + [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))] + [TypeConverter(typeof(EnumTypeConverter))] + public ChartLineDashStyle DashStyle + { + get + { + return data.Style.DashStyle; + } + set + { + data.Style.DashStyle = value; + data.NotifyObservers(); + } + } + + [DynamicReadOnlyValidationMethod] + public bool DynamicReadOnlyValidation(string propertyName) + { + return !data.Style.IsEditable; + } + } +} \ No newline at end of file Index: Core/Gui/src/Core.Gui/PropertyClasses/Chart/ChartPointDataProperties.cs =================================================================== diff -u --- Core/Gui/src/Core.Gui/PropertyClasses/Chart/ChartPointDataProperties.cs (revision 0) +++ Core/Gui/src/Core.Gui/PropertyClasses/Chart/ChartPointDataProperties.cs (revision 985902680ffb75f3b9ee26b52725fe31916b6dec) @@ -0,0 +1,150 @@ +// Copyright (C) Stichting Deltares 2021. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer 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.ComponentModel; +using System.Drawing; +using System.Drawing.Design; +using Core.Common.Util; +using Core.Common.Util.Attributes; +using Core.Components.Chart.Data; +using Core.Components.Chart.Styles; +using Core.Gui.Attributes; +using Core.Gui.Converters; +using Core.Gui.Properties; +using Core.Gui.UITypeEditors; + +namespace Core.Gui.PropertyClasses.Chart +{ + /// + /// ViewModel of for the property panel. + /// + 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))] + [Editor(typeof(ColorEditor), typeof(UITypeEditor))] + [TypeConverter(typeof(ColorTypeConverter))] + public Color Color + { + get + { + return data.Style.Color; + } + set + { + data.Style.Color = value; + data.NotifyObservers(); + } + } + + [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))] + [Editor(typeof(ColorEditor), typeof(UITypeEditor))] + [TypeConverter(typeof(ColorTypeConverter))] + public Color StrokeColor + { + get + { + return data.Style.StrokeColor; + } + set + { + data.Style.StrokeColor = value; + data.NotifyObservers(); + } + } + + [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))] + public int StrokeThickness + { + get + { + return data.Style.StrokeThickness; + } + set + { + data.Style.StrokeThickness = value; + data.NotifyObservers(); + } + } + + [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))] + public int Size + { + get + { + return data.Style.Size; + } + set + { + data.Style.Size = value; + data.NotifyObservers(); + } + } + + [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))] + [TypeConverter(typeof(EnumTypeConverter))] + public ChartPointSymbol Symbol + { + get + { + return data.Style.Symbol; + } + set + { + data.Style.Symbol = value; + data.NotifyObservers(); + } + } + + [DynamicReadOnlyValidationMethod] + public bool DynamicReadOnlyValidation(string propertyName) + { + return !data.Style.IsEditable; + } + } +} \ No newline at end of file Index: Core/Gui/test/Core.Gui.Test/PropertyClasses/Chart/ChartAreaDataPropertiesTest.cs =================================================================== diff -u --- Core/Gui/test/Core.Gui.Test/PropertyClasses/Chart/ChartAreaDataPropertiesTest.cs (revision 0) +++ Core/Gui/test/Core.Gui.Test/PropertyClasses/Chart/ChartAreaDataPropertiesTest.cs (revision 985902680ffb75f3b9ee26b52725fe31916b6dec) @@ -0,0 +1,166 @@ +// Copyright (C) Stichting Deltares 2021. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer 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.ComponentModel; +using System.Drawing; +using Core.Common.Base; +using Core.Components.Chart.Data; +using Core.Components.Chart.Styles; +using Core.Gui.Converters; +using Core.Gui.PropertyClasses.Chart; +using Core.Gui.TestUtil; +using NUnit.Framework; +using Rhino.Mocks; + +namespace Core.Gui.Test.PropertyClasses.Chart +{ + [TestFixture] + public class ChartAreaDataPropertiesTest + { + private const int fillColorPropertyIndex = 3; + private const int strokeColorPropertyIndex = 4; + private const int strokeThicknessPropertyIndex = 5; + + [Test] + public void Constructor_ExpectedValues() + { + // Call + var properties = new ChartAreaDataProperties(); + + // Assert + Assert.IsInstanceOf>(properties); + Assert.IsNull(properties.Data); + Assert.AreEqual("Vlakken", properties.Type); + } + + [Test] + [TestCase(true)] + [TestCase(false)] + public void Constructor_Always_PropertiesHaveExpectedAttributesValues(bool isStyleEditable) + { + // Setup + var chartAreaData = new ChartAreaData("Test", new ChartAreaStyle + { + IsEditable = isStyleEditable + }); + + // Call + var properties = new ChartAreaDataProperties + { + Data = chartAreaData + }; + + // Assert + PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); + Assert.AreEqual(6, dynamicProperties.Count); + + const string styleCategory = "Stijl"; + + PropertyDescriptor fillColorProperty = dynamicProperties[fillColorPropertyIndex]; + Assert.IsInstanceOf(fillColorProperty.Converter); + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(fillColorProperty, + styleCategory, + "Kleur", + "De kleur van de vlakken waarmee deze gegevensreeks wordt weergegeven.", + !isStyleEditable); + + 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.", + !isStyleEditable); + + PropertyDescriptor strokeThicknessProperty = dynamicProperties[strokeThicknessPropertyIndex]; + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(strokeThicknessProperty, + styleCategory, + "Lijndikte", + "De dikte van de lijn van de vlakken waarmee deze gegevensreeks wordt weergegeven.", + !isStyleEditable); + } + + [Test] + public void Data_SetNewChartAreaDataInstance_ReturnCorrectPropertyValues() + { + // Setup + Color fillColor = Color.Aqua; + Color strokeColor = Color.Bisque; + const int strokeThickness = 4; + + var chartAreaData = new ChartAreaData("Test", new ChartAreaStyle + { + FillColor = fillColor, + StrokeColor = strokeColor, + StrokeThickness = strokeThickness + }); + var properties = new ChartAreaDataProperties(); + + // Call + properties.Data = chartAreaData; + + // Assert + Assert.AreEqual(fillColor, properties.FillColor); + Assert.AreEqual(strokeColor, properties.StrokeColor); + Assert.AreEqual(strokeThickness, properties.StrokeThickness); + } + + [Test] + public void SetProperties_IndividualProperties_UpdateDataAndNotifyObservers() + { + // Setup + const int numberOfChangedProperties = 3; + var mocks = new MockRepository(); + var observer = mocks.StrictMock(); + observer.Expect(o => o.UpdateObserver()).Repeat.Times(numberOfChangedProperties); + mocks.ReplayAll(); + + var chartAreaData = new ChartAreaData("Test", new ChartAreaStyle + { + FillColor = Color.AliceBlue, + StrokeColor = Color.Blue, + StrokeThickness = 3 + }); + + chartAreaData.Attach(observer); + + var properties = new ChartAreaDataProperties + { + Data = chartAreaData + }; + + Color newFillColor = Color.Blue; + Color newStrokeColor = Color.Red; + const int newStrokeThickness = 6; + + // Call + properties.FillColor = newFillColor; + properties.StrokeColor = newStrokeColor; + properties.StrokeThickness = newStrokeThickness; + + // Assert + Assert.AreEqual(newFillColor, chartAreaData.Style.FillColor); + Assert.AreEqual(newStrokeColor, chartAreaData.Style.StrokeColor); + Assert.AreEqual(newStrokeThickness, chartAreaData.Style.StrokeThickness); + mocks.VerifyAll(); + } + } +} \ No newline at end of file Index: Core/Gui/test/Core.Gui.Test/PropertyClasses/Chart/ChartDataCollectionPropertiesTest.cs =================================================================== diff -u --- Core/Gui/test/Core.Gui.Test/PropertyClasses/Chart/ChartDataCollectionPropertiesTest.cs (revision 0) +++ Core/Gui/test/Core.Gui.Test/PropertyClasses/Chart/ChartDataCollectionPropertiesTest.cs (revision 985902680ffb75f3b9ee26b52725fe31916b6dec) @@ -0,0 +1,86 @@ +// Copyright (C) Stichting Deltares 2021. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer 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.ComponentModel; +using Core.Components.Chart.Data; +using Core.Gui.PropertyBag; +using Core.Gui.PropertyClasses.Chart; +using Core.Gui.TestUtil; +using NUnit.Framework; + +namespace Core.Gui.Test.PropertyClasses.Chart +{ + [TestFixture] + public class ChartDataCollectionPropertiesTest + { + private const int namePropertyIndex = 0; + + [Test] + public void Constructor_ReturnsExpectedValues() + { + // Call + var properties = new ChartDataCollectionProperties(); + + Assert.IsInstanceOf>(properties); + Assert.IsNull(properties.Data); + } + + [Test] + public void Data_SetNewChartDataCollectionInstance_ReturnCorrectPropertyValues() + { + // Setup + var chartDataCollection = new ChartDataCollection("Test"); + var properties = new ChartDataCollectionProperties(); + + // Call + properties.Data = chartDataCollection; + + // Assert + Assert.AreEqual(chartDataCollection.Name, properties.Name); + } + + [Test] + public void Constructor_Always_PropertiesHaveExpectedAttributesValues() + { + // Setup + var chartDataCollection = new ChartDataCollection("Test"); + + // Call + var properties = new ChartDataCollectionProperties + { + Data = chartDataCollection + }; + + // Assert + PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); + Assert.AreEqual(1, dynamicProperties.Count); + + const string generalCategory = "Algemeen"; + + PropertyDescriptor nameProperty = dynamicProperties[namePropertyIndex]; + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nameProperty, + generalCategory, + "Naam", + "De naam van deze gegevensreeks.", + true); + } + } +} \ No newline at end of file Index: Core/Gui/test/Core.Gui.Test/PropertyClasses/Chart/ChartDataPropertiesTest.cs =================================================================== diff -u --- Core/Gui/test/Core.Gui.Test/PropertyClasses/Chart/ChartDataPropertiesTest.cs (revision 0) +++ Core/Gui/test/Core.Gui.Test/PropertyClasses/Chart/ChartDataPropertiesTest.cs (revision 985902680ffb75f3b9ee26b52725fe31916b6dec) @@ -0,0 +1,145 @@ +// Copyright (C) Stichting Deltares 2021. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer 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.ComponentModel; +using Core.Common.Base; +using Core.Components.Chart.Data; +using Core.Components.Chart.TestUtil; +using Core.Gui.PropertyBag; +using Core.Gui.PropertyClasses.Chart; +using Core.Gui.TestUtil; +using NUnit.Framework; +using Rhino.Mocks; + +namespace Core.Gui.Test.PropertyClasses.Chart +{ + [TestFixture] + public class ChartDataPropertiesTest + { + private const int namePropertyIndex = 0; + private const int typePropertyIndex = 1; + private const int visiblePropertyIndex = 2; + + [Test] + public void Constructor_ReturnsExpectedValues() + { + // Call + var properties = new TestChartDataProperties(); + + Assert.IsInstanceOf>(properties); + Assert.IsNull(properties.Data); + } + + [Test] + public void Data_SetNewChartDataContextInstance_ReturnCorrectPropertyValues() + { + // Setup + var chartData = new TestChartData("TestChart"); + var properties = new TestChartDataProperties(); + + // Call + properties.Data = chartData; + + // Assert + Assert.AreEqual(chartData.Name, properties.Name); + Assert.AreEqual(chartData.IsVisible, properties.IsVisible); + Assert.AreEqual("Test type string", properties.Type); + } + + [Test] + public void SetProperties_IndividualProperties_UpdateDataAndNotifyObservers() + { + // Setup + const int numberOfChangedProperties = 1; + + var mocks = new MockRepository(); + var observer = mocks.StrictMock(); + observer.Expect(o => o.UpdateObserver()).Repeat.Times(numberOfChangedProperties); + mocks.ReplayAll(); + + var chartData = new TestChartData("Test"); + + chartData.Attach(observer); + + var properties = new TestChartDataProperties + { + Data = chartData + }; + + // Call + properties.IsVisible = false; + + // Assert + Assert.IsFalse(chartData.IsVisible); + mocks.VerifyAll(); + } + + [Test] + public void Constructor_Always_PropertiesHaveExpectedAttributesValues() + { + // Setup + var chartDataContext = new TestChartData("TestChart"); + + // Call + var properties = new TestChartDataProperties + { + Data = chartDataContext + }; + + // Assert + PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); + Assert.AreEqual(3, dynamicProperties.Count); + + const string generalCategory = "Algemeen"; + + PropertyDescriptor nameProperty = dynamicProperties[namePropertyIndex]; + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nameProperty, + generalCategory, + "Naam", + "De naam van deze gegevensreeks.", + true); + + PropertyDescriptor typeProperty = dynamicProperties[typePropertyIndex]; + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(typeProperty, + generalCategory, + "Type", + "Het type van de data die wordt weergegeven in de gegevensreeks.", + true); + + PropertyDescriptor isVisibleProperty = dynamicProperties[visiblePropertyIndex]; + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(isVisibleProperty, + generalCategory, + "Weergeven", + "Geeft aan of de gegevensreeks wordt weergegeven."); + } + + private class TestChartDataProperties : ChartDataProperties + { + public override string Type + { + get + { + return "Test type string"; + } + } + } + } +} \ No newline at end of file Index: Core/Gui/test/Core.Gui.Test/PropertyClasses/Chart/ChartLineDataPropertiesTest.cs =================================================================== diff -u --- Core/Gui/test/Core.Gui.Test/PropertyClasses/Chart/ChartLineDataPropertiesTest.cs (revision 0) +++ Core/Gui/test/Core.Gui.Test/PropertyClasses/Chart/ChartLineDataPropertiesTest.cs (revision 985902680ffb75f3b9ee26b52725fe31916b6dec) @@ -0,0 +1,167 @@ +// Copyright (C) Stichting Deltares 2021. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer 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.ComponentModel; +using System.Drawing; +using Core.Common.Base; +using Core.Common.Util; +using Core.Components.Chart.Data; +using Core.Components.Chart.Styles; +using Core.Gui.Converters; +using Core.Gui.PropertyClasses.Chart; +using Core.Gui.TestUtil; +using NUnit.Framework; +using Rhino.Mocks; + +namespace Core.Gui.Test.PropertyClasses.Chart +{ + [TestFixture] + public class ChartLineDataPropertiesTest + { + private const int colorPropertyIndex = 3; + private const int widthPropertyIndex = 4; + private const int stylePropertyIndex = 5; + + [Test] + public void Constructor_ExpectedValues() + { + // Call + var properties = new ChartLineDataProperties(); + + // Assert + Assert.IsInstanceOf>(properties); + Assert.IsNull(properties.Data); + Assert.AreEqual("Lijnen", properties.Type); + } + + [Test] + [TestCase(true)] + [TestCase(false)] + public void Constructor_Always_PropertiesHaveExpectedAttributesValues(bool isStyleEditable) + { + // Setup + var chartLineData = new ChartLineData("Test", new ChartLineStyle + { + IsEditable = isStyleEditable + }); + + // Call + var properties = new ChartLineDataProperties + { + Data = chartLineData + }; + + // Assert + PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); + Assert.AreEqual(6, dynamicProperties.Count); + + const string styleCategory = "Stijl"; + + PropertyDescriptor colorProperty = dynamicProperties[colorPropertyIndex]; + Assert.IsInstanceOf(colorProperty.Converter); + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(colorProperty, + styleCategory, + "Kleur", + "De kleur van de lijnen waarmee deze gegevensreeks wordt weergegeven.", + !isStyleEditable); + + PropertyDescriptor widthProperty = dynamicProperties[widthPropertyIndex]; + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(widthProperty, + styleCategory, + "Lijndikte", + "De dikte van de lijnen waarmee deze gegevensreeks wordt weergegeven.", + !isStyleEditable); + + PropertyDescriptor styleProperty = dynamicProperties[stylePropertyIndex]; + Assert.IsInstanceOf(styleProperty.Converter); + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(styleProperty, + styleCategory, + "Lijnstijl", + "De stijl van de lijnen waarmee deze gegevensreeks wordt weergegeven.", + !isStyleEditable); + } + + [Test] + public void Data_SetNewChartLineDataInstance_ReturnCorrectPropertyValues() + { + // Setup + Color color = Color.Aqua; + const int width = 4; + const ChartLineDashStyle dashStyle = ChartLineDashStyle.DashDot; + + var chartLineData = new ChartLineData("Test", new ChartLineStyle + { + Color = color, + Width = width, + DashStyle = dashStyle + }); + var properties = new ChartLineDataProperties(); + + // Call + properties.Data = chartLineData; + + // Assert + Assert.AreEqual(color, properties.Color); + Assert.AreEqual(width, properties.Width); + Assert.AreEqual(dashStyle, properties.DashStyle); + } + + [Test] + public void SetProperties_IndividualProperties_UpdateDataAndNotifyObservers() + { + // Setup + const int numberOfChangedProperties = 3; + var mocks = new MockRepository(); + var observer = mocks.StrictMock(); + observer.Expect(o => o.UpdateObserver()).Repeat.Times(numberOfChangedProperties); + mocks.ReplayAll(); + + var chartLineData = new ChartLineData("Test", new ChartLineStyle + { + Color = Color.AliceBlue, + Width = 3, + DashStyle = ChartLineDashStyle.Solid + }); + + chartLineData.Attach(observer); + + var properties = new ChartLineDataProperties + { + Data = chartLineData + }; + + Color newColor = Color.Blue; + const int newWidth = 6; + const ChartLineDashStyle newDashStyle = ChartLineDashStyle.DashDot; + + // Call + properties.Color = newColor; + properties.Width = newWidth; + properties.DashStyle = newDashStyle; + + // Assert + Assert.AreEqual(newColor, chartLineData.Style.Color); + Assert.AreEqual(newWidth, chartLineData.Style.Width); + Assert.AreEqual(newDashStyle, chartLineData.Style.DashStyle); + mocks.VerifyAll(); + } + } +} \ No newline at end of file Index: Core/Gui/test/Core.Gui.Test/PropertyClasses/Chart/ChartMultipleAreaDataPropertiesTest.cs =================================================================== diff -u --- Core/Gui/test/Core.Gui.Test/PropertyClasses/Chart/ChartMultipleAreaDataPropertiesTest.cs (revision 0) +++ Core/Gui/test/Core.Gui.Test/PropertyClasses/Chart/ChartMultipleAreaDataPropertiesTest.cs (revision 985902680ffb75f3b9ee26b52725fe31916b6dec) @@ -0,0 +1,166 @@ +// Copyright (C) Stichting Deltares 2021. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer 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.ComponentModel; +using System.Drawing; +using Core.Common.Base; +using Core.Components.Chart.Data; +using Core.Components.Chart.Styles; +using Core.Gui.Converters; +using Core.Gui.PropertyClasses.Chart; +using Core.Gui.TestUtil; +using NUnit.Framework; +using Rhino.Mocks; + +namespace Core.Gui.Test.PropertyClasses.Chart +{ + [TestFixture] + public class ChartMultipleAreaDataPropertiesTest + { + private const int fillColorPropertyIndex = 3; + private const int strokeColorPropertyIndex = 4; + private const int strokeThicknessPropertyIndex = 5; + + [Test] + public void Constructor_ExpectedValues() + { + // Call + var properties = new ChartMultipleAreaDataProperties(); + + // Assert + Assert.IsInstanceOf>(properties); + Assert.IsNull(properties.Data); + Assert.AreEqual("Vlakken", properties.Type); + } + + [Test] + [TestCase(true)] + [TestCase(false)] + public void Constructor_Always_PropertiesHaveExpectedAttributesValues(bool isStyleEditable) + { + // Setup + var chartAreaData = new ChartMultipleAreaData("Test", new ChartAreaStyle + { + IsEditable = isStyleEditable + }); + + // Call + var properties = new ChartMultipleAreaDataProperties + { + Data = chartAreaData + }; + + // Assert + PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); + Assert.AreEqual(6, dynamicProperties.Count); + + const string styleCategory = "Stijl"; + + PropertyDescriptor fillColorProperty = dynamicProperties[fillColorPropertyIndex]; + Assert.IsInstanceOf(fillColorProperty.Converter); + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(fillColorProperty, + styleCategory, + "Kleur", + "De kleur van de vlakken waarmee deze gegevensreeks wordt weergegeven.", + !isStyleEditable); + + 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.", + !isStyleEditable); + + PropertyDescriptor strokeThicknessProperty = dynamicProperties[strokeThicknessPropertyIndex]; + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(strokeThicknessProperty, + styleCategory, + "Lijndikte", + "De dikte van de lijn van de vlakken waarmee deze gegevensreeks wordt weergegeven.", + !isStyleEditable); + } + + [Test] + public void Data_SetNewChartAreaDataInstance_ReturnCorrectPropertyValues() + { + // Setup + Color fillColor = Color.Aqua; + Color strokeColor = Color.Bisque; + const int strokeThickness = 4; + + var chartAreaData = new ChartMultipleAreaData("Test", new ChartAreaStyle + { + FillColor = fillColor, + StrokeColor = strokeColor, + StrokeThickness = strokeThickness + }); + var properties = new ChartMultipleAreaDataProperties(); + + // Call + properties.Data = chartAreaData; + + // Assert + Assert.AreEqual(fillColor, properties.FillColor); + Assert.AreEqual(strokeColor, properties.StrokeColor); + Assert.AreEqual(strokeThickness, properties.StrokeThickness); + } + + [Test] + public void SetProperties_IndividualProperties_UpdateDataAndNotifyObservers() + { + // Setup + const int numberOfChangedProperties = 3; + var mocks = new MockRepository(); + var observer = mocks.StrictMock(); + observer.Expect(o => o.UpdateObserver()).Repeat.Times(numberOfChangedProperties); + mocks.ReplayAll(); + + var chartAreaData = new ChartMultipleAreaData("Test", new ChartAreaStyle + { + FillColor = Color.AliceBlue, + StrokeColor = Color.Blue, + StrokeThickness = 3 + }); + + chartAreaData.Attach(observer); + + var properties = new ChartMultipleAreaDataProperties + { + Data = chartAreaData + }; + + Color newFillColor = Color.Blue; + Color newStrokeColor = Color.Red; + const int newStrokeThickness = 6; + + // Call + properties.FillColor = newFillColor; + properties.StrokeColor = newStrokeColor; + properties.StrokeThickness = newStrokeThickness; + + // Assert + Assert.AreEqual(newFillColor, chartAreaData.Style.FillColor); + Assert.AreEqual(newStrokeColor, chartAreaData.Style.StrokeColor); + Assert.AreEqual(newStrokeThickness, chartAreaData.Style.StrokeThickness); + mocks.VerifyAll(); + } + } +} \ No newline at end of file Index: Core/Gui/test/Core.Gui.Test/PropertyClasses/Chart/ChartMultipleLineDataPropertiesTest.cs =================================================================== diff -u --- Core/Gui/test/Core.Gui.Test/PropertyClasses/Chart/ChartMultipleLineDataPropertiesTest.cs (revision 0) +++ Core/Gui/test/Core.Gui.Test/PropertyClasses/Chart/ChartMultipleLineDataPropertiesTest.cs (revision 985902680ffb75f3b9ee26b52725fe31916b6dec) @@ -0,0 +1,167 @@ +// Copyright (C) Stichting Deltares 2021. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer 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.ComponentModel; +using System.Drawing; +using Core.Common.Base; +using Core.Common.Util; +using Core.Components.Chart.Data; +using Core.Components.Chart.Styles; +using Core.Gui.Converters; +using Core.Gui.PropertyClasses.Chart; +using Core.Gui.TestUtil; +using NUnit.Framework; +using Rhino.Mocks; + +namespace Core.Gui.Test.PropertyClasses.Chart +{ + [TestFixture] + public class ChartMultipleLineDataPropertiesTest + { + private const int colorPropertyIndex = 3; + private const int widthPropertyIndex = 4; + private const int stylePropertyIndex = 5; + + [Test] + public void Constructor_ExpectedValues() + { + // Call + var properties = new ChartMultipleLineDataProperties(); + + // Assert + Assert.IsInstanceOf>(properties); + Assert.IsNull(properties.Data); + Assert.AreEqual("Lijnen", properties.Type); + } + + [Test] + [TestCase(true)] + [TestCase(false)] + public void Constructor_Always_PropertiesHaveExpectedAttributesValues(bool isStyleEditable) + { + // Setup + var chartLineData = new ChartMultipleLineData("Test", new ChartLineStyle + { + IsEditable = isStyleEditable + }); + + // Call + var properties = new ChartMultipleLineDataProperties + { + Data = chartLineData + }; + + // Assert + PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); + Assert.AreEqual(6, dynamicProperties.Count); + + const string styleCategory = "Stijl"; + + PropertyDescriptor colorProperty = dynamicProperties[colorPropertyIndex]; + Assert.IsInstanceOf(colorProperty.Converter); + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(colorProperty, + styleCategory, + "Kleur", + "De kleur van de lijnen waarmee deze gegevensreeks wordt weergegeven.", + !isStyleEditable); + + PropertyDescriptor widthProperty = dynamicProperties[widthPropertyIndex]; + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(widthProperty, + styleCategory, + "Lijndikte", + "De dikte van de lijnen waarmee deze gegevensreeks wordt weergegeven.", + !isStyleEditable); + + PropertyDescriptor styleProperty = dynamicProperties[stylePropertyIndex]; + Assert.IsInstanceOf(styleProperty.Converter); + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(styleProperty, + styleCategory, + "Lijnstijl", + "De stijl van de lijnen waarmee deze gegevensreeks wordt weergegeven.", + !isStyleEditable); + } + + [Test] + public void Data_SetNewChartLineDataInstance_ReturnCorrectPropertyValues() + { + // Setup + Color color = Color.Aqua; + const int width = 4; + const ChartLineDashStyle dashStyle = ChartLineDashStyle.DashDot; + + var chartLineData = new ChartMultipleLineData("Test", new ChartLineStyle + { + Color = color, + Width = width, + DashStyle = dashStyle + }); + var properties = new ChartMultipleLineDataProperties(); + + // Call + properties.Data = chartLineData; + + // Assert + Assert.AreEqual(color, properties.Color); + Assert.AreEqual(width, properties.Width); + Assert.AreEqual(dashStyle, properties.DashStyle); + } + + [Test] + public void SetProperties_IndividualProperties_UpdateDataAndNotifyObservers() + { + // Setup + const int numberOfChangedProperties = 3; + var mocks = new MockRepository(); + var observer = mocks.StrictMock(); + observer.Expect(o => o.UpdateObserver()).Repeat.Times(numberOfChangedProperties); + mocks.ReplayAll(); + + var chartLineData = new ChartMultipleLineData("Test", new ChartLineStyle + { + Color = Color.AliceBlue, + Width = 3, + DashStyle = ChartLineDashStyle.Solid + }); + + chartLineData.Attach(observer); + + var properties = new ChartMultipleLineDataProperties + { + Data = chartLineData + }; + + Color newColor = Color.Blue; + const int newWidth = 6; + const ChartLineDashStyle newDashStyle = ChartLineDashStyle.DashDot; + + // Call + properties.Color = newColor; + properties.Width = newWidth; + properties.DashStyle = newDashStyle; + + // Assert + Assert.AreEqual(newColor, chartLineData.Style.Color); + Assert.AreEqual(newWidth, chartLineData.Style.Width); + Assert.AreEqual(newDashStyle, chartLineData.Style.DashStyle); + mocks.VerifyAll(); + } + } +} \ No newline at end of file Index: Core/Gui/test/Core.Gui.Test/PropertyClasses/Chart/ChartPointDataPropertiesTest.cs =================================================================== diff -u --- Core/Gui/test/Core.Gui.Test/PropertyClasses/Chart/ChartPointDataPropertiesTest.cs (revision 0) +++ Core/Gui/test/Core.Gui.Test/PropertyClasses/Chart/ChartPointDataPropertiesTest.cs (revision 985902680ffb75f3b9ee26b52725fe31916b6dec) @@ -0,0 +1,198 @@ +// Copyright (C) Stichting Deltares 2021. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer 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.ComponentModel; +using System.Drawing; +using Core.Common.Base; +using Core.Common.Util; +using Core.Components.Chart.Data; +using Core.Components.Chart.Styles; +using Core.Gui.Converters; +using Core.Gui.PropertyClasses.Chart; +using Core.Gui.TestUtil; +using NUnit.Framework; +using Rhino.Mocks; + +namespace Core.Gui.Test.PropertyClasses.Chart +{ + [TestFixture] + public class ChartPointDataPropertiesTest + { + private const int colorPropertyIndex = 3; + private const int strokeColorPropertyIndex = 4; + private const int strokeThicknessPropertyIndex = 5; + private const int sizePropertyIndex = 6; + private const int symbolPropertyIndex = 7; + + [Test] + public void Constructor_ExpectedValues() + { + // Call + var properties = new ChartPointDataProperties(); + + // Assert + Assert.IsInstanceOf>(properties); + Assert.IsNull(properties.Data); + Assert.AreEqual("Punten", properties.Type); + } + + [Test] + [TestCase(true)] + [TestCase(false)] + public void Constructor_Always_PropertiesHaveExpectedAttributesValues(bool isStyleEditable) + { + // Setup + var chartPointData = new ChartPointData("Test", new ChartPointStyle + { + IsEditable = isStyleEditable + }); + + // Call + var properties = new ChartPointDataProperties + { + Data = chartPointData + }; + + // Assert + PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); + Assert.AreEqual(8, dynamicProperties.Count); + + const string styleCategory = "Stijl"; + + PropertyDescriptor colorProperty = dynamicProperties[colorPropertyIndex]; + Assert.IsInstanceOf(colorProperty.Converter); + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(colorProperty, + styleCategory, + "Kleur", + "De kleur van de symbolen waarmee deze gegevensreeks wordt weergegeven.", + !isStyleEditable); + + 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.", + !isStyleEditable); + + PropertyDescriptor strokeThicknessProperty = dynamicProperties[strokeThicknessPropertyIndex]; + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(strokeThicknessProperty, + styleCategory, + "Lijndikte", + "De dikte van de lijn van de symbolen waarmee deze gegevensreeks wordt weergegeven.", + !isStyleEditable); + + PropertyDescriptor sizeProperty = dynamicProperties[sizePropertyIndex]; + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(sizeProperty, + styleCategory, + "Grootte", + "De grootte van de symbolen waarmee deze gegevensreeks wordt weergegeven.", + !isStyleEditable); + + PropertyDescriptor symbolProperty = dynamicProperties[symbolPropertyIndex]; + Assert.IsInstanceOf(symbolProperty.Converter); + PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(symbolProperty, + styleCategory, + "Symbool", + "Het symbool waarmee deze gegevensreeks wordt weergegeven.", + !isStyleEditable); + } + + [Test] + public void Data_SetNewChartPointDataInstance_ReturnCorrectPropertyValues() + { + // Setup + Color color = Color.Aqua; + Color strokeColor = Color.Crimson; + const int size = 4; + const int strokeThickness = 2; + const ChartPointSymbol symbol = ChartPointSymbol.Circle; + + var chartPointData = new ChartPointData("Test", new ChartPointStyle + { + Color = color, + StrokeColor = strokeColor, + Size = size, + StrokeThickness = strokeThickness, + Symbol = symbol + }); + var properties = new ChartPointDataProperties(); + + // Call + properties.Data = chartPointData; + + // Assert + Assert.AreEqual(color, properties.Color); + Assert.AreEqual(strokeColor, properties.StrokeColor); + Assert.AreEqual(strokeThickness, properties.StrokeThickness); + Assert.AreEqual(size, properties.Size); + Assert.AreEqual(symbol, properties.Symbol); + } + + [Test] + public void SetProperties_IndividualProperties_UpdateDataAndNotifyObservers() + { + // Setup + const int numberOfChangedProperties = 5; + var mocks = new MockRepository(); + var observer = mocks.StrictMock(); + observer.Expect(o => o.UpdateObserver()).Repeat.Times(numberOfChangedProperties); + mocks.ReplayAll(); + + var chartPointData = new ChartPointData("Test", new ChartPointStyle + { + Color = Color.AliceBlue, + StrokeColor = Color.Fuchsia, + Size = 3, + StrokeThickness = 1, + Symbol = ChartPointSymbol.Circle + }); + + chartPointData.Attach(observer); + + var properties = new ChartPointDataProperties + { + Data = chartPointData + }; + + Color newColor = Color.Blue; + Color newStrokeColor = Color.Aquamarine; + const int newSize = 6; + const ChartPointSymbol newSymbol = ChartPointSymbol.Diamond; + const int newStrokeThickness = 4; + + // Call + properties.Color = newColor; + properties.Size = newSize; + properties.Symbol = newSymbol; + properties.StrokeColor = newStrokeColor; + properties.StrokeThickness = newStrokeThickness; + + // Assert + Assert.AreEqual(newColor, chartPointData.Style.Color); + Assert.AreEqual(newSize, chartPointData.Style.Size); + Assert.AreEqual(newSymbol, chartPointData.Style.Symbol); + Assert.AreEqual(newStrokeColor, chartPointData.Style.StrokeColor); + Assert.AreEqual(newStrokeThickness, chartPointData.Style.StrokeThickness); + mocks.VerifyAll(); + } + } +} \ No newline at end of file Index: Core/Plugins/src/Core.Plugins.Chart/ChartPlugin.cs =================================================================== diff -u -rab3938a73513858354f1240bb86c0098f930ef3d -r985902680ffb75f3b9ee26b52725fe31916b6dec --- Core/Plugins/src/Core.Plugins.Chart/ChartPlugin.cs (.../ChartPlugin.cs) (revision ab3938a73513858354f1240bb86c0098f930ef3d) +++ Core/Plugins/src/Core.Plugins.Chart/ChartPlugin.cs (.../ChartPlugin.cs) (revision 985902680ffb75f3b9ee26b52725fe31916b6dec) @@ -26,8 +26,8 @@ using Core.Gui; using Core.Gui.Forms.ViewHost; using Core.Gui.Plugin; +using Core.Gui.PropertyClasses.Chart; using Core.Plugins.Chart.Legend; -using Core.Plugins.Chart.PropertyClasses; namespace Core.Plugins.Chart { Index: Core/Plugins/src/Core.Plugins.Chart/Properties/Resources.Designer.cs =================================================================== diff -u -rf869d21f23cf0986db9b2b68fd1aa2b9e7d28c9e -r985902680ffb75f3b9ee26b52725fe31916b6dec --- Core/Plugins/src/Core.Plugins.Chart/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision f869d21f23cf0986db9b2b68fd1aa2b9e7d28c9e) +++ Core/Plugins/src/Core.Plugins.Chart/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 985902680ffb75f3b9ee26b52725fe31916b6dec) @@ -71,159 +71,6 @@ } /// - /// Looks up a localized string similar to Algemeen. - /// - public static string Categories_General { - get { - return ResourceManager.GetString("Categories_General", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Stijl. - /// - public static string Categories_Styling { - get { - return ResourceManager.GetString("Categories_Styling", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to De kleur van de vlakken waarmee deze gegevensreeks wordt weergegeven.. - /// - public static string ChartAreaData_FillColor_Description { - get { - return ResourceManager.GetString("ChartAreaData_FillColor_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to De kleur van de lijn van de vlakken waarmee deze gegevensreeks wordt weergegeven.. - /// - public static string ChartAreaData_StrokeColor_Description { - get { - return ResourceManager.GetString("ChartAreaData_StrokeColor_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to De dikte van de lijn van de vlakken waarmee deze gegevensreeks wordt weergegeven.. - /// - public static string ChartAreaData_StrokeThickness_Description { - get { - return ResourceManager.GetString("ChartAreaData_StrokeThickness_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Kleur. - /// - public static string ChartData_Color_DisplayName { - get { - return ResourceManager.GetString("ChartData_Color_DisplayName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Lijnkleur. - /// - public static string ChartData_StrokeColor_DisplayName { - get { - return ResourceManager.GetString("ChartData_StrokeColor_DisplayName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Lijndikte. - /// - public static string ChartData_StrokeThickness_DisplayName { - get { - return ResourceManager.GetString("ChartData_StrokeThickness_DisplayName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Geeft aan of de gegevensreeks wordt weergegeven.. - /// - public static string ChartDataProperties_IsVisible_Description { - get { - return ResourceManager.GetString("ChartDataProperties_IsVisible_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Weergeven. - /// - public static string ChartDataProperties_IsVisible_DisplayName { - get { - return ResourceManager.GetString("ChartDataProperties_IsVisible_DisplayName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to De naam van deze gegevensreeks.. - /// - public static string ChartDataProperties_Name_Description { - get { - return ResourceManager.GetString("ChartDataProperties_Name_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Naam. - /// - public static string ChartDataProperties_Name_DisplayName { - get { - return ResourceManager.GetString("ChartDataProperties_Name_DisplayName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Vlakken. - /// - public static string ChartDataProperties_Type_Areas { - get { - return ResourceManager.GetString("ChartDataProperties_Type_Areas", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Het type van de data die wordt weergegeven in de gegevensreeks.. - /// - public static string ChartDataProperties_Type_Description { - get { - return ResourceManager.GetString("ChartDataProperties_Type_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Type. - /// - public static string ChartDataProperties_Type_DisplayName { - get { - return ResourceManager.GetString("ChartDataProperties_Type_DisplayName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Lijnen. - /// - public static string ChartDataProperties_Type_Lines { - get { - return ResourceManager.GetString("ChartDataProperties_Type_Lines", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Punten. - /// - public static string ChartDataProperties_Type_Points { - get { - return ResourceManager.GetString("ChartDataProperties_Type_Points", resourceCulture); - } - } - - /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// public static System.Drawing.Bitmap ChartIcon { @@ -234,105 +81,6 @@ } /// - /// Looks up a localized string similar to De kleur van de lijnen waarmee deze gegevensreeks wordt weergegeven.. - /// - public static string ChartLineData_Color_Description { - get { - return ResourceManager.GetString("ChartLineData_Color_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to De stijl van de lijnen waarmee deze gegevensreeks wordt weergegeven.. - /// - public static string ChartLineData_DashStyle_Description { - get { - return ResourceManager.GetString("ChartLineData_DashStyle_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Lijnstijl. - /// - public static string ChartLineData_DashStyle_DisplayName { - get { - return ResourceManager.GetString("ChartLineData_DashStyle_DisplayName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to De dikte van de lijnen waarmee deze gegevensreeks wordt weergegeven.. - /// - public static string ChartLineData_Width_Description { - get { - return ResourceManager.GetString("ChartLineData_Width_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to De kleur van de symbolen waarmee deze gegevensreeks wordt weergegeven.. - /// - public static string ChartPointData_Color_Description { - get { - return ResourceManager.GetString("ChartPointData_Color_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to De grootte van de symbolen waarmee deze gegevensreeks wordt weergegeven.. - /// - public static string ChartPointData_Size_Description { - get { - return ResourceManager.GetString("ChartPointData_Size_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Grootte. - /// - public static string ChartPointData_Size_DisplayName { - get { - return ResourceManager.GetString("ChartPointData_Size_DisplayName", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to De kleur van de lijn van de symbolen waarmee deze gegevensreeks wordt weergegeven.. - /// - public static string ChartPointData_StrokeColor_Description { - get { - return ResourceManager.GetString("ChartPointData_StrokeColor_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to De dikte van de lijn van de symbolen waarmee deze gegevensreeks wordt weergegeven.. - /// - public static string ChartPointData_StrokeThickness_Description { - get { - return ResourceManager.GetString("ChartPointData_StrokeThickness_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Het symbool waarmee deze gegevensreeks wordt weergegeven.. - /// - public static string ChartPointData_Symbol_Description { - get { - return ResourceManager.GetString("ChartPointData_Symbol_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Symbool. - /// - public static string ChartPointData_Symbol_DisplayName { - get { - return ResourceManager.GetString("ChartPointData_Symbol_DisplayName", resourceCulture); - } - } - - /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// public static System.Drawing.Bitmap LineIcon { Index: Core/Plugins/src/Core.Plugins.Chart/Properties/Resources.resx =================================================================== diff -u -rf869d21f23cf0986db9b2b68fd1aa2b9e7d28c9e -r985902680ffb75f3b9ee26b52725fe31916b6dec --- Core/Plugins/src/Core.Plugins.Chart/Properties/Resources.resx (.../Resources.resx) (revision f869d21f23cf0986db9b2b68fd1aa2b9e7d28c9e) +++ Core/Plugins/src/Core.Plugins.Chart/Properties/Resources.resx (.../Resources.resx) (revision 985902680ffb75f3b9ee26b52725fe31916b6dec) @@ -139,88 +139,4 @@ ..\resources\zoomextents.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - Algemeen - - - De naam van deze gegevensreeks. - - - Naam - - - Geeft aan of de gegevensreeks wordt weergegeven. - - - Weergeven - - - Het type van de data die wordt weergegeven in de gegevensreeks. - - - Type - - - Punten - - - Lijnen - - - Vlakken - - - Stijl - - - Kleur - - - Lijnkleur - - - Lijndikte - - - De kleur van de symbolen waarmee deze gegevensreeks wordt weergegeven. - - - De grootte van de symbolen waarmee deze gegevensreeks wordt weergegeven. - - - Grootte - - - De kleur van de lijn van de symbolen waarmee deze gegevensreeks wordt weergegeven. - - - De dikte van de lijn van de symbolen waarmee deze gegevensreeks wordt weergegeven. - - - Het symbool waarmee deze gegevensreeks wordt weergegeven. - - - Symbool - - - De kleur van de lijnen waarmee deze gegevensreeks wordt weergegeven. - - - De stijl van de lijnen waarmee deze gegevensreeks wordt weergegeven. - - - Lijnstijl - - - De dikte van de lijnen waarmee deze gegevensreeks wordt weergegeven. - - - De kleur van de vlakken waarmee deze gegevensreeks wordt weergegeven. - - - De kleur van de lijn van de vlakken waarmee deze gegevensreeks wordt weergegeven. - - - De dikte van de lijn van de vlakken waarmee deze gegevensreeks wordt weergegeven. - \ No newline at end of file Fisheye: Tag 985902680ffb75f3b9ee26b52725fe31916b6dec refers to a dead (removed) revision in file `Core/Plugins/src/Core.Plugins.Chart/PropertyClasses/ChartAreaDataProperties.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 985902680ffb75f3b9ee26b52725fe31916b6dec refers to a dead (removed) revision in file `Core/Plugins/src/Core.Plugins.Chart/PropertyClasses/ChartDataCollectionProperties.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 985902680ffb75f3b9ee26b52725fe31916b6dec refers to a dead (removed) revision in file `Core/Plugins/src/Core.Plugins.Chart/PropertyClasses/ChartDataProperties.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 985902680ffb75f3b9ee26b52725fe31916b6dec refers to a dead (removed) revision in file `Core/Plugins/src/Core.Plugins.Chart/PropertyClasses/ChartLineDataProperties.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 985902680ffb75f3b9ee26b52725fe31916b6dec refers to a dead (removed) revision in file `Core/Plugins/src/Core.Plugins.Chart/PropertyClasses/ChartMultipleAreaDataProperties.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 985902680ffb75f3b9ee26b52725fe31916b6dec refers to a dead (removed) revision in file `Core/Plugins/src/Core.Plugins.Chart/PropertyClasses/ChartMultipleLineDataProperties.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 985902680ffb75f3b9ee26b52725fe31916b6dec refers to a dead (removed) revision in file `Core/Plugins/src/Core.Plugins.Chart/PropertyClasses/ChartPointDataProperties.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Core/Plugins/test/Core.Plugins.Chart.Test/ChartPluginTest.cs =================================================================== diff -u -rf869d21f23cf0986db9b2b68fd1aa2b9e7d28c9e -r985902680ffb75f3b9ee26b52725fe31916b6dec --- Core/Plugins/test/Core.Plugins.Chart.Test/ChartPluginTest.cs (.../ChartPluginTest.cs) (revision f869d21f23cf0986db9b2b68fd1aa2b9e7d28c9e) +++ Core/Plugins/test/Core.Plugins.Chart.Test/ChartPluginTest.cs (.../ChartPluginTest.cs) (revision 985902680ffb75f3b9ee26b52725fe31916b6dec) @@ -33,10 +33,10 @@ using Core.Gui.Forms.MainWindow; using Core.Gui.Forms.ViewHost; using Core.Gui.Plugin; +using Core.Gui.PropertyClasses.Chart; using Core.Gui.Settings; using Core.Gui.TestUtil; using Core.Plugins.Chart.Legend; -using Core.Plugins.Chart.PropertyClasses; using NUnit.Framework; using Rhino.Mocks; Fisheye: Tag 985902680ffb75f3b9ee26b52725fe31916b6dec refers to a dead (removed) revision in file `Core/Plugins/test/Core.Plugins.Chart.Test/PropertyClasses/ChartAreaDataPropertiesTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 985902680ffb75f3b9ee26b52725fe31916b6dec refers to a dead (removed) revision in file `Core/Plugins/test/Core.Plugins.Chart.Test/PropertyClasses/ChartDataCollectionPropertiesTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 985902680ffb75f3b9ee26b52725fe31916b6dec refers to a dead (removed) revision in file `Core/Plugins/test/Core.Plugins.Chart.Test/PropertyClasses/ChartDataPropertiesTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 985902680ffb75f3b9ee26b52725fe31916b6dec refers to a dead (removed) revision in file `Core/Plugins/test/Core.Plugins.Chart.Test/PropertyClasses/ChartLineDataPropertiesTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 985902680ffb75f3b9ee26b52725fe31916b6dec refers to a dead (removed) revision in file `Core/Plugins/test/Core.Plugins.Chart.Test/PropertyClasses/ChartMultipleAreaDataPropertiesTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 985902680ffb75f3b9ee26b52725fe31916b6dec refers to a dead (removed) revision in file `Core/Plugins/test/Core.Plugins.Chart.Test/PropertyClasses/ChartMultipleLineDataPropertiesTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 985902680ffb75f3b9ee26b52725fe31916b6dec refers to a dead (removed) revision in file `Core/Plugins/test/Core.Plugins.Chart.Test/PropertyClasses/ChartPointDataPropertiesTest.cs'. Fisheye: No comparison available. Pass `N' to diff?