Index: Core/Plugins/src/Core.Plugins.OxyPlot/Core.Plugins.OxyPlot.csproj
===================================================================
diff -u -r0d7895f07d2c1b15457ffdc8e8762780a5837030 -ra49c98841cb7c943ff7abbfef8110b4bf6f52a8b
--- Core/Plugins/src/Core.Plugins.OxyPlot/Core.Plugins.OxyPlot.csproj (.../Core.Plugins.OxyPlot.csproj) (revision 0d7895f07d2c1b15457ffdc8e8762780a5837030)
+++ Core/Plugins/src/Core.Plugins.OxyPlot/Core.Plugins.OxyPlot.csproj (.../Core.Plugins.OxyPlot.csproj) (revision a49c98841cb7c943ff7abbfef8110b4bf6f52a8b)
@@ -66,9 +66,6 @@
ChartDataView.cs
-
- Component
-
UserControl
Fisheye: Tag a49c98841cb7c943ff7abbfef8110b4bf6f52a8b refers to a dead (removed) revision in file `Core/Plugins/src/Core.Plugins.OxyPlot/Legend/LegendTreeView.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Core/Plugins/src/Core.Plugins.OxyPlot/Legend/LegendView.Designer.cs
===================================================================
diff -u -r2ac724ffe21f3e67a82559d0e9fb03ffa21ce995 -ra49c98841cb7c943ff7abbfef8110b4bf6f52a8b
--- Core/Plugins/src/Core.Plugins.OxyPlot/Legend/LegendView.Designer.cs (.../LegendView.Designer.cs) (revision 2ac724ffe21f3e67a82559d0e9fb03ffa21ce995)
+++ Core/Plugins/src/Core.Plugins.OxyPlot/Legend/LegendView.Designer.cs (.../LegendView.Designer.cs) (revision a49c98841cb7c943ff7abbfef8110b4bf6f52a8b)
@@ -19,7 +19,7 @@
{
components.Dispose();
}
- seriesTree.Dispose();
+ treeView.Dispose();
base.Dispose(disposing);
}
@@ -33,30 +33,29 @@
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LegendView));
- this.seriesTree = new Core.Plugins.OxyPlot.Legend.LegendTreeView();
+ this.treeView = new TreeView();
this.SuspendLayout();
//
- // seriesTree
+ // treeView
//
- this.seriesTree.AllowDrop = true;
- this.seriesTree.ChartData = null;
- resources.ApplyResources(this.seriesTree, "seriesTree");
- this.seriesTree.HideSelection = false;
- this.seriesTree.LabelEdit = true;
- this.seriesTree.Name = "seriesTree";
+ this.treeView.AllowDrop = true;
+ resources.ApplyResources(this.treeView, "treeView");
+ this.treeView.HideSelection = false;
+ this.treeView.LabelEdit = true;
+ this.treeView.Name = "treeView";
//
// LegendView
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.Controls.Add(this.seriesTree);
+ this.Controls.Add(this.treeView);
this.Name = "LegendView";
this.ResumeLayout(false);
}
#endregion
- private LegendTreeView seriesTree;
+ private TreeView treeView;
}
}
\ No newline at end of file
Index: Core/Plugins/src/Core.Plugins.OxyPlot/Legend/LegendView.cs
===================================================================
diff -u -rfbb37872d09f1ded75ce2209e8e48a6b64d8a78f -ra49c98841cb7c943ff7abbfef8110b4bf6f52a8b
--- Core/Plugins/src/Core.Plugins.OxyPlot/Legend/LegendView.cs (.../LegendView.cs) (revision fbb37872d09f1ded75ce2209e8e48a6b64d8a78f)
+++ Core/Plugins/src/Core.Plugins.OxyPlot/Legend/LegendView.cs (.../LegendView.cs) (revision a49c98841cb7c943ff7abbfef8110b4bf6f52a8b)
@@ -19,12 +19,18 @@
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
+using System.Linq;
using System.Windows.Forms;
+using Core.Common.Base;
+using Core.Common.Controls.TreeView;
using Core.Common.Controls.Views;
using Core.Components.Charting.Data;
using Core.Components.OxyPlot.Forms;
using Core.Plugins.OxyPlot.Properties;
+using OxyPlotResources = Core.Plugins.OxyPlot.Properties.Resources;
+using GuiResources = Core.Common.Gui.Properties.Resources;
+
namespace Core.Plugins.OxyPlot.Legend
{
///
@@ -39,30 +45,112 @@
{
InitializeComponent();
Text = Resources.General_Chart;
+
+ treeView.TreeViewController.RegisterTreeNodeInfo(new TreeNodeInfo
+ {
+ Text = pointData => OxyPlotResources.ChartDataNodePresenter_Point_data_label,
+ Image = pointData => OxyPlotResources.PointsIcon,
+ CanDrag = (pointData, sourceNode) => DragOperations.Move,
+ CanCheck = pointData => true,
+ IsChecked = pointData => pointData.IsVisible,
+ OnNodeChecked = PointBasedChartDataOnNodeChecked
+ });
+
+ treeView.TreeViewController.RegisterTreeNodeInfo(new TreeNodeInfo
+ {
+ Text = lineData => OxyPlotResources.ChartDataNodePresenter_Line_data_label,
+ Image = lineData => OxyPlotResources.LineIcon,
+ CanDrag = (lineData, sourceNode) => DragOperations.Move,
+ CanCheck = lineData => true,
+ IsChecked = lineData => lineData.IsVisible,
+ OnNodeChecked = PointBasedChartDataOnNodeChecked
+ });
+
+ treeView.TreeViewController.RegisterTreeNodeInfo(new TreeNodeInfo
+ {
+ Text = areaData => OxyPlotResources.ChartDataNodePresenter_Area_data_label,
+ Image = areaData => OxyPlotResources.AreaIcon,
+ CanDrag = (areaData, sourceNode) => DragOperations.Move,
+ CanCheck = areaData => true,
+ IsChecked = areaData => areaData.IsVisible,
+ OnNodeChecked = PointBasedChartDataOnNodeChecked
+ });
+
+ treeView.TreeViewController.RegisterTreeNodeInfo(new TreeNodeInfo
+ {
+ Text = baseChart => OxyPlotResources.General_Chart,
+ Image = baseChart => GuiResources.folder,
+ ChildNodeObjects = baseChart => baseChart.List.Reverse().Cast