Index: Application/Ringtoets/src/Application.Ringtoets/App.xaml.cs =================================================================== diff -u -r42ca97fdb85a553c6aac3bfdfe57c7be4af90821 -r570101d9648e296b96c7e624c4d4f6bfad8d41b6 --- Application/Ringtoets/src/Application.Ringtoets/App.xaml.cs (.../App.xaml.cs) (revision 42ca97fdb85a553c6aac3bfdfe57c7be4af90821) +++ Application/Ringtoets/src/Application.Ringtoets/App.xaml.cs (.../App.xaml.cs) (revision 570101d9648e296b96c7e624c4d4f6bfad8d41b6) @@ -130,7 +130,6 @@ { new ProjectExplorerGuiPlugin(), new CommonToolsGuiPlugin(), - new ChartingGuiPlugin(), new SharpMapGisGuiPlugin(), new RingtoetsGuiPlugin(), new PipingGuiPlugin() Index: Core/Components/src/Core.Components.OxyPlot.Forms/BaseChart.cs =================================================================== diff -u --- Core/Components/src/Core.Components.OxyPlot.Forms/BaseChart.cs (revision 0) +++ Core/Components/src/Core.Components.OxyPlot.Forms/BaseChart.cs (revision 570101d9648e296b96c7e624c4d4f6bfad8d41b6) @@ -0,0 +1,84 @@ +using System; +using Core.Components.OxyPlot.Data; +using Core.Components.OxyPlot.Properties; +using OxyPlot; +using OxyPlot.Axes; +using OxyPlot.WindowsForms; + +namespace Core.Components.OxyPlot.Forms +{ + public sealed class BaseChart : PlotView + { + private LinearAxis xAxis; + private LinearAxis yAxis; + + /// + /// Creates a new instance of . + /// + public BaseChart() + { + Model = new PlotModel(); + InitializeAxes(); + InitializeDefaultStyle(); + + MinimumSize = new System.Drawing.Size(50, 75); + } + + /// + /// Sets the default look and feel of the + /// + private void InitializeDefaultStyle() + { + xAxis.MajorGridlineStyle = LineStyle.Solid; + xAxis.MinorGridlineStyle = LineStyle.Dot; + yAxis.MajorGridlineStyle = LineStyle.Solid; + yAxis.MinorGridlineStyle = LineStyle.Dot; + } + + /// + /// Sets up default axes representations. + /// + private void InitializeAxes() + { + xAxis = new LinearAxis + { + Title = Resources.BaseChart_XAxisTitle, + Position = AxisPosition.Bottom, + TickStyle = TickStyle.None, + ExtraGridlines = new[] { 0.0 }, + ExtraGridlineThickness = 1 + }; + yAxis = new LinearAxis + { + Title = Resources.BaseChart_YAxisTitle, + TickStyle = TickStyle.None, + ExtraGridlines = new[] { 0.0 }, + ExtraGridlineThickness = 1 + }; + Model.Axes.Add(xAxis); + Model.Axes.Add(yAxis); + } + + /// + /// Add to the . + /// + /// The data to add to the . + /// Thrown when is null. + public void AddData(IChartData data) + { + if (data == null) + { + throw new ArgumentNullException("data", "Cannot add null data to the chart."); + } + data.AddTo(Model); + } + + /// + /// Remove all the that has been added to the . + /// + public void ClearData() + { + Model.Series.Clear(); + } + } +} \ No newline at end of file Index: Core/Components/src/Core.Components.OxyPlot.Forms/Core.Components.OxyPlot.Forms.csproj =================================================================== diff -u --- Core/Components/src/Core.Components.OxyPlot.Forms/Core.Components.OxyPlot.Forms.csproj (revision 0) +++ Core/Components/src/Core.Components.OxyPlot.Forms/Core.Components.OxyPlot.Forms.csproj (revision 570101d9648e296b96c7e624c4d4f6bfad8d41b6) @@ -0,0 +1,84 @@ + + + + + {DADAA0A5-288C-49CB-9F08-337F16832C86} + Library + Properties + Core.Components.OxyPlot.Forms + Core.Components.OxyPlot.Forms + v4.0 + 512 + + + true + DEBUG;TRACE + full + false + prompt + AllRules.ruleset + + + + + none + TRACE + true + none + prompt + AllRules.ruleset + + + + + TRACE + true + pdbonly + prompt + AllRules.ruleset + + + + ..\..\..\..\packages\OxyPlot.Core.1.0.0-unstable1953\lib\net40\OxyPlot.dll + + + ..\..\..\..\packages\OxyPlot.WindowsForms.1.0.0-unstable1953\lib\net40\OxyPlot.WindowsForms.dll + + + + + + + + + Properties\GlobalAssembly.cs + + + Component + + + + + + + + + {c90b77da-e421-43cc-b82e-529651bc21ac} + Core.Common.Version + False + + + {2344a7bd-7e25-4a1a-982e-6c674af5167a} + Core.Components.OxyPlot + False + + + + + \ No newline at end of file Index: Core/Components/src/Core.Components.OxyPlot.Forms/Properties/AssemblyInfo.cs =================================================================== diff -u --- Core/Components/src/Core.Components.OxyPlot.Forms/Properties/AssemblyInfo.cs (revision 0) +++ Core/Components/src/Core.Components.OxyPlot.Forms/Properties/AssemblyInfo.cs (revision 570101d9648e296b96c7e624c4d4f6bfad8d41b6) @@ -0,0 +1,6 @@ +using System.Reflection; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("Core.Components.OxyPlot.Forms")] +[assembly: AssemblyProduct("Core.Components.OxyPlot.Forms")] +[assembly: Guid("9b055a22-085f-40fb-89e6-38a9edc8b4c0")] \ No newline at end of file Index: Core/Components/src/Core.Components.OxyPlot.Forms/packages.config =================================================================== diff -u --- Core/Components/src/Core.Components.OxyPlot.Forms/packages.config (revision 0) +++ Core/Components/src/Core.Components.OxyPlot.Forms/packages.config (revision 570101d9648e296b96c7e624c4d4f6bfad8d41b6) @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file Index: Core/Components/src/Core.Components.OxyPlot/Core.Components.OxyPlot.csproj =================================================================== diff -u -rea23f63aaa17ddf43d3e5c753a53515a504ece38 -r570101d9648e296b96c7e624c4d4f6bfad8d41b6 --- Core/Components/src/Core.Components.OxyPlot/Core.Components.OxyPlot.csproj (.../Core.Components.OxyPlot.csproj) (revision ea23f63aaa17ddf43d3e5c753a53515a504ece38) +++ Core/Components/src/Core.Components.OxyPlot/Core.Components.OxyPlot.csproj (.../Core.Components.OxyPlot.csproj) (revision 570101d9648e296b96c7e624c4d4f6bfad8d41b6) @@ -41,25 +41,13 @@ ..\..\..\..\packages\OxyPlot.Core.1.0.0-unstable1953\lib\net40\OxyPlot.dll - - ..\..\..\..\packages\OxyPlot.WindowsForms.1.0.0-unstable1953\lib\net40\OxyPlot.WindowsForms.dll - - - - - - - Properties\GlobalAssembly.cs - - Component - Index: Core/Components/src/Core.Components.OxyPlot/packages.config =================================================================== diff -u -rbbb0ff8397bcb1097043adeed8f78710a9779fb5 -r570101d9648e296b96c7e624c4d4f6bfad8d41b6 --- Core/Components/src/Core.Components.OxyPlot/packages.config (.../packages.config) (revision bbb0ff8397bcb1097043adeed8f78710a9779fb5) +++ Core/Components/src/Core.Components.OxyPlot/packages.config (.../packages.config) (revision 570101d9648e296b96c7e624c4d4f6bfad8d41b6) @@ -1,5 +1,4 @@  - \ No newline at end of file Index: Core/Components/test/Core.Components.OxyPlot.Forms.Test/BaseChartTest.cs =================================================================== diff -u --- Core/Components/test/Core.Components.OxyPlot.Forms.Test/BaseChartTest.cs (revision 0) +++ Core/Components/test/Core.Components.OxyPlot.Forms.Test/BaseChartTest.cs (revision 570101d9648e296b96c7e624c4d4f6bfad8d41b6) @@ -0,0 +1,148 @@ +using System; +using System.Collections.ObjectModel; +using System.Linq; +using Core.Components.OxyPlot.Data; +using NUnit.Framework; +using OxyPlot; +using OxyPlot.Series; +using OxyPlot.WindowsForms; +using Rhino.Mocks; + +namespace Core.Components.OxyPlot.Forms.Test +{ + [TestFixture] + public class BaseChartTest + { + [Test] + public void DefaultConstructor_PropertiesSet() + { + // Call + var chart = new BaseChart(); + + // Assert + Assert.IsInstanceOf(chart); + Assert.IsInstanceOf(chart.Model); + Assert.IsNull(chart.Controller); + Assert.AreEqual(2, chart.Model.Axes.Count); + + Assert.AreEqual(75, chart.MinimumSize.Height); + Assert.AreEqual(50, chart.MinimumSize.Width); + } + + [Test] + public void AddData_WithoutData_ThrowsArgumentNullException() + { + // Setup + var chart = new BaseChart(); + + // Call + TestDelegate test = () => chart.AddData(null); + + // Assert + Assert.Throws(test); + } + + [Test] + public void AddData_WithIChartData_Added() + { + // Setup + var mocks = new MockRepository(); + var chart = new BaseChart(); + var dataMock = mocks.StrictMock(); + dataMock.Expect(d => d.AddTo(chart.Model)); + + mocks.ReplayAll(); + + // Call + chart.AddData(dataMock); + + // Assert + mocks.VerifyAll(); + } + + [Test] + public void ClearData_Always_RemovesSeriesFromModel() + { + // Setup + var mocks = new MockRepository(); + var chart = new BaseChart(); + var dataMock = mocks.StrictMock(); + dataMock.Expect(d => d.AddTo(chart.Model)); + mocks.ReplayAll(); + + chart.AddData(dataMock); + + // Call + chart.ClearData(); + + // Assert + Assert.IsEmpty(chart.Model.Series); + mocks.VerifyAll(); + } + + [Test] + public void GivenBaseChart_WhenPointDataAdded_ThenSeriesHasPointStyle() + { + // Given + var chart = new BaseChart(); + var pointData = new PointData(new Collection>()); + + // When + chart.AddData(pointData); + + // Then + var pointSeries = (LineSeries)chart.Model.Series.First(); + Assert.AreEqual(LineStyle.None, pointSeries.LineStyle); + Assert.AreEqual(MarkerType.Circle, pointSeries.MarkerType); + } + + [Test] + public void GivenBaseChart_WhenLineDataAdded_ThenSeriesIsLineSeries() + { + // Given + var chart = new BaseChart(); + var pointData = new LineData(new Collection>()); + + // When + chart.AddData(pointData); + + // Then + Assert.IsInstanceOf(chart.Model.Series.First()); + } + + [Test] + public void GivenBaseChart_WhenAreaDataAdded_ThenSeriesIsAreaSeries() + { + // Given + var chart = new BaseChart(); + var pointData = new AreaData(new Collection>()); + + // When + chart.AddData(pointData); + + // Then + Assert.IsInstanceOf(chart.Model.Series.First()); + } + + [Test] + [TestCase(0)] + [TestCase(1)] + [TestCase(11)] + public void GivenANumberOfChartData_WhenAddedToChart_AddsSameNumberOfSeriesToModel(int numberOfSeries) + { + // Given + var chart = new BaseChart(); + var data = new CollectionData(); + for (int i = 0; i < numberOfSeries; i++) + { + data.Add(new LineData(new Collection>())); + } + + // When + chart.AddData(data); + + // Assert + Assert.AreEqual(numberOfSeries, chart.Model.Series.Count); + } + } +} \ No newline at end of file Index: Core/Components/test/Core.Components.OxyPlot.Forms.Test/Core.Components.OxyPlot.Forms.Test.csproj =================================================================== diff -u --- Core/Components/test/Core.Components.OxyPlot.Forms.Test/Core.Components.OxyPlot.Forms.Test.csproj (revision 0) +++ Core/Components/test/Core.Components.OxyPlot.Forms.Test/Core.Components.OxyPlot.Forms.Test.csproj (revision 570101d9648e296b96c7e624c4d4f6bfad8d41b6) @@ -0,0 +1,85 @@ + + + + Debug + x86 + {D07BB841-15D7-4127-8B46-CFC61C546B45} + Library + Properties + Core.Components.OxyPlot.Forms.Test + Core.Components.OxyPlot.Forms.Test + v4.0 + 512 + + + true + bin\Debug\ + 4 + x86 + MinimumRecommendedRules.ruleset + TRACE;DEBUG + full + + + none + bin\Release\ + 4 + x86 + MinimumRecommendedRules.ruleset + TRACE + true + + + bin\ReleaseForCodeCoverage\ + TRACE + true + pdbonly + x86 + prompt + MinimumRecommendedRules.ruleset + + + + ..\..\..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll + + + ..\..\..\..\packages\OxyPlot.Core.1.0.0-unstable1953\lib\net40\OxyPlot.dll + + + ..\..\..\..\packages\OxyPlot.WindowsForms.1.0.0-unstable1953\lib\net40\OxyPlot.WindowsForms.dll + True + + + ..\..\..\..\packages\RhinoMocks.3.6.1\lib\net\Rhino.Mocks.dll + + + + + + + + + + + + + + + + {dadaa0a5-288c-49cb-9f08-337f16832c86} + Core.Components.OxyPlot.Forms + + + {2344A7BD-7E25-4A1A-982E-6C674AF5167A} + Core.Components.OxyPlot + + + + + \ No newline at end of file Index: Core/Components/test/Core.Components.OxyPlot.Forms.Test/Properties/AssemblyInfo.cs =================================================================== diff -u --- Core/Components/test/Core.Components.OxyPlot.Forms.Test/Properties/AssemblyInfo.cs (revision 0) +++ Core/Components/test/Core.Components.OxyPlot.Forms.Test/Properties/AssemblyInfo.cs (revision 570101d9648e296b96c7e624c4d4f6bfad8d41b6) @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Core.Components.OxyPlot.Forms.Test")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("Core.Components.OxyPlot.Forms.Test")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("8d4ceed6-3bb2-4f49-96ee-5d4ca01948a7")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] Index: Core/Components/test/Core.Components.OxyPlot.Forms.Test/packages.config =================================================================== diff -u --- Core/Components/test/Core.Components.OxyPlot.Forms.Test/packages.config (revision 0) +++ Core/Components/test/Core.Components.OxyPlot.Forms.Test/packages.config (revision 570101d9648e296b96c7e624c4d4f6bfad8d41b6) @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file Fisheye: Tag 570101d9648e296b96c7e624c4d4f6bfad8d41b6 refers to a dead (removed) revision in file `Core/Components/test/Core.Components.OxyPlot.Test/BaseChartTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Core/Components/test/Core.Components.OxyPlot.Test/Core.Components.OxyPlot.Test.csproj =================================================================== diff -u -r307d9f9ef20f6d38919cec957280212806a8e123 -r570101d9648e296b96c7e624c4d4f6bfad8d41b6 --- Core/Components/test/Core.Components.OxyPlot.Test/Core.Components.OxyPlot.Test.csproj (.../Core.Components.OxyPlot.Test.csproj) (revision 307d9f9ef20f6d38919cec957280212806a8e123) +++ Core/Components/test/Core.Components.OxyPlot.Test/Core.Components.OxyPlot.Test.csproj (.../Core.Components.OxyPlot.Test.csproj) (revision 570101d9648e296b96c7e624c4d4f6bfad8d41b6) @@ -45,24 +45,10 @@ ..\..\..\..\packages\OxyPlot.Core.1.0.0-unstable1953\lib\net40\OxyPlot.dll - - False - ..\..\..\..\packages\OxyPlot.WindowsForms.1.0.0-unstable1953\lib\net40\OxyPlot.WindowsForms.dll - - - ..\..\..\..\packages\RhinoMocks.3.6.1\lib\net\Rhino.Mocks.dll - - - - - - - - Index: Core/Components/test/Core.Components.OxyPlot.Test/Data/AreaDataTest.cs =================================================================== diff -u -r545fb5e9c0105fe824abde45b452145c6659d343 -r570101d9648e296b96c7e624c4d4f6bfad8d41b6 --- Core/Components/test/Core.Components.OxyPlot.Test/Data/AreaDataTest.cs (.../AreaDataTest.cs) (revision 545fb5e9c0105fe824abde45b452145c6659d343) +++ Core/Components/test/Core.Components.OxyPlot.Test/Data/AreaDataTest.cs (.../AreaDataTest.cs) (revision 570101d9648e296b96c7e624c4d4f6bfad8d41b6) @@ -81,20 +81,7 @@ CollectionAssert.AreEquivalent(equivalentPoints, series.Points); CollectionAssert.AreEquivalent(Arrays.CopyOf(equivalentPoints,1), series.Points2); } - [Test] - public void GivenBaseChart_WhenPointDataAdded_ThenSeriesHasPointStyle() - { - // Given - var chart = new BaseChart(); - var pointData = new AreaData(new Collection>()); - // When - chart.AddData(pointData); - - // Then - Assert.IsInstanceOf(chart.Model.Series.First()); - } - private Collection> CreateTestPoints() { return new Collection> Index: Core/Components/test/Core.Components.OxyPlot.Test/Data/CollectionDataTest.cs =================================================================== diff -u -r4ea1323ca52ee52133113dbc01bae0429946d0d4 -r570101d9648e296b96c7e624c4d4f6bfad8d41b6 --- Core/Components/test/Core.Components.OxyPlot.Test/Data/CollectionDataTest.cs (.../CollectionDataTest.cs) (revision 4ea1323ca52ee52133113dbc01bae0429946d0d4) +++ Core/Components/test/Core.Components.OxyPlot.Test/Data/CollectionDataTest.cs (.../CollectionDataTest.cs) (revision 570101d9648e296b96c7e624c4d4f6bfad8d41b6) @@ -17,26 +17,5 @@ // Assert Assert.IsInstanceOf(data); } - - [Test] - [TestCase(0)] - [TestCase(1)] - [TestCase(11)] - public void GivenANumberOfChartData_WhenAddedToChart_AddsSameNumberOfSeriesToModel(int numberOfSeries) - { - // Given - var chart = new BaseChart(); - var data = new CollectionData(); - for (int i = 0; i < numberOfSeries; i++) - { - data.Add(new LineData(new Collection>())); - } - - // When - chart.AddData(data); - - // Assert - Assert.AreEqual(numberOfSeries, chart.Model.Series.Count); - } } } \ No newline at end of file Index: Core/Components/test/Core.Components.OxyPlot.Test/Data/LineDataTest.cs =================================================================== diff -u -r545fb5e9c0105fe824abde45b452145c6659d343 -r570101d9648e296b96c7e624c4d4f6bfad8d41b6 --- Core/Components/test/Core.Components.OxyPlot.Test/Data/LineDataTest.cs (.../LineDataTest.cs) (revision 545fb5e9c0105fe824abde45b452145c6659d343) +++ Core/Components/test/Core.Components.OxyPlot.Test/Data/LineDataTest.cs (.../LineDataTest.cs) (revision 570101d9648e296b96c7e624c4d4f6bfad8d41b6) @@ -80,20 +80,6 @@ Assert.AreSame(points, series.ItemsSource); } - [Test] - public void GivenBaseChart_WhenPointDataAdded_ThenSeriesHasPointStyle() - { - // Given - var chart = new BaseChart(); - var pointData = new LineData(new Collection>()); - - // When - chart.AddData(pointData); - - // Then - Assert.IsInstanceOf(chart.Model.Series.First()); - } - private Collection> CreateTestPoints() { return new Collection> Index: Core/Components/test/Core.Components.OxyPlot.Test/Data/PointDataTest.cs =================================================================== diff -u -r545fb5e9c0105fe824abde45b452145c6659d343 -r570101d9648e296b96c7e624c4d4f6bfad8d41b6 --- Core/Components/test/Core.Components.OxyPlot.Test/Data/PointDataTest.cs (.../PointDataTest.cs) (revision 545fb5e9c0105fe824abde45b452145c6659d343) +++ Core/Components/test/Core.Components.OxyPlot.Test/Data/PointDataTest.cs (.../PointDataTest.cs) (revision 570101d9648e296b96c7e624c4d4f6bfad8d41b6) @@ -80,22 +80,6 @@ Assert.AreSame(points, series.ItemsSource); } - [Test] - public void GivenBaseChart_WhenPointDataAdded_ThenSeriesHasPointStyle() - { - // Given - var chart = new BaseChart(); - var pointData = new PointData(new Collection>()); - - // When - chart.AddData(pointData); - - // Then - var pointSeries = (LineSeries) chart.Model.Series.First(); - Assert.AreEqual(LineStyle.None, pointSeries.LineStyle); - Assert.AreEqual(MarkerType.Circle, pointSeries.MarkerType); - } - private Collection> CreateTestPoints() { return new Collection> Index: Core/Plugins/src/Core.Plugins.OxyPlot/Core.Plugins.OxyPlot.csproj =================================================================== diff -u -r5a98830aee77b1ee0158c11ba5cccffc656226e0 -r570101d9648e296b96c7e624c4d4f6bfad8d41b6 --- Core/Plugins/src/Core.Plugins.OxyPlot/Core.Plugins.OxyPlot.csproj (.../Core.Plugins.OxyPlot.csproj) (revision 5a98830aee77b1ee0158c11ba5cccffc656226e0) +++ Core/Plugins/src/Core.Plugins.OxyPlot/Core.Plugins.OxyPlot.csproj (.../Core.Plugins.OxyPlot.csproj) (revision 570101d9648e296b96c7e624c4d4f6bfad8d41b6) @@ -81,6 +81,8 @@ UserControl + + Component @@ -125,6 +127,10 @@ Core.Common.Version False + + {DADAA0A5-288C-49CB-9F08-337F16832C86} + Core.Components.OxyPlot.Forms + {2344A7BD-7E25-4A1A-982E-6C674AF5167A} Core.Components.OxyPlot Index: Core/Plugins/src/Core.Plugins.OxyPlot/Forms/ChartDataView.cs =================================================================== diff -u -r0a601445097c12310c8fb1bff0c43f45a75c9e11 -r570101d9648e296b96c7e624c4d4f6bfad8d41b6 --- Core/Plugins/src/Core.Plugins.OxyPlot/Forms/ChartDataView.cs (.../ChartDataView.cs) (revision 0a601445097c12310c8fb1bff0c43f45a75c9e11) +++ Core/Plugins/src/Core.Plugins.OxyPlot/Forms/ChartDataView.cs (.../ChartDataView.cs) (revision 570101d9648e296b96c7e624c4d4f6bfad8d41b6) @@ -1,6 +1,6 @@ using System.Windows.Forms; -using Core.Components.OxyPlot; using Core.Components.OxyPlot.Data; +using Core.Components.OxyPlot.Forms; namespace Core.Plugins.OxyPlot.Forms { Index: Core/Plugins/src/Core.Plugins.OxyPlot/Forms/IChartView.cs =================================================================== diff -u -r0a601445097c12310c8fb1bff0c43f45a75c9e11 -r570101d9648e296b96c7e624c4d4f6bfad8d41b6 --- Core/Plugins/src/Core.Plugins.OxyPlot/Forms/IChartView.cs (.../IChartView.cs) (revision 0a601445097c12310c8fb1bff0c43f45a75c9e11) +++ Core/Plugins/src/Core.Plugins.OxyPlot/Forms/IChartView.cs (.../IChartView.cs) (revision 570101d9648e296b96c7e624c4d4f6bfad8d41b6) @@ -1,5 +1,5 @@ using Core.Common.Controls.Views; -using Core.Components.OxyPlot; +using Core.Components.OxyPlot.Forms; namespace Core.Plugins.OxyPlot.Forms { Index: Core/Plugins/src/Core.Plugins.OxyPlot/Legend/ChartDataNodePresenter.cs =================================================================== diff -u --- Core/Plugins/src/Core.Plugins.OxyPlot/Legend/ChartDataNodePresenter.cs (revision 0) +++ Core/Plugins/src/Core.Plugins.OxyPlot/Legend/ChartDataNodePresenter.cs (revision 570101d9648e296b96c7e624c4d4f6bfad8d41b6) @@ -0,0 +1,28 @@ +using Core.Common.Controls.TreeView; +using Core.Components.OxyPlot.Data; + +namespace Core.Plugins.OxyPlot.Legend +{ + /// + /// This class describes the presentation of in a . + /// + public class ChartDataNodePresenter : TreeViewNodePresenterBase + { + public override void UpdateNode(TreeNode parentNode, TreeNode node, IChartData nodeData) + { + node.Text = nodeData.GetType().Name; + if (nodeData is AreaData) + { + node.Image = Properties.Resources.AreaIcon; + } + if (nodeData is LineData) + { + node.Image = Properties.Resources.LineIcon; + } + if (nodeData is PointData) + { + node.Image = Properties.Resources.PointsIcon; + } + } + } +} \ No newline at end of file Index: Core/Plugins/src/Core.Plugins.OxyPlot/Legend/ChartNodePresenter.cs =================================================================== diff -u --- Core/Plugins/src/Core.Plugins.OxyPlot/Legend/ChartNodePresenter.cs (revision 0) +++ Core/Plugins/src/Core.Plugins.OxyPlot/Legend/ChartNodePresenter.cs (revision 570101d9648e296b96c7e624c4d4f6bfad8d41b6) @@ -0,0 +1,24 @@ +using System.Collections; +using Core.Common.Controls.TreeView; +using Core.Common.Gui.Properties; +using Core.Components.OxyPlot.Forms; + +namespace Core.Plugins.OxyPlot.Legend +{ + /// + /// This class describes the presentation of in a . + /// + public class ChartNodePresenter : TreeViewNodePresenterBase + { + public override void UpdateNode(TreeNode parentNode, TreeNode node, BaseChart nodeData) + { + node.Text = "Grafiek"; + node.Image = Resources.folder; + } + + public override IEnumerable GetChildNodeObjects(BaseChart parentNodeData) + { + return parentNodeData.Model.Series; + } + } +} \ No newline at end of file Index: Core/Plugins/src/Core.Plugins.OxyPlot/Legend/LegendController.cs =================================================================== diff -u -r0a601445097c12310c8fb1bff0c43f45a75c9e11 -r570101d9648e296b96c7e624c4d4f6bfad8d41b6 --- Core/Plugins/src/Core.Plugins.OxyPlot/Legend/LegendController.cs (.../LegendController.cs) (revision 0a601445097c12310c8fb1bff0c43f45a75c9e11) +++ Core/Plugins/src/Core.Plugins.OxyPlot/Legend/LegendController.cs (.../LegendController.cs) (revision 570101d9648e296b96c7e624c4d4f6bfad8d41b6) @@ -1,6 +1,6 @@ using System; using Core.Common.Controls.Views; -using Core.Components.OxyPlot; +using Core.Components.OxyPlot.Forms; namespace Core.Plugins.OxyPlot.Legend { Index: Core/Plugins/src/Core.Plugins.OxyPlot/Legend/LegendTreeView.cs =================================================================== diff -u -r5a98830aee77b1ee0158c11ba5cccffc656226e0 -r570101d9648e296b96c7e624c4d4f6bfad8d41b6 --- Core/Plugins/src/Core.Plugins.OxyPlot/Legend/LegendTreeView.cs (.../LegendTreeView.cs) (revision 5a98830aee77b1ee0158c11ba5cccffc656226e0) +++ Core/Plugins/src/Core.Plugins.OxyPlot/Legend/LegendTreeView.cs (.../LegendTreeView.cs) (revision 570101d9648e296b96c7e624c4d4f6bfad8d41b6) @@ -1,8 +1,4 @@ -using System.Collections; -using Core.Common.Controls.TreeView; -using Core.Common.Gui.Properties; -using Core.Components.OxyPlot; -using Core.Components.OxyPlot.Data; +using Core.Common.Controls.TreeView; namespace Core.Plugins.OxyPlot.Legend { @@ -14,38 +10,4 @@ RegisterNodePresenter(new ChartNodePresenter()); } } - - public class ChartNodePresenter : TreeViewNodePresenterBase - { - public override void UpdateNode(TreeNode parentNode, TreeNode node, BaseChart nodeData) - { - node.Text = "Grafiek"; - node.Image = Resources.folder; - } - - public override IEnumerable GetChildNodeObjects(BaseChart parentNodeData) - { - return parentNodeData.Model.Series; - } - } - - public class ChartDataNodePresenter : TreeViewNodePresenterBase - { - public override void UpdateNode(TreeNode parentNode, TreeNode node, IChartData nodeData) - { - node.Text = nodeData.GetType().Name; - if (nodeData is AreaData) - { - node.Image = Properties.Resources.AreaIcon; - } - if (nodeData is LineData) - { - node.Image = Properties.Resources.LineIcon; - } - if (nodeData is PointData) - { - node.Image = Properties.Resources.PointsIcon; - } - } - } } \ No newline at end of file Index: Core/Plugins/src/Core.Plugins.OxyPlot/Legend/LegendView.cs =================================================================== diff -u -r3ee80d5d797653a6eac5c4a46c4900ad4fbe8380 -r570101d9648e296b96c7e624c4d4f6bfad8d41b6 --- Core/Plugins/src/Core.Plugins.OxyPlot/Legend/LegendView.cs (.../LegendView.cs) (revision 3ee80d5d797653a6eac5c4a46c4900ad4fbe8380) +++ Core/Plugins/src/Core.Plugins.OxyPlot/Legend/LegendView.cs (.../LegendView.cs) (revision 570101d9648e296b96c7e624c4d4f6bfad8d41b6) @@ -1,14 +1,23 @@ using System.Windows.Forms; using Core.Common.Controls.Views; -using Core.Components.OxyPlot; +using Core.Components.OxyPlot.Forms; using Core.Plugins.OxyPlot.Properties; namespace Core.Plugins.OxyPlot.Legend { + /// + /// This class defines a view which shows the data that have been added to a . + /// public sealed partial class LegendView : UserControl, IView { + /// + /// The chart for which this view should show data. + /// private BaseChart chart; + /// + /// Creates a new instance of . + /// public LegendView() { InitializeComponent(); @@ -28,6 +37,9 @@ } } + /// + /// Updates the tree with the current state of the chart. + /// private void UpdateTree() { if (IsDisposed) Index: Core/Plugins/test/Core.Plugins.OxyPlot.Test/Core.Plugins.OxyPlot.Test.csproj =================================================================== diff -u -r03d5df1364557b6f4a184908affb7754e58b3fa4 -r570101d9648e296b96c7e624c4d4f6bfad8d41b6 --- Core/Plugins/test/Core.Plugins.OxyPlot.Test/Core.Plugins.OxyPlot.Test.csproj (.../Core.Plugins.OxyPlot.Test.csproj) (revision 03d5df1364557b6f4a184908affb7754e58b3fa4) +++ Core/Plugins/test/Core.Plugins.OxyPlot.Test/Core.Plugins.OxyPlot.Test.csproj (.../Core.Plugins.OxyPlot.Test.csproj) (revision 570101d9648e296b96c7e624c4d4f6bfad8d41b6) @@ -95,6 +95,10 @@ {30E4C2AE-719E-4D70-9FA9-668A9767FBFA} Core.Common.Gui + + {DADAA0A5-288C-49CB-9F08-337F16832C86} + Core.Components.OxyPlot.Forms + {2344A7BD-7E25-4A1A-982E-6C674AF5167A} Core.Components.OxyPlot Index: Core/Plugins/test/Core.Plugins.OxyPlot.Test/Forms/ChartDataViewTest.cs =================================================================== diff -u -r2cabd8bee5e1046b5a0e46664633de35c3ba8c4a -r570101d9648e296b96c7e624c4d4f6bfad8d41b6 --- Core/Plugins/test/Core.Plugins.OxyPlot.Test/Forms/ChartDataViewTest.cs (.../ChartDataViewTest.cs) (revision 2cabd8bee5e1046b5a0e46664633de35c3ba8c4a) +++ Core/Plugins/test/Core.Plugins.OxyPlot.Test/Forms/ChartDataViewTest.cs (.../ChartDataViewTest.cs) (revision 570101d9648e296b96c7e624c4d4f6bfad8d41b6) @@ -1,7 +1,7 @@ using System; using System.Windows.Forms; -using Core.Components.OxyPlot; using Core.Components.OxyPlot.Data; +using Core.Components.OxyPlot.Forms; using Core.Plugins.OxyPlot.Forms; using NUnit.Framework; using Rhino.Mocks; Index: Core/Plugins/test/Core.Plugins.OxyPlot.Test/Legend/LegendViewTest.cs =================================================================== diff -u -r03d5df1364557b6f4a184908affb7754e58b3fa4 -r570101d9648e296b96c7e624c4d4f6bfad8d41b6 --- Core/Plugins/test/Core.Plugins.OxyPlot.Test/Legend/LegendViewTest.cs (.../LegendViewTest.cs) (revision 03d5df1364557b6f4a184908affb7754e58b3fa4) +++ Core/Plugins/test/Core.Plugins.OxyPlot.Test/Legend/LegendViewTest.cs (.../LegendViewTest.cs) (revision 570101d9648e296b96c7e624c4d4f6bfad8d41b6) @@ -1,7 +1,7 @@ using System; using System.Windows.Forms; using Core.Common.Controls.Views; -using Core.Components.OxyPlot; +using Core.Components.OxyPlot.Forms; using Core.Plugins.OxyPlot.Legend; using NUnit.Framework; Index: Core/Plugins/test/Core.Plugins.OxyPlot.Test/OxyPlotGuiPluginTest.cs =================================================================== diff -u -r5a98830aee77b1ee0158c11ba5cccffc656226e0 -r570101d9648e296b96c7e624c4d4f6bfad8d41b6 --- Core/Plugins/test/Core.Plugins.OxyPlot.Test/OxyPlotGuiPluginTest.cs (.../OxyPlotGuiPluginTest.cs) (revision 5a98830aee77b1ee0158c11ba5cccffc656226e0) +++ Core/Plugins/test/Core.Plugins.OxyPlot.Test/OxyPlotGuiPluginTest.cs (.../OxyPlotGuiPluginTest.cs) (revision 570101d9648e296b96c7e624c4d4f6bfad8d41b6) @@ -1,14 +1,13 @@ using System; -using System.Collections.Generic; using System.Linq; using System.Windows; using System.Windows.Forms; using Core.Common.Controls.Views; using Core.Common.Gui; using Core.Common.Gui.Forms.MainWindow; using Core.Common.Gui.Forms.ViewManager; -using Core.Components.OxyPlot; using Core.Components.OxyPlot.Data; +using Core.Components.OxyPlot.Forms; using Core.Plugins.OxyPlot.Forms; using Core.Plugins.OxyPlot.Legend; using NUnit.Framework; Index: Ringtoets.sln =================================================================== diff -u -r3275fac43bec51c916db0b401361f3ffc44ebb18 -r570101d9648e296b96c7e624c4d4f6bfad8d41b6 --- Ringtoets.sln (.../Ringtoets.sln) (revision 3275fac43bec51c916db0b401361f3ffc44ebb18) +++ Ringtoets.sln (.../Ringtoets.sln) (revision 570101d9648e296b96c7e624c4d4f6bfad8d41b6) @@ -229,6 +229,10 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Application.Ringtoets.Storage.Test", "Application\Ringtoets\test\Application.Ringtoets.Storage.Test\Application.Ringtoets.Storage.Test.csproj", "{594C5C6D-5833-4E1C-9F30-13A202628EEF}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core.Components.OxyPlot.Forms", "Core\Components\src\Core.Components.OxyPlot.Forms\Core.Components.OxyPlot.Forms.csproj", "{DADAA0A5-288C-49CB-9F08-337F16832C86}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core.Components.OxyPlot.Forms.Test", "Core\Components\test\Core.Components.OxyPlot.Forms.Test\Core.Components.OxyPlot.Forms.Test.csproj", "{D07BB841-15D7-4127-8B46-CFC61C546B45}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution CreateInstaller|x86 = CreateInstaller|x86 @@ -952,6 +956,25 @@ {594C5C6D-5833-4E1C-9F30-13A202628EEF}.Release|x86.Build.0 = Release|x86 {594C5C6D-5833-4E1C-9F30-13A202628EEF}.ReleaseForCodeCoverage|x86.ActiveCfg = ReleaseForCodeCoverage|x86 {594C5C6D-5833-4E1C-9F30-13A202628EEF}.ReleaseForCodeCoverage|x86.Build.0 = ReleaseForCodeCoverage|x86 + {DADAA0A5-288C-49CB-9F08-337F16832C86}.CreateInstaller|x86.ActiveCfg = Release|x86 + {DADAA0A5-288C-49CB-9F08-337F16832C86}.CreateInstaller|x86.Build.0 = Release|x86 + {DADAA0A5-288C-49CB-9F08-337F16832C86}.CreateInstallerWithDemoProject|x86.ActiveCfg = Release|x86 + {DADAA0A5-288C-49CB-9F08-337F16832C86}.CreateInstallerWithDemoProject|x86.Build.0 = Release|x86 + {DADAA0A5-288C-49CB-9F08-337F16832C86}.Debug|x86.ActiveCfg = Debug|x86 + {DADAA0A5-288C-49CB-9F08-337F16832C86}.Debug|x86.Build.0 = Debug|x86 + {DADAA0A5-288C-49CB-9F08-337F16832C86}.Release|x86.ActiveCfg = Release|x86 + {DADAA0A5-288C-49CB-9F08-337F16832C86}.Release|x86.Build.0 = Release|x86 + {DADAA0A5-288C-49CB-9F08-337F16832C86}.ReleaseForCodeCoverage|x86.ActiveCfg = ReleaseForCodeCoverage|x86 + {DADAA0A5-288C-49CB-9F08-337F16832C86}.ReleaseForCodeCoverage|x86.Build.0 = ReleaseForCodeCoverage|x86 + {D07BB841-15D7-4127-8B46-CFC61C546B45}.CreateInstaller|x86.ActiveCfg = Release|x86 + {D07BB841-15D7-4127-8B46-CFC61C546B45}.CreateInstaller|x86.Build.0 = Release|x86 + {D07BB841-15D7-4127-8B46-CFC61C546B45}.CreateInstallerWithDemoProject|x86.ActiveCfg = Release|x86 + {D07BB841-15D7-4127-8B46-CFC61C546B45}.Debug|x86.ActiveCfg = Debug|x86 + {D07BB841-15D7-4127-8B46-CFC61C546B45}.Debug|x86.Build.0 = Debug|x86 + {D07BB841-15D7-4127-8B46-CFC61C546B45}.Release|x86.ActiveCfg = Release|x86 + {D07BB841-15D7-4127-8B46-CFC61C546B45}.Release|x86.Build.0 = Release|x86 + {D07BB841-15D7-4127-8B46-CFC61C546B45}.ReleaseForCodeCoverage|x86.ActiveCfg = ReleaseForCodeCoverage|x86 + {D07BB841-15D7-4127-8B46-CFC61C546B45}.ReleaseForCodeCoverage|x86.Build.0 = ReleaseForCodeCoverage|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -1062,7 +1085,9 @@ {7A696ACF-BA09-41A2-A912-A26E82C494CF} = {502CA963-E0E9-4F4A-A1D4-612C6A08386B} {D9DC93FF-DCF3-44A4-9193-9911966CDFF4} = {502CA963-E0E9-4F4A-A1D4-612C6A08386B} {2344A7BD-7E25-4A1A-982E-6C674AF5167A} = {7A696ACF-BA09-41A2-A912-A26E82C494CF} + {DADAA0A5-288C-49CB-9F08-337F16832C86} = {7A696ACF-BA09-41A2-A912-A26E82C494CF} {4BB4D2AA-332E-42D6-8D34-FFABBCE1F1D8} = {D9DC93FF-DCF3-44A4-9193-9911966CDFF4} + {D07BB841-15D7-4127-8B46-CFC61C546B45} = {D9DC93FF-DCF3-44A4-9193-9911966CDFF4} {594C5C6D-5833-4E1C-9F30-13A202628EEF} = {EE8D5A6C-4871-452A-A69B-F04E374D715E} EndGlobalSection GlobalSection(TextTemplating) = postSolution Index: packages/repositories.config =================================================================== diff -u -r3a90fe6b4e06e556b9864b016cb147630306f3ef -r570101d9648e296b96c7e624c4d4f6bfad8d41b6 --- packages/repositories.config (.../repositories.config) (revision 3a90fe6b4e06e556b9864b016cb147630306f3ef) +++ packages/repositories.config (.../repositories.config) (revision 570101d9648e296b96c7e624c4d4f6bfad8d41b6) @@ -21,7 +21,9 @@ + +