Index: Core/Common/src/Core.Common.Gui/Core.Common.Gui.csproj
===================================================================
diff -u -rc27aa10e3d9924c856ba3ed81ca12c96a56fe635 -r2b1937d120d50436169ef18d9fce57d4400d1bbe
--- Core/Common/src/Core.Common.Gui/Core.Common.Gui.csproj (.../Core.Common.Gui.csproj) (revision c27aa10e3d9924c856ba3ed81ca12c96a56fe635)
+++ Core/Common/src/Core.Common.Gui/Core.Common.Gui.csproj (.../Core.Common.Gui.csproj) (revision 2b1937d120d50436169ef18d9fce57d4400d1bbe)
@@ -218,7 +218,7 @@
-
+
Index: Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml.cs
===================================================================
diff -u -rc27aa10e3d9924c856ba3ed81ca12c96a56fe635 -r2b1937d120d50436169ef18d9fce57d4400d1bbe
--- Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml.cs (.../MainWindow.xaml.cs) (revision c27aa10e3d9924c856ba3ed81ca12c96a56fe635)
+++ Core/Common/src/Core.Common.Gui/Forms/MainWindow/MainWindow.xaml.cs (.../MainWindow.xaml.cs) (revision 2b1937d120d50436169ef18d9fce57d4400d1bbe)
@@ -997,7 +997,7 @@
{
foreach (var command in ribbonExtension.Commands)
{
- var guiCommand = command as IGuiCommand;
+ var guiCommand = command as GuiCommand;
if (guiCommand != null)
{
guiCommand.Gui = Gui;
Index: Core/Common/src/Core.Common.Gui/GuiCommand.cs
===================================================================
diff -u
--- Core/Common/src/Core.Common.Gui/GuiCommand.cs (revision 0)
+++ Core/Common/src/Core.Common.Gui/GuiCommand.cs (revision 2b1937d120d50436169ef18d9fce57d4400d1bbe)
@@ -0,0 +1,12 @@
+using Core.Common.Controls;
+
+namespace Core.Common.Gui
+{
+ ///
+ /// Command with reference to Gui
+ ///
+ public abstract class GuiCommand : Command
+ {
+ public IGui Gui { get; set; }
+ }
+}
\ No newline at end of file
Index: Core/Common/src/Core.Common.Gui/IGui.cs
===================================================================
diff -u -r8d069bd17ce1b0f7ec017385f9f4e5fd84ed1f6f -r2b1937d120d50436169ef18d9fce57d4400d1bbe
--- Core/Common/src/Core.Common.Gui/IGui.cs (.../IGui.cs) (revision 8d069bd17ce1b0f7ec017385f9f4e5fd84ed1f6f)
+++ Core/Common/src/Core.Common.Gui/IGui.cs (.../IGui.cs) (revision 2b1937d120d50436169ef18d9fce57d4400d1bbe)
@@ -53,7 +53,7 @@
///
/// Gets commands.
///
- IList Commands { get; }
+ IList Commands { get; }
///
/// Gets all document views currently opened in the gui.
Fisheye: Tag 2b1937d120d50436169ef18d9fce57d4400d1bbe refers to a dead (removed) revision in file `Core/Common/src/Core.Common.Gui/IGuiCommand.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Core/Common/src/Core.Common.Gui/RingtoetsGui.cs
===================================================================
diff -u -r074232b001ecb5ae110c0b95c05264d4372cbfb5 -r2b1937d120d50436169ef18d9fce57d4400d1bbe
--- Core/Common/src/Core.Common.Gui/RingtoetsGui.cs (.../RingtoetsGui.cs) (revision 074232b001ecb5ae110c0b95c05264d4372cbfb5)
+++ Core/Common/src/Core.Common.Gui/RingtoetsGui.cs (.../RingtoetsGui.cs) (revision 2b1937d120d50436169ef18d9fce57d4400d1bbe)
@@ -45,7 +45,7 @@
private static RingtoetsGui instance;
private static string instanceCreationStackTrace;
- private readonly IList commands = new List();
+ private readonly IList commands = new List();
private readonly ApplicationCore applicationCore;
private MainWindow mainWindow;
@@ -176,7 +176,7 @@
}
}
- public IList Commands
+ public IList Commands
{
get
{
Index: Core/Plugins/src/Core.Plugins.CommonTools.Gui/Commands/Charting/ExportChartAsImageCommand.cs
===================================================================
diff -u -ra950714ad9510756331d862aa35695fa0b2ed03b -r2b1937d120d50436169ef18d9fce57d4400d1bbe
--- Core/Plugins/src/Core.Plugins.CommonTools.Gui/Commands/Charting/ExportChartAsImageCommand.cs (.../ExportChartAsImageCommand.cs) (revision a950714ad9510756331d862aa35695fa0b2ed03b)
+++ Core/Plugins/src/Core.Plugins.CommonTools.Gui/Commands/Charting/ExportChartAsImageCommand.cs (.../ExportChartAsImageCommand.cs) (revision 2b1937d120d50436169ef18d9fce57d4400d1bbe)
@@ -55,7 +55,7 @@
}
}
- public abstract class ChartViewCommandBase : Command, IGuiCommand
+ public abstract class ChartViewCommandBase : GuiCommand
{
public override bool Enabled
{
@@ -65,8 +65,6 @@
}
}
- public IGui Gui { get; set; }
-
protected ChartView View
{
get
Index: Core/Plugins/src/Core.Plugins.CommonTools.Gui/Commands/Charting/RulerCommand.cs
===================================================================
diff -u -ra950714ad9510756331d862aa35695fa0b2ed03b -r2b1937d120d50436169ef18d9fce57d4400d1bbe
--- Core/Plugins/src/Core.Plugins.CommonTools.Gui/Commands/Charting/RulerCommand.cs (.../RulerCommand.cs) (revision a950714ad9510756331d862aa35695fa0b2ed03b)
+++ Core/Plugins/src/Core.Plugins.CommonTools.Gui/Commands/Charting/RulerCommand.cs (.../RulerCommand.cs) (revision 2b1937d120d50436169ef18d9fce57d4400d1bbe)
@@ -5,7 +5,7 @@
namespace Core.Plugins.CommonTools.Gui.Commands.Charting
{
- public class RulerCommand : Command, IGuiCommand
+ public class RulerCommand : GuiCommand
{
public override bool Checked
{
@@ -23,8 +23,6 @@
}
}
- public IGui Gui { get; set; }
-
protected override void OnExecute(params object[] arguments)
{
var view = RulerTool;
Index: Core/Plugins/src/Core.Plugins.CommonTools.Gui/Commands/Charting/ShowChartLegendViewCommand.cs
===================================================================
diff -u -ra950714ad9510756331d862aa35695fa0b2ed03b -r2b1937d120d50436169ef18d9fce57d4400d1bbe
--- Core/Plugins/src/Core.Plugins.CommonTools.Gui/Commands/Charting/ShowChartLegendViewCommand.cs (.../ShowChartLegendViewCommand.cs) (revision a950714ad9510756331d862aa35695fa0b2ed03b)
+++ Core/Plugins/src/Core.Plugins.CommonTools.Gui/Commands/Charting/ShowChartLegendViewCommand.cs (.../ShowChartLegendViewCommand.cs) (revision 2b1937d120d50436169ef18d9fce57d4400d1bbe)
@@ -1,10 +1,9 @@
using System.Linq;
-using Core.Common.Controls;
using Core.Common.Gui;
namespace Core.Plugins.CommonTools.Gui.Commands.Charting
{
- public class ShowChartLegendViewCommand : Command, IGuiCommand
+ public class ShowChartLegendViewCommand : GuiCommand
{
public override bool Checked
{
@@ -27,8 +26,6 @@
}
}
- public IGui Gui { get; set; }
-
protected override void OnExecute(params object[] arguments)
{
var commonToolsGuiPlugin = Gui.Plugins.OfType().FirstOrDefault();
Index: Core/Plugins/src/Core.Plugins.ProjectExplorer/Commands/ShowProjectExplorerCommand.cs
===================================================================
diff -u -ra950714ad9510756331d862aa35695fa0b2ed03b -r2b1937d120d50436169ef18d9fce57d4400d1bbe
--- Core/Plugins/src/Core.Plugins.ProjectExplorer/Commands/ShowProjectExplorerCommand.cs (.../ShowProjectExplorerCommand.cs) (revision a950714ad9510756331d862aa35695fa0b2ed03b)
+++ Core/Plugins/src/Core.Plugins.ProjectExplorer/Commands/ShowProjectExplorerCommand.cs (.../ShowProjectExplorerCommand.cs) (revision 2b1937d120d50436169ef18d9fce57d4400d1bbe)
@@ -1,9 +1,8 @@
-using Core.Common.Controls;
using Core.Common.Gui;
namespace Core.Plugins.ProjectExplorer.Commands
{
- public class ShowProjectExplorerCommand : Command, IGuiCommand
+ public class ShowProjectExplorerCommand : GuiCommand
{
public override bool Enabled
{
@@ -26,8 +25,6 @@
}
}
- public IGui Gui { get; set; }
-
protected override void OnExecute(params object[] arguments)
{
var view = ProjectExplorerGuiPlugin.Instance.ProjectExplorer;
Index: Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Commands/LayoutComponentToolCommand.cs
===================================================================
diff -u -rcc4fe77af8a4c4a8c076fe19a9a7f3ee8fe7714c -r2b1937d120d50436169ef18d9fce57d4400d1bbe
--- Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Commands/LayoutComponentToolCommand.cs (.../LayoutComponentToolCommand.cs) (revision cc4fe77af8a4c4a8c076fe19a9a7f3ee8fe7714c)
+++ Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Commands/LayoutComponentToolCommand.cs (.../LayoutComponentToolCommand.cs) (revision 2b1937d120d50436169ef18d9fce57d4400d1bbe)
@@ -1,10 +1,9 @@
-using Core.Common.Gui;
using Core.GIS.SharpMap.UI.Tools;
using Core.GIS.SharpMap.UI.Tools.Decorations;
namespace Core.Plugins.SharpMapGis.Gui.Commands
{
- public class LayoutComponentToolCommand : MapViewCommand, IGuiCommand where T : LayoutComponentTool
+ public class LayoutComponentToolCommand : MapViewCommand where T : LayoutComponentTool
{
public override bool Checked
{
@@ -24,8 +23,6 @@
}
}
- public IGui Gui { get; set; }
-
protected override IMapTool CurrentTool
{
get
Index: Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Commands/MapViewCommand.cs
===================================================================
diff -u -ra950714ad9510756331d862aa35695fa0b2ed03b -r2b1937d120d50436169ef18d9fce57d4400d1bbe
--- Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Commands/MapViewCommand.cs (.../MapViewCommand.cs) (revision a950714ad9510756331d862aa35695fa0b2ed03b)
+++ Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Commands/MapViewCommand.cs (.../MapViewCommand.cs) (revision 2b1937d120d50436169ef18d9fce57d4400d1bbe)
@@ -1,11 +1,11 @@
-using Core.Common.Controls;
+using Core.Common.Gui;
using Core.GIS.SharpMap.Api;
using Core.GIS.SharpMap.UI.Tools;
using Core.Plugins.SharpMapGis.Gui.Forms;
namespace Core.Plugins.SharpMapGis.Gui.Commands
{
- public abstract class MapViewCommand : Command
+ public abstract class MapViewCommand : GuiCommand
{
public override bool Enabled
{
Index: Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Commands/ShowMapContentsCommand.cs
===================================================================
diff -u -ra950714ad9510756331d862aa35695fa0b2ed03b -r2b1937d120d50436169ef18d9fce57d4400d1bbe
--- Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Commands/ShowMapContentsCommand.cs (.../ShowMapContentsCommand.cs) (revision a950714ad9510756331d862aa35695fa0b2ed03b)
+++ Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Commands/ShowMapContentsCommand.cs (.../ShowMapContentsCommand.cs) (revision 2b1937d120d50436169ef18d9fce57d4400d1bbe)
@@ -1,10 +1,9 @@
using System.Linq;
-using Core.Common.Controls;
using Core.Common.Gui;
namespace Core.Plugins.SharpMapGis.Gui.Commands
{
- public class ShowMapContentsCommand : Command, IGuiCommand
+ public class ShowMapContentsCommand : GuiCommand
{
public override bool Enabled
{
@@ -27,8 +26,6 @@
}
}
- public IGui Gui { get; set; }
-
protected override void OnExecute(params object[] arguments)
{
var sharpMapGisGuiPlugin = Gui.Plugins.OfType().FirstOrDefault();
Index: Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Commands/ZoomLayerCommand.cs
===================================================================
diff -u -r9f01c4daf5b7af6549045ed6ac404d18419c2555 -r2b1937d120d50436169ef18d9fce57d4400d1bbe
--- Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Commands/ZoomLayerCommand.cs (.../ZoomLayerCommand.cs) (revision 9f01c4daf5b7af6549045ed6ac404d18419c2555)
+++ Core/Plugins/src/Core.Plugins.SharpMapGis.Gui/Commands/ZoomLayerCommand.cs (.../ZoomLayerCommand.cs) (revision 2b1937d120d50436169ef18d9fce57d4400d1bbe)
@@ -1,5 +1,4 @@
using System.Linq;
-using Core.Common.Gui;
using Core.Common.Utils.Collections;
using Core.GIS.GeoAPI.Geometries;
using Core.GIS.NetTopologySuite.Geometries;
@@ -8,10 +7,8 @@
namespace Core.Plugins.SharpMapGis.Gui.Commands
{
- public class ZoomLayerCommand : MapViewCommand, IGuiCommand
+ public class ZoomLayerCommand : MapViewCommand
{
- public IGui Gui { get; set; }
-
protected override void OnExecute(params object[] arguments)
{
// parameter 0 must be a layer
Index: Ringtoets/Demo/src/Ringtoets.Demo/Commands/AddNewDemoDikeAssessmentSectionCommand.cs
===================================================================
diff -u -r6bcbd610ececdc293a8883b50448f369e1fa4a25 -r2b1937d120d50436169ef18d9fce57d4400d1bbe
--- Ringtoets/Demo/src/Ringtoets.Demo/Commands/AddNewDemoDikeAssessmentSectionCommand.cs (.../AddNewDemoDikeAssessmentSectionCommand.cs) (revision 6bcbd610ececdc293a8883b50448f369e1fa4a25)
+++ Ringtoets/Demo/src/Ringtoets.Demo/Commands/AddNewDemoDikeAssessmentSectionCommand.cs (.../AddNewDemoDikeAssessmentSectionCommand.cs) (revision 2b1937d120d50436169ef18d9fce57d4400d1bbe)
@@ -14,21 +14,17 @@
///
/// Command that adds a new with demo data to the project tree.
///
- public class AddNewDemoDikeAssessmentSectionCommand : IGuiCommand
+ public class AddNewDemoDikeAssessmentSectionCommand : GuiCommand
{
- public bool Enabled
+ public override bool Enabled
{
get
{
return true;
}
}
- public bool Checked { get; set; }
-
- public IGui Gui { get; set; }
-
- public void Execute(params object[] arguments)
+ protected override void OnExecute(params object[] arguments)
{
var project = Gui.Project;
project.Items.Add(CreateNewDemoAssessmentSection());
Index: Ringtoets/Demo/src/Ringtoets.Demo/Commands/AddNewDemoDuneAssessmentSectionCommand.cs
===================================================================
diff -u -rd121feba5299c86d7ac04a366ee869b163e43ec7 -r2b1937d120d50436169ef18d9fce57d4400d1bbe
--- Ringtoets/Demo/src/Ringtoets.Demo/Commands/AddNewDemoDuneAssessmentSectionCommand.cs (.../AddNewDemoDuneAssessmentSectionCommand.cs) (revision d121feba5299c86d7ac04a366ee869b163e43ec7)
+++ Ringtoets/Demo/src/Ringtoets.Demo/Commands/AddNewDemoDuneAssessmentSectionCommand.cs (.../AddNewDemoDuneAssessmentSectionCommand.cs) (revision 2b1937d120d50436169ef18d9fce57d4400d1bbe)
@@ -7,21 +7,17 @@
///
/// Command that adds a new with demo data to the project tree.
///
- public class AddNewDemoDuneAssessmentSectionCommand : IGuiCommand
+ public class AddNewDemoDuneAssessmentSectionCommand : GuiCommand
{
- public bool Enabled
+ public override bool Enabled
{
get
{
return true;
}
}
- public bool Checked { get; set; }
-
- public IGui Gui { get; set; }
-
- public void Execute(params object[] arguments)
+ protected override void OnExecute(params object[] arguments)
{
var project = Gui.Project;
project.Items.Add(CreateNewDemoAssessmentSection());
Index: Ringtoets/Demo/test/Ringtoets.Demo.Test/Commands/AddNewDemoDikeAssessmentSectionCommandTest.cs
===================================================================
diff -u -r6bcbd610ececdc293a8883b50448f369e1fa4a25 -r2b1937d120d50436169ef18d9fce57d4400d1bbe
--- Ringtoets/Demo/test/Ringtoets.Demo.Test/Commands/AddNewDemoDikeAssessmentSectionCommandTest.cs (.../AddNewDemoDikeAssessmentSectionCommandTest.cs) (revision 6bcbd610ececdc293a8883b50448f369e1fa4a25)
+++ Ringtoets/Demo/test/Ringtoets.Demo.Test/Commands/AddNewDemoDikeAssessmentSectionCommandTest.cs (.../AddNewDemoDikeAssessmentSectionCommandTest.cs) (revision 2b1937d120d50436169ef18d9fce57d4400d1bbe)
@@ -25,7 +25,7 @@
// Assert
Assert.IsInstanceOf(command);
- Assert.IsInstanceOf(command);
+ Assert.IsInstanceOf(command);
Assert.IsTrue(command.Enabled);
Assert.IsFalse(command.Checked);
Assert.IsNull(command.Gui);
Index: Ringtoets/Demo/test/Ringtoets.Demo.Test/Commands/AddNewDemoDuneAssessmentSectionCommandTest.cs
===================================================================
diff -u -r1f79b34c12554e2b9878f6296168d18232cc9852 -r2b1937d120d50436169ef18d9fce57d4400d1bbe
--- Ringtoets/Demo/test/Ringtoets.Demo.Test/Commands/AddNewDemoDuneAssessmentSectionCommandTest.cs (.../AddNewDemoDuneAssessmentSectionCommandTest.cs) (revision 1f79b34c12554e2b9878f6296168d18232cc9852)
+++ Ringtoets/Demo/test/Ringtoets.Demo.Test/Commands/AddNewDemoDuneAssessmentSectionCommandTest.cs (.../AddNewDemoDuneAssessmentSectionCommandTest.cs) (revision 2b1937d120d50436169ef18d9fce57d4400d1bbe)
@@ -21,7 +21,7 @@
// Assert
Assert.IsInstanceOf(command);
- Assert.IsInstanceOf(command);
+ Assert.IsInstanceOf(command);
Assert.IsTrue(command.Enabled);
Assert.IsFalse(command.Checked);
Assert.IsNull(command.Gui);