Index: Core/Plugins/src/Core.Plugins.Map/Core.Plugins.Map.csproj
===================================================================
diff -u -rd993e5ebe5851ea9c65753d8709d73a926a24afd -r06f019ab079a648ef19427dcf80ae4fc50cb32c1
--- Core/Plugins/src/Core.Plugins.Map/Core.Plugins.Map.csproj (.../Core.Plugins.Map.csproj) (revision d993e5ebe5851ea9c65753d8709d73a926a24afd)
+++ Core/Plugins/src/Core.Plugins.Map/Core.Plugins.Map.csproj (.../Core.Plugins.Map.csproj) (revision 06f019ab079a648ef19427dcf80ae4fc50cb32c1)
@@ -27,12 +27,6 @@
-
- Designer
- MSBuild:Compile
-
-
-
Index: Core/Plugins/src/Core.Plugins.Map/MapPlugin.cs
===================================================================
diff -u -rcbde09a1860a8a4480b958d6671de3480b995886 -r06f019ab079a648ef19427dcf80ae4fc50cb32c1
--- Core/Plugins/src/Core.Plugins.Map/MapPlugin.cs (.../MapPlugin.cs) (revision cbde09a1860a8a4480b958d6671de3480b995886)
+++ Core/Plugins/src/Core.Plugins.Map/MapPlugin.cs (.../MapPlugin.cs) (revision 06f019ab079a648ef19427dcf80ae4fc50cb32c1)
@@ -22,14 +22,12 @@
using System;
using System.Collections.Generic;
using Core.Common.Gui;
-using Core.Common.Gui.Forms;
using Core.Common.Gui.Forms.ViewHost;
using Core.Common.Gui.Plugin;
using Core.Common.Util;
using Core.Components.Gis.Data;
using Core.Components.Gis.Forms;
using Core.Components.Gis.IO.Importers;
-using Core.Plugins.Map.Commands;
using Core.Plugins.Map.Helpers;
using Core.Plugins.Map.Legend;
using Core.Plugins.Map.PresentationObjects;
@@ -45,27 +43,18 @@
{
private bool activated;
private IMapView currentMapView;
- private MapRibbon mapRibbon;
private MapLegendController mapLegendController;
- public override IRibbonCommandHandler RibbonCommandHandler
- {
- get
- {
- return mapRibbon;
- }
- }
-
public override void Activate()
{
mapLegendController = CreateLegendController(Gui);
- mapRibbon = CreateMapRibbon();
-
mapLegendController.ToggleView();
+
Gui.ViewHost.ViewOpened += OnViewOpened;
Gui.ViewHost.ViewBroughtToFront += OnViewBroughtToFront;
Gui.ViewHost.ViewClosed += OnViewClosed;
Gui.ViewHost.ActiveDocumentViewChanged += OnActiveDocumentViewChanged;
+
activated = true;
}
@@ -135,14 +124,6 @@
return controller;
}
- private MapRibbon CreateMapRibbon()
- {
- return new MapRibbon
- {
- ToggleLegendViewCommand = new ToggleMapLegendViewCommand(mapLegendController)
- };
- }
-
private void OnViewOpened(object sender, ViewChangeEventArgs e)
{
var view = e.View as IMapView;
@@ -183,9 +164,7 @@
currentMapView = mapView;
- IMapControl mapControl = mapView?.Map;
- mapLegendController.Update(mapControl);
- mapRibbon.Map = mapControl;
+ mapLegendController.Update(mapView?.Map);
}
}
}
\ No newline at end of file
Fisheye: Tag 06f019ab079a648ef19427dcf80ae4fc50cb32c1 refers to a dead (removed) revision in file `Core/Plugins/src/Core.Plugins.Map/MapRibbon.xaml'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 06f019ab079a648ef19427dcf80ae4fc50cb32c1 refers to a dead (removed) revision in file `Core/Plugins/src/Core.Plugins.Map/MapRibbon.xaml.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Core/Plugins/src/Core.Plugins.Map/Properties/Resources.Designer.cs
===================================================================
diff -u -rcbde09a1860a8a4480b958d6671de3480b995886 -r06f019ab079a648ef19427dcf80ae4fc50cb32c1
--- Core/Plugins/src/Core.Plugins.Map/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision cbde09a1860a8a4480b958d6671de3480b995886)
+++ Core/Plugins/src/Core.Plugins.Map/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 06f019ab079a648ef19427dcf80ae4fc50cb32c1)
@@ -40,7 +40,7 @@
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class Resources {
@@ -92,15 +92,6 @@
}
///
- /// Looks up a localized string similar to Algemeen.
- ///
- public static string Categories_General {
- get {
- return ResourceManager.GetString("Categories_General", resourceCulture);
- }
- }
-
- ///
/// Looks up a localized string similar to Labels.
///
public static string Categories_Label {
@@ -787,33 +778,6 @@
}
///
- /// Looks up a localized string similar to Kaarten.
- ///
- public static string Ribbon_ContextualGroup_Map {
- get {
- return ResourceManager.GetString("Ribbon_ContextualGroup_Map", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Navigatie.
- ///
- public static string Ribbon_GroupBox_Navigation {
- get {
- return ResourceManager.GetString("Ribbon_GroupBox_Navigation", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Hulpmiddelen.
- ///
- public static string Ribbon_GroupBox_Tools {
- get {
- return ResourceManager.GetString("Ribbon_GroupBox_Tools", resourceCulture);
- }
- }
-
- ///
/// Looks up a localized string similar to Toon coördinaten.
///
public static string Ribbon_Toggle_Coordinates {
Index: Core/Plugins/src/Core.Plugins.Map/Properties/Resources.resx
===================================================================
diff -u -r02ec21cee69eb91a172db6cb5bb2989cc5e2fe9c -r06f019ab079a648ef19427dcf80ae4fc50cb32c1
--- Core/Plugins/src/Core.Plugins.Map/Properties/Resources.resx (.../Resources.resx) (revision 02ec21cee69eb91a172db6cb5bb2989cc5e2fe9c)
+++ Core/Plugins/src/Core.Plugins.Map/Properties/Resources.resx (.../Resources.resx) (revision 06f019ab079a648ef19427dcf80ae4fc50cb32c1)
@@ -124,9 +124,6 @@
..\Resources\map.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-
- Kaarten
-
Kaart
@@ -154,9 +151,6 @@
..\Resources\zoomrectangle.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-
- Navigatie
-
Zoom door rechthoek
@@ -175,9 +169,6 @@
..\Resources\map-pin.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-
- Hulpmiddelen
-
Toon coördinaten
@@ -193,9 +184,6 @@
..\Resources\map--plus.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-
- Algemeen
-
De naam van deze kaartlaag.
Index: Core/Plugins/test/Core.Plugins.Map.Test/MapPluginTest.cs
===================================================================
diff -u -rcbde09a1860a8a4480b958d6671de3480b995886 -r06f019ab079a648ef19427dcf80ae4fc50cb32c1
--- Core/Plugins/test/Core.Plugins.Map.Test/MapPluginTest.cs (.../MapPluginTest.cs) (revision cbde09a1860a8a4480b958d6671de3480b995886)
+++ Core/Plugins/test/Core.Plugins.Map.Test/MapPluginTest.cs (.../MapPluginTest.cs) (revision 06f019ab079a648ef19427dcf80ae4fc50cb32c1)
@@ -266,18 +266,15 @@
var view = new TestMapView();
IViewHost guiViewHost = gui.ViewHost;
MapLegendView mapLegendView = guiViewHost.ToolViews.OfType().First();
- var mapRibbon = (MapRibbon) plugin.RibbonCommandHandler;
// Precondition
Assert.IsNull(GetMapControl(mapLegendView));
- Assert.IsNull(GetMapControl(mapRibbon));
// When
guiViewHost.AddDocumentView(view);
// Then
Assert.AreSame(view.Map, GetMapControl(mapLegendView));
- Assert.AreSame(view.Map, GetMapControl(mapRibbon));
}
Dispatcher.CurrentDispatcher.InvokeShutdown();
@@ -310,21 +307,18 @@
var view2 = new TestMapView();
IViewHost guiViewHost = gui.ViewHost;
MapLegendView mapLegendView = guiViewHost.ToolViews.OfType().First();
- var mapRibbon = (MapRibbon) plugin.RibbonCommandHandler;
guiViewHost.AddDocumentView(view1);
guiViewHost.AddDocumentView(view2);
// Precondition
Assert.AreSame(view2.Map, GetMapControl(mapLegendView));
- Assert.AreSame(view2.Map, GetMapControl(mapRibbon));
// When
guiViewHost.BringToFront(view1);
// Then
Assert.AreSame(view1.Map, GetMapControl(mapLegendView));
- Assert.AreSame(view1.Map, GetMapControl(mapRibbon));
}
Dispatcher.CurrentDispatcher.InvokeShutdown();
@@ -356,20 +350,17 @@
var view = new TestMapView();
IViewHost guiViewHost = gui.ViewHost;
MapLegendView mapLegendView = guiViewHost.ToolViews.OfType().First();
- var mapRibbon = (MapRibbon) plugin.RibbonCommandHandler;
guiViewHost.AddDocumentView(view);
// Precondition
Assert.AreSame(view.Map, GetMapControl(mapLegendView));
- Assert.AreSame(view.Map, GetMapControl(mapRibbon));
// When
guiViewHost.Remove(view);
// Then
Assert.IsNull(GetMapControl(mapLegendView));
- Assert.IsNull(GetMapControl(mapRibbon));
}
Dispatcher.CurrentDispatcher.InvokeShutdown();
@@ -402,32 +393,24 @@
var view2 = new TestMapView();
IViewHost guiViewHost = gui.ViewHost;
MapLegendView mapLegendView = guiViewHost.ToolViews.OfType().First();
- var mapRibbon = (MapRibbon) plugin.RibbonCommandHandler;
guiViewHost.AddDocumentView(view1);
guiViewHost.AddDocumentView(view2);
// Precondition
Assert.AreSame(view2.Map, GetMapControl(mapLegendView));
- Assert.AreSame(view2.Map, GetMapControl(mapRibbon));
// When
guiViewHost.Remove(view1);
// Then
Assert.AreSame(view2.Map, GetMapControl(mapLegendView));
- Assert.AreSame(view2.Map, GetMapControl(mapRibbon));
}
Dispatcher.CurrentDispatcher.InvokeShutdown();
mocks.VerifyAll();
}
- private static IMapControl GetMapControl(MapRibbon mapRibbon)
- {
- return TypeUtils.GetProperty(mapRibbon, "Map");
- }
-
private static IMapControl GetMapControl(MapLegendView mapLegendView)
{
return TypeUtils.GetProperty(mapLegendView, "MapControl");
Fisheye: Tag 06f019ab079a648ef19427dcf80ae4fc50cb32c1 refers to a dead (removed) revision in file `Core/Plugins/test/Core.Plugins.Map.Test/MapRibbonTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?