Index: Application/Ringtoets/src/Application.Ringtoets/App.xaml.cs
===================================================================
diff -u -rbc173e2a73c395bf64d1d9b4ad8d81129a1cdd7c -r96fff35cedc43c8be2da620efa3d1b9cb3e42238
--- Application/Ringtoets/src/Application.Ringtoets/App.xaml.cs (.../App.xaml.cs) (revision bc173e2a73c395bf64d1d9b4ad8d81129a1cdd7c)
+++ Application/Ringtoets/src/Application.Ringtoets/App.xaml.cs (.../App.xaml.cs) (revision 96fff35cedc43c8be2da620efa3d1b9cb3e42238)
@@ -156,10 +156,10 @@
new CommonToolsGuiPlugin(),
new RingtoetsGuiPlugin(),
new PipingGuiPlugin(),
+ new OxyPlotGuiPlugin(),
new DotSpatialGuiPlugin()
#if INCLUDE_DEMOPROJECT
, new DemoProjectGuiPlugin()
- , new OxyPlotGuiPlugin()
#endif
}
};
Index: Core/Plugins/src/Core.Plugins.OxyPlot/ChartingRibbon.xaml
===================================================================
diff -u -rbc173e2a73c395bf64d1d9b4ad8d81129a1cdd7c -r96fff35cedc43c8be2da620efa3d1b9cb3e42238
--- Core/Plugins/src/Core.Plugins.OxyPlot/ChartingRibbon.xaml (.../ChartingRibbon.xaml) (revision bc173e2a73c395bf64d1d9b4ad8d81129a1cdd7c)
+++ Core/Plugins/src/Core.Plugins.OxyPlot/ChartingRibbon.xaml (.../ChartingRibbon.xaml) (revision 96fff35cedc43c8be2da620efa3d1b9cb3e42238)
@@ -16,12 +16,6 @@
-
-
-
-
-
-
Index: Core/Plugins/src/Core.Plugins.OxyPlot/ChartingRibbon.xaml.cs
===================================================================
diff -u -rfbb37872d09f1ded75ce2209e8e48a6b64d8a78f -r96fff35cedc43c8be2da620efa3d1b9cb3e42238
--- Core/Plugins/src/Core.Plugins.OxyPlot/ChartingRibbon.xaml.cs (.../ChartingRibbon.xaml.cs) (revision fbb37872d09f1ded75ce2209e8e48a6b64d8a78f)
+++ Core/Plugins/src/Core.Plugins.OxyPlot/ChartingRibbon.xaml.cs (.../ChartingRibbon.xaml.cs) (revision 96fff35cedc43c8be2da620efa3d1b9cb3e42238)
@@ -65,11 +65,6 @@
}
///
- /// Sets the command used when the open chart button is clicked.
- ///
- public ICommand OpenChartViewCommand { private get; set; }
-
- ///
/// Sets the command used when the toggle legend view button is clicked.
///
public ICommand ToggleLegendViewCommand { private get; set; }
@@ -78,10 +73,6 @@
{
get
{
- if (OpenChartViewCommand != null)
- {
- yield return OpenChartViewCommand;
- }
if (ToggleLegendViewCommand != null)
{
yield return ToggleLegendViewCommand;
@@ -126,12 +117,7 @@
// but more ideally be removed.
return ChartingContextualGroup.Name == tabGroupName && ChartingContextualGroup.Visibility == Visibility.Visible;
}
-
- private void ButtonOpenChartView_Click(object sender, RoutedEventArgs e)
- {
- OpenChartViewCommand.Execute();
- }
-
+
private void ButtonToggleLegend_Click(object sender, RoutedEventArgs e)
{
ToggleLegendViewCommand.Execute();
Fisheye: Tag 96fff35cedc43c8be2da620efa3d1b9cb3e42238 refers to a dead (removed) revision in file `Core/Plugins/src/Core.Plugins.OxyPlot/Commands/OpenChartViewCommand.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Core/Plugins/src/Core.Plugins.OxyPlot/Core.Plugins.OxyPlot.csproj
===================================================================
diff -u -ra49c98841cb7c943ff7abbfef8110b4bf6f52a8b -r96fff35cedc43c8be2da620efa3d1b9cb3e42238
--- Core/Plugins/src/Core.Plugins.OxyPlot/Core.Plugins.OxyPlot.csproj (.../Core.Plugins.OxyPlot.csproj) (revision a49c98841cb7c943ff7abbfef8110b4bf6f52a8b)
+++ Core/Plugins/src/Core.Plugins.OxyPlot/Core.Plugins.OxyPlot.csproj (.../Core.Plugins.OxyPlot.csproj) (revision 96fff35cedc43c8be2da620efa3d1b9cb3e42238)
@@ -73,7 +73,6 @@
LegendView.cs
-
Index: Core/Plugins/src/Core.Plugins.OxyPlot/OxyPlotGuiPlugin.cs
===================================================================
diff -u -r4af57ec0ebbdb753668d1f7096c373672a38563f -r96fff35cedc43c8be2da620efa3d1b9cb3e42238
--- Core/Plugins/src/Core.Plugins.OxyPlot/OxyPlotGuiPlugin.cs (.../OxyPlotGuiPlugin.cs) (revision 4af57ec0ebbdb753668d1f7096c373672a38563f)
+++ Core/Plugins/src/Core.Plugins.OxyPlot/OxyPlotGuiPlugin.cs (.../OxyPlotGuiPlugin.cs) (revision 96fff35cedc43c8be2da620efa3d1b9cb3e42238)
@@ -103,7 +103,6 @@
{
return new ChartingRibbon
{
- OpenChartViewCommand = new OpenChartViewCommand(documentViewController),
ToggleLegendViewCommand = new ToggleLegendViewCommand(legendController)
};
}
Index: Core/Plugins/src/Core.Plugins.OxyPlot/Properties/Resources.Designer.cs
===================================================================
diff -u -rc68064014494505f833de7749ee7b3d879f723d6 -r96fff35cedc43c8be2da620efa3d1b9cb3e42238
--- Core/Plugins/src/Core.Plugins.OxyPlot/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision c68064014494505f833de7749ee7b3d879f723d6)
+++ Core/Plugins/src/Core.Plugins.OxyPlot/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 96fff35cedc43c8be2da620efa3d1b9cb3e42238)
@@ -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.
@@ -108,16 +108,6 @@
}
///
- /// Looks up a localized resource of type System.Drawing.Bitmap.
- ///
- public static System.Drawing.Bitmap DocumentIcon {
- get {
- object obj = ResourceManager.GetObject("DocumentIcon", resourceCulture);
- return ((System.Drawing.Bitmap)(obj));
- }
- }
-
- ///
/// Looks up a localized string similar to Grafiek.
///
public static string General_Chart {
@@ -137,15 +127,6 @@
}
///
- /// Looks up a localized string similar to Open een documentvenster met een diagram..
- ///
- public static string OpenChartView_ToolTip {
- get {
- return ResourceManager.GetString("OpenChartView_ToolTip", resourceCulture);
- }
- }
-
- ///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
public static System.Drawing.Bitmap PanIcon {
@@ -185,15 +166,6 @@
}
///
- /// Looks up a localized string similar to Demo.
- ///
- public static string Ribbon_Demo_Header {
- get {
- return ResourceManager.GetString("Ribbon_Demo_Header", resourceCulture);
- }
- }
-
- ///
/// Looks up a localized string similar to Navigatie.
///
public static string Ribbon_GroupBox_Navigation {
Index: Core/Plugins/src/Core.Plugins.OxyPlot/Properties/Resources.resx
===================================================================
diff -u -rc68064014494505f833de7749ee7b3d879f723d6 -r96fff35cedc43c8be2da620efa3d1b9cb3e42238
--- Core/Plugins/src/Core.Plugins.OxyPlot/Properties/Resources.resx (.../Resources.resx) (revision c68064014494505f833de7749ee7b3d879f723d6)
+++ Core/Plugins/src/Core.Plugins.OxyPlot/Properties/Resources.resx (.../Resources.resx) (revision 96fff35cedc43c8be2da620efa3d1b9cb3e42238)
@@ -133,18 +133,12 @@
..\resources\chart.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-
- ..\resources\document.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-
Grafiek
..\resources\line.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
-
- Open een documentvenster met een diagram.
-
..\resources\hand.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
@@ -157,9 +151,6 @@
Grafieken
-
- Demo
-
Navigatie
Index: Core/Plugins/test/Core.Plugins.OxyPlot.Test/ChartingRibbonTest.cs
===================================================================
diff -u -r0d7895f07d2c1b15457ffdc8e8762780a5837030 -r96fff35cedc43c8be2da620efa3d1b9cb3e42238
--- Core/Plugins/test/Core.Plugins.OxyPlot.Test/ChartingRibbonTest.cs (.../ChartingRibbonTest.cs) (revision 0d7895f07d2c1b15457ffdc8e8762780a5837030)
+++ Core/Plugins/test/Core.Plugins.OxyPlot.Test/ChartingRibbonTest.cs (.../ChartingRibbonTest.cs) (revision 96fff35cedc43c8be2da620efa3d1b9cb3e42238)
@@ -35,23 +35,20 @@
{
// Setup
var mocks = new MockRepository();
- var documentViewController = mocks.Stub();
var toolViewController = mocks.Stub();
mocks.ReplayAll();
- var openChartViewCommand = new OpenChartViewCommand(documentViewController);
var toggleLegendViewCommand = new ToggleLegendViewCommand(new LegendController(toolViewController));
var ribbon = new ChartingRibbon
{
- OpenChartViewCommand = openChartViewCommand,
ToggleLegendViewCommand = toggleLegendViewCommand,
};
// Call
var commands = ribbon.Commands.ToArray();
// Assert
- CollectionAssert.AreEqual(new ICommand[]{openChartViewCommand, toggleLegendViewCommand}, commands);
+ CollectionAssert.AreEqual(new ICommand[]{toggleLegendViewCommand}, commands);
mocks.VerifyAll();
}
@@ -80,23 +77,23 @@
[Test]
[RequiresSTA]
- public void OpenChartViewButton_OnClick_ExecutesOpenChartViewCommand()
+ public void TogglePanning_OnClick_TogglePanning()
{
// Setup
var mocks = new MockRepository();
- var command = mocks.StrictMock();
- command.Expect(c => c.Execute());
+ var chart = mocks.DynamicMock();
+ chart.Expect(c => c.TogglePanning());
mocks.ReplayAll();
var ribbon = new ChartingRibbon
{
- OpenChartViewCommand = command
+ Chart = chart
};
- var button = ribbon.GetRibbonControl().FindName("OpenChartViewButton") as Button;
+ var button = ribbon.GetRibbonControl().FindName("TogglePanningButton") as ToggleButton;
// Precondition
- Assert.IsNotNull(button, "Ribbon should have an open chart view button.");
+ Assert.IsNotNull(button, "Ribbon should have a toggle panning button.");
// Call
button.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent));
@@ -107,6 +104,33 @@
[Test]
[RequiresSTA]
+ public void ToggleRectangleZooming_OnClick_ToggleRectangleZooming()
+ {
+ // Setup
+ var mocks = new MockRepository();
+ var chart = mocks.DynamicMock();
+ chart.Expect(c => c.ToggleRectangleZooming());
+
+ mocks.ReplayAll();
+
+ var ribbon = new ChartingRibbon
+ {
+ Chart = chart
+ };
+ var button = ribbon.GetRibbonControl().FindName("ToggleRectangleZoomingButton") as ToggleButton;
+
+ // Precondition
+ Assert.IsNotNull(button, "Ribbon should have a toggle rectangle zooming button.");
+
+ // Call
+ button.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent));
+
+ // Assert
+ mocks.VerifyAll();
+ }
+
+ [Test]
+ [RequiresSTA]
public void ToggleLegendViewButton_OnClick_ExecutesToggleLegendViewCommand()
{
// Setup
Fisheye: Tag 96fff35cedc43c8be2da620efa3d1b9cb3e42238 refers to a dead (removed) revision in file `Core/Plugins/test/Core.Plugins.OxyPlot.Test/Commands/OpenChartViewCommandTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Core/Plugins/test/Core.Plugins.OxyPlot.Test/Core.Plugins.OxyPlot.Test.csproj
===================================================================
diff -u -ra49c98841cb7c943ff7abbfef8110b4bf6f52a8b -r96fff35cedc43c8be2da620efa3d1b9cb3e42238
--- Core/Plugins/test/Core.Plugins.OxyPlot.Test/Core.Plugins.OxyPlot.Test.csproj (.../Core.Plugins.OxyPlot.Test.csproj) (revision a49c98841cb7c943ff7abbfef8110b4bf6f52a8b)
+++ Core/Plugins/test/Core.Plugins.OxyPlot.Test/Core.Plugins.OxyPlot.Test.csproj (.../Core.Plugins.OxyPlot.Test.csproj) (revision 96fff35cedc43c8be2da620efa3d1b9cb3e42238)
@@ -61,7 +61,6 @@
-
Index: Core/Plugins/test/Core.Plugins.OxyPlot.Test/Legend/LineDataTreeNodeInfoTest.cs
===================================================================
diff -u -rb3883ecc0719d5df114cacc849796c0ca420507d -r96fff35cedc43c8be2da620efa3d1b9cb3e42238
--- Core/Plugins/test/Core.Plugins.OxyPlot.Test/Legend/LineDataTreeNodeInfoTest.cs (.../LineDataTreeNodeInfoTest.cs) (revision b3883ecc0719d5df114cacc849796c0ca420507d)
+++ Core/Plugins/test/Core.Plugins.OxyPlot.Test/Legend/LineDataTreeNodeInfoTest.cs (.../LineDataTreeNodeInfoTest.cs) (revision 96fff35cedc43c8be2da620efa3d1b9cb3e42238)
@@ -121,6 +121,26 @@
[TestCase(true)]
[TestCase(false)]
+ public void IsChecked_Always_ReturnsAccordingToVisibleStateOfLineData(bool isVisible)
+ {
+ // Setup
+ var lineData = mocks.StrictMock(Enumerable.Empty>());
+
+ lineData.IsVisible = isVisible;
+
+ mocks.ReplayAll();
+
+ // Call
+ var canCheck = info.IsChecked(lineData);
+
+ // Assert
+ Assert.AreEqual(isVisible, canCheck);
+
+ mocks.VerifyAll();
+ }
+
+ [TestCase(true)]
+ [TestCase(false)]
public void LineDataNodeWithoutParent_SetsLineDataVisibility(bool initialVisibleState)
{
// Setup
Index: Demo/Ringtoets/src/Demo.Ringtoets/Commands/OpenChartViewCommand.cs
===================================================================
diff -u
--- Demo/Ringtoets/src/Demo.Ringtoets/Commands/OpenChartViewCommand.cs (revision 0)
+++ Demo/Ringtoets/src/Demo.Ringtoets/Commands/OpenChartViewCommand.cs (revision 96fff35cedc43c8be2da620efa3d1b9cb3e42238)
@@ -0,0 +1,92 @@
+// 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.Collections.Generic;
+using System.Collections.ObjectModel;
+using Core.Common.Controls.Commands;
+using Core.Common.Gui;
+using Core.Components.Charting.Data;
+
+namespace Demo.Ringtoets.Commands
+{
+ ///
+ /// This class describes the command for opening a view for with some arbitrary data.
+ ///
+ public class OpenChartViewCommand : ICommand
+ {
+ private readonly IDocumentViewController documentViewController;
+
+ public OpenChartViewCommand(IDocumentViewController documentViewController)
+ {
+ this.documentViewController = documentViewController;
+ }
+
+ public bool Enabled
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public bool Checked
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public void Execute(params object[] arguments)
+ {
+ var line = new LineData(new Collection>
+ {
+ new Tuple(0.0, 1.1),
+ new Tuple(1.0, 2.1),
+ new Tuple(1.6, 1.6)
+ });
+ var area = new AreaData(new Collection>
+ {
+ new Tuple(0.0, 1.1),
+ new Tuple(1.0, 2.1),
+ new Tuple(1.6, 1.6),
+ new Tuple(1.6, 0.5),
+ new Tuple(0.0, 0.5),
+ new Tuple(0.0, 1.1)
+ });
+ var clearArea = new AreaData(new Collection>
+ {
+ new Tuple(0.5, 0.5),
+ new Tuple(0.5, 1.0),
+ new Tuple(1.0, 1.0),
+ new Tuple(0.5, 0.5)
+ });
+ var points = new PointData(new Collection>
+ {
+ new Tuple(0.0, 1.1),
+ new Tuple(0.5, 1.6),
+ new Tuple(1.0, 2.1)
+ });
+ documentViewController.DocumentViewsResolver.OpenViewForData(new ChartDataCollection(new List { area, clearArea, line, points }));
+ }
+ }
+}
\ No newline at end of file
Index: Demo/Ringtoets/src/Demo.Ringtoets/Commands/OpenMapViewCommand.cs
===================================================================
diff -u -r1a01c1a2825d37f773c817fbcab39d0cc5da9940 -r96fff35cedc43c8be2da620efa3d1b9cb3e42238
--- Demo/Ringtoets/src/Demo.Ringtoets/Commands/OpenMapViewCommand.cs (.../OpenMapViewCommand.cs) (revision 1a01c1a2825d37f773c817fbcab39d0cc5da9940)
+++ Demo/Ringtoets/src/Demo.Ringtoets/Commands/OpenMapViewCommand.cs (.../OpenMapViewCommand.cs) (revision 96fff35cedc43c8be2da620efa3d1b9cb3e42238)
@@ -4,12 +4,11 @@
using Core.Common.Controls.Commands;
using Core.Common.Gui;
using Core.Components.DotSpatial.Data;
-using Core.Plugins.DotSpatial.Forms;
namespace Demo.Ringtoets.Commands
{
///
- /// The command for opening a with some arbitrary data.
+ /// The command for opening a view for with some arbitrary data.
///
public class OpenMapViewCommand : ICommand
{
Index: Demo/Ringtoets/src/Demo.Ringtoets/Demo.Ringtoets.csproj
===================================================================
diff -u -rd182ae6d1a6590c4b52b17fd1f59c5b7c3780b48 -r96fff35cedc43c8be2da620efa3d1b9cb3e42238
--- Demo/Ringtoets/src/Demo.Ringtoets/Demo.Ringtoets.csproj (.../Demo.Ringtoets.csproj) (revision d182ae6d1a6590c4b52b17fd1f59c5b7c3780b48)
+++ Demo/Ringtoets/src/Demo.Ringtoets/Demo.Ringtoets.csproj (.../Demo.Ringtoets.csproj) (revision 96fff35cedc43c8be2da620efa3d1b9cb3e42238)
@@ -52,6 +52,7 @@
+
@@ -90,14 +91,14 @@
Core.Common.Version
False
+
+ {516EBC95-B8F2-428C-B7F6-733F01BF8FDD}
+ Core.Components.Charting
+
{AA47E858-A2A7-470E-8B2D-C76AE8ED9CCD}
Core.Components.DotSpatial
-
- {610E0A9C-1997-4C43-A10E-39D4C66ADA93}
- Core.Plugins.DotSpatial
-
{d4200f43-3f72-4f42-af0a-8ced416a38ec}
Ringtoets.Common.Data
@@ -215,7 +216,9 @@
-
+
+
+