Index: Core/Common/src/Core.Common.Gui.Swf/Core.Common.Gui.Swf.csproj =================================================================== diff -u -r3f1a2b8718a744b49b160c89df46dee6b7fb5fdd -r44fce3b0d8942914f2678d8e33ca99646cf8062f --- Core/Common/src/Core.Common.Gui.Swf/Core.Common.Gui.Swf.csproj (.../Core.Common.Gui.Swf.csproj) (revision 3f1a2b8718a744b49b160c89df46dee6b7fb5fdd) +++ Core/Common/src/Core.Common.Gui.Swf/Core.Common.Gui.Swf.csproj (.../Core.Common.Gui.Swf.csproj) (revision 44fce3b0d8942914f2678d8e33ca99646cf8062f) @@ -1,4 +1,4 @@ - + @@ -88,7 +88,6 @@ Resources.resx - Component Fisheye: Tag 44fce3b0d8942914f2678d8e33ca99646cf8062f refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui.Swf/TreeViewNodePresenterBaseForPluginGui.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Core/Common/src/Core.Common.Gui/GuiPlugin.cs =================================================================== diff -u -r074232b001ecb5ae110c0b95c05264d4372cbfb5 -r44fce3b0d8942914f2678d8e33ca99646cf8062f --- Core/Common/src/Core.Common.Gui/GuiPlugin.cs (.../GuiPlugin.cs) (revision 074232b001ecb5ae110c0b95c05264d4372cbfb5) +++ Core/Common/src/Core.Common.Gui/GuiPlugin.cs (.../GuiPlugin.cs) (revision 44fce3b0d8942914f2678d8e33ca99646cf8062f) @@ -62,14 +62,6 @@ } /// - /// Context menu which can be provided by the gui plugin. - /// - public virtual ContextMenuStrip GetContextMenu(object sender, object data) - { - return null; - } - - /// /// Node presenters which can be provided by the gui plugin. /// public virtual IEnumerable GetProjectTreeViewNodePresenters() Index: Core/GIS/src/Core.GIS.SharpMap/Core.GIS.SharpMap.csproj =================================================================== diff -u -r3f1a2b8718a744b49b160c89df46dee6b7fb5fdd -r44fce3b0d8942914f2678d8e33ca99646cf8062f --- Core/GIS/src/Core.GIS.SharpMap/Core.GIS.SharpMap.csproj (.../Core.GIS.SharpMap.csproj) (revision 3f1a2b8718a744b49b160c89df46dee6b7fb5fdd) +++ Core/GIS/src/Core.GIS.SharpMap/Core.GIS.SharpMap.csproj (.../Core.GIS.SharpMap.csproj) (revision 44fce3b0d8942914f2678d8e33ca99646cf8062f) @@ -190,8 +190,6 @@ - - @@ -202,20 +200,6 @@ DropdownShapeEditor.cs - - - - - - capabilities_1_3_0.xsd - - - - - - - exceptions_1_3_0.xsd - Fisheye: Tag 44fce3b0d8942914f2678d8e33ca99646cf8062f refers to a dead (removed) revision in file `Core/GIS/src/Core.GIS.SharpMap/Web/Wms/Capabilities.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 44fce3b0d8942914f2678d8e33ca99646cf8062f refers to a dead (removed) revision in file `Core/GIS/src/Core.GIS.SharpMap/Web/Wms/Client.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 44fce3b0d8942914f2678d8e33ca99646cf8062f refers to a dead (removed) revision in file `Core/GIS/src/Core.GIS.SharpMap/Web/Wms/Schemas/1.3.0/capabilities_1_3_0.xsd'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 44fce3b0d8942914f2678d8e33ca99646cf8062f refers to a dead (removed) revision in file `Core/GIS/src/Core.GIS.SharpMap/Web/Wms/Schemas/1.3.0/capabilities_1_3_0.xsx'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 44fce3b0d8942914f2678d8e33ca99646cf8062f refers to a dead (removed) revision in file `Core/GIS/src/Core.GIS.SharpMap/Web/Wms/Schemas/1.3.0/exceptions_1_3_0.xsd'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 44fce3b0d8942914f2678d8e33ca99646cf8062f refers to a dead (removed) revision in file `Core/GIS/src/Core.GIS.SharpMap/Web/Wms/Schemas/1.3.0/exceptions_1_3_0.xsx'. Fisheye: No comparison available. Pass `N' to diff? Index: Core/Plugins/src/Core.Plugins.CommonTools.Gui/Forms/Charting/ChartLegendView.cs =================================================================== diff -u -ref35125104cc8b0201f9c961049cc6c8a30fb74d -r44fce3b0d8942914f2678d8e33ca99646cf8062f --- Core/Plugins/src/Core.Plugins.CommonTools.Gui/Forms/Charting/ChartLegendView.cs (.../ChartLegendView.cs) (revision ef35125104cc8b0201f9c961049cc6c8a30fb74d) +++ Core/Plugins/src/Core.Plugins.CommonTools.Gui/Forms/Charting/ChartLegendView.cs (.../ChartLegendView.cs) (revision 44fce3b0d8942914f2678d8e33ca99646cf8062f) @@ -29,8 +29,8 @@ }; treeView.SelectedNodeChanged += TreeViewSelectedNodeChanged; - treeView.RegisterNodePresenter(new ChartTreeNodePresenter(guiPlugin)); - treeView.RegisterNodePresenter(new ChartSeriesTreeNodePresenter(guiPlugin)); + treeView.RegisterNodePresenter(new ChartTreeNodePresenter()); + treeView.RegisterNodePresenter(new ChartSeriesTreeNodePresenter()); UpdateButtons(); } Index: Core/Plugins/src/Core.Plugins.CommonTools.Gui/Forms/Charting/ChartSeriesTreeNodePresenter.cs =================================================================== diff -u -r074232b001ecb5ae110c0b95c05264d4372cbfb5 -r44fce3b0d8942914f2678d8e33ca99646cf8062f --- Core/Plugins/src/Core.Plugins.CommonTools.Gui/Forms/Charting/ChartSeriesTreeNodePresenter.cs (.../ChartSeriesTreeNodePresenter.cs) (revision 074232b001ecb5ae110c0b95c05264d4372cbfb5) +++ Core/Plugins/src/Core.Plugins.CommonTools.Gui/Forms/Charting/ChartSeriesTreeNodePresenter.cs (.../ChartSeriesTreeNodePresenter.cs) (revision 44fce3b0d8942914f2678d8e33ca99646cf8062f) @@ -3,16 +3,12 @@ using Core.Common.Controls.Swf.Charting; using Core.Common.Controls.Swf.Charting.Series; using Core.Common.Controls.Swf.TreeViewControls; -using Core.Common.Gui; -using Core.Common.Gui.Swf; using Core.Plugins.CommonTools.Gui.Properties; namespace Core.Plugins.CommonTools.Gui.Forms.Charting { - internal class ChartSeriesTreeNodePresenter : TreeViewNodePresenterBaseForPluginGui + internal class ChartSeriesTreeNodePresenter : TreeViewNodePresenterBase { - public ChartSeriesTreeNodePresenter(GuiPlugin guiPlugin) : base(guiPlugin) {} - public override bool CanRenameNode(ITreeNode node) { return true; Index: Core/Plugins/src/Core.Plugins.CommonTools.Gui/Forms/Charting/ChartTreeNodePresenter.cs =================================================================== diff -u -r529c5b708080eb65abba0502d79869fe549e035a -r44fce3b0d8942914f2678d8e33ca99646cf8062f --- Core/Plugins/src/Core.Plugins.CommonTools.Gui/Forms/Charting/ChartTreeNodePresenter.cs (.../ChartTreeNodePresenter.cs) (revision 529c5b708080eb65abba0502d79869fe549e035a) +++ Core/Plugins/src/Core.Plugins.CommonTools.Gui/Forms/Charting/ChartTreeNodePresenter.cs (.../ChartTreeNodePresenter.cs) (revision 44fce3b0d8942914f2678d8e33ca99646cf8062f) @@ -3,16 +3,12 @@ using Core.Common.Controls; using Core.Common.Controls.Swf.Charting; using Core.Common.Controls.Swf.TreeViewControls; -using Core.Common.Gui; -using Core.Common.Gui.Swf; using Core.Plugins.CommonTools.Gui.Properties; namespace Core.Plugins.CommonTools.Gui.Forms.Charting { - public class ChartTreeNodePresenter : TreeViewNodePresenterBaseForPluginGui + public class ChartTreeNodePresenter : TreeViewNodePresenterBase { - public ChartTreeNodePresenter(GuiPlugin guiPlugin) : base(guiPlugin) {} - public override bool CanRenameNode(ITreeNode node) { return true; Index: Core/Plugins/src/Core.Plugins.ProjectExplorer/NodePresenters/TreeFolderNodePresenter.cs =================================================================== diff -u -r074232b001ecb5ae110c0b95c05264d4372cbfb5 -r44fce3b0d8942914f2678d8e33ca99646cf8062f --- Core/Plugins/src/Core.Plugins.ProjectExplorer/NodePresenters/TreeFolderNodePresenter.cs (.../TreeFolderNodePresenter.cs) (revision 074232b001ecb5ae110c0b95c05264d4372cbfb5) +++ Core/Plugins/src/Core.Plugins.ProjectExplorer/NodePresenters/TreeFolderNodePresenter.cs (.../TreeFolderNodePresenter.cs) (revision 44fce3b0d8942914f2678d8e33ca99646cf8062f) @@ -1,16 +1,12 @@ using System.Collections; using System.Drawing; -using Core.Common.Controls; using Core.Common.Controls.Swf.TreeViewControls; -using Core.Common.Gui; using Core.Common.Gui.Swf; namespace Core.Plugins.ProjectExplorer.NodePresenters { - public class TreeFolderNodePresenter : TreeViewNodePresenterBaseForPluginGui + public class TreeFolderNodePresenter : TreeViewNodePresenterBase { - public TreeFolderNodePresenter(GuiPlugin guiPlugin) : base(guiPlugin) {} - public override void UpdateNode(ITreeNode parentNode, ITreeNode node, TreeFolder data) { node.Text = data.Text; Index: Core/Plugins/src/Core.Plugins.ProjectExplorer/ProjectTreeView.cs =================================================================== diff -u -ref35125104cc8b0201f9c961049cc6c8a30fb74d -r44fce3b0d8942914f2678d8e33ca99646cf8062f --- Core/Plugins/src/Core.Plugins.ProjectExplorer/ProjectTreeView.cs (.../ProjectTreeView.cs) (revision ef35125104cc8b0201f9c961049cc6c8a30fb74d) +++ Core/Plugins/src/Core.Plugins.ProjectExplorer/ProjectTreeView.cs (.../ProjectTreeView.cs) (revision 44fce3b0d8942914f2678d8e33ca99646cf8062f) @@ -58,7 +58,7 @@ gui.SelectionChanged += GuiSelectionChanged; - var treeFolderNodePresenter = new TreeFolderNodePresenter(guiPlugin); + var treeFolderNodePresenter = new TreeFolderNodePresenter(); treeView.RegisterNodePresenter(treeFolderNodePresenter); } Index: Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/MapLegendView/MapLayerTreeViewNodePresenter.cs =================================================================== diff -u -r529c5b708080eb65abba0502d79869fe549e035a -r44fce3b0d8942914f2678d8e33ca99646cf8062f --- Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/MapLegendView/MapLayerTreeViewNodePresenter.cs (.../MapLayerTreeViewNodePresenter.cs) (revision 529c5b708080eb65abba0502d79869fe549e035a) +++ Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/MapLegendView/MapLayerTreeViewNodePresenter.cs (.../MapLayerTreeViewNodePresenter.cs) (revision 44fce3b0d8942914f2678d8e33ca99646cf8062f) @@ -2,20 +2,24 @@ using System.Collections; using System.ComponentModel; using System.Linq; +using System.Windows.Forms; using Core.Common.Controls; using Core.Common.Controls.Swf.TreeViewControls; -using Core.Common.Gui; -using Core.Common.Gui.Swf; using Core.GIS.SharpMap.Api.Layers; using Core.GIS.SharpMap.Layers; using Core.GIS.SharpMap.Map; namespace Core.Plugins.SharpMapGis.Gui.Forms.MapLegendView { - public class MapLayerTreeViewNodePresenter : TreeViewNodePresenterBaseForPluginGui + public class MapLayerTreeViewNodePresenter : TreeViewNodePresenterBase { - public MapLayerTreeViewNodePresenter(GuiPlugin guiPlugin) : base(guiPlugin) {} + private MapLegendView contextMenuProvider; + public MapLayerTreeViewNodePresenter(MapLegendView legend) + { + this.contextMenuProvider = legend; + } + public override bool CanRenameNode(ITreeNode node) { var layer = (ILayer) node.Tag; @@ -141,6 +145,11 @@ } } + public override ContextMenuStrip GetContextMenu(ITreeNode node, object nodeData) + { + return contextMenuProvider.GetContextMenu(nodeData); + } + protected override bool CanRemove(ILayer nodeData) { var parentNode = TreeView.GetNodeByTag(nodeData).Parent; Index: Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/MapLegendView/MapLegendView.Designer.cs =================================================================== diff -u -r31595e2aa87c2cb7e23fb07cd3f04d219bfd15fd -r44fce3b0d8942914f2678d8e33ca99646cf8062f --- Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/MapLegendView/MapLegendView.Designer.cs (.../MapLegendView.Designer.cs) (revision 31595e2aa87c2cb7e23fb07cd3f04d219bfd15fd) +++ Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/MapLegendView/MapLegendView.Designer.cs (.../MapLegendView.Designer.cs) (revision 44fce3b0d8942914f2678d8e33ca99646cf8062f) @@ -39,36 +39,33 @@ this.buttonAddLayer = new System.Windows.Forms.ToolStripButton(); this.buttonRemoveLayer = new System.Windows.Forms.ToolStripButton(); this.contextMenuLayer = new System.Windows.Forms.ContextMenuStrip(this.components); - this.contextMenuLayerOpenAttributeTable = new ToolStripMenuItem(); + this.contextMenuLayerOpenAttributeTable = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripSeparator(); - this.contextMenuLayerDelete = new ToolStripMenuItem(); - this.contextMenuLayerRename = new ToolStripMenuItem(); + this.contextMenuLayerDelete = new System.Windows.Forms.ToolStripMenuItem(); + this.contextMenuLayerRename = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator(); this.orderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.bringToFrontToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.sendToBackToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator(); this.bringForwardToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.sendBackwardToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.zoomToLayerToolStripMenuItem1 = new ToolStripMenuItem(); - this.zoomToMapExtentsToolStripMenuItem1 = new ToolStripMenuItem(); + this.zoomToLayerToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.zoomToMapExtentsToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); - this.showLabelsToolStripMenuItem = new ToolStripMenuItem(); - this.showInLegendToolStripMenuItem = new ToolStripMenuItem(); - this.hideAllButThisOneToolStripMenuItem = new ToolStripMenuItem(); + this.showLabelsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.showInLegendToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.hideAllButThisOneToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.TreeView = new Core.Common.Controls.Swf.TreeViewControls.TreeView(); - this.contextMenuWmsLayer = new System.Windows.Forms.ContextMenuStrip(this.components); - this.zoomToLayerToolStripMenuItem = new ToolStripMenuItem(); this.contextMenuMap = new System.Windows.Forms.ContextMenuStrip(this.components); - this.addLayerToolStripMenuItem = new ToolStripMenuItem(); - this.addLayergroupToolStripMenuItem = new ToolStripMenuItem(); + this.addLayerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.addLayergroupToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator(); - this.zoomToExtentsToolStripMenuItem = new ToolStripMenuItem(); - this.zoomToMapExtentsToolStripMenuItem = new ToolStripMenuItem(); + this.zoomToExtentsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.zoomToMapExtentsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.changeCoordinateSystemToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStrip1.SuspendLayout(); this.contextMenuLayer.SuspendLayout(); - this.contextMenuWmsLayer.SuspendLayout(); this.contextMenuMap.SuspendLayout(); this.SuspendLayout(); // @@ -250,19 +247,6 @@ this.TreeView.Name = "TreeView"; this.TreeView.SelectNodeOnRightMouseClick = true; // - // contextMenuWmsLayer - // - this.contextMenuWmsLayer.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.zoomToLayerToolStripMenuItem}); - this.contextMenuWmsLayer.Name = "contextMenuLayer"; - resources.ApplyResources(this.contextMenuWmsLayer, "contextMenuWmsLayer"); - // - // zoomToLayerToolStripMenuItem - // - this.zoomToLayerToolStripMenuItem.Name = "zoomToLayerToolStripMenuItem"; - resources.ApplyResources(this.zoomToLayerToolStripMenuItem, "zoomToLayerToolStripMenuItem"); - this.zoomToLayerToolStripMenuItem.Click += new System.EventHandler(this.ZoomToLayerToolStripMenuItemClick); - // // contextMenuMap // this.contextMenuMap.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -322,7 +306,6 @@ this.toolStrip1.ResumeLayout(false); this.toolStrip1.PerformLayout(); this.contextMenuLayer.ResumeLayout(false); - this.contextMenuWmsLayer.ResumeLayout(false); this.contextMenuMap.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); @@ -342,8 +325,6 @@ private ToolStripMenuItem contextMenuLayerOpenAttributeTable; private System.Windows.Forms.ToolStripSeparator toolStripMenuItem2; private System.Windows.Forms.ToolStripButton buttonAddWmsLayer; - private System.Windows.Forms.ContextMenuStrip contextMenuWmsLayer; - private ToolStripMenuItem zoomToLayerToolStripMenuItem; private System.Windows.Forms.ContextMenuStrip contextMenuMap; private ToolStripMenuItem addLayerToolStripMenuItem; private ToolStripMenuItem zoomToLayerToolStripMenuItem1; Index: Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/MapLegendView/MapLegendView.cs =================================================================== diff -u -r5e8f24c2eade934e5e8ff0f4f510eb5fbd40ac67 -r44fce3b0d8942914f2678d8e33ca99646cf8062f --- Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/MapLegendView/MapLegendView.cs (.../MapLegendView.cs) (revision 5e8f24c2eade934e5e8ff0f4f510eb5fbd40ac67) +++ Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/MapLegendView/MapLegendView.cs (.../MapLegendView.cs) (revision 44fce3b0d8942914f2678d8e33ca99646cf8062f) @@ -5,15 +5,13 @@ using System.Linq; using System.Windows.Forms; using Core.Common.Controls; -using Core.Common.Controls.Swf; using Core.Common.Controls.Swf.TreeViewControls; using Core.Common.Gui; using Core.GIS.GeoAPI.CoordinateSystems; using Core.GIS.SharpMap.Api.Layers; using Core.GIS.SharpMap.Extensions.Layers; using Core.GIS.SharpMap.Layers; using Core.GIS.SharpMap.Map; -using Core.GIS.SharpMap.Web.Wms; using Core.Plugins.SharpMapGis.Gui.Commands; using Core.Plugins.SharpMapGis.Gui.Properties; using log4net; @@ -24,7 +22,6 @@ { private static readonly ILog Log = LogManager.GetLogger(typeof(MapLegendView)); private readonly IGui gui; - private readonly IGisGuiService gisService; public Action OnOpenLayerAttributeTable = layer => { }; @@ -35,15 +32,12 @@ { InitializeComponent(); - var guiPlugin = gui.Plugins.OfType().FirstOrDefault(); // this is bad, refactor it to depend only on simple interfaces - gisService = guiPlugin.GisGuiService; - this.gui = gui; - var mapTreeViewNodePresenter = new MapTreeViewNodePresenter(guiPlugin); - var mapLayerTreeViewNodePresenter = new MapLayerTreeViewNodePresenter(guiPlugin); + var mapTreeViewNodePresenter = new MapTreeViewNodePresenter(this); + var mapLayerTreeViewNodePresenter = new MapLayerTreeViewNodePresenter(this); var mapLayerLegendStyleTreeViewNodePresenter = new VectorStyleTreeViewNodePresenter(); - var themeItemTreeViewNodePresenter = new ThemeItemTreeViewNodePresenter(guiPlugin); + var themeItemTreeViewNodePresenter = new ThemeItemTreeViewNodePresenter(); TreeView.RegisterNodePresenter(mapTreeViewNodePresenter); TreeView.RegisterNodePresenter(mapLayerTreeViewNodePresenter); @@ -108,10 +102,6 @@ { return contextMenuLayer; } - if (nodeTag is Client.WmsServerLayer) - { - return contextMenuWmsLayer; - } if (nodeTag is Map) { return contextMenuMap; @@ -422,17 +412,6 @@ gui.Selection = ((ITreeNode) e.Node).Tag; } - private void ZoomToLayerToolStripMenuItemClick(object sender, EventArgs e) - { - var tag = TreeView.SelectedNode.Tag; - if (tag is Client.WmsServerLayer) - { - var layer = (Client.WmsServerLayer) tag; - var layerEnvelope = layer.LatLonBoundingBox; - gisService.ZoomCurrentMapToEnvelope(layerEnvelope); - } - } - private void AddLayerToolStripMenuItemClick(object sender, EventArgs e) { AddLayer(); Index: Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/MapLegendView/MapLegendView.resx =================================================================== diff -u -r555c08c6f506516d96076f33c1d6d4c4217b2a1c -r44fce3b0d8942914f2678d8e33ca99646cf8062f --- Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/MapLegendView/MapLegendView.resx (.../MapLegendView.resx) (revision 555c08c6f506516d96076f33c1d6d4c4217b2a1c) +++ Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/MapLegendView/MapLegendView.resx (.../MapLegendView.resx) (revision 44fce3b0d8942914f2678d8e33ca99646cf8062f) @@ -117,18 +117,18 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - + 160, 17 - + None + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsIAAA7CARUoSoAAAALQSURBVDhPhZJ7TI1xGMff4d/8YzMZmWyWZLRJiuxMF0qU + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAALQSURBVDhPhZJ7TI1xGMff4d/8YzMZmWyWZLRJiuxMF0qU nJY1m0PFW5GMmrSQSyldzlplWtdlRBfVSdONN+VylDqlKRXK6jTV5tZFs/XRe2LtsPHdvnv27LfP9/fs 2SP8KVHanhEoOQyIkt2Yn2TX4Fuz0fzX0791Uav0v9V6YvLbxBOGvnbRPtDLozeNxD+JJOi+M6oCzxkr 8MxVoBA3EHrHm1+oIJyfgbtG08egF/hM16dhtB/HyG4ZJaPxFcVtOZx+4I76+QUDHKYJmoNlpXYGTY1Q @@ -158,7 +158,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsIAAA7CARUoSoAAAAGqSURBVDhPrZHNK4RBHMfnH1g5CeHiIlKraEO05SZlCzka + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGqSURBVDhPrZHNK4RBHMfnH1g5CeHiIlKraEO05SZlCzka 8rK4PBdRkkfCwbJPsrWFmgO1UnpYaS2H3YvEweMl7XFXWXLQXuTma2ae9bI9i5JvfZqZw+f3m98M+ff4 TmehRhSTEIUi0F2gAYETLuaE022HstmBtPIZdr4M9UQBi7EvaBLNUKGdqFIeCQ5Z5Y2LFdn1T7Ls/K1s FhDyZCiL7DsdBeVzUp3D53T5ORpH5bOOcZT0zMwOI5CLeIDA0Ajuzmasxe7vDCSibUg9MKRSuonYxzWO @@ -183,7 +183,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsIAAA7CARUoSoAAAAGkSURBVDhPrZExSAJhGIYvtN22VqGWanAuq6M5QYigtqMa + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGkSURBVDhPrZExSAJhGIYvtN22VqGWanAuq6M5QYigtqMa xOmIypq8JYcoOCJBiOKvFGyJAwmEInQRK6JriZZAhSwKyiGrybfvv7vKOI2IPnjgX573+15+4d8nehKB kpFN0hJkjuaHlOSI8DMRYsADeXcUlvI17HwNSl4Gu2J1qAaqrkDNK4Y8mwra5cTFurH1T7KxualsBnA5 nG4gR09CkKinpBHU0x8jVEKhrvOEbHVmHuhJFwpJAboq4OZ00R52e6OjmB1B5Y6hUtFM+LugEgoqumTI @@ -228,11 +228,11 @@ $this - 4 + 3 - + 25, 15 - + 269, 22 @@ -257,6 +257,33 @@ 266, 6 + + 246, 22 + + + Op de voorgrond plaatsen + + + 246, 22 + + + Naar de achtergrond verplaatsen + + + 243, 6 + + + 246, 22 + + + Naar voren halen + + + 246, 22 + + + Naar achteren sturen + 269, 22 @@ -297,41 +324,14 @@ Alle andere lagen verbergen - 270, 220 + 270, 242 contextMenuLayer System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 237, 22 - - - Op de voorgrond plaatsen - - - 246, 22 - - - Naar de achtergrond verplaatsen - - - 234, 6 - - - 237, 22 - - - Naar voren halen - - - 237, 22 - - - Naar achteren sturen - Fill @@ -354,44 +354,17 @@ TreeView - Core.Common.Controls.Swf.TreeViewControls.TreeView, Core.Common.Controls.Swf, Version=0.5.0.830, Culture=neutral, PublicKeyToken=null + Core.Common.Controls.Swf.TreeViewControls.TreeView, Core.Common.Controls.Swf, Version=0.5.0.1297, Culture=neutral, PublicKeyToken=null $this - 3 + 2 - - 259, 17 - - - 158, 26 - - - contextMenuWmsLayer - - - System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 157, 22 - - - Zoom naar laag - - - 426, 17 - - - 269, 120 - - - contextMenuMap - - - System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + 274, 11 + 268, 22 @@ -425,9 +398,18 @@ Veranderen kaartcoördinatenstelsel... - - True + + 269, 120 + + contextMenuMap + + + System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + 6, 13 @@ -456,7 +438,7 @@ contextMenuLayerOpenAttributeTable - Core.Common.Controls.Swf.ClonableToolStripMenuItem, Core.Common.Controls.Swf, Version=0.5.0.830, Culture=neutral, PublicKeyToken=null + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 toolStripMenuItem2 @@ -468,13 +450,13 @@ contextMenuLayerDelete - Core.Common.Controls.Swf.ClonableToolStripMenuItem, Core.Common.Controls.Swf, Version=0.5.0.830, Culture=neutral, PublicKeyToken=null + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 contextMenuLayerRename - Core.Common.Controls.Swf.ClonableToolStripMenuItem, Core.Common.Controls.Swf, Version=0.5.0.830, Culture=neutral, PublicKeyToken=null + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 toolStripMenuItem1 @@ -522,13 +504,13 @@ zoomToLayerToolStripMenuItem1 - Core.Common.Controls.Swf.ClonableToolStripMenuItem, Core.Common.Controls.Swf, Version=0.5.0.830, Culture=neutral, PublicKeyToken=null + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 zoomToMapExtentsToolStripMenuItem1 - Core.Common.Controls.Swf.ClonableToolStripMenuItem, Core.Common.Controls.Swf, Version=0.5.0.830, Culture=neutral, PublicKeyToken=null + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 toolStripSeparator2 @@ -540,37 +522,31 @@ showLabelsToolStripMenuItem - Core.Common.Controls.Swf.ClonableToolStripMenuItem, Core.Common.Controls.Swf, Version=0.5.0.830, Culture=neutral, PublicKeyToken=null + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 showInLegendToolStripMenuItem - Core.Common.Controls.Swf.ClonableToolStripMenuItem, Core.Common.Controls.Swf, Version=0.5.0.830, Culture=neutral, PublicKeyToken=null + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 hideAllButThisOneToolStripMenuItem - Core.Common.Controls.Swf.ClonableToolStripMenuItem, Core.Common.Controls.Swf, Version=0.5.0.830, Culture=neutral, PublicKeyToken=null + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - zoomToLayerToolStripMenuItem - - - Core.Common.Controls.Swf.ClonableToolStripMenuItem, Core.Common.Controls.Swf, Version=0.5.0.830, Culture=neutral, PublicKeyToken=null - addLayerToolStripMenuItem - Core.Common.Controls.Swf.ClonableToolStripMenuItem, Core.Common.Controls.Swf, Version=0.5.0.830, Culture=neutral, PublicKeyToken=null + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 addLayergroupToolStripMenuItem - Core.Common.Controls.Swf.ClonableToolStripMenuItem, Core.Common.Controls.Swf, Version=0.5.0.830, Culture=neutral, PublicKeyToken=null + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 toolStripSeparator4 @@ -582,13 +558,13 @@ zoomToExtentsToolStripMenuItem - Core.Common.Controls.Swf.ClonableToolStripMenuItem, Core.Common.Controls.Swf, Version=0.5.0.830, Culture=neutral, PublicKeyToken=null + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 zoomToMapExtentsToolStripMenuItem - Core.Common.Controls.Swf.ClonableToolStripMenuItem, Core.Common.Controls.Swf, Version=0.5.0.830, Culture=neutral, PublicKeyToken=null + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 changeCoordinateSystemToolStripMenuItem Index: Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/MapLegendView/MapTreeViewNodePresenter.cs =================================================================== diff -u -r528577e7cac9c86626794fafc6c6c147146c5e84 -r44fce3b0d8942914f2678d8e33ca99646cf8062f --- Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/MapLegendView/MapTreeViewNodePresenter.cs (.../MapTreeViewNodePresenter.cs) (revision 528577e7cac9c86626794fafc6c6c147146c5e84) +++ Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/MapLegendView/MapTreeViewNodePresenter.cs (.../MapTreeViewNodePresenter.cs) (revision 44fce3b0d8942914f2678d8e33ca99646cf8062f) @@ -3,22 +3,26 @@ using System.ComponentModel; using System.Drawing; using System.Linq; +using System.Windows.Forms; using Core.Common.Controls; using Core.Common.Controls.Swf.TreeViewControls; -using Core.Common.Gui; -using Core.Common.Gui.Swf; using Core.GIS.SharpMap.Api.Layers; using Core.GIS.SharpMap.Layers; using Core.GIS.SharpMap.Map; using Core.Plugins.SharpMapGis.Gui.Properties; namespace Core.Plugins.SharpMapGis.Gui.Forms.MapLegendView { - public class MapTreeViewNodePresenter : TreeViewNodePresenterBaseForPluginGui + public class MapTreeViewNodePresenter : TreeViewNodePresenterBase { private static readonly Bitmap MapIcon = Resources.Map; + + private MapLegendView contextMenuProvider; - public MapTreeViewNodePresenter(GuiPlugin guiPlugin) : base(guiPlugin) {} + public MapTreeViewNodePresenter(MapLegendView mapLegend) + { + contextMenuProvider = mapLegend; + } public override bool CanRenameNode(ITreeNode node) { @@ -95,6 +99,11 @@ } } + public override ContextMenuStrip GetContextMenu(ITreeNode node, object nodeData) + { + return contextMenuProvider.GetContextMenu(nodeData); + } + protected override void OnPropertyChanged(Map map, ITreeNode node, PropertyChangedEventArgs e) { if (node == null) Index: Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/MapLegendView/ThemeItemTreeViewNodePresenter.cs =================================================================== diff -u -r074232b001ecb5ae110c0b95c05264d4372cbfb5 -r44fce3b0d8942914f2678d8e33ca99646cf8062f --- Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/MapLegendView/ThemeItemTreeViewNodePresenter.cs (.../ThemeItemTreeViewNodePresenter.cs) (revision 074232b001ecb5ae110c0b95c05264d4372cbfb5) +++ Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/MapLegendView/ThemeItemTreeViewNodePresenter.cs (.../ThemeItemTreeViewNodePresenter.cs) (revision 44fce3b0d8942914f2678d8e33ca99646cf8062f) @@ -1,17 +1,12 @@ using System.ComponentModel; -using Core.Common.Controls; using Core.Common.Controls.Swf.TreeViewControls; -using Core.Common.Gui; -using Core.Common.Gui.Swf; using Core.GIS.SharpMap.Api; using Core.GIS.SharpMap.Styles; namespace Core.Plugins.SharpMapGis.Gui.Forms.MapLegendView { - public class ThemeItemTreeViewNodePresenter : TreeViewNodePresenterBaseForPluginGui + public class ThemeItemTreeViewNodePresenter : TreeViewNodePresenterBase { - public ThemeItemTreeViewNodePresenter(GuiPlugin guiPlugin) : base(guiPlugin) {} - public override void UpdateNode(ITreeNode parentNode, ITreeNode node, IThemeItem themeItem) { if (node.Text != themeItem.Label) Index: Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/MapLegendView/VectorStyleTreeViewNodePresenter.cs =================================================================== diff -u -r074232b001ecb5ae110c0b95c05264d4372cbfb5 -r44fce3b0d8942914f2678d8e33ca99646cf8062f --- Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/MapLegendView/VectorStyleTreeViewNodePresenter.cs (.../VectorStyleTreeViewNodePresenter.cs) (revision 074232b001ecb5ae110c0b95c05264d4372cbfb5) +++ Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Forms/MapLegendView/VectorStyleTreeViewNodePresenter.cs (.../VectorStyleTreeViewNodePresenter.cs) (revision 44fce3b0d8942914f2678d8e33ca99646cf8062f) @@ -1,15 +1,11 @@ using System.ComponentModel; -using Core.Common.Controls; using Core.Common.Controls.Swf.TreeViewControls; -using Core.Common.Gui.Swf; using Core.GIS.SharpMap.Styles; namespace Core.Plugins.SharpMapGis.Gui.Forms.MapLegendView { - public class VectorStyleTreeViewNodePresenter : TreeViewNodePresenterBaseForPluginGui + public class VectorStyleTreeViewNodePresenter : TreeViewNodePresenterBase { - public VectorStyleTreeViewNodePresenter() : base(null) {} - public override void UpdateNode(ITreeNode parentNode, ITreeNode node, VectorStyle style) { if (node.Tag != style) Index: Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/NodePresenters/MapProjectTreeViewNodePresenter.cs =================================================================== diff -u -r529c5b708080eb65abba0502d79869fe549e035a -r44fce3b0d8942914f2678d8e33ca99646cf8062f --- Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/NodePresenters/MapProjectTreeViewNodePresenter.cs (.../MapProjectTreeViewNodePresenter.cs) (revision 529c5b708080eb65abba0502d79869fe549e035a) +++ Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/NodePresenters/MapProjectTreeViewNodePresenter.cs (.../MapProjectTreeViewNodePresenter.cs) (revision 44fce3b0d8942914f2678d8e33ca99646cf8062f) @@ -2,14 +2,13 @@ using Core.Common.Base.Data; using Core.Common.Controls; using Core.Common.Controls.Swf.TreeViewControls; -using Core.Common.Gui.Swf; using Core.GIS.SharpMap.Api.Layers; using Core.GIS.SharpMap.Map; using Core.Plugins.SharpMapGis.Gui.Properties; namespace Core.Plugins.SharpMapGis.Gui.NodePresenters { - public class MapProjectTreeViewNodePresenter : TreeViewNodePresenterBaseForPluginGui + public class MapProjectTreeViewNodePresenter : TreeViewNodePresenterBase { private static readonly Bitmap MapIcon = Resources.Map; Index: Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/SharpMapGisGuiPlugin.cs =================================================================== diff -u -r7e491a8cd7dc86b6ead9f4be9bb32754e16cf302 -r44fce3b0d8942914f2678d8e33ca99646cf8062f --- Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/SharpMapGisGuiPlugin.cs (.../SharpMapGisGuiPlugin.cs) (revision 7e491a8cd7dc86b6ead9f4be9bb32754e16cf302) +++ Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/SharpMapGisGuiPlugin.cs (.../SharpMapGisGuiPlugin.cs) (revision 44fce3b0d8942914f2678d8e33ca99646cf8062f) @@ -257,27 +257,9 @@ }; } - public override ContextMenuStrip GetContextMenu(object sender, object data) - { - //custom treenodes for maplegend view - if (sender is TreeNode) - { - var treeNode = (TreeNode)sender; - if (treeNode.TreeView.Parent == mapLegendView) - { - return mapLegendView != null ? mapLegendView.GetContextMenu(data) : null; - } - } - - return null; - } - public override IEnumerable GetProjectTreeViewNodePresenters() { - yield return new MapProjectTreeViewNodePresenter - { - GuiPlugin = this - }; + yield return new MapProjectTreeViewNodePresenter(); } internal static MapView GetFocusedMapView(IView view = null) Index: Core/Plugins/src/Core.Plugins.SharpMapGis/Properties/Resources.Designer.cs =================================================================== diff -u -r54135385f2c39cad94b80f3ad8197041765c007d -r44fce3b0d8942914f2678d8e33ca99646cf8062f --- Core/Plugins/src/Core.Plugins.SharpMapGis/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 54135385f2c39cad94b80f3ad8197041765c007d) +++ Core/Plugins/src/Core.Plugins.SharpMapGis/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 44fce3b0d8942914f2678d8e33ca99646cf8062f) @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.42000 +// Runtime Version:4.0.30319.34209 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -117,6 +117,15 @@ } /// + /// Looks up a localized string similar to Zoomen tot kaartbereik. + /// + public static string ExportMapToImageMapTool_Zoom_to_extents { + get { + return ResourceManager.GetString("ExportMapToImageMapTool_Zoom_to_extents", resourceCulture); + } + } + + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// public static System.Drawing.Bitmap Map { Index: Core/Plugins/src/Core.Plugins.SharpMapGis/Properties/Resources.resx =================================================================== diff -u -r54135385f2c39cad94b80f3ad8197041765c007d -r44fce3b0d8942914f2678d8e33ca99646cf8062f --- Core/Plugins/src/Core.Plugins.SharpMapGis/Properties/Resources.resx (.../Resources.resx) (revision 54135385f2c39cad94b80f3ad8197041765c007d) +++ Core/Plugins/src/Core.Plugins.SharpMapGis/Properties/Resources.resx (.../Resources.resx) (revision 44fce3b0d8942914f2678d8e33ca99646cf8062f) @@ -142,4 +142,7 @@ ..\Resources\exportIcon.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + Zoomen tot kaartbereik + \ No newline at end of file Index: Core/Plugins/src/Core.Plugins.SharpMapGis/Tools/ExportMapToImageMapTool.cs =================================================================== diff -u -r0aa7cf8c9a9eba3df2f5e9f90d81540fe314c36a -r44fce3b0d8942914f2678d8e33ca99646cf8062f --- Core/Plugins/src/Core.Plugins.SharpMapGis/Tools/ExportMapToImageMapTool.cs (.../ExportMapToImageMapTool.cs) (revision 0aa7cf8c9a9eba3df2f5e9f90d81540fe314c36a) +++ Core/Plugins/src/Core.Plugins.SharpMapGis/Tools/ExportMapToImageMapTool.cs (.../ExportMapToImageMapTool.cs) (revision 44fce3b0d8942914f2678d8e33ca99646cf8062f) @@ -23,7 +23,7 @@ { var name = Resources.ExportMapToImageMapTool_OnBeforeContextMenu_Export_map_as_image; var exportAsImageMenuItem = new ToolStripMenuItem(name, Resources.exportIcon, ExportMapEventHandler); - var zoomToExtentsMenuItem = new ToolStripMenuItem("Zoom to extents", Resources.MapZoomToExtentsImage, (s, e) => Map.ZoomToExtents()); + var zoomToExtentsMenuItem = new ToolStripMenuItem(Resources.ExportMapToImageMapTool_Zoom_to_extents, Resources.MapZoomToExtentsImage, (s, e) => Map.ZoomToExtents()); return new[] { Index: Core/Plugins/test/Core.Plugins.CommonTools.Test/Forms/Charting/ChartTreeNodePresenterTest.cs =================================================================== diff -u -reab6a10ef5444e79f4dddd5babbfcd5892d3d97a -r44fce3b0d8942914f2678d8e33ca99646cf8062f --- Core/Plugins/test/Core.Plugins.CommonTools.Test/Forms/Charting/ChartTreeNodePresenterTest.cs (.../ChartTreeNodePresenterTest.cs) (revision eab6a10ef5444e79f4dddd5babbfcd5892d3d97a) +++ Core/Plugins/test/Core.Plugins.CommonTools.Test/Forms/Charting/ChartTreeNodePresenterTest.cs (.../ChartTreeNodePresenterTest.cs) (revision 44fce3b0d8942914f2678d8e33ca99646cf8062f) @@ -31,7 +31,7 @@ mocks.ReplayAll(); - var nodePresenter = new ChartTreeNodePresenter(guiPlugin) { TreeView = treeView }; + var nodePresenter = new ChartTreeNodePresenter() { TreeView = treeView }; // Call var insertionAllowed = nodePresenter.CanInsert(chart, sourceNode, targetNode); @@ -59,7 +59,7 @@ // Precondition Assert.IsNull(treeView.TreeViewNodeSorter); - var nodePresenter = new ChartTreeNodePresenter(guiPlugin) { TreeView = treeView }; + var nodePresenter = new ChartTreeNodePresenter() { TreeView = treeView }; // Call var insertionAllowed = nodePresenter.CanInsert(chart, sourceNode, targetNode); Index: Core/Plugins/test/Core.Plugins.SharpMapGis.Test/Core.Plugins.SharpMapGis.Test.csproj =================================================================== diff -u -r7e491a8cd7dc86b6ead9f4be9bb32754e16cf302 -r44fce3b0d8942914f2678d8e33ca99646cf8062f --- Core/Plugins/test/Core.Plugins.SharpMapGis.Test/Core.Plugins.SharpMapGis.Test.csproj (.../Core.Plugins.SharpMapGis.Test.csproj) (revision 7e491a8cd7dc86b6ead9f4be9bb32754e16cf302) +++ Core/Plugins/test/Core.Plugins.SharpMapGis.Test/Core.Plugins.SharpMapGis.Test.csproj (.../Core.Plugins.SharpMapGis.Test.csproj) (revision 44fce3b0d8942914f2678d8e33ca99646cf8062f) @@ -118,7 +118,6 @@ Resource.resx - Index: Core/Plugins/test/Core.Plugins.SharpMapGis.Test/Forms/MapLayerTreeViewNodePresenterTest.cs =================================================================== diff -u -reab6a10ef5444e79f4dddd5babbfcd5892d3d97a -r44fce3b0d8942914f2678d8e33ca99646cf8062f --- Core/Plugins/test/Core.Plugins.SharpMapGis.Test/Forms/MapLayerTreeViewNodePresenterTest.cs (.../MapLayerTreeViewNodePresenterTest.cs) (revision eab6a10ef5444e79f4dddd5babbfcd5892d3d97a) +++ Core/Plugins/test/Core.Plugins.SharpMapGis.Test/Forms/MapLayerTreeViewNodePresenterTest.cs (.../MapLayerTreeViewNodePresenterTest.cs) (revision 44fce3b0d8942914f2678d8e33ca99646cf8062f) @@ -28,9 +28,7 @@ [SetUp] public void Setup() { - var pluginGui = mocks.Stub(); - - mapLayerNodePresenter = new MapLayerTreeViewNodePresenter(pluginGui); + mapLayerNodePresenter = new MapLayerTreeViewNodePresenter(new MapLegendView(null)); treeView = mocks.Stub(); mapLayerNodePresenter.TreeView = treeView; } Index: Core/Plugins/test/Core.Plugins.SharpMapGis.Test/Forms/MapTreeViewNodePresenterTest.cs =================================================================== diff -u -r074232b001ecb5ae110c0b95c05264d4372cbfb5 -r44fce3b0d8942914f2678d8e33ca99646cf8062f --- Core/Plugins/test/Core.Plugins.SharpMapGis.Test/Forms/MapTreeViewNodePresenterTest.cs (.../MapTreeViewNodePresenterTest.cs) (revision 074232b001ecb5ae110c0b95c05264d4372cbfb5) +++ Core/Plugins/test/Core.Plugins.SharpMapGis.Test/Forms/MapTreeViewNodePresenterTest.cs (.../MapTreeViewNodePresenterTest.cs) (revision 44fce3b0d8942914f2678d8e33ca99646cf8062f) @@ -15,13 +15,18 @@ [TestFixture] public class MapTreeViewNodePresenterTest { - private readonly MockRepository mocks = new MockRepository(); + private MockRepository mocks; + [SetUp] + public void SetUp() + { + mocks = new MockRepository(); + } + [Test] public void TestGetChildNodeObjects() { - ITreeView tv; - var guiPlugin = CreateGuiPluginMock(out tv); + var mapLegendView = mocks.StrictMock(); var map = new Map(); map.Layers.Add(new VectorLayer @@ -33,31 +38,17 @@ Name = "Test2", ShowInTreeView = false }); - var mapTreeViewNodePresenter = new MapTreeViewNodePresenter(guiPlugin); + mocks.ReplayAll(); + + var mapTreeViewNodePresenter = new MapTreeViewNodePresenter(mapLegendView); var childNodes = mapTreeViewNodePresenter.GetChildNodeObjects(map); var enumerator = childNodes.GetEnumerator(); Assert.IsTrue(enumerator.MoveNext()); Assert.AreEqual("Test1", ((VectorLayer) enumerator.Current).Name); Assert.IsFalse(enumerator.MoveNext()); - } - private GuiPlugin CreateGuiPluginMock(out ITreeView tv) - { - //create mocks because we are only testing presenter here - var guiPlugin = mocks.Stub(); - var gui = mocks.Stub(); - var applicationCore = mocks.Stub(); - tv = mocks.Stub(); - - Expect.Call(gui.ApplicationCore).Return(applicationCore).Repeat.Any(); - Expect.Call(gui.Plugins).Return(new List - { - guiPlugin - }).Repeat.Any(); - - guiPlugin.Gui = gui; - return guiPlugin; + mocks.VerifyAll(); } } } \ No newline at end of file Fisheye: Tag 44fce3b0d8942914f2678d8e33ca99646cf8062f refers to a dead (removed) revision in file `Core/Plugins/test/Core.Plugins.SharpMapGis.Test/SharpMapGisGuiPluginTest.cs'. Fisheye: No comparison available. Pass `N' to diff?