Index: Core/Common/src/Core.Common.Gui/Forms/ViewManager/AvalonDockDockingManager.cs
===================================================================
diff -u -r0a601445097c12310c8fb1bff0c43f45a75c9e11 -ra70fac40e34e16bed007b1d0d4e437d91c89d0cb
--- Core/Common/src/Core.Common.Gui/Forms/ViewManager/AvalonDockDockingManager.cs (.../AvalonDockDockingManager.cs) (revision 0a601445097c12310c8fb1bff0c43f45a75c9e11)
+++ Core/Common/src/Core.Common.Gui/Forms/ViewManager/AvalonDockDockingManager.cs (.../AvalonDockDockingManager.cs) (revision a70fac40e34e16bed007b1d0d4e437d91c89d0cb)
@@ -72,7 +72,7 @@
///
/// Called after layout is changed (e.g. loaded).
///
- public void LayoutChange()
+ public void UpdateLayout()
{
var existingContents = dockingManager.Layout.Descendents().OfType().ToArray();
var existingHostControls = existingContents.Select(c => c.Content as WindowsFormsHost);
Index: Core/Common/src/Core.Common.Gui/IGui.cs
===================================================================
diff -u -r3ee80d5d797653a6eac5c4a46c4900ad4fbe8380 -ra70fac40e34e16bed007b1d0d4e437d91c89d0cb
--- Core/Common/src/Core.Common.Gui/IGui.cs (.../IGui.cs) (revision 3ee80d5d797653a6eac5c4a46c4900ad4fbe8380)
+++ Core/Common/src/Core.Common.Gui/IGui.cs (.../IGui.cs) (revision a70fac40e34e16bed007b1d0d4e437d91c89d0cb)
@@ -58,6 +58,11 @@
IList Commands { get; }
///
+ /// Gets the currently active document .
+ ///
+ IView ActiveView { get; }
+
+ ///
/// Gets all document views currently opened in the gui.
///
IViewList DocumentViews { get; }
@@ -116,11 +121,6 @@
///
IContextMenuBuilderProvider ContextMenuProvider { get; }
- ///
- /// Gets the currently active document .
- ///
- IView ActiveView { get; }
-
#endregion
#region Public Methods
Index: Core/Common/src/Core.Common.Gui/RingtoetsGui.cs
===================================================================
diff -u -r5933051dfa1dbc40dbf7552852e6ca85ae7b0811 -ra70fac40e34e16bed007b1d0d4e437d91c89d0cb
--- Core/Common/src/Core.Common.Gui/RingtoetsGui.cs (.../RingtoetsGui.cs) (revision 5933051dfa1dbc40dbf7552852e6ca85ae7b0811)
+++ Core/Common/src/Core.Common.Gui/RingtoetsGui.cs (.../RingtoetsGui.cs) (revision a70fac40e34e16bed007b1d0d4e437d91c89d0cb)
@@ -708,7 +708,7 @@
{
mainWindow.LoadLayout();
- toolWindowViewsDockingManager.LayoutChange();
+ toolWindowViewsDockingManager.UpdateLayout();
// bug in Fluent ribbon (views removed during load layout are not cleared - no events), synchronize them manually
toolWindowViews.SynchronizeViews(toolWindowViewsDockingManager.Views.ToArray());
Index: Core/Components/src/Core.Components.OxyPlot.Forms/BaseChart.cs
===================================================================
diff -u -r51a1d01aacd31638434df31702386d9a8c8f9a17 -ra70fac40e34e16bed007b1d0d4e437d91c89d0cb
--- Core/Components/src/Core.Components.OxyPlot.Forms/BaseChart.cs (.../BaseChart.cs) (revision 51a1d01aacd31638434df31702386d9a8c8f9a17)
+++ Core/Components/src/Core.Components.OxyPlot.Forms/BaseChart.cs (.../BaseChart.cs) (revision a70fac40e34e16bed007b1d0d4e437d91c89d0cb)
@@ -8,6 +8,9 @@
namespace Core.Components.OxyPlot.Forms
{
+ ///
+ /// This class describes a plot view with configured representation of axes.
+ ///
public sealed class BaseChart : PlotView
{
private LinearAxis xAxis;
@@ -20,46 +23,40 @@
{
Model = new PlotModel();
InitializeAxes();
- InitializeDefaultStyle();
MinimumSize = new System.Drawing.Size(50, 75);
}
///
- /// Sets the default look and feel of the
+ /// Sets up default axes representations.
///
- private void InitializeDefaultStyle()
+ private void InitializeAxes()
{
- xAxis.MajorGridlineStyle = LineStyle.Solid;
- xAxis.MinorGridlineStyle = LineStyle.Dot;
- yAxis.MajorGridlineStyle = LineStyle.Solid;
- yAxis.MinorGridlineStyle = LineStyle.Dot;
+ xAxis = CreateAxis(Resources.BaseChart_XAxisTitle, AxisPosition.Bottom);
+ yAxis = CreateAxis(Resources.BaseChart_YAxisTitle, AxisPosition.Left);
+ Model.Axes.Add(xAxis);
+ Model.Axes.Add(yAxis);
}
///
- /// Sets up default axes representations.
+ /// Creates an axis with default style set.
///
- private void InitializeAxes()
+ /// The title of the .
+ /// The of the .
+ ///
+ private static LinearAxis CreateAxis(string title, AxisPosition position)
{
- xAxis = new LinearAxis
+ return new LinearAxis
{
- Title = Resources.BaseChart_XAxisTitle,
- Position = AxisPosition.Bottom,
+ Title = title,
+ Position = position,
TickStyle = TickStyle.None,
ExtraGridlines = new[] { 0.0 },
ExtraGridlineThickness = 1,
- Layer = AxisLayer.AboveSeries
+ Layer = AxisLayer.AboveSeries,
+ MajorGridlineStyle = LineStyle.Solid,
+ MinorGridlineStyle = LineStyle.Dot
};
- yAxis = new LinearAxis
- {
- Title = Resources.BaseChart_YAxisTitle,
- TickStyle = TickStyle.None,
- ExtraGridlines = new[] { 0.0 },
- ExtraGridlineThickness = 1,
- Layer = AxisLayer.AboveSeries
- };
- Model.Axes.Add(xAxis);
- Model.Axes.Add(yAxis);
}
///
@@ -77,7 +74,7 @@
}
///
- /// Remove all the that has been added to the .
+ /// Remove all the that has been added to the .
///
public void ClearData()
{
Index: Core/Components/test/Core.Components.OxyPlot.Forms.Test/Properties/AssemblyInfo.cs
===================================================================
diff -u -r570101d9648e296b96c7e624c4d4f6bfad8d41b6 -ra70fac40e34e16bed007b1d0d4e437d91c89d0cb
--- Core/Components/test/Core.Components.OxyPlot.Forms.Test/Properties/AssemblyInfo.cs (.../AssemblyInfo.cs) (revision 570101d9648e296b96c7e624c4d4f6bfad8d41b6)
+++ Core/Components/test/Core.Components.OxyPlot.Forms.Test/Properties/AssemblyInfo.cs (.../AssemblyInfo.cs) (revision a70fac40e34e16bed007b1d0d4e437d91c89d0cb)
@@ -1,18 +1,8 @@
using System.Reflection;
-using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
[assembly: AssemblyTitle("Core.Components.OxyPlot.Forms.Test")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("Core.Components.OxyPlot.Forms.Test")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2016")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
@@ -21,16 +11,3 @@
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("8d4ceed6-3bb2-4f49-96ee-5d4ca01948a7")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
Index: Core/Components/test/Core.Components.OxyPlot.Test/Properties/AssemblyInfo.cs
===================================================================
diff -u -r307d9f9ef20f6d38919cec957280212806a8e123 -ra70fac40e34e16bed007b1d0d4e437d91c89d0cb
--- Core/Components/test/Core.Components.OxyPlot.Test/Properties/AssemblyInfo.cs (.../AssemblyInfo.cs) (revision 307d9f9ef20f6d38919cec957280212806a8e123)
+++ Core/Components/test/Core.Components.OxyPlot.Test/Properties/AssemblyInfo.cs (.../AssemblyInfo.cs) (revision a70fac40e34e16bed007b1d0d4e437d91c89d0cb)
@@ -1,18 +1,8 @@
using System.Reflection;
-using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
[assembly: AssemblyTitle("Core.Components.OxyPlot.Test")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("Core.Components.OxyPlot.Test")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2016")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
@@ -21,16 +11,3 @@
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("0181e263-f7cc-4a86-aa69-094036252e9a")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
Index: Core/Plugins/src/Core.Plugins.OxyPlot/ChartingRibbon.xaml.cs
===================================================================
diff -u -r10a16f2a08c6a50176351ae46c9a23a37ab92e28 -ra70fac40e34e16bed007b1d0d4e437d91c89d0cb
--- Core/Plugins/src/Core.Plugins.OxyPlot/ChartingRibbon.xaml.cs (.../ChartingRibbon.xaml.cs) (revision 10a16f2a08c6a50176351ae46c9a23a37ab92e28)
+++ Core/Plugins/src/Core.Plugins.OxyPlot/ChartingRibbon.xaml.cs (.../ChartingRibbon.xaml.cs) (revision a70fac40e34e16bed007b1d0d4e437d91c89d0cb)
@@ -33,8 +33,14 @@
{
get
{
- yield return OpenChartViewCommand;
- yield return ToggleLegendViewCommand;
+ if (OpenChartViewCommand != null)
+ {
+ yield return OpenChartViewCommand;
+ }
+ if (ToggleLegendViewCommand != null)
+ {
+ yield return ToggleLegendViewCommand;
+ }
}
}
Index: Core/Plugins/src/Core.Plugins.OxyPlot/Commands/OpenChartViewCommand.cs
===================================================================
diff -u -r51a1d01aacd31638434df31702386d9a8c8f9a17 -ra70fac40e34e16bed007b1d0d4e437d91c89d0cb
--- Core/Plugins/src/Core.Plugins.OxyPlot/Commands/OpenChartViewCommand.cs (.../OpenChartViewCommand.cs) (revision 51a1d01aacd31638434df31702386d9a8c8f9a17)
+++ Core/Plugins/src/Core.Plugins.OxyPlot/Commands/OpenChartViewCommand.cs (.../OpenChartViewCommand.cs) (revision a70fac40e34e16bed007b1d0d4e437d91c89d0cb)
@@ -2,11 +2,16 @@
using System.Collections.ObjectModel;
using Core.Common.Gui;
using Core.Components.OxyPlot.Data;
+using Core.Plugins.OxyPlot.Forms;
using OxyPlot;
namespace Core.Plugins.OxyPlot.Commands
{
+ ///
+ /// This class describes the command for opening a with some random data.
+ ///
public class OpenChartViewCommand : IGuiCommand {
+
public bool Enabled
{
get
Index: Core/Plugins/src/Core.Plugins.OxyPlot/Commands/ToggleLegendViewCommand.cs
===================================================================
diff -u -r03d5df1364557b6f4a184908affb7754e58b3fa4 -ra70fac40e34e16bed007b1d0d4e437d91c89d0cb
--- Core/Plugins/src/Core.Plugins.OxyPlot/Commands/ToggleLegendViewCommand.cs (.../ToggleLegendViewCommand.cs) (revision 03d5df1364557b6f4a184908affb7754e58b3fa4)
+++ Core/Plugins/src/Core.Plugins.OxyPlot/Commands/ToggleLegendViewCommand.cs (.../ToggleLegendViewCommand.cs) (revision a70fac40e34e16bed007b1d0d4e437d91c89d0cb)
@@ -4,8 +4,7 @@
namespace Core.Plugins.OxyPlot.Commands
{
///
- /// This class describes commands which control the state of a and uses a
- /// to do so. The state of this command is determined by the state of the .
+ /// This class describes the command which toggles the .
///
public class ToggleLegendViewCommand : ICommand
{
Index: Core/Plugins/src/Core.Plugins.OxyPlot/Core.Plugins.OxyPlot.csproj
===================================================================
diff -u -r570101d9648e296b96c7e624c4d4f6bfad8d41b6 -ra70fac40e34e16bed007b1d0d4e437d91c89d0cb
--- Core/Plugins/src/Core.Plugins.OxyPlot/Core.Plugins.OxyPlot.csproj (.../Core.Plugins.OxyPlot.csproj) (revision 570101d9648e296b96c7e624c4d4f6bfad8d41b6)
+++ Core/Plugins/src/Core.Plugins.OxyPlot/Core.Plugins.OxyPlot.csproj (.../Core.Plugins.OxyPlot.csproj) (revision a70fac40e34e16bed007b1d0d4e437d91c89d0cb)
@@ -80,7 +80,7 @@
UserControl
-
+
Fisheye: Tag a70fac40e34e16bed007b1d0d4e437d91c89d0cb refers to a dead (removed) revision in file `Core/Plugins/src/Core.Plugins.OxyPlot/IOxyPlotGuiPlugin.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Core/Plugins/src/Core.Plugins.OxyPlot/IToolViewController.cs
===================================================================
diff -u
--- Core/Plugins/src/Core.Plugins.OxyPlot/IToolViewController.cs (revision 0)
+++ Core/Plugins/src/Core.Plugins.OxyPlot/IToolViewController.cs (revision a70fac40e34e16bed007b1d0d4e437d91c89d0cb)
@@ -0,0 +1,29 @@
+using Core.Common.Controls.Views;
+
+namespace Core.Plugins.OxyPlot
+{
+ ///
+ /// Interface defining methods for controlling the tool instances.
+ ///
+ public interface IToolViewController {
+
+ ///
+ /// Checks whether a tool window of type is open.
+ ///
+ /// The type of tool window to check for.
+ /// true if a tool window of type is open, false otherwise.
+ bool IsToolWindowOpen();
+
+ ///
+ /// Open the tool view and make it visible in the interface.
+ ///
+ /// The tool view to open.
+ void OpenToolView(IView toolView);
+
+ ///
+ /// Close the tool view removing it from the interface.
+ ///
+ /// The tool view to close.
+ void CloseToolView(IView toolView);
+ }
+}
\ No newline at end of file
Index: Core/Plugins/src/Core.Plugins.OxyPlot/Legend/ChartDataNodePresenter.cs
===================================================================
diff -u -r5fa6d278e3763a01d20799215bec6f6e398ee417 -ra70fac40e34e16bed007b1d0d4e437d91c89d0cb
--- Core/Plugins/src/Core.Plugins.OxyPlot/Legend/ChartDataNodePresenter.cs (.../ChartDataNodePresenter.cs) (revision 5fa6d278e3763a01d20799215bec6f6e398ee417)
+++ Core/Plugins/src/Core.Plugins.OxyPlot/Legend/ChartDataNodePresenter.cs (.../ChartDataNodePresenter.cs) (revision a70fac40e34e16bed007b1d0d4e437d91c89d0cb)
@@ -1,5 +1,7 @@
+using System;
using Core.Common.Controls.TreeView;
using Core.Components.OxyPlot.Data;
+using Core.Plugins.OxyPlot.Properties;
namespace Core.Plugins.OxyPlot.Legend
{
@@ -10,19 +12,25 @@
{
public override void UpdateNode(TreeNode parentNode, TreeNode node, IChartData nodeData)
{
- node.Text = nodeData.GetType().Name;
if (nodeData is AreaData)
{
- node.Image = Properties.Resources.AreaIcon;
+ node.Text = Resources.ChartDataNodePresenter_Area_data_label;
+ node.Image = Resources.AreaIcon;
}
- if (nodeData is LineData)
+ else if (nodeData is LineData)
{
- node.Image = Properties.Resources.LineIcon;
+ node.Text = Resources.ChartDataNodePresenter_Line_data_label;
+ node.Image = Resources.LineIcon;
}
- if (nodeData is PointData)
+ else if (nodeData is PointData)
{
- node.Image = Properties.Resources.PointsIcon;
+ node.Text = Resources.ChartDataNodePresenter_Point_data_label;
+ node.Image = Resources.PointsIcon;
}
+ else
+ {
+ throw new NotSupportedException("Cannot add chart data of type other than points, lines or area.");
+ }
node.ShowCheckBox = true;
node.Checked = true;
}
Index: Core/Plugins/src/Core.Plugins.OxyPlot/Legend/LegendController.cs
===================================================================
diff -u -r570101d9648e296b96c7e624c4d4f6bfad8d41b6 -ra70fac40e34e16bed007b1d0d4e437d91c89d0cb
--- Core/Plugins/src/Core.Plugins.OxyPlot/Legend/LegendController.cs (.../LegendController.cs) (revision 570101d9648e296b96c7e624c4d4f6bfad8d41b6)
+++ Core/Plugins/src/Core.Plugins.OxyPlot/Legend/LegendController.cs (.../LegendController.cs) (revision a70fac40e34e16bed007b1d0d4e437d91c89d0cb)
@@ -5,18 +5,18 @@
namespace Core.Plugins.OxyPlot.Legend
{
///
- /// This class controls the actions which are related to a and act upon a .
+ /// This class controls the actions which are related to controlling visibility and updating contents of a .
///
public class LegendController
{
- private readonly IOxyPlotGuiPlugin plugin;
+ private readonly IToolViewController plugin;
private IView legendView;
///
/// Creates a new instance of .
///
/// The to invoke actions upon.
- public LegendController(IOxyPlotGuiPlugin plugin)
+ public LegendController(IToolViewController plugin)
{
if (plugin == null)
{
Index: Core/Plugins/src/Core.Plugins.OxyPlot/Legend/LegendTreeView.cs
===================================================================
diff -u -r51a1d01aacd31638434df31702386d9a8c8f9a17 -ra70fac40e34e16bed007b1d0d4e437d91c89d0cb
--- Core/Plugins/src/Core.Plugins.OxyPlot/Legend/LegendTreeView.cs (.../LegendTreeView.cs) (revision 51a1d01aacd31638434df31702386d9a8c8f9a17)
+++ Core/Plugins/src/Core.Plugins.OxyPlot/Legend/LegendTreeView.cs (.../LegendTreeView.cs) (revision a70fac40e34e16bed007b1d0d4e437d91c89d0cb)
@@ -3,14 +3,23 @@
namespace Core.Plugins.OxyPlot.Legend
{
+ ///
+ /// This class extends the so that it can visualize charting data.
+ ///
public class LegendTreeView : TreeView
{
+ ///
+ /// Creates a new instance of .
+ ///
public LegendTreeView()
{
RegisterNodePresenter(new ChartDataNodePresenter());
RegisterNodePresenter(new ChartNodePresenter());
}
+ ///
+ /// Gets or sets the that is used as the source of the .
+ ///
public BaseChart Chart
{
get
Index: Core/Plugins/src/Core.Plugins.OxyPlot/OxyPlotGuiPlugin.cs
===================================================================
diff -u -rb6dea7374102ce7e7a8f13cf127ea01c36e03eb9 -ra70fac40e34e16bed007b1d0d4e437d91c89d0cb
--- Core/Plugins/src/Core.Plugins.OxyPlot/OxyPlotGuiPlugin.cs (.../OxyPlotGuiPlugin.cs) (revision b6dea7374102ce7e7a8f13cf127ea01c36e03eb9)
+++ Core/Plugins/src/Core.Plugins.OxyPlot/OxyPlotGuiPlugin.cs (.../OxyPlotGuiPlugin.cs) (revision a70fac40e34e16bed007b1d0d4e437d91c89d0cb)
@@ -13,7 +13,7 @@
namespace Core.Plugins.OxyPlot
{
- public class OxyPlotGuiPlugin : GuiPlugin, IOxyPlotGuiPlugin
+ public class OxyPlotGuiPlugin : GuiPlugin, IToolViewController
{
private ChartingRibbon chartingRibbon;
private LegendController legendController;
@@ -74,12 +74,12 @@
///
/// Creates a new .
///
- /// The to use for the controller
+ /// The to use for the controller
/// .
/// A new instance.
- private static LegendController CreateLegendController(IOxyPlotGuiPlugin oxyPlotGuiPlugin)
+ private static LegendController CreateLegendController(IToolViewController toolViewController)
{
- var controller = new LegendController(oxyPlotGuiPlugin);
+ var controller = new LegendController(toolViewController);
return controller;
}
Index: Core/Plugins/src/Core.Plugins.OxyPlot/Properties/Resources.Designer.cs
===================================================================
diff -u -r10a16f2a08c6a50176351ae46c9a23a37ab92e28 -ra70fac40e34e16bed007b1d0d4e437d91c89d0cb
--- Core/Plugins/src/Core.Plugins.OxyPlot/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 10a16f2a08c6a50176351ae46c9a23a37ab92e28)
+++ Core/Plugins/src/Core.Plugins.OxyPlot/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision a70fac40e34e16bed007b1d0d4e437d91c89d0cb)
@@ -71,6 +71,33 @@
}
///
+ /// Looks up a localized string similar to Gebied.
+ ///
+ public static string ChartDataNodePresenter_Area_data_label {
+ get {
+ return ResourceManager.GetString("ChartDataNodePresenter_Area_data_label", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Lijn.
+ ///
+ public static string ChartDataNodePresenter_Line_data_label {
+ get {
+ return ResourceManager.GetString("ChartDataNodePresenter_Line_data_label", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Punten.
+ ///
+ public static string ChartDataNodePresenter_Point_data_label {
+ get {
+ return ResourceManager.GetString("ChartDataNodePresenter_Point_data_label", resourceCulture);
+ }
+ }
+
+ ///
/// Looks up a localized resource of type System.Drawing.Bitmap.
///
public static System.Drawing.Bitmap ChartIcon {
Index: Core/Plugins/src/Core.Plugins.OxyPlot/Properties/Resources.resx
===================================================================
diff -u -r10a16f2a08c6a50176351ae46c9a23a37ab92e28 -ra70fac40e34e16bed007b1d0d4e437d91c89d0cb
--- Core/Plugins/src/Core.Plugins.OxyPlot/Properties/Resources.resx (.../Resources.resx) (revision 10a16f2a08c6a50176351ae46c9a23a37ab92e28)
+++ Core/Plugins/src/Core.Plugins.OxyPlot/Properties/Resources.resx (.../Resources.resx) (revision a70fac40e34e16bed007b1d0d4e437d91c89d0cb)
@@ -121,6 +121,15 @@
..\resources\area.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+ Gebied
+
+
+ Lijn
+
+
+ Punten
+
..\resources\chart.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
Index: Core/Plugins/test/Core.Plugins.Charting.Test/Properties/AssemblyInfo.cs
===================================================================
diff -u -rf0c2a16f1d03185660d0ac6fbb5fce8bb5c2ee43 -ra70fac40e34e16bed007b1d0d4e437d91c89d0cb
--- Core/Plugins/test/Core.Plugins.Charting.Test/Properties/AssemblyInfo.cs (.../AssemblyInfo.cs) (revision f0c2a16f1d03185660d0ac6fbb5fce8bb5c2ee43)
+++ Core/Plugins/test/Core.Plugins.Charting.Test/Properties/AssemblyInfo.cs (.../AssemblyInfo.cs) (revision a70fac40e34e16bed007b1d0d4e437d91c89d0cb)
@@ -1,17 +1,8 @@
using System.Reflection;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
[assembly: AssemblyTitle("Core.Plugins.Charting.Test")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("Core.Plugins.Charting.Test")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2015")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
@@ -20,16 +11,3 @@
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("92c9327e-4bfc-44c5-b2fc-9948477abf54")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
Index: Core/Plugins/test/Core.Plugins.OxyPlot.Test/ChartingRibbonTest.cs
===================================================================
diff -u -raa7438485b5bbc9b7f07e2f7800c1acd4a23a7b5 -ra70fac40e34e16bed007b1d0d4e437d91c89d0cb
--- Core/Plugins/test/Core.Plugins.OxyPlot.Test/ChartingRibbonTest.cs (.../ChartingRibbonTest.cs) (revision aa7438485b5bbc9b7f07e2f7800c1acd4a23a7b5)
+++ Core/Plugins/test/Core.Plugins.OxyPlot.Test/ChartingRibbonTest.cs (.../ChartingRibbonTest.cs) (revision a70fac40e34e16bed007b1d0d4e437d91c89d0cb)
@@ -1,11 +1,11 @@
using System.Linq;
using System.Windows;
-using System.Windows.Controls.Primitives;
using Core.Plugins.OxyPlot.Commands;
using Core.Plugins.OxyPlot.Legend;
-using Fluent;
using NUnit.Framework;
using Rhino.Mocks;
+using Button = Fluent.Button;
+using ButtonBase = System.Windows.Controls.Primitives.ButtonBase;
using ICommand = Core.Common.Controls.Commands.ICommand;
using ToggleButton = Fluent.ToggleButton;
@@ -16,16 +16,13 @@
{
[Test]
[RequiresSTA]
- public void Commands_NoCommandsAssigned_ReturnsNullForCommands()
+ public void Commands_NoCommandsAssigned_ReturnsEmptyCommandsCollection()
{
// Setup
var ribbon = new ChartingRibbon();
- // Call
- var commands = ribbon.Commands.ToArray();
-
- // Assert
- CollectionAssert.AreEqual(Enumerable.Repeat(null,2),commands);
+ // Call & Assert
+ CollectionAssert.IsEmpty(ribbon.Commands);
}
[Test]
Index: Core/Plugins/test/Core.Plugins.OxyPlot.Test/Commands/ToggleLegendViewCommandTest.cs
===================================================================
diff -u -r03d5df1364557b6f4a184908affb7754e58b3fa4 -ra70fac40e34e16bed007b1d0d4e437d91c89d0cb
--- Core/Plugins/test/Core.Plugins.OxyPlot.Test/Commands/ToggleLegendViewCommandTest.cs (.../ToggleLegendViewCommandTest.cs) (revision 03d5df1364557b6f4a184908affb7754e58b3fa4)
+++ Core/Plugins/test/Core.Plugins.OxyPlot.Test/Commands/ToggleLegendViewCommandTest.cs (.../ToggleLegendViewCommandTest.cs) (revision a70fac40e34e16bed007b1d0d4e437d91c89d0cb)
@@ -41,7 +41,7 @@
{
// Setup
var mocks = new MockRepository();
- var plugin = mocks.StrictMock();
+ var plugin = mocks.StrictMock();
plugin.Expect(p => p.IsToolWindowOpen()).Return(open);
mocks.ReplayAll();
@@ -62,16 +62,18 @@
{
// Setup
var mocks = new MockRepository();
- var plugin = mocks.StrictMock();
+ var plugin = mocks.StrictMock();
// Open first
- plugin.Expect(p => p.IsToolWindowOpen()).Return(false);
- plugin.Expect(p => p.OpenToolView(Arg.Matches(v => true)));
+ using (mocks.Ordered())
+ {
+ plugin.Expect(p => p.IsToolWindowOpen()).Return(false);
+ plugin.Expect(p => p.OpenToolView(Arg.Matches(v => true)));
- // Then close
- plugin.Expect(p => p.IsToolWindowOpen()).Return(true);
- plugin.Expect(p => p.CloseToolView(Arg.Matches(v => true)));
-
+ // Then close
+ plugin.Expect(p => p.IsToolWindowOpen()).Return(true);
+ plugin.Expect(p => p.CloseToolView(Arg.Matches(v => true)));
+ }
mocks.ReplayAll();
var controller = new LegendController(plugin);
Index: Core/Plugins/test/Core.Plugins.OxyPlot.Test/Legend/ChartDataNodePresenterTest.cs
===================================================================
diff -u -r51a1d01aacd31638434df31702386d9a8c8f9a17 -ra70fac40e34e16bed007b1d0d4e437d91c89d0cb
--- Core/Plugins/test/Core.Plugins.OxyPlot.Test/Legend/ChartDataNodePresenterTest.cs (.../ChartDataNodePresenterTest.cs) (revision 51a1d01aacd31638434df31702386d9a8c8f9a17)
+++ Core/Plugins/test/Core.Plugins.OxyPlot.Test/Legend/ChartDataNodePresenterTest.cs (.../ChartDataNodePresenterTest.cs) (revision a70fac40e34e16bed007b1d0d4e437d91c89d0cb)
@@ -23,6 +23,8 @@
// Assert
Assert.IsInstanceOf>(nodePresenter);
+ Assert.IsNull(nodePresenter.TreeView);
+ Assert.AreEqual(typeof(IChartData), nodePresenter.NodeTagType);
}
[Test]
@@ -36,7 +38,7 @@
nodePresenter.UpdateNode(null, treeNode, new PointData(emptyCollection));
// Assert
- Assert.AreEqual("PointData", treeNode.Text);
+ Assert.AreEqual("Punten", treeNode.Text);
Assert.IsTrue(treeNode.ShowCheckBox);
Assert.IsTrue(treeNode.Checked);
TestHelper.AssertImagesAreEqual(Resources.PointsIcon, treeNode.Image);
@@ -53,7 +55,7 @@
nodePresenter.UpdateNode(null, treeNode, new LineData(emptyCollection));
// Assert
- Assert.AreEqual("LineData", treeNode.Text);
+ Assert.AreEqual("Lijn", treeNode.Text);
TestHelper.AssertImagesAreEqual(Resources.LineIcon, treeNode.Image);
}
@@ -68,24 +70,23 @@
nodePresenter.UpdateNode(null, treeNode, new AreaData(emptyCollection));
// Assert
- Assert.AreEqual("AreaData", treeNode.Text);
+ Assert.AreEqual("Gebied", treeNode.Text);
TestHelper.AssertImagesAreEqual(Resources.AreaIcon, treeNode.Image);
}
[Test]
- public void UpdateNode_ForOtherIChartData_SetsText()
+ public void UpdateNode_ForOtherIChartData_ThrowsNotSupportedException()
{
// Setup
var nodePresenter = new ChartDataNodePresenter();
var treeNode = new TreeNode(null);
var data = new TestChartData();
// Call
- nodePresenter.UpdateNode(null, treeNode, data);
+ TestDelegate test = () => nodePresenter.UpdateNode(null, treeNode, data);
// Assert
- Assert.AreEqual("TestChartData", treeNode.Text);
- Assert.IsNull(treeNode.Image);
+ Assert.Throws(test);
}
}
Index: Core/Plugins/test/Core.Plugins.OxyPlot.Test/Legend/ChartNodePresenterTest.cs
===================================================================
diff -u -r10a16f2a08c6a50176351ae46c9a23a37ab92e28 -ra70fac40e34e16bed007b1d0d4e437d91c89d0cb
--- Core/Plugins/test/Core.Plugins.OxyPlot.Test/Legend/ChartNodePresenterTest.cs (.../ChartNodePresenterTest.cs) (revision 10a16f2a08c6a50176351ae46c9a23a37ab92e28)
+++ Core/Plugins/test/Core.Plugins.OxyPlot.Test/Legend/ChartNodePresenterTest.cs (.../ChartNodePresenterTest.cs) (revision a70fac40e34e16bed007b1d0d4e437d91c89d0cb)
@@ -20,6 +20,8 @@
// Assert
Assert.IsInstanceOf>(nodePresenter);
+ Assert.IsNull(nodePresenter.TreeView);
+ Assert.AreEqual(typeof(BaseChart), nodePresenter.NodeTagType);
}
[Test]
@@ -42,14 +44,13 @@
{
// Setup
var nodePresenter = new ChartNodePresenter();
- var treeNode = new TreeNode(null);
var chart = new BaseChart();
// Call
var result = nodePresenter.GetChildNodeObjects(chart);
// Assert
- Assert.AreSame(chart.Model.Series, result);
+ CollectionAssert.AreEquivalent(chart.Model.Series, result);
}
}
}
\ No newline at end of file
Index: Core/Plugins/test/Core.Plugins.OxyPlot.Test/Legend/LegendControllerTest.cs
===================================================================
diff -u -r03d5df1364557b6f4a184908affb7754e58b3fa4 -ra70fac40e34e16bed007b1d0d4e437d91c89d0cb
--- Core/Plugins/test/Core.Plugins.OxyPlot.Test/Legend/LegendControllerTest.cs (.../LegendControllerTest.cs) (revision 03d5df1364557b6f4a184908affb7754e58b3fa4)
+++ Core/Plugins/test/Core.Plugins.OxyPlot.Test/Legend/LegendControllerTest.cs (.../LegendControllerTest.cs) (revision a70fac40e34e16bed007b1d0d4e437d91c89d0cb)
@@ -39,7 +39,7 @@
{
// Setup
var mocks = new MockRepository();
- var plugin = mocks.StrictMock();
+ var plugin = mocks.StrictMock();
plugin.Expect(p => p.IsToolWindowOpen()).Return(open);
mocks.ReplayAll();
@@ -61,7 +61,7 @@
{
// Setup
var mocks = new MockRepository();
- var plugin = mocks.StrictMock();
+ var plugin = mocks.StrictMock();
if (open)
{
plugin.Expect(p => p.IsToolWindowOpen()).Return(false);
Index: Core/Plugins/test/Core.Plugins.OxyPlot.Test/Legend/LegendTreeViewTest.cs
===================================================================
diff -u -r10a16f2a08c6a50176351ae46c9a23a37ab92e28 -ra70fac40e34e16bed007b1d0d4e437d91c89d0cb
--- Core/Plugins/test/Core.Plugins.OxyPlot.Test/Legend/LegendTreeViewTest.cs (.../LegendTreeViewTest.cs) (revision 10a16f2a08c6a50176351ae46c9a23a37ab92e28)
+++ Core/Plugins/test/Core.Plugins.OxyPlot.Test/Legend/LegendTreeViewTest.cs (.../LegendTreeViewTest.cs) (revision a70fac40e34e16bed007b1d0d4e437d91c89d0cb)
@@ -17,6 +17,7 @@
Assert.AreEqual(2, view.NodePresenters.Count());
Assert.IsInstanceOf(view.NodePresenters.ElementAt(0));
Assert.IsInstanceOf(view.NodePresenters.ElementAt(1));
+ Assert.IsNull(view.Chart);
}
}
}
\ No newline at end of file
Index: Core/Plugins/test/Core.Plugins.OxyPlot.Test/Legend/LegendViewTest.cs
===================================================================
diff -u -r570101d9648e296b96c7e624c4d4f6bfad8d41b6 -ra70fac40e34e16bed007b1d0d4e437d91c89d0cb
--- Core/Plugins/test/Core.Plugins.OxyPlot.Test/Legend/LegendViewTest.cs (.../LegendViewTest.cs) (revision 570101d9648e296b96c7e624c4d4f6bfad8d41b6)
+++ Core/Plugins/test/Core.Plugins.OxyPlot.Test/Legend/LegendViewTest.cs (.../LegendViewTest.cs) (revision a70fac40e34e16bed007b1d0d4e437d91c89d0cb)
@@ -3,6 +3,7 @@
using Core.Common.Controls.Views;
using Core.Components.OxyPlot.Forms;
using Core.Plugins.OxyPlot.Legend;
+using Core.Plugins.OxyPlot.Properties;
using NUnit.Framework;
namespace Core.Plugins.OxyPlot.Test.Legend
@@ -19,6 +20,8 @@
// Assert
Assert.IsInstanceOf(view);
Assert.IsInstanceOf(view);
+ Assert.IsNull(view.Data);
+ Assert.AreEqual(Resources.General_Chart, view.Text);
}
[Test]
@@ -36,6 +39,19 @@
}
[Test]
+ public void Data_ForNull_NullSet()
+ {
+ // Setup
+ var view = new LegendView();
+
+ // Call
+ view.Data = null;
+
+ // Assert
+ Assert.IsNull(view.Data);
+ }
+
+ [Test]
public void Data_OtherObject_ThrowsInvalidCastException()
{
// Setup
Index: Core/Plugins/test/Core.Plugins.OxyPlot.Test/OxyPlotGuiPluginTest.cs
===================================================================
diff -u -r51a1d01aacd31638434df31702386d9a8c8f9a17 -ra70fac40e34e16bed007b1d0d4e437d91c89d0cb
--- Core/Plugins/test/Core.Plugins.OxyPlot.Test/OxyPlotGuiPluginTest.cs (.../OxyPlotGuiPluginTest.cs) (revision 51a1d01aacd31638434df31702386d9a8c8f9a17)
+++ Core/Plugins/test/Core.Plugins.OxyPlot.Test/OxyPlotGuiPluginTest.cs (.../OxyPlotGuiPluginTest.cs) (revision a70fac40e34e16bed007b1d0d4e437d91c89d0cb)
@@ -195,9 +195,13 @@
public class TestChartView : Control, IChartView
{
public object Data { get; set; }
- public BaseChart Chart { get
+
+ public BaseChart Chart
{
- return (BaseChart) Data;
- } }
+ get
+ {
+ return (BaseChart) Data;
+ }
+ }
}
}
\ No newline at end of file
Index: Core/Plugins/test/Core.Plugins.ProjectExplorer.Test/Properties/AssemblyInfo.cs
===================================================================
diff -u -rb824d24e9f2698cfd0ba7f253ffd037266c16dc4 -ra70fac40e34e16bed007b1d0d4e437d91c89d0cb
--- Core/Plugins/test/Core.Plugins.ProjectExplorer.Test/Properties/AssemblyInfo.cs (.../AssemblyInfo.cs) (revision b824d24e9f2698cfd0ba7f253ffd037266c16dc4)
+++ Core/Plugins/test/Core.Plugins.ProjectExplorer.Test/Properties/AssemblyInfo.cs (.../AssemblyInfo.cs) (revision a70fac40e34e16bed007b1d0d4e437d91c89d0cb)
@@ -1,6 +1,5 @@
using System.Reflection;
using System.Runtime.InteropServices;
-using NUnit.Framework;
[assembly: AssemblyTitle("Core.Plugins.ProjectExplorer.Test")]
[assembly: AssemblyProduct("Core.Plugins.ProjectExplorer.Test")]
Index: Core/Plugins/test/Core.Plugins.SharpMapGis.Test/Properties/AssemblyInfo.cs
===================================================================
diff -u -rb824d24e9f2698cfd0ba7f253ffd037266c16dc4 -ra70fac40e34e16bed007b1d0d4e437d91c89d0cb
--- Core/Plugins/test/Core.Plugins.SharpMapGis.Test/Properties/AssemblyInfo.cs (.../AssemblyInfo.cs) (revision b824d24e9f2698cfd0ba7f253ffd037266c16dc4)
+++ Core/Plugins/test/Core.Plugins.SharpMapGis.Test/Properties/AssemblyInfo.cs (.../AssemblyInfo.cs) (revision a70fac40e34e16bed007b1d0d4e437d91c89d0cb)
@@ -1,6 +1,5 @@
using System.Reflection;
using System.Runtime.InteropServices;
-using NUnit.Framework;
[assembly: AssemblyTitle("Core.Plugins.SharpMapGis.Test")]
[assembly: AssemblyProduct("Core.Plugins.SharpMapGis.Test")]