Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Views/GrassCoverErosionInwardsInputView.Designer.cs =================================================================== diff -u -raeb6e1a439617630e7613b9ed5af152c345fa2c6 -r62ed6462b31529a87c231f131195aef6efa6e3a7 --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Views/GrassCoverErosionInwardsInputView.Designer.cs (.../GrassCoverErosionInwardsInputView.Designer.cs) (revision aeb6e1a439617630e7613b9ed5af152c345fa2c6) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Views/GrassCoverErosionInwardsInputView.Designer.cs (.../GrassCoverErosionInwardsInputView.Designer.cs) (revision 62ed6462b31529a87c231f131195aef6efa6e3a7) @@ -43,10 +43,8 @@ // // chartControl // - this.chartControl.BottomAxisTitle = "L"; this.chartControl.ChartTitle = null; this.chartControl.Dock = System.Windows.Forms.DockStyle.Fill; - this.chartControl.LeftAxisTitle = "Hoogte"; this.chartControl.Location = new System.Drawing.Point(0, 0); this.chartControl.MinimumSize = new System.Drawing.Size(50, 75); this.chartControl.Name = "chartControl"; Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingInputView.Designer.cs =================================================================== diff -u -r81fa8a9bf3bd503cbd280e88b8f6037a840cff12 -r62ed6462b31529a87c231f131195aef6efa6e3a7 --- Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingInputView.Designer.cs (.../PipingInputView.Designer.cs) (revision 81fa8a9bf3bd503cbd280e88b8f6037a840cff12) +++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingInputView.Designer.cs (.../PipingInputView.Designer.cs) (revision 62ed6462b31529a87c231f131195aef6efa6e3a7) @@ -19,6 +19,8 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; + namespace Ringtoets.Piping.Forms.Views { partial class PipingInputView @@ -37,16 +39,16 @@ private void InitializeComponent() { this.chartControl = new Core.Components.OxyPlot.Forms.ChartControl(); - this.pipingSoilLayerTable = new Ringtoets.Piping.Forms.Views.PipingSoilLayerTable(); + this.pipingSoilLayerTable = new PipingSoilLayerTable(); this.SuspendLayout(); // // chartControl // - this.chartControl.BottomAxisTitle = ""; + this.chartControl.BottomAxisTitle = RingtoetsCommonFormsResources.InputView_Distance_DisplayName; this.chartControl.ChartTitle = null; this.chartControl.Data = null; this.chartControl.Dock = System.Windows.Forms.DockStyle.Fill; - this.chartControl.LeftAxisTitle = ""; + this.chartControl.LeftAxisTitle = RingtoetsCommonFormsResources.InputView_Height_DisplayName; this.chartControl.Location = new System.Drawing.Point(0, 0); this.chartControl.MinimumSize = new System.Drawing.Size(100, 100); this.chartControl.Name = "chartControl"; Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingInputView.cs =================================================================== diff -u -r81fa8a9bf3bd503cbd280e88b8f6037a840cff12 -r62ed6462b31529a87c231f131195aef6efa6e3a7 --- Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingInputView.cs (.../PipingInputView.cs) (revision 81fa8a9bf3bd503cbd280e88b8f6037a840cff12) +++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingInputView.cs (.../PipingInputView.cs) (revision 62ed6462b31529a87c231f131195aef6efa6e3a7) @@ -64,7 +64,6 @@ public PipingInputView() { InitializeComponent(); - InitializeChartControl(); calculationObserver = new Observer(UpdateChartTitle); calculationInputObserver = new Observer(UpdateViewData); @@ -144,12 +143,6 @@ base.Dispose(disposing); } - private void InitializeChartControl() - { - chartControl.LeftAxisTitle = RingtoetsCommonFormsResources.InputView_Height_DisplayName; - chartControl.BottomAxisTitle = RingtoetsCommonFormsResources.InputView_Distance_DisplayName; - } - private void UpdateChartTitle() { chartControl.ChartTitle = data.Name; Index: Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/Ringtoets.Revetment.Forms.csproj =================================================================== diff -u -r8e8c4917761153bb77baead204adb68bf3fe9550 -r62ed6462b31529a87c231f131195aef6efa6e3a7 --- Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/Ringtoets.Revetment.Forms.csproj (.../Ringtoets.Revetment.Forms.csproj) (revision 8e8c4917761153bb77baead204adb68bf3fe9550) +++ Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/Ringtoets.Revetment.Forms.csproj (.../Ringtoets.Revetment.Forms.csproj) (revision 62ed6462b31529a87c231f131195aef6efa6e3a7) @@ -34,7 +34,10 @@ + + + @@ -51,6 +54,12 @@ + + UserControl + + + WaveConditionsInputView.cs + @@ -78,6 +87,21 @@ Core.Common.Utils False + + {2465cca1-c505-4827-9454-4fd5fd9194cd} + Core.Components.Charting.Forms + False + + + {516ebc95-b8f2-428c-b7f6-733f01bf8fdd} + Core.Components.Charting + False + + + {dadaa0a5-288c-49cb-9f08-337f16832c86} + Core.Components.OxyPlot.Forms + False + {d4200f43-3f72-4f42-af0a-8ced416a38ec} Ringtoets.Common.Data @@ -100,6 +124,9 @@ Resources.Designer.cs Designer + + WaveConditionsInputView.cs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file Index: Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/Ringtoets.Revetment.Forms.Test.csproj =================================================================== diff -u -r8e8c4917761153bb77baead204adb68bf3fe9550 -r62ed6462b31529a87c231f131195aef6efa6e3a7 --- Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/Ringtoets.Revetment.Forms.Test.csproj (.../Ringtoets.Revetment.Forms.Test.csproj) (revision 8e8c4917761153bb77baead204adb68bf3fe9550) +++ Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/Ringtoets.Revetment.Forms.Test.csproj (.../Ringtoets.Revetment.Forms.Test.csproj) (revision 62ed6462b31529a87c231f131195aef6efa6e3a7) @@ -48,6 +48,7 @@ + @@ -59,6 +60,7 @@ + @@ -89,6 +91,14 @@ {d749ee4c-ce50-4c17-bf01-9a953028c126} Core.Common.TestUtil + + {2465CCA1-C505-4827-9454-4FD5FD9194CD} + Core.Components.Charting.Forms + + + {516ebc95-b8f2-428c-b7f6-733f01bf8fdd} + Core.Components.Charting + {d4200f43-3f72-4f42-af0a-8ced416a38ec} Ringtoets.Common.Data Index: Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/Views/WaveConditionsInputViewTest.cs =================================================================== diff -u --- Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/Views/WaveConditionsInputViewTest.cs (revision 0) +++ Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/Views/WaveConditionsInputViewTest.cs (revision 62ed6462b31529a87c231f131195aef6efa6e3a7) @@ -0,0 +1,65 @@ +// Copyright (C) Stichting Deltares 2017. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets is free software: you can redistribute it and/or modify +// it under the terms of the GNU 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 General Public License for more details. +// +// You should have received a copy of the GNU 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.Linq; +using System.Windows.Forms; +using Core.Components.Charting.Forms; +using NUnit.Framework; +using Ringtoets.Revetment.Forms.Views; + +namespace Ringtoets.Revetment.Forms.Test.Views +{ + [TestFixture] + public class WaveConditionsInputViewTest + { + [Test] + public void Constructor_ExpectedValues() + { + // Call + using (var view = new WaveConditionsInputView()) + { + // Assert + Assert.IsInstanceOf(view); + Assert.IsInstanceOf(view); + Assert.IsNotNull(view.Chart); + Assert.IsNull(view.Data); + Assert.AreEqual(1, view.Controls.Count); + } + } + + [Test] + public void Constructor_Always_AddEmptyChartControl() + { + // Call + using (var view = new WaveConditionsInputView()) + { + // Assert + var chartControl = (IChartControl)view.Controls.Find("chartControl", true).First(); + Assert.IsInstanceOf(chartControl); + Assert.AreSame(chartControl, chartControl); + Assert.AreEqual(DockStyle.Fill, ((Control)chartControl).Dock); + Assert.AreEqual("Afstand [m]", chartControl.BottomAxisTitle); + Assert.AreEqual("Hoogte [m+NAP]", chartControl.LeftAxisTitle); + Assert.IsNull(chartControl.Data); + } + } + } +} \ No newline at end of file