Index: Core/Plugins/src/Core.Plugins.Chart/ChartPlugin.cs =================================================================== diff -u -rcbde09a1860a8a4480b958d6671de3480b995886 -r8fd5a65907925ec5246fc0630745a5a0ff52ef4d --- Core/Plugins/src/Core.Plugins.Chart/ChartPlugin.cs (.../ChartPlugin.cs) (revision cbde09a1860a8a4480b958d6671de3480b995886) +++ Core/Plugins/src/Core.Plugins.Chart/ChartPlugin.cs (.../ChartPlugin.cs) (revision 8fd5a65907925ec5246fc0630745a5a0ff52ef4d) @@ -22,12 +22,10 @@ using System; using System.Collections.Generic; using Core.Common.Gui; -using Core.Common.Gui.Forms; using Core.Common.Gui.Forms.ViewHost; using Core.Common.Gui.Plugin; using Core.Components.Chart.Data; using Core.Components.Chart.Forms; -using Core.Plugins.Chart.Commands; using Core.Plugins.Chart.Legend; using Core.Plugins.Chart.PropertyClasses; @@ -40,27 +38,18 @@ { private bool activated; private IChartView currentChartView; - private ChartingRibbon chartingRibbon; private ChartLegendController chartLegendController; - public override IRibbonCommandHandler RibbonCommandHandler - { - get - { - return chartingRibbon; - } - } - public override void Activate() { chartLegendController = CreateLegendController(Gui); - chartingRibbon = CreateRibbon(chartLegendController); - chartLegendController.ToggleView(); + Gui.ViewHost.ViewOpened += OnViewOpened; Gui.ViewHost.ViewBroughtToFront += OnViewBroughtToFront; Gui.ViewHost.ViewClosed += OnViewClosed; Gui.ViewHost.ActiveDocumentViewChanged += OnActiveDocumentViewChanged; + activated = true; } @@ -100,20 +89,6 @@ return controller; } - /// - /// Creates the and the commands that will be used when clicking on the buttons. - /// - /// The to use for the - /// . - /// A new instance. - private static ChartingRibbon CreateRibbon(ChartLegendController chartLegendController) - { - return new ChartingRibbon - { - ToggleLegendViewCommand = new ToggleLegendViewCommand(chartLegendController) - }; - } - private void OnViewOpened(object sender, ViewChangeEventArgs e) { UpdateComponentsForView(e.View as IChartView); @@ -150,10 +125,7 @@ } currentChartView = chartView; - - IChartControl chartControl = chartView?.Chart; - chartLegendController.Update(chartControl); - chartingRibbon.Chart = chartControl; + chartLegendController.Update(chartView?.Chart); } } } \ No newline at end of file Fisheye: Tag 8fd5a65907925ec5246fc0630745a5a0ff52ef4d refers to a dead (removed) revision in file `Core/Plugins/src/Core.Plugins.Chart/ChartingRibbon.xaml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 8fd5a65907925ec5246fc0630745a5a0ff52ef4d refers to a dead (removed) revision in file `Core/Plugins/src/Core.Plugins.Chart/ChartingRibbon.xaml.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Core/Plugins/src/Core.Plugins.Chart/Core.Plugins.Chart.csproj =================================================================== diff -u -rb971159ac2c4a43328cdb59b3eb28728b6505dad -r8fd5a65907925ec5246fc0630745a5a0ff52ef4d --- Core/Plugins/src/Core.Plugins.Chart/Core.Plugins.Chart.csproj (.../Core.Plugins.Chart.csproj) (revision b971159ac2c4a43328cdb59b3eb28728b6505dad) +++ Core/Plugins/src/Core.Plugins.Chart/Core.Plugins.Chart.csproj (.../Core.Plugins.Chart.csproj) (revision 8fd5a65907925ec5246fc0630745a5a0ff52ef4d) @@ -20,12 +20,6 @@ - - MSBuild:Compile - Designer - - - Index: Core/Plugins/src/Core.Plugins.Chart/Properties/Resources.Designer.cs =================================================================== diff -u -rcbde09a1860a8a4480b958d6671de3480b995886 -r8fd5a65907925ec5246fc0630745a5a0ff52ef4d --- Core/Plugins/src/Core.Plugins.Chart/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision cbde09a1860a8a4480b958d6671de3480b995886) +++ Core/Plugins/src/Core.Plugins.Chart/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 8fd5a65907925ec5246fc0630745a5a0ff52ef4d) @@ -40,7 +40,7 @@ // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class Resources { @@ -459,24 +459,6 @@ } /// - /// Looks up a localized string similar to Grafieken. - /// - public static string Ribbon_ContextualGroup_Charting { - get { - return ResourceManager.GetString("Ribbon_ContextualGroup_Charting", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Navigatie. - /// - public static string Ribbon_GroupBox_Navigation { - get { - return ResourceManager.GetString("Ribbon_GroupBox_Navigation", resourceCulture); - } - } - - /// /// Looks up a localized string similar to Grafiek. /// public static string Ribbon_Toggle_Legend { Index: Core/Plugins/src/Core.Plugins.Chart/Properties/Resources.resx =================================================================== diff -u -r6a1093e75bdf23c60232116445c086ebb5319558 -r8fd5a65907925ec5246fc0630745a5a0ff52ef4d --- Core/Plugins/src/Core.Plugins.Chart/Properties/Resources.resx (.../Resources.resx) (revision 6a1093e75bdf23c60232116445c086ebb5319558) +++ Core/Plugins/src/Core.Plugins.Chart/Properties/Resources.resx (.../Resources.resx) (revision 8fd5a65907925ec5246fc0630745a5a0ff52ef4d) @@ -139,12 +139,6 @@ ..\resources\zoomrectangle.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - Grafieken - - - Navigatie - Grafiek Index: Core/Plugins/test/Core.Plugins.Chart.Test/ChartPluginTest.cs =================================================================== diff -u -rcbde09a1860a8a4480b958d6671de3480b995886 -r8fd5a65907925ec5246fc0630745a5a0ff52ef4d --- Core/Plugins/test/Core.Plugins.Chart.Test/ChartPluginTest.cs (.../ChartPluginTest.cs) (revision cbde09a1860a8a4480b958d6671de3480b995886) +++ Core/Plugins/test/Core.Plugins.Chart.Test/ChartPluginTest.cs (.../ChartPluginTest.cs) (revision 8fd5a65907925ec5246fc0630745a5a0ff52ef4d) @@ -224,18 +224,15 @@ var view = new TestChartView(); IViewHost guiViewHost = gui.ViewHost; ChartLegendView chartLegendView = guiViewHost.ToolViews.OfType().First(); - var chartingRibbon = (ChartingRibbon) plugin.RibbonCommandHandler; // Precondition Assert.IsNull(GetChartControl(chartLegendView)); - Assert.IsNull(GetChartControl(chartingRibbon)); // When guiViewHost.AddDocumentView(view); // Then Assert.AreSame(view.Chart, GetChartControl(chartLegendView)); - Assert.AreSame(view.Chart, GetChartControl(chartingRibbon)); } Dispatcher.CurrentDispatcher.InvokeShutdown(); @@ -268,21 +265,18 @@ var view2 = new TestChartView(); IViewHost guiViewHost = gui.ViewHost; ChartLegendView chartLegendView = guiViewHost.ToolViews.OfType().First(); - var chartingRibbon = (ChartingRibbon) plugin.RibbonCommandHandler; guiViewHost.AddDocumentView(view1); guiViewHost.AddDocumentView(view2); // Precondition Assert.AreSame(view2.Chart, GetChartControl(chartLegendView)); - Assert.AreSame(view2.Chart, GetChartControl(chartingRibbon)); // When guiViewHost.BringToFront(view1); // Then Assert.AreSame(view1.Chart, GetChartControl(chartLegendView)); - Assert.AreSame(view1.Chart, GetChartControl(chartingRibbon)); } Dispatcher.CurrentDispatcher.InvokeShutdown(); @@ -314,20 +308,17 @@ var view = new TestChartView(); IViewHost guiViewHost = gui.ViewHost; ChartLegendView chartLegendView = guiViewHost.ToolViews.OfType().First(); - var chartingRibbon = (ChartingRibbon) plugin.RibbonCommandHandler; guiViewHost.AddDocumentView(view); // Precondition Assert.AreSame(view.Chart, GetChartControl(chartLegendView)); - Assert.AreSame(view.Chart, GetChartControl(chartingRibbon)); // When guiViewHost.Remove(view); // Then Assert.IsNull(GetChartControl(chartLegendView)); - Assert.IsNull(GetChartControl(chartingRibbon)); } Dispatcher.CurrentDispatcher.InvokeShutdown(); @@ -360,32 +351,24 @@ var view2 = new TestChartView(); IViewHost guiViewHost = gui.ViewHost; ChartLegendView chartLegendView = guiViewHost.ToolViews.OfType().First(); - var chartingRibbon = (ChartingRibbon) plugin.RibbonCommandHandler; guiViewHost.AddDocumentView(view1); guiViewHost.AddDocumentView(view2); // Precondition Assert.AreSame(view2.Chart, GetChartControl(chartLegendView)); - Assert.AreSame(view2.Chart, GetChartControl(chartingRibbon)); // When guiViewHost.Remove(view1); // Then Assert.AreSame(view2.Chart, GetChartControl(chartLegendView)); - Assert.AreSame(view2.Chart, GetChartControl(chartingRibbon)); } Dispatcher.CurrentDispatcher.InvokeShutdown(); mocks.VerifyAll(); } - private static IChartControl GetChartControl(ChartingRibbon chartRibbon) - { - return TypeUtils.GetProperty(chartRibbon, "Chart"); - } - private static IChartControl GetChartControl(ChartLegendView chartLegendView) { return TypeUtils.GetProperty(chartLegendView, "ChartControl"); Fisheye: Tag 8fd5a65907925ec5246fc0630745a5a0ff52ef4d refers to a dead (removed) revision in file `Core/Plugins/test/Core.Plugins.Chart.Test/ChartingRibbonTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Core/Plugins/test/Core.Plugins.Chart.Test/Core.Plugins.Chart.Test.csproj =================================================================== diff -u -r08e8d26a0715f0f3db57c1d3e86256aa06934db4 -r8fd5a65907925ec5246fc0630745a5a0ff52ef4d --- Core/Plugins/test/Core.Plugins.Chart.Test/Core.Plugins.Chart.Test.csproj (.../Core.Plugins.Chart.Test.csproj) (revision 08e8d26a0715f0f3db57c1d3e86256aa06934db4) +++ Core/Plugins/test/Core.Plugins.Chart.Test/Core.Plugins.Chart.Test.csproj (.../Core.Plugins.Chart.Test.csproj) (revision 8fd5a65907925ec5246fc0630745a5a0ff52ef4d) @@ -16,18 +16,18 @@ - - - - - - - - - - - - + + + + + + + + + + + +