Index: Core/Components/src/Core.Components.Gis.Forms/Properties/Resources.Designer.cs =================================================================== diff -u -r99f9004206bfb9de084275d749b7aeccafd6da18 -r70952faba3713dc603266d3a2bc9c00eb4397caf --- Core/Components/src/Core.Components.Gis.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 99f9004206bfb9de084275d749b7aeccafd6da18) +++ Core/Components/src/Core.Components.Gis.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 70952faba3713dc603266d3a2bc9c00eb4397caf) @@ -1,4 +1,25 @@ -//------------------------------------------------------------------------------ +// 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. + +//------------------------------------------------------------------------------ // // This code was generated by a tool. // Runtime Version:4.0.30319.42000 @@ -117,15 +138,6 @@ } /// - /// Looks up a localized string similar to Bewerken. - /// - public static string WmtsConnectionDialog_ActionButton_Edit { - get { - return ResourceManager.GetString("WmtsConnectionDialog_ActionButton_Edit", resourceCulture); - } - } - - /// /// Looks up a localized string similar to WMTS locatie aanpassen. /// public static string WmtsConnectionDialog_Text_Edit { @@ -135,7 +147,7 @@ } /// - /// Looks up a localized string similar to URL naar het WMTS dataservice inclusief 'capabilities'.. + /// Looks up a localized string similar to URL naar 'capabilities' van de webservice.. /// public static string WmtsConnectionDialog_UrlErrorProvider_HelpText { get { @@ -151,5 +163,14 @@ return ResourceManager.GetString("WmtsLocationControl_DisplayName", resourceCulture); } } + + /// + /// Looks up a localized string similar to Gegevens ophalen van de locatie (URL) '{0}' is mislukt.. + /// + public static string WmtsLocationControl_Unable_to_connect_to_0 { + get { + return ResourceManager.GetString("WmtsLocationControl_Unable_to_connect_to_0", resourceCulture); + } + } } } Index: Core/Components/src/Core.Components.Gis.Forms/Properties/Resources.resx =================================================================== diff -u -r99f9004206bfb9de084275d749b7aeccafd6da18 -r70952faba3713dc603266d3a2bc9c00eb4397caf --- Core/Components/src/Core.Components.Gis.Forms/Properties/Resources.resx (.../Resources.resx) (revision 99f9004206bfb9de084275d749b7aeccafd6da18) +++ Core/Components/src/Core.Components.Gis.Forms/Properties/Resources.resx (.../Resources.resx) (revision 70952faba3713dc603266d3a2bc9c00eb4397caf) @@ -136,16 +136,16 @@ Titel - - Bewerken - WMTS locatie aanpassen - URL naar het WMTS dataservice inclusief 'capabilities'. + URL naar 'capabilities' van de webservice. Web Map Tile Service (WMTS) + + Gegevens ophalen van de locatie (URL) '{0}' is mislukt. + \ No newline at end of file Index: Core/Components/src/Core.Components.Gis.Forms/Views/WmtsConnectionDialog.cs =================================================================== diff -u -rc7dcfeb120035a08adfe115275512e1e6c5b4931 -r70952faba3713dc603266d3a2bc9c00eb4397caf --- Core/Components/src/Core.Components.Gis.Forms/Views/WmtsConnectionDialog.cs (.../WmtsConnectionDialog.cs) (revision c7dcfeb120035a08adfe115275512e1e6c5b4931) +++ Core/Components/src/Core.Components.Gis.Forms/Views/WmtsConnectionDialog.cs (.../WmtsConnectionDialog.cs) (revision 70952faba3713dc603266d3a2bc9c00eb4397caf) @@ -81,7 +81,6 @@ { nameTextBox.Text = wmtsConnectionInfo.Name; urlTextBox.Text = wmtsConnectionInfo.Url; - actionButton.Text = Resources.WmtsConnectionDialog_ActionButton_Edit; Text = Resources.WmtsConnectionDialog_Text_Edit; } Index: Core/Components/src/Core.Components.Gis.Forms/Views/WmtsConnectionDialog.resx =================================================================== diff -u -r99f9004206bfb9de084275d749b7aeccafd6da18 -r70952faba3713dc603266d3a2bc9c00eb4397caf --- Core/Components/src/Core.Components.Gis.Forms/Views/WmtsConnectionDialog.resx (.../WmtsConnectionDialog.resx) (revision 99f9004206bfb9de084275d749b7aeccafd6da18) +++ Core/Components/src/Core.Components.Gis.Forms/Views/WmtsConnectionDialog.resx (.../WmtsConnectionDialog.resx) (revision 70952faba3713dc603266d3a2bc9c00eb4397caf) @@ -340,7 +340,7 @@ 3 - Toevoegen + Opslaan actionButton @@ -381,12 +381,12 @@ 1 - + 123, 17 - - + + True - + 6, 13 Index: Core/Components/src/Core.Components.Gis.Forms/Views/WmtsLocationControl.cs =================================================================== diff -u -rf6f7505803cfaf42422b61d33b16a7b714ce6400 -r70952faba3713dc603266d3a2bc9c00eb4397caf --- Core/Components/src/Core.Components.Gis.Forms/Views/WmtsLocationControl.cs (.../WmtsLocationControl.cs) (revision f6f7505803cfaf42422b61d33b16a7b714ce6400) +++ Core/Components/src/Core.Components.Gis.Forms/Views/WmtsLocationControl.cs (.../WmtsLocationControl.cs) (revision 70952faba3713dc603266d3a2bc9c00eb4397caf) @@ -265,13 +265,12 @@ { urlLocationComboBox.ValueMember = nameof(WmtsConnectionInfo.Url); UpdateComboBoxDataSource(wmtsConnectionInfos.FirstOrDefault()); - } private void UpdateComboBoxDataSource(object selectedItem) { urlLocationComboBox.BeginUpdate(); - + urlLocationComboBoxUpdating = true; urlLocationComboBox.DataSource = wmtsConnectionInfos.OrderBy(i => i.Name).ToList(); urlLocationComboBox.DisplayMember = nameof(WmtsConnectionInfo.Name); @@ -328,12 +327,11 @@ IEnumerable wmtsCapabilities = wmtsCapabilityFactory.GetWmtsCapabilities(selectedWmtsConnectionInfo.Url).ToArray(); UpdateDataGridViewDataSource(wmtsCapabilities); } - catch (CannotFindTileSourceException exception) + catch (CannotFindTileSourceException) { Form parentForm = FindForm(); - MessageBox.Show(parentForm, exception.Message, BaseResources.Error, MessageBoxButtons.OK, - MessageBoxIcon.Error); - log.Error(exception.Message, exception); + MessageBox.Show(parentForm, string.Format(Resources.WmtsLocationControl_Unable_to_connect_to_0, selectedWmtsConnectionInfo.Name), + BaseResources.Error, MessageBoxButtons.OK, MessageBoxIcon.Error); } } Index: Core/Components/src/Core.Components.Gis.IO/Writers/WmtsConnectionInfoWriter.cs =================================================================== diff -u -r99f9004206bfb9de084275d749b7aeccafd6da18 -r70952faba3713dc603266d3a2bc9c00eb4397caf --- Core/Components/src/Core.Components.Gis.IO/Writers/WmtsConnectionInfoWriter.cs (.../WmtsConnectionInfoWriter.cs) (revision 99f9004206bfb9de084275d749b7aeccafd6da18) +++ Core/Components/src/Core.Components.Gis.IO/Writers/WmtsConnectionInfoWriter.cs (.../WmtsConnectionInfoWriter.cs) (revision 70952faba3713dc603266d3a2bc9c00eb4397caf) @@ -80,8 +80,14 @@ private void WriteWmtsConnectionInfosToXml(IEnumerable wmtsConnectionInfos) { EnsureParentDirectoryExists(); - using (XmlWriter writer = XmlWriter.Create(filePath)) + + var settings = new XmlWriterSettings { + Indent = true + }; + + using (XmlWriter writer = XmlWriter.Create(filePath, settings)) + { writer.WriteStartDocument(); writer.WriteStartElement(WmtsConnectionInfoXmlDefinitions.RootElement); Index: Core/Components/test/Core.Components.Gis.Forms.Test/Views/WmtsConnectionDialogTest.cs =================================================================== diff -u -r99f9004206bfb9de084275d749b7aeccafd6da18 -r70952faba3713dc603266d3a2bc9c00eb4397caf --- Core/Components/test/Core.Components.Gis.Forms.Test/Views/WmtsConnectionDialogTest.cs (.../WmtsConnectionDialogTest.cs) (revision 99f9004206bfb9de084275d749b7aeccafd6da18) +++ Core/Components/test/Core.Components.Gis.Forms.Test/Views/WmtsConnectionDialogTest.cs (.../WmtsConnectionDialogTest.cs) (revision 70952faba3713dc603266d3a2bc9c00eb4397caf) @@ -83,7 +83,7 @@ Assert.AreEqual("URL:", urlLabel.Text); var actionButton = (Button) new ButtonTester("actionButton", dialog).TheObject; - Assert.AreEqual("Toevoegen", actionButton.Text); + Assert.AreEqual("Opslaan", actionButton.Text); Assert.IsFalse(actionButton.Enabled); var cancelButton = new ButtonTester("cancelButton", dialog); @@ -127,7 +127,7 @@ Assert.AreEqual("URL:", urlLabel.Text); var actionButton = (Button) new ButtonTester("actionButton", dialog).TheObject; - Assert.AreEqual("Bewerken", actionButton.Text); + Assert.AreEqual("Opslaan", actionButton.Text); Assert.IsTrue(actionButton.Enabled); var cancelButton = new ButtonTester("cancelButton", dialog); Index: Core/Components/test/Core.Components.Gis.Forms.Test/Views/WmtsLocationControlTest.cs =================================================================== diff -u -r27c758a14c9658eb064ec971f10611b9994d28e7 -r70952faba3713dc603266d3a2bc9c00eb4397caf --- Core/Components/test/Core.Components.Gis.Forms.Test/Views/WmtsLocationControlTest.cs (.../WmtsLocationControlTest.cs) (revision 27c758a14c9658eb064ec971f10611b9994d28e7) +++ Core/Components/test/Core.Components.Gis.Forms.Test/Views/WmtsLocationControlTest.cs (.../WmtsLocationControlTest.cs) (revision 70952faba3713dc603266d3a2bc9c00eb4397caf) @@ -25,6 +25,7 @@ using System.Linq; using System.Threading; using System.Windows.Forms; +using BruTile; using BruTile.Wmts; using Core.Common.Controls.DataGrid; using Core.Common.Gui.Settings; @@ -879,7 +880,7 @@ } [Test] - public void GivenWmtsLocationControlAndConnectClicked_WhenCannotFindTileSourceException_ThenErrorMessageShownAndLogGenerated() + public void GivenWmtsLocationControlAndConnectClicked_WhenCannotFindTileSourceException_ThenErrorMessageShown() { // Given const string exceptionMessage = "fail"; @@ -906,10 +907,9 @@ var connectToButton = new ButtonTester("connectToButton", form); // When - Action action = () => connectToButton.Click(); + connectToButton.Click(); // Then - TestHelper.AssertLogMessageWithLevelIsGenerated(action, Tuple.Create(exceptionMessage, LogLevelConstant.Error)); Assert.AreEqual("Fout", messageBoxTitle); Assert.AreEqual(exceptionMessage, messageBoxText); } @@ -937,7 +937,7 @@ } } - private static WmtsCapability CreateWmtsCapability(TestWmtsTileSource tileSource) + private static WmtsCapability CreateWmtsCapability(ITileSource tileSource) { var wmtsTileSchema = (WmtsTileSchema) tileSource.Schema; return new WmtsCapability(wmtsTileSchema.Identifier, wmtsTileSchema.Format, @@ -993,8 +993,7 @@ { File.WriteAllText(filePath, "" + $"{wmtsConnectionInfo.Name}{wmtsConnectionInfo.Url}" + - "") - ; + ""); } } } \ No newline at end of file Index: Core/Components/test/Core.Components.Gis.IO.Test/Writers/WmtsConnectionInfoWriterTest.cs =================================================================== diff -u -r99f9004206bfb9de084275d749b7aeccafd6da18 -r70952faba3713dc603266d3a2bc9c00eb4397caf --- Core/Components/test/Core.Components.Gis.IO.Test/Writers/WmtsConnectionInfoWriterTest.cs (.../WmtsConnectionInfoWriterTest.cs) (revision 99f9004206bfb9de084275d749b7aeccafd6da18) +++ Core/Components/test/Core.Components.Gis.IO.Test/Writers/WmtsConnectionInfoWriterTest.cs (.../WmtsConnectionInfoWriterTest.cs) (revision 70952faba3713dc603266d3a2bc9c00eb4397caf) @@ -161,9 +161,16 @@ // Assert string actualContent = GetFileContent(filePath); - string expectedContent = "" + - "name1url1" + - "name2url2" + + string expectedContent = "" + Environment.NewLine + + "" + Environment.NewLine + + " " + Environment.NewLine + + " name1" + Environment.NewLine + + " url1" + Environment.NewLine + + " " + Environment.NewLine + + " " + Environment.NewLine + + " name2" + Environment.NewLine + + " url2" + Environment.NewLine + + " " + Environment.NewLine + ""; Assert.AreEqual(expectedContent, actualContent); } Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Properties/Resources.Designer.cs =================================================================== diff -u -ra489d29ed1bf6bf0521644b809320b4b6407ec56 -r70952faba3713dc603266d3a2bc9c00eb4397caf --- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision a489d29ed1bf6bf0521644b809320b4b6407ec56) +++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 70952faba3713dc603266d3a2bc9c00eb4397caf) @@ -113,7 +113,7 @@ } /// - /// Looks up a localized string similar to Selecteer een kaartlaag.. + /// Looks up a localized string similar to Selecteer een achtergrondkaart.. /// public static string BackgroundMapData_SelectMapData_Tooltip { get { Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Properties/Resources.resx =================================================================== diff -u -ra489d29ed1bf6bf0521644b809320b4b6407ec56 -r70952faba3713dc603266d3a2bc9c00eb4397caf --- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Properties/Resources.resx (.../Resources.resx) (revision a489d29ed1bf6bf0521644b809320b4b6407ec56) +++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Properties/Resources.resx (.../Resources.resx) (revision 70952faba3713dc603266d3a2bc9c00eb4397caf) @@ -173,6 +173,6 @@ Selecteren... - Selecteer een kaartlaag. + Selecteer een achtergrondkaart. \ No newline at end of file Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/TreeNodeInfos/BackgroundMapDataContainerTreeNodeInfoTest.cs =================================================================== diff -u -r4d42665303ba643c7dde86a0e8771c95821dbcf7 -r70952faba3713dc603266d3a2bc9c00eb4397caf --- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/TreeNodeInfos/BackgroundMapDataContainerTreeNodeInfoTest.cs (.../BackgroundMapDataContainerTreeNodeInfoTest.cs) (revision 4d42665303ba643c7dde86a0e8771c95821dbcf7) +++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/TreeNodeInfos/BackgroundMapDataContainerTreeNodeInfoTest.cs (.../BackgroundMapDataContainerTreeNodeInfoTest.cs) (revision 70952faba3713dc603266d3a2bc9c00eb4397caf) @@ -234,7 +234,7 @@ using (ContextMenuStrip contextMenu = info.ContextMenuStrip(container, assessmentSection, treeViewControl)) { const string expectedItemText = "Selecteren..."; - const string expectedItemTooltip = "Selecteer een kaartlaag."; + const string expectedItemTooltip = "Selecteer een achtergrondkaart."; TestHelper.AssertContextMenuStripContainsItem(contextMenu, selectContextMenuIndex, expectedItemText, expectedItemTooltip, RingtoetsCommonFormsResources.MapsIcon);