Index: Core/Components/src/Core.Components.DotSpatial.Forms/Core.Components.DotSpatial.Forms.csproj
===================================================================
diff -u -r5ee68bb6e2d903af666a6e927e4f67b916c88848 -r8ed20afbbecb8d353372e6623e7bbf68cdee543c
--- Core/Components/src/Core.Components.DotSpatial.Forms/Core.Components.DotSpatial.Forms.csproj (.../Core.Components.DotSpatial.Forms.csproj) (revision 5ee68bb6e2d903af666a6e927e4f67b916c88848)
+++ Core/Components/src/Core.Components.DotSpatial.Forms/Core.Components.DotSpatial.Forms.csproj (.../Core.Components.DotSpatial.Forms.csproj) (revision 8ed20afbbecb8d353372e6623e7bbf68cdee543c)
@@ -90,7 +90,7 @@
True
Resources.resx
-
+
Index: Core/Components/src/Core.Components.DotSpatial.Forms/Views/IBackgroundMapDataSelectionControl.cs
===================================================================
diff -u
--- Core/Components/src/Core.Components.DotSpatial.Forms/Views/IBackgroundMapDataSelectionControl.cs (revision 0)
+++ Core/Components/src/Core.Components.DotSpatial.Forms/Views/IBackgroundMapDataSelectionControl.cs (revision 8ed20afbbecb8d353372e6623e7bbf68cdee543c)
@@ -0,0 +1,53 @@
+// 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 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;
+using System.Windows.Forms;
+using Core.Components.Gis.Data;
+
+namespace Core.Components.DotSpatial.Forms.Views
+{
+ ///
+ /// Interface for a user control that has a background MapData.
+ ///
+ public interface IBackgroundMapDataSelectionControl
+ {
+ ///
+ /// Fired when the has been changed.
+ ///
+ event EventHandler SelectedMapDataChanged;
+
+ ///
+ /// Gets the display name of the user control;
+ ///
+ string DisplayName { get; }
+
+ ///
+ /// Gets the selected or null if none selected.
+ ///
+ WmtsMapData SelectedMapData { get; }
+
+ ///
+ /// Gets the user control.
+ ///
+ UserControl UserControl { get; }
+ }
+}
\ No newline at end of file
Fisheye: Tag 8ed20afbbecb8d353372e6623e7bbf68cdee543c refers to a dead (removed) revision in file `Core/Components/src/Core.Components.DotSpatial.Forms/Views/IHasMapData.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Core/Components/src/Core.Components.DotSpatial.Forms/Views/WmtsConnectionDialog.cs
===================================================================
diff -u -r336c86d498d517c66d854fc0e91a6a06f1e582c2 -r8ed20afbbecb8d353372e6623e7bbf68cdee543c
--- Core/Components/src/Core.Components.DotSpatial.Forms/Views/WmtsConnectionDialog.cs (.../WmtsConnectionDialog.cs) (revision 336c86d498d517c66d854fc0e91a6a06f1e582c2)
+++ Core/Components/src/Core.Components.DotSpatial.Forms/Views/WmtsConnectionDialog.cs (.../WmtsConnectionDialog.cs) (revision 8ed20afbbecb8d353372e6623e7bbf68cdee543c)
@@ -28,15 +28,15 @@
namespace Core.Components.DotSpatial.Forms.Views
{
///
- /// A dialog which allows the user to set data, which is used for .
+ /// A dialog allowing the user to create an instance of .
///
- public partial class WmtsConnectionDialog
- : DialogBase
+ public partial class WmtsConnectionDialog : DialogBase
{
///
/// Creates a new instance of .
///
/// The parent of the dialog.
+ /// Thrown when is null.
public WmtsConnectionDialog(IWin32Window dialogParent) : base(dialogParent, Resources.MapsIcon, 400, 150)
{
InitializeComponent();
@@ -66,12 +66,12 @@
}
///
- /// Gets the name that was set in the dialog.
+ /// Gets the name of the WMTS.
///
public string WmtsConnectionName { get; private set; }
///
- /// Gets the URL that was set in the dialog.
+ /// Gets the URL to the GetCapabilities() of the WMTS.
///
public string WmtsConnectionUrl { get; private set; }
Index: Core/Components/src/Core.Components.DotSpatial.Forms/Views/WmtsLocationControl.cs
===================================================================
diff -u -r9159e629e90a794aa18b28d61c6b7904407acbcc -r8ed20afbbecb8d353372e6623e7bbf68cdee543c
--- Core/Components/src/Core.Components.DotSpatial.Forms/Views/WmtsLocationControl.cs (.../WmtsLocationControl.cs) (revision 9159e629e90a794aa18b28d61c6b7904407acbcc)
+++ Core/Components/src/Core.Components.DotSpatial.Forms/Views/WmtsLocationControl.cs (.../WmtsLocationControl.cs) (revision 8ed20afbbecb8d353372e6623e7bbf68cdee543c)
@@ -38,7 +38,7 @@
///
/// This class represents a where WMTS locations can be administrated.
///
- public partial class WmtsLocationControl : UserControl, IHasMapData
+ public partial class WmtsLocationControl : UserControl, IBackgroundMapDataSelectionControl
{
private const string wmtsConnectionInfoFileName = "wmtsConnectionInfo.config";
private static readonly ILog log = LogManager.GetLogger(typeof(WmtsLocationControl));
Index: Core/Components/test/Core.Components.DotSpatial.Forms.Test/Views/WmtsLocationControlTest.cs
===================================================================
diff -u -reb95ff53a2a3010673144d34c0370632698c35ee -r8ed20afbbecb8d353372e6623e7bbf68cdee543c
--- Core/Components/test/Core.Components.DotSpatial.Forms.Test/Views/WmtsLocationControlTest.cs (.../WmtsLocationControlTest.cs) (revision eb95ff53a2a3010673144d34c0370632698c35ee)
+++ Core/Components/test/Core.Components.DotSpatial.Forms.Test/Views/WmtsLocationControlTest.cs (.../WmtsLocationControlTest.cs) (revision 8ed20afbbecb8d353372e6623e7bbf68cdee543c)
@@ -81,7 +81,7 @@
{
// Assert
Assert.IsInstanceOf(control);
- Assert.IsInstanceOf(control);
+ Assert.IsInstanceOf(control);
Assert.AreEqual("Web Map Tile Service (WMTS)", control.DisplayName);
Assert.IsNull(control.SelectedMapData);
Assert.AreSame(control, control.UserControl);
Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/BackgroundMapDataSelectionDialog.cs
===================================================================
diff -u -r5ee68bb6e2d903af666a6e927e4f67b916c88848 -r8ed20afbbecb8d353372e6623e7bbf68cdee543c
--- Ringtoets/Integration/src/Ringtoets.Integration.Forms/BackgroundMapDataSelectionDialog.cs (.../BackgroundMapDataSelectionDialog.cs) (revision 5ee68bb6e2d903af666a6e927e4f67b916c88848)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/BackgroundMapDataSelectionDialog.cs (.../BackgroundMapDataSelectionDialog.cs) (revision 8ed20afbbecb8d353372e6623e7bbf68cdee543c)
@@ -36,8 +36,8 @@
///
public partial class BackgroundMapDataSelectionDialog : DialogBase
{
- private readonly List mapDatas;
- private IHasMapData currentMapDataControl;
+ private readonly List mapDatas;
+ private IBackgroundMapDataSelectionControl currentMapDataControl;
///
/// Creates a new instance of .
@@ -48,7 +48,7 @@
public BackgroundMapDataSelectionDialog(IWin32Window dialogParent, WmtsMapData mapData)
: base(dialogParent, RingtoetsCommonFormsResources.SelectionDialogIcon, 500, 350)
{
- mapDatas = new List
+ mapDatas = new List
{
new WmtsLocationControl(mapData)
};
@@ -84,7 +84,7 @@
{
if (currentMapDataControl != null)
{
- var currentHasMapData = propertiesGroupBox.Controls.OfType().FirstOrDefault() as IHasMapData;
+ var currentHasMapData = propertiesGroupBox.Controls.OfType().FirstOrDefault() as IBackgroundMapDataSelectionControl;
if (currentHasMapData != null)
{
currentHasMapData.SelectedMapDataChanged -= OnSelectedMapDataChanged;
@@ -132,7 +132,7 @@
private void UpdateComboBoxDataSource()
{
mapLayerComboBox.DataSource = mapDatas;
- mapLayerComboBox.DisplayMember = nameof(IHasMapData.DisplayName);
+ mapLayerComboBox.DisplayMember = nameof(IBackgroundMapDataSelectionControl.DisplayName);
}
#endregion
@@ -158,7 +158,7 @@
private void MapLayerComboBox_OnSelectedIndexChanged(object sender, EventArgs eventArgs)
{
- var selectedItem = mapLayerComboBox.SelectedItem as IHasMapData;
+ var selectedItem = mapLayerComboBox.SelectedItem as IBackgroundMapDataSelectionControl;
if (selectedItem == null)
{
return;
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/BackgroundMapDataSelectionDialogTest.cs
===================================================================
diff -u -rdc229a7f477b15ac8d52a9164451b21202891772 -r8ed20afbbecb8d353372e6623e7bbf68cdee543c
--- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/BackgroundMapDataSelectionDialogTest.cs (.../BackgroundMapDataSelectionDialogTest.cs) (revision dc229a7f477b15ac8d52a9164451b21202891772)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/BackgroundMapDataSelectionDialogTest.cs (.../BackgroundMapDataSelectionDialogTest.cs) (revision 8ed20afbbecb8d353372e6623e7bbf68cdee543c)
@@ -130,7 +130,7 @@
var mapLayers = (ComboBox) new ComboBoxTester("mapLayerComboBox", dialog).TheObject;
Assert.AreEqual(ComboBoxStyle.DropDownList, mapLayers.DropDownStyle);
- Assert.IsInstanceOf>(mapLayers.DataSource);
+ Assert.IsInstanceOf>(mapLayers.DataSource);
Assert.AreEqual("DisplayName", mapLayers.DisplayMember);
Assert.IsTrue(mapLayers.Sorted);
}