Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Ringtoets.Integration.Forms.csproj
===================================================================
diff -u -rdadf9ac48b69ed4e26610fc6e7ccf8af0e2f5452 -r498145f32a037111ff2b09fd5076b5d5ec97288b
--- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Ringtoets.Integration.Forms.csproj (.../Ringtoets.Integration.Forms.csproj) (revision dadf9ac48b69ed4e26610fc6e7ccf8af0e2f5452)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Ringtoets.Integration.Forms.csproj (.../Ringtoets.Integration.Forms.csproj) (revision 498145f32a037111ff2b09fd5076b5d5ec97288b)
@@ -150,10 +150,10 @@
WaveHeightLocationsView.cs
-
+
UserControl
-
+
WmtsLocationControl.cs
@@ -269,7 +269,7 @@
WaveHeightLocationsView.cs
Designer
-
+
WmtsLocationControl.cs
Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/WmtsLocationControl.Designer.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/WmtsLocationControl.Designer.cs (revision 0)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/WmtsLocationControl.Designer.cs (revision 498145f32a037111ff2b09fd5076b5d5ec97288b)
@@ -0,0 +1,140 @@
+// Copyright (C) Stichting Deltares 2016. 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.
+
+namespace Ringtoets.Integration.Forms.Views
+{
+ partial class WmtsLocationControl
+ {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ #region Component Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent()
+ {
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WmtsLocationControl));
+ this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
+ this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
+ this.urlLocationLabel = new System.Windows.Forms.Label();
+ this.urlLocationComboBox = new System.Windows.Forms.ComboBox();
+ this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel();
+ this.connectToButton = new System.Windows.Forms.Button();
+ this.addLocationButton = new System.Windows.Forms.Button();
+ this.editLocationButton = new System.Windows.Forms.Button();
+ this.dataGridViewControl = new Core.Common.Controls.DataGrid.DataGridViewControl();
+ this.tableLayoutPanel1.SuspendLayout();
+ this.tableLayoutPanel2.SuspendLayout();
+ this.flowLayoutPanel2.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // tableLayoutPanel1
+ //
+ resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1");
+ this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel2, 0, 0);
+ this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel2, 0, 1);
+ this.tableLayoutPanel1.Controls.Add(this.dataGridViewControl, 0, 2);
+ this.tableLayoutPanel1.Name = "tableLayoutPanel1";
+ //
+ // tableLayoutPanel2
+ //
+ resources.ApplyResources(this.tableLayoutPanel2, "tableLayoutPanel2");
+ this.tableLayoutPanel2.Controls.Add(this.urlLocationLabel, 0, 0);
+ this.tableLayoutPanel2.Controls.Add(this.urlLocationComboBox, 1, 0);
+ this.tableLayoutPanel2.Name = "tableLayoutPanel2";
+ //
+ // urlLocationLabel
+ //
+ resources.ApplyResources(this.urlLocationLabel, "urlLocationLabel");
+ this.urlLocationLabel.Name = "urlLocationLabel";
+ //
+ // urlLocationComboBox
+ //
+ resources.ApplyResources(this.urlLocationComboBox, "urlLocationComboBox");
+ this.urlLocationComboBox.FormattingEnabled = true;
+ this.urlLocationComboBox.Name = "urlLocationComboBox";
+ //
+ // flowLayoutPanel2
+ //
+ resources.ApplyResources(this.flowLayoutPanel2, "flowLayoutPanel2");
+ this.flowLayoutPanel2.Controls.Add(this.connectToButton);
+ this.flowLayoutPanel2.Controls.Add(this.addLocationButton);
+ this.flowLayoutPanel2.Controls.Add(this.editLocationButton);
+ this.flowLayoutPanel2.Name = "flowLayoutPanel2";
+ //
+ // connectToButton
+ //
+ resources.ApplyResources(this.connectToButton, "connectToButton");
+ this.connectToButton.Name = "connectToButton";
+ this.connectToButton.UseVisualStyleBackColor = true;
+ //
+ // addButton
+ //
+ resources.ApplyResources(this.addLocationButton, "addLocationButton");
+ this.addLocationButton.Name = "addLocationButton";
+ this.addLocationButton.UseVisualStyleBackColor = true;
+ //
+ // editButton
+ //
+ resources.ApplyResources(this.editLocationButton, "editLocationButton");
+ this.editLocationButton.Name = "editLocationButton";
+ this.editLocationButton.UseVisualStyleBackColor = true;
+ //
+ // dataGridView
+ //
+ this.dataGridViewControl.Dock = System.Windows.Forms.DockStyle.Fill;
+ resources.ApplyResources(this.dataGridViewControl, "dataGridViewControl");
+ this.dataGridViewControl.Name = "dataGridViewControl";
+ //
+ // WmtsLayerControl
+ //
+ resources.ApplyResources(this, "$this");
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.tableLayoutPanel1);
+ this.Name = "WmtsLayerControl";
+ this.tableLayoutPanel1.ResumeLayout(false);
+ this.tableLayoutPanel1.PerformLayout();
+ this.tableLayoutPanel2.ResumeLayout(false);
+ this.tableLayoutPanel2.PerformLayout();
+ this.flowLayoutPanel2.ResumeLayout(false);
+ this.flowLayoutPanel2.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
+ private Core.Common.Controls.DataGrid.DataGridViewControl dataGridViewControl;
+ private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2;
+ private System.Windows.Forms.Label urlLocationLabel;
+ private System.Windows.Forms.ComboBox urlLocationComboBox;
+ private System.Windows.Forms.Button connectToButton;
+ private System.Windows.Forms.Button addLocationButton;
+ private System.Windows.Forms.Button editLocationButton;
+ private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
+ }
+}
Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/WmtsLocationControl.cs
===================================================================
diff -u
--- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/WmtsLocationControl.cs (revision 0)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/WmtsLocationControl.cs (revision 498145f32a037111ff2b09fd5076b5d5ec97288b)
@@ -0,0 +1,57 @@
+// Copyright (C) Stichting Deltares 2016. 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.Windows.Forms;
+
+namespace Ringtoets.Integration.Forms.Views
+{
+ ///
+ /// This class represents a where WMTS locations can be administrated.
+ ///
+ public partial class WmtsLocationControl : UserControl
+ {
+ ///
+ /// Creates a new instance of .
+ ///
+ public WmtsLocationControl()
+ {
+ InitializeComponent();
+ InitializeDataGridView();
+ }
+
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing)
+ {
+ components?.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ private void InitializeDataGridView()
+ {
+ dataGridViewControl.AddTextBoxColumn("", "Kaartlaag", true);
+ dataGridViewControl.AddTextBoxColumn("", "Formaat", true);
+ dataGridViewControl.AddTextBoxColumn("", "Titel", true);
+ dataGridViewControl.AddTextBoxColumn("", "Coördinatenstelsel", true);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/WmtsLocationControl.resx
===================================================================
diff -u
--- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/WmtsLocationControl.resx (revision 0)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/WmtsLocationControl.resx (revision 498145f32a037111ff2b09fd5076b5d5ec97288b)
@@ -0,0 +1,390 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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
+
+
+
+ 1
+
+
+ True
+
+
+ 2
+
+
+ True
+
+
+
+ 3, 6
+
+
+
+ 3, 6, 3, 0
+
+
+ 73, 13
+
+
+ 0
+
+
+ Locatie (URL)
+
+
+ urlLocationLabel
+
+
+ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tableLayoutPanel2
+
+
+ 0
+
+
+ Fill
+
+
+ 82, 3
+
+
+ 396, 21
+
+
+ 1
+
+
+ urlLocationComboBox
+
+
+ System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tableLayoutPanel2
+
+
+ 1
+
+
+ Fill
+
+
+ 3, 3
+
+
+ 1
+
+
+ 481, 27
+
+
+ 2
+
+
+ tableLayoutPanel2
+
+
+ System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tableLayoutPanel1
+
+
+ 0
+
+
+ <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="urlLocationLabel" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="urlLocationComboBox" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /></Controls><Columns Styles="AutoSize,0,Percent,100" /><Rows Styles="Percent,100" /></TableLayoutSettings>
+
+
+ True
+
+
+ True
+
+
+ 3, 3
+
+
+ 102, 23
+
+
+ 0
+
+
+ Verbinding maken
+
+
+ connectToButton
+
+
+ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ flowLayoutPanel2
+
+
+ 0
+
+
+ True
+
+
+ 111, 3
+
+
+ 115, 23
+
+
+ 1
+
+
+ Locatie toevoegen...
+
+
+ addLocationButton
+
+
+ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ flowLayoutPanel2
+
+
+ 1
+
+
+ True
+
+
+ 232, 3
+
+
+ 116, 23
+
+
+ 2
+
+
+ Locatie aanpassen...
+
+
+ editLocationButton
+
+
+ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ flowLayoutPanel2
+
+
+ 2
+
+
+ 3, 36
+
+
+ 351, 29
+
+
+ 2
+
+
+ flowLayoutPanel2
+
+
+ System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tableLayoutPanel1
+
+
+ 1
+
+
+ Fill
+
+
+ 3, 71
+
+
+ 481, 146
+
+
+ 0
+
+
+ dataGridViewControl
+
+
+ System.Windows.Forms.DataGridView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ tableLayoutPanel1
+
+
+ 2
+
+
+ Fill
+
+
+ 0, 0
+
+
+ 3
+
+
+ 487, 220
+
+
+ 0
+
+
+ tableLayoutPanel1
+
+
+ System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ $this
+
+
+ 0
+
+
+ <?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="tableLayoutPanel2" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="flowLayoutPanel2" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="dataGridView" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="Percent,100" /><Rows Styles="AutoSize,0,AutoSize,0,Percent,100,Absolute,20" /></TableLayoutSettings>
+
+
+ True
+
+
+ 6, 13
+
+
+ 487, 220
+
+
+ WmtsLayerControl
+
+
+ System.Windows.Forms.UserControl, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
Fisheye: Tag 498145f32a037111ff2b09fd5076b5d5ec97288b refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.Forms/WmtsLocationControl.Designer.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 498145f32a037111ff2b09fd5076b5d5ec97288b refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.Forms/WmtsLocationControl.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 498145f32a037111ff2b09fd5076b5d5ec97288b refers to a dead (removed) revision in file `Ringtoets/Integration/src/Ringtoets.Integration.Forms/WmtsLocationControl.resx'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Ringtoets.Integration.Forms.Test.csproj
===================================================================
diff -u -rdadf9ac48b69ed4e26610fc6e7ccf8af0e2f5452 -r498145f32a037111ff2b09fd5076b5d5ec97288b
--- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Ringtoets.Integration.Forms.Test.csproj (.../Ringtoets.Integration.Forms.Test.csproj) (revision dadf9ac48b69ed4e26610fc6e7ccf8af0e2f5452)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Ringtoets.Integration.Forms.Test.csproj (.../Ringtoets.Integration.Forms.Test.csproj) (revision 498145f32a037111ff2b09fd5076b5d5ec97288b)
@@ -116,7 +116,7 @@
-
+
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/WmtsLocationControlTest.cs
===================================================================
diff -u
--- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/WmtsLocationControlTest.cs (revision 0)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/WmtsLocationControlTest.cs (revision 498145f32a037111ff2b09fd5076b5d5ec97288b)
@@ -0,0 +1,109 @@
+// Copyright (C) Stichting Deltares 2016. 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.Common.Controls.DataGrid;
+using NUnit.Extensions.Forms;
+using NUnit.Framework;
+using Ringtoets.Integration.Forms.Views;
+
+namespace Ringtoets.Integration.Forms.Test.Views
+{
+ [TestFixture]
+ public class WmtsLocationControlTest : NUnitFormTest
+ {
+ private const int mapLayerIdColumnIndex = 0;
+ private const int mapLayerFormatColumnIndex = 1;
+ private const int mapLayerTitleColumnIndex = 2;
+ private const int mapLayerCoordinateSystemColumnIndex = 3;
+
+ [Test]
+ public void Constructor_DefaultValues()
+ {
+ // Call
+ using (var control = new WmtsLocationControl())
+ {
+ // Assert
+ Assert.IsInstanceOf(control);
+ }
+ }
+
+ [Test]
+ public void Show_DefaultProperties()
+ {
+ // Call
+ using (var control = new WmtsLocationControl())
+ using (var form = new Form())
+ {
+ form.Controls.Add(control);
+
+ // Assert
+ var urlLocationLabel = new LabelTester("urlLocationLabel", form);
+ Assert.AreEqual("Locatie (URL)", urlLocationLabel.Text);
+
+ var urlLocations = new ComboBoxTester("urlLocationComboBox", form);
+ Assert.IsNotNull(urlLocations);
+
+ var buttonConnectTo = new ButtonTester("connectToButton", form);
+ Assert.AreEqual("Verbinding maken", buttonConnectTo.Text);
+
+ var buttonAddLocation = new ButtonTester("addLocationButton", form);
+ Assert.AreEqual("Locatie toevoegen...", buttonAddLocation.Text);
+
+ var buttonEditLocation = new ButtonTester("editLocationButton", form);
+ Assert.AreEqual("Locatie aanpassen...", buttonEditLocation.Text);
+ }
+ }
+
+ [Test]
+ public void Constructor_DataGridViewCorrectlyInitialized()
+ {
+ // Call
+ using (var control = new WmtsLocationControl())
+ using (var form = new Form())
+ {
+ form.Controls.Add(control);
+
+ // Assert
+ var dataGridViewControl = (DataGridViewControl) new ControlTester("dataGridViewControl", form).TheObject;
+ var dataGridView = dataGridViewControl.Controls.OfType().First();
+ Assert.AreEqual(4, dataGridView.ColumnCount);
+
+ var mapLayerIdColumn = (DataGridViewTextBoxColumn) dataGridView.Columns[mapLayerIdColumnIndex];
+ Assert.AreEqual("Kaartlaag", mapLayerIdColumn.HeaderText);
+ Assert.IsTrue(mapLayerIdColumn.ReadOnly);
+
+ var mapLayerFormatColumn = (DataGridViewTextBoxColumn) dataGridView.Columns[mapLayerFormatColumnIndex];
+ Assert.AreEqual("Formaat", mapLayerFormatColumn.HeaderText);
+ Assert.IsTrue(mapLayerFormatColumn.ReadOnly);
+
+ var mapLayerTitleColumn = (DataGridViewTextBoxColumn) dataGridView.Columns[mapLayerTitleColumnIndex];
+ Assert.AreEqual("Titel", mapLayerTitleColumn.HeaderText);
+ Assert.IsTrue(mapLayerTitleColumn.ReadOnly);
+
+ var mapLayerCoordinateSystemColumn = (DataGridViewTextBoxColumn) dataGridView.Columns[mapLayerCoordinateSystemColumnIndex];
+ Assert.AreEqual("Coördinatenstelsel", mapLayerCoordinateSystemColumn.HeaderText);
+ Assert.IsTrue(mapLayerCoordinateSystemColumn.ReadOnly);
+ }
+ }
+ }
+}
\ No newline at end of file
Fisheye: Tag 498145f32a037111ff2b09fd5076b5d5ec97288b refers to a dead (removed) revision in file `Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/WmtsLocationControlTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?