From c5cde62cecfdd413e9902b26b30b0d4dfd05a24d Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Thu, 14 Mar 2019 13:25:32 +0200 Subject: Machine Studio v4.0.10 PPC v1.0.9 --- .../Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs index 666a56704..e78047563 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs @@ -1749,13 +1749,13 @@ namespace Tango.MachineStudio.Technician.ViewModels /// private void InitJobRunnerItem(JobRunnerItem item) { - item.StartJob += () => + item.StartJob += async () => { try { CheckMachineOperator(); - var handler = MachineOperator.Print(item.Job, item.ProcessParameters); + var handler = await MachineOperator.Print(item.Job, item.ProcessParameters); item.JobHandler = handler; -- cgit v1.3.1 From 3c5f32456c72b26497c05bb35fd64e3c77c6b0f5 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Mon, 15 Apr 2019 12:06:30 +0300 Subject: Now using the latest RealTimeGraphX library! + infinity check! --- .../Graph/WpfGraphController.cs | 36 -- .../Tango.MachineStudio.ColorCapture.csproj | 9 +- .../ViewModels/MainViewVM.cs | 16 +- .../Views/MainView.xaml | 11 +- .../Views/MainView.xaml.cs | 1 - .../Tango.MachineStudio.Developer.csproj | 6 +- .../Editors/MultiGraphElementEditor.xaml | 2 +- .../Editors/SingleGraphElementEditor.xaml | 4 +- .../Tango.MachineStudio.Technician.csproj | 14 +- .../TechGraphController.cs | 15 +- .../TechItems/MultiGraphItem.cs | 3 +- .../TechItems/SingleGraphItem.cs | 3 +- .../ViewModels/MachineTechViewVM.cs | 11 +- .../Controls/IRealTimeGraph.cs | 35 -- .../Controls/RealTimeGraphControl.xaml | 65 --- .../Controls/RealTimeGraphControl.xaml.cs | 77 --- .../Controls/WpfGraphControl.cs | 88 ++++ .../Resources/MaterialDesign.xaml | 29 +- .../Tango.MachineStudio.Common.csproj | 24 +- .../Tango.MachineStudio.Common/Themes/Generic.xaml | 87 ++++ .../Tango.MachineStudio.UI.csproj | 6 +- .../RealTimeGraphX.WPF.Demo/App.config | 6 + .../RealTimeGraphX.WPF.Demo/App.xaml | 9 + .../RealTimeGraphX.WPF.Demo/App.xaml.cs | 17 + .../RealTimeGraphX.WPF.Demo/MainWindow.xaml | 112 +++++ .../RealTimeGraphX.WPF.Demo/MainWindow.xaml.cs | 29 ++ .../RealTimeGraphX.WPF.Demo/MainWindowVM.cs | 107 ++++ .../Properties/AssemblyInfo.cs | 55 +++ .../Properties/Resources.Designer.cs | 71 +++ .../Properties/Resources.resx | 117 +++++ .../Properties/Settings.Designer.cs | 30 ++ .../Properties/Settings.settings | 7 + .../RealTimeGraphX.WPF.Demo.csproj | 116 +++++ .../RealTimeGraphX.WPF.Demo/Themes/Generic.xaml | 53 ++ .../RealTimeGraphX.WPF.Demo/WpfGraphControl.cs | 39 ++ .../RealTimeGraphX.WPF/ExtensionMethods.cs | 79 +++ .../RealTimeGraphX.WPF/Properties/AssemblyInfo.cs | 55 +++ .../Properties/Resources.Designer.cs | 62 +++ .../RealTimeGraphX.WPF/Properties/Resources.resx | 117 +++++ .../Properties/Settings.Designer.cs | 30 ++ .../Properties/Settings.settings | 7 + .../RealTimeGraphX.WPF/RealTimeGraphX.WPF.csproj | 97 ++++ .../RealTimeGraphX.WPF/Themes/Generic.xaml | 143 ++++++ .../RealTimeGraphX.WPF/WpfGraphAxisControl.cs | 172 +++++++ .../RealTimeGraphX.WPF/WpfGraphAxisPanel.cs | 115 +++++ .../RealTimeGraphX.WPF/WpfGraphAxisTickData.cs | 98 ++++ .../RealTimeGraphX.WPF/WpfGraphComponentBase.cs | 66 +++ .../RealTimeGraphX.WPF/WpfGraphController.cs | 22 + .../RealTimeGraphX.WPF/WpfGraphDataSeries.cs | 139 ++++++ .../RealTimeGraphX.WPF/WpfGraphGridLines.cs | 92 ++++ .../RealTimeGraphX.WPF/WpfGraphSurface.cs | 380 ++++++++++++++ .../RealTimeGraphX/DataPoints/DoubleDataPoint.cs | 178 +++++++ .../RealTimeGraphX/DataPoints/FloatDataPoint.cs | 178 +++++++ .../RealTimeGraphX/DataPoints/Int32DataPoint.cs | 178 +++++++ .../RealTimeGraphX/DataPoints/TimeSpanDataPoint.cs | 180 +++++++ .../EventArguments/RangeChangedEventArgs.cs | 58 +++ .../RealTimeGraphX/GraphCommand.cs | 77 +++ .../RealTimeGraphX/GraphController.cs | 543 +++++++++++++++++++++ .../RealTimeGraphX/GraphDataPoint.cs | 412 ++++++++++++++++ .../RealTimeGraphX/GraphDataPointHelper.cs | 48 ++ .../RealTimeGraphX/GraphDataPointTypeConverter.cs | 82 ++++ .../RealTimeGraphX/GraphDataQueue.cs | 63 +++ .../RealTimeGraphX/GraphObject.cs | 42 ++ .../RealTimeGraphX/GraphRange.cs | 138 ++++++ .../RealTimeGraphX/GraphRenderer.cs | 76 +++ .../RealTimeGraphX/GraphTransform.cs | 39 ++ .../RealTimeGraphX/IGraphComponent.cs | 10 + .../RealTimeGraphX/IGraphController.cs | 185 +++++++ .../RealTimeGraphX/IGraphDataPoint.cs | 94 ++++ .../RealTimeGraphX/IGraphDataSeries.cs | 31 ++ .../RealTimeGraphX/IGraphRenderer.cs | 41 ++ .../RealTimeGraphX/IGraphSurface.cs | 64 +++ .../RealTimeGraphX/RealTimeGraphX.csproj | 7 + .../Renderers/ScrollingLineRenderer.cs | 84 ++++ .../RealTimeGraphX.WPF/RealTimeGraphX.WPF.csproj | 6 - Software/Visual_Studio/Tango.sln | 269 +++++----- 76 files changed, 5612 insertions(+), 455 deletions(-) delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/Graph/WpfGraphController.cs delete mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/IRealTimeGraph.cs delete mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml delete mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/WpfGraphControl.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/App.config create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/App.xaml create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/App.xaml.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/MainWindow.xaml create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/MainWindow.xaml.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/MainWindowVM.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/Properties/AssemblyInfo.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/Properties/Resources.Designer.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/Properties/Resources.resx create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/Properties/Settings.Designer.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/Properties/Settings.settings create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/RealTimeGraphX.WPF.Demo.csproj create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/Themes/Generic.xaml create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/WpfGraphControl.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/ExtensionMethods.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/Properties/AssemblyInfo.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/Properties/Resources.Designer.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/Properties/Resources.resx create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/Properties/Settings.Designer.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/Properties/Settings.settings create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/RealTimeGraphX.WPF.csproj create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/Themes/Generic.xaml create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphAxisControl.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphAxisPanel.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphAxisTickData.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphComponentBase.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphController.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphDataSeries.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphGridLines.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphSurface.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/DataPoints/DoubleDataPoint.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/DataPoints/FloatDataPoint.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/DataPoints/Int32DataPoint.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/DataPoints/TimeSpanDataPoint.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/EventArguments/RangeChangedEventArgs.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphCommand.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphController.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphDataPoint.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphDataPointHelper.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphDataPointTypeConverter.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphDataQueue.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphObject.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphRange.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphRenderer.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphTransform.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/IGraphComponent.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/IGraphController.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/IGraphDataPoint.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/IGraphDataSeries.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/IGraphRenderer.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/IGraphSurface.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/RealTimeGraphX.csproj create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/Renderers/ScrollingLineRenderer.cs (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/Graph/WpfGraphController.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/Graph/WpfGraphController.cs deleted file mode 100644 index 63ce7035e..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/Graph/WpfGraphController.cs +++ /dev/null @@ -1,36 +0,0 @@ -using RealTimeGraphX; -using RealTimeGraphX.DataPoints; -using RealTimeGraphX.Renderers; -using RealTimeGraphX.WPF.DataSeries; -using RealTimeGraphX.WPF.Painters; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Media; - -namespace Tango.MachineStudio.ColorCapture.Graph -{ - public class WpfGraphController : GraphControllerBase - { - public WpfGraphController(int refreshRate = 50) - { - AddDataSeries(new WpfDataSeries() - { - StrokeThickness = 1, - Stroke = Colors.DodgerBlue, - }); - - var renderer = new GraphScrollingRenderer() - { - RefreshRate = TimeSpan.FromMilliseconds(refreshRate) - }; - - var painter = new WpfScrollingGraphPainter(); - - ConnectOutput(renderer); - renderer.ConnectOutput(painter); - } - } -} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/Tango.MachineStudio.ColorCapture.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/Tango.MachineStudio.ColorCapture.csproj index c30520f13..b399d9971 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/Tango.MachineStudio.ColorCapture.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/Tango.MachineStudio.ColorCapture.csproj @@ -100,7 +100,6 @@ - @@ -139,12 +138,12 @@ {37e4ceab-b54b-451f-b535-04cf7da9c459} ColorMine - - {99d233c5-fee7-418e-9c25-d4584cb52e28} + + {6b9774f7-960d-438e-ad81-c6b9be328d50} RealTimeGraphX.WPF - - {6d55a3b8-46d3-493a-a143-aebd2b98d683} + + {f13a489c-80ee-4cd0-bdd4-92d959215646} RealTimeGraphX diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/ViewModels/MainViewVM.cs index 5ea5747d5..31eec0871 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/ViewModels/MainViewVM.cs @@ -2,6 +2,8 @@ using ColorMine.ColorSpaces.Comparisons; using Microsoft.Win32; using Microsoft.WindowsAPICodePack.Dialogs; +using RealTimeGraphX.DataPoints; +using RealTimeGraphX.WPF; using System; using System.Collections.Generic; using System.Collections.ObjectModel; @@ -16,7 +18,6 @@ using Tango.Core; using Tango.Core.Commands; using Tango.CSV; using Tango.Logging; -using Tango.MachineStudio.ColorCapture.Graph; using Tango.MachineStudio.ColorCapture.Models; using Tango.MachineStudio.Common; using Tango.MachineStudio.Common.Notifications; @@ -106,7 +107,7 @@ namespace Tango.MachineStudio.ColorCapture.ViewModels public double DeltaE { get; set; } - public WpfGraphController CaptureDeltaEController { get; set; } + public WpfGraphController CaptureDeltaEController { get; set; } public RelayCommand ToggleCameraCommand { get; set; } @@ -169,7 +170,11 @@ namespace Tango.MachineStudio.ColorCapture.ViewModels Benchmarks = new ObservableCollection(); _cardDetector = new CardDetector(); ToggleCameraCommand = new RelayCommand(ToggleCamera); - CaptureDeltaEController = new WpfGraphController(); + CaptureDeltaEController = new WpfGraphController(); + CaptureDeltaEController.DataSeriesCollection.Add(new WpfGraphDataSeries() + { + Stroke = System.Windows.Media.Colors.DodgerBlue, + }); CaptureDeltaEController.Range.AutoY = true; CaptureDeltaEController.Range.MaximumX = 1000; @@ -461,6 +466,11 @@ namespace Tango.MachineStudio.ColorCapture.ViewModels } } + if (double.IsInfinity(DeltaE)) + { + DeltaE = 0; + } + CaptureDeltaEController.PushData(_sampleCounter++, DeltaE); } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/Views/MainView.xaml index ba8e3f281..afdac7e18 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/Views/MainView.xaml @@ -9,12 +9,11 @@ xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" xmlns:vm="clr-namespace:Tango.MachineStudio.ColorCapture.ViewModels" xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls" - xmlns:graphX="clr-namespace:RealTimeGraphX.WPF.Surfaces;assembly=RealTimeGraphX.WPF" - xmlns:componentsX="clr-namespace:RealTimeGraphX.WPF.Components;assembly=RealTimeGraphX.WPF" + xmlns:commonControls="clr-namespace:Tango.MachineStudio.Common.Controls;assembly=Tango.MachineStudio.Common" xmlns:controls="clr-namespace:Tango.MachineStudio.ColorCapture.Controls" xmlns:sharedControls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" xmlns:tcc="clr-namespace:Tango.TCC.BL;assembly=Tango.TCC.BL" - xmlns:realtimeGraphX="clr-namespace:RealTimeGraphX.WPF.Surfaces;assembly=RealTimeGraphX.WPF" + xmlns:realtimeGraphX="clr-namespace:RealTimeGraphX.WPF;assembly=RealTimeGraphX.WPF" xmlns:global="clr-namespace:Tango.MachineStudio.ColorCapture" xmlns:local="clr-namespace:Tango.MachineStudio.ColorCapture.Views" mc:Ignorable="d" @@ -435,14 +434,14 @@ - + - + - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/Views/MainView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/Views/MainView.xaml.cs index 05b5daf7e..aa7ff5d49 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/Views/MainView.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorCapture/Views/MainView.xaml.cs @@ -29,7 +29,6 @@ namespace Tango.MachineStudio.ColorCapture.Views Loaded += (_, __) => { _vm = DataContext as MainViewVM; - _vm.CaptureDeltaEController.Output.Output.ConnectOutput(Graph); }; } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj index 190e8d0fe..cd00557b1 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj @@ -196,10 +196,6 @@ {37e4ceab-b54b-451f-b535-04cf7da9c459} ColorMine - - {b9ae25d6-be35-492f-9079-21a7f3e6f7cc} - RealTimeGraphEx - {BB2ABB74-BA58-4812-83AA-EC8171F42DF4} Tango.AutoComplete @@ -361,7 +357,7 @@ - + \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MultiGraphElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MultiGraphElementEditor.xaml index 22fd8eaa8..9b9334355 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MultiGraphElementEditor.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MultiGraphElementEditor.xaml @@ -32,7 +32,7 @@ - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/SingleGraphElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/SingleGraphElementEditor.xaml index ca2481de6..622ddfa8b 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/SingleGraphElementEditor.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/SingleGraphElementEditor.xaml @@ -32,9 +32,9 @@ - + - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj index 7e6f4e111..ff45bcbf9 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Tango.MachineStudio.Technician.csproj @@ -522,16 +522,12 @@ - - {b9ae25d6-be35-492f-9079-21a7f3e6f7cc} - RealTimeGraphEx - - - {99d233c5-fee7-418e-9c25-d4584cb52e28} + + {6b9774f7-960d-438e-ad81-c6b9be328d50} RealTimeGraphX.WPF - - {6d55a3b8-46d3-493a-a143-aebd2b98d683} + + {f13a489c-80ee-4cd0-bdd4-92d959215646} RealTimeGraphX @@ -728,7 +724,7 @@ - + \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechGraphController.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechGraphController.cs index 28c75f79f..ca132095c 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechGraphController.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechGraphController.cs @@ -1,8 +1,7 @@ using RealTimeGraphX; using RealTimeGraphX.DataPoints; using RealTimeGraphX.Renderers; -using RealTimeGraphX.WPF.DataSeries; -using RealTimeGraphX.WPF.Painters; +using RealTimeGraphX.WPF; using System; using System.Collections.Generic; using System.Linq; @@ -11,19 +10,11 @@ using System.Threading.Tasks; namespace Tango.MachineStudio.Technician { - public class TechGraphController : GraphControllerBase + public class TechGraphController : WpfGraphController { public TechGraphController(int refreshRate = 50) { - var renderer = new GraphScrollingRenderer() - { - RefreshRate = TimeSpan.FromMilliseconds(refreshRate) - }; - - var painter = new WpfScrollingGraphPainter(); - - ConnectOutput(renderer); - renderer.ConnectOutput(painter); + RefreshRate = TimeSpan.FromMilliseconds(50); } } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MultiGraphItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MultiGraphItem.cs index 377738d09..1412175a0 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MultiGraphItem.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MultiGraphItem.cs @@ -1,4 +1,5 @@ using RealTimeGraphX.DataPoints; +using RealTimeGraphX.WPF; using System; using System.Collections.Generic; using System.Linq; @@ -213,7 +214,7 @@ namespace Tango.MachineStudio.Technician.TechItems { if (Editor != null) { - var controller = Editor.InnerGraph.Controller; + var controller = Editor.InnerGraph.Controller as WpfGraphController; controller.Range.MaximumX = new TimeSpanDataPoint(TimeSpan.FromSeconds(_duration)); controller.Range.MinimumY = new DoubleDataPoint(_min); diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs index 808dadb68..8ccd5e718 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs @@ -1,4 +1,5 @@ using RealTimeGraphX.DataPoints; +using RealTimeGraphX.WPF; using System; using System.Collections.Generic; using System.Linq; @@ -217,7 +218,7 @@ namespace Tango.MachineStudio.Technician.TechItems { if (Editor != null) { - var controller = Editor.InnerGraph.Controller; + var controller = Editor.InnerGraph.Controller as WpfGraphController; ; controller.Range.MaximumX = new TimeSpanDataPoint(TimeSpan.FromSeconds(_duration)); controller.Range.MinimumY = new DoubleDataPoint(_min); diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs index e78047563..72e43d7b0 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/ViewModels/MachineTechViewVM.cs @@ -1,6 +1,5 @@ using Google.Protobuf.Collections; using Microsoft.Win32; -using RealTimeGraphEx.Controllers; using System; using System.Collections.Generic; using System.Collections.ObjectModel; @@ -36,9 +35,9 @@ using Tango.MachineStudio.Technician.Models; using Tango.Logging; using Microsoft.WindowsAPICodePack.Dialogs; using RealTimeGraphX; -using RealTimeGraphX.WPF.DataSeries; using RealTimeGraphX.DataPoints; using Tango.MachineStudio.Technician.Views; +using RealTimeGraphX.WPF; namespace Tango.MachineStudio.Technician.ViewModels { @@ -1024,7 +1023,7 @@ namespace Tango.MachineStudio.Technician.ViewModels var editor = element as SingleGraphElementEditor; TechGraphController controller = new TechGraphController(); - controller.AddDataSeries(new WpfDataSeries() + controller.DataSeriesCollection.Add(new WpfGraphDataSeries() { Stroke = Colors.DodgerBlue, }); @@ -1043,7 +1042,7 @@ namespace Tango.MachineStudio.Technician.ViewModels for (int i = 0; i < graphItem.TechMonitor.ChannelCount; i++) { - controller.AddDataSeries(new WpfDataSeries() + controller.DataSeriesCollection.Add(new WpfGraphDataSeries() { Stroke = ColorHelper.GetRandomColor(), Name = graphItem.TechMonitor.Name.First() + (i + 1).ToString(), @@ -1437,7 +1436,7 @@ namespace Tango.MachineStudio.Technician.ViewModels controller.Range.MaximumY = item.TechMonitor.Max; controller.Range.MaximumX = TimeSpan.FromSeconds(10); - controller.AddDataSeries(new WpfDataSeries() + controller.DataSeriesCollection.Add(new WpfGraphDataSeries() { Stroke = Colors.DodgerBlue, }); @@ -1498,7 +1497,7 @@ namespace Tango.MachineStudio.Technician.ViewModels for (int i = 0; i < item.TechMonitor.ChannelCount; i++) { - controller.AddDataSeries(new WpfDataSeries() + controller.DataSeriesCollection.Add(new WpfGraphDataSeries() { Stroke = ColorHelper.GetRandomColor(), Name = item.TechMonitor.Name.First() + (i + 1).ToString(), diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/IRealTimeGraph.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/IRealTimeGraph.cs deleted file mode 100644 index dcf2cdf81..000000000 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/IRealTimeGraph.cs +++ /dev/null @@ -1,35 +0,0 @@ -using RealTimeGraphEx; -using RealTimeGraphEx.Controllers; -using RealTimeGraphX; -using RealTimeGraphX.WPF.DataSeries; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Tango.MachineStudio.Common.Controls -{ - public interface IRealTimeGraph - { - /// - /// Gets or sets the name of the sensor. - /// - String DisplayName { get; set; } - - /// - /// Gets or sets the tag. - /// - Object Tag { get; set; } - - /// - /// Gets or sets the sensor units. - /// - String DisplayUnits { get; set; } - - /// - /// Gets or sets the inner graph controller. - /// - IGraphController Controller { get; set; } - } -} diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml deleted file mode 100644 index b5e809a3e..000000000 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml.cs deleted file mode 100644 index f82196fed..000000000 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/RealTimeGraphControl.xaml.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Animation; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; -using RealTimeGraphEx; -using RealTimeGraphEx.Controllers; -using RealTimeGraphX; -using RealTimeGraphX.WPF.DataSeries; - -namespace Tango.MachineStudio.Common.Controls -{ - /// - /// Interaction logic for RealTimeGraphControl.xaml - /// - public partial class RealTimeGraphControl : UserControl, IRealTimeGraph - { - #region Properties - - public String DisplayName - { - get { return (String)GetValue(DisplayNameProperty); } - set { SetValue(DisplayNameProperty, value); } - } - public static readonly DependencyProperty DisplayNameProperty = - DependencyProperty.Register("DisplayName", typeof(String), typeof(RealTimeGraphControl), new PropertyMetadata(null)); - - public String DisplayUnits - { - get { return (String)GetValue(DisplayUnitsProperty); } - set { SetValue(DisplayUnitsProperty, value); } - } - public static readonly DependencyProperty DisplayUnitsProperty = - DependencyProperty.Register("DisplayUnits", typeof(String), typeof(RealTimeGraphControl), new PropertyMetadata(null)); - - public String StringFormat - { - get { return (String)GetValue(StringFormatProperty); } - set { SetValue(StringFormatProperty, value); } - } - public static readonly DependencyProperty StringFormatProperty = - DependencyProperty.Register("StringFormat", typeof(String), typeof(RealTimeGraphControl), new PropertyMetadata("0.0")); - - - - public IGraphController Controller - { - get { return (IGraphController)GetValue(ControllerProperty); } - set { SetValue(ControllerProperty, value); } - } - public static readonly DependencyProperty ControllerProperty = - DependencyProperty.Register("Controller", typeof(IGraphController), typeof(RealTimeGraphControl), new PropertyMetadata(null,(d,e) => (d as RealTimeGraphControl).OnControllerChanged())); - - private void OnControllerChanged() - { - Controller.Output.Output.ConnectOutput(Graph); - } - - #endregion - - public RealTimeGraphControl() - { - InitializeComponent(); - } - } -} diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/WpfGraphControl.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/WpfGraphControl.cs new file mode 100644 index 000000000..68db76cd5 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/WpfGraphControl.cs @@ -0,0 +1,88 @@ +using RealTimeGraphX; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Tango.MachineStudio.Common.Controls +{ + public class WpfGraphControl : Control + { + /// + /// Gets or sets the graph controller. + /// + public IGraphController Controller + { + get { return (IGraphController)GetValue(ControllerProperty); } + set { SetValue(ControllerProperty, value); } + } + public static readonly DependencyProperty ControllerProperty = + DependencyProperty.Register("Controller", typeof(IGraphController), typeof(WpfGraphControl), new PropertyMetadata(null)); + + + /// + /// Gets or sets the string format of the y-axis. + /// + public String StringFormat + { + get { return (String)GetValue(StringFormatProperty); } + set { SetValue(StringFormatProperty, value); } + } + public static readonly DependencyProperty StringFormatProperty = + DependencyProperty.Register("StringFormat", typeof(String), typeof(WpfGraphControl), new PropertyMetadata("0.0")); + + + /// + /// Gets or sets the display name. + /// + public String DisplayName + { + get { return (String)GetValue(DisplayNameProperty); } + set { SetValue(DisplayNameProperty, value); } + } + public static readonly DependencyProperty DisplayNameProperty = + DependencyProperty.Register("DisplayName", typeof(String), typeof(WpfGraphControl), new PropertyMetadata(null)); + + + /// + /// Gets or sets the display units. + /// + public String DisplayUnits + { + get { return (String)GetValue(DisplayUnitsProperty); } + set { SetValue(DisplayUnitsProperty, value); } + } + public static readonly DependencyProperty DisplayUnitsProperty = + DependencyProperty.Register("DisplayUnits", typeof(String), typeof(WpfGraphControl), new PropertyMetadata(null)); + + /// + /// Gets or sets the graph label visibility. + /// + public Visibility GraphLabelVisibility + { + get { return (Visibility)GetValue(GraphLabelVisibilityProperty); } + set { SetValue(GraphLabelVisibilityProperty, value); } + } + public static readonly DependencyProperty GraphLabelVisibilityProperty = + DependencyProperty.Register("GraphLabelVisibility", typeof(Visibility), typeof(WpfGraphControl), new PropertyMetadata(Visibility.Visible)); + + + /// + /// Initializes the class. + /// + static WpfGraphControl() + { + DefaultStyleKeyProperty.OverrideMetadata(typeof(WpfGraphControl), new FrameworkPropertyMetadata(typeof(WpfGraphControl))); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml index 2f65fe817..d90d03545 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/MaterialDesign.xaml @@ -235,39 +235,12 @@ - - - - - - - - - - - + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj index 4cf1855ca..e2bf7792d 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj @@ -60,6 +60,7 @@ + @@ -87,6 +88,7 @@ MachineView.xaml + @@ -100,11 +102,7 @@ HiveComboControl.xaml - - - RealTimeGraphControl.xaml - @@ -177,10 +175,6 @@ - - Designer - MSBuild:Compile - Designer MSBuild:Compile @@ -223,16 +217,12 @@ - - {b9ae25d6-be35-492f-9079-21a7f3e6f7cc} - RealTimeGraphEx - - - {99d233c5-fee7-418e-9c25-d4584cb52e28} + + {6b9774f7-960d-438e-ad81-c6b9be328d50} RealTimeGraphX.WPF - - {6d55a3b8-46d3-493a-a143-aebd2b98d683} + + {f13a489c-80ee-4cd0-bdd4-92d959215646} RealTimeGraphX @@ -386,7 +376,7 @@ - + \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/Generic.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/Generic.xaml index 9cc398753..79245745e 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/Generic.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/Generic.xaml @@ -2,6 +2,7 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mahApps="http://metro.mahapps.com/winfx/xaml/controls" + xmlns:realTimeGraphX="clr-namespace:RealTimeGraphX.WPF;assembly=RealTimeGraphX.WPF" xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" xmlns:local="clr-namespace:Tango.MachineStudio.Common.Controls"> @@ -28,4 +29,90 @@ + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj index 8d9255926..8416758fa 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj @@ -356,10 +356,6 @@ - - {b9ae25d6-be35-492f-9079-21a7f3e6f7cc} - RealTimeGraphEx - {bb2abb74-ba58-4812-83aa-ec8171f42df4} Tango.AutoComplete @@ -614,7 +610,7 @@ copy /Y "$(SolutionDir)Referenced Assemblies\Microsoft.WITDataStore32.dll" "$(Ta - + \ No newline at end of file diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/App.config b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/App.config new file mode 100644 index 000000000..731f6de6c --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/App.xaml b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/App.xaml new file mode 100644 index 000000000..19410e824 --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/App.xaml.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/App.xaml.cs new file mode 100644 index 000000000..16bbca639 --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/App.xaml.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace RealTimeGraphX.WPF.Demo +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/MainWindow.xaml b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/MainWindow.xaml new file mode 100644 index 000000000..89cdde87c --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/MainWindow.xaml @@ -0,0 +1,112 @@ + + + + + DodgerBlue + Red + Green + + + + + + + + + + + + + + + + + + + + + + + + + Duration + + + Refresh Rate + + + Minimum Y + + + Maximum Y + + + Auto Range (Y) + + Stroke + + + Thickness + + + Fill + + + Paused + + + + + + + + + + + + + + + + + Duration + + + Refresh Rate + + + Minimum Y + + + Maximum Y + + + Auto Range (Y) + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/MainWindow.xaml.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/MainWindow.xaml.cs new file mode 100644 index 000000000..11bdb2d6a --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/MainWindow.xaml.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace RealTimeGraphX.WPF.Demo +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + DataContext = new MainWindowVM(); + } + } +} diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/MainWindowVM.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/MainWindowVM.cs new file mode 100644 index 000000000..390230140 --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/MainWindowVM.cs @@ -0,0 +1,107 @@ +using RealTimeGraphX.DataPoints; +using RealTimeGraphX.Renderers; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Media; + +namespace RealTimeGraphX.WPF.Demo +{ + public class MainWindowVM + { + public WpfGraphController Controller { get; set; } + + public WpfGraphController MultiController { get; set; } + + public MainWindowVM() + { + Controller = new WpfGraphController(); + Controller.Range.MinimumY = 0; + Controller.Range.MaximumY = 1080; + Controller.Range.MaximumX = TimeSpan.FromSeconds(10); + Controller.Range.AutoY = true; + + Controller.DataSeriesCollection.Add(new WpfGraphDataSeries() + { + Name = "Series", + Stroke = Colors.DodgerBlue, + }); + + MultiController = new WpfGraphController(); + MultiController.Range.MinimumY = 0; + MultiController.Range.MaximumY = 1080; + MultiController.Range.MaximumX = TimeSpan.FromSeconds(10); + MultiController.Range.AutoY = true; + + MultiController.DataSeriesCollection.Add(new WpfGraphDataSeries() + { + Name = "Series 1", + Stroke = Colors.Red, + }); + + MultiController.DataSeriesCollection.Add(new WpfGraphDataSeries() + { + Name = "Series 2", + Stroke = Colors.Green, + }); + + MultiController.DataSeriesCollection.Add(new WpfGraphDataSeries() + { + Name = "Series 3", + Stroke = Colors.Blue, + }); + + MultiController.DataSeriesCollection.Add(new WpfGraphDataSeries() + { + Name = "Series 4", + Stroke = Colors.Yellow, + }); + + MultiController.DataSeriesCollection.Add(new WpfGraphDataSeries() + { + Name = "Series 5", + Stroke = Colors.Gray, + }); + + Stopwatch watch = new Stopwatch(); + watch.Start(); + + Task.Factory.StartNew(() => + { + while (true) + { + var y = System.Windows.Forms.Cursor.Position.Y; + + List yy = new List() + { + y, + y + 20, + y + 40, + y + 60, + y + 80, + }; + + var x = watch.Elapsed; + + List xx = new List() + { + x, + x, + x, + x, + x + }; + + Controller.PushData(x, y); + MultiController.PushData(xx, yy); + + Thread.Sleep(30); + } + }); + } + } +} diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/Properties/AssemblyInfo.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..7e504011c --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/Properties/AssemblyInfo.cs @@ -0,0 +1,55 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows; + +// 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("RealTimeGraphX.WPF.Demo")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("RealTimeGraphX.WPF.Demo")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[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 +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +//In order to begin building localizable applications, set +//CultureYouAreCodingWith in your .csproj file +//inside a . For example, if you are using US english +//in your source files, set the to en-US. Then uncomment +//the NeutralResourceLanguage attribute below. Update the "en-US" in +//the line below to match the UICulture setting in the project file. + +//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] + + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] + + +// 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")] diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/Properties/Resources.Designer.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/Properties/Resources.Designer.cs new file mode 100644 index 000000000..b1dd1cfba --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace RealTimeGraphX.WPF.Demo.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // 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", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("RealTimeGraphX.WPF.Demo.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/Properties/Resources.resx b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/Properties/Resources.resx new file mode 100644 index 000000000..af7dbebba --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/Properties/Settings.Designer.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/Properties/Settings.Designer.cs new file mode 100644 index 000000000..d6fd721ce --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace RealTimeGraphX.WPF.Demo.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/Properties/Settings.settings b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/Properties/Settings.settings new file mode 100644 index 000000000..033d7a5e9 --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/RealTimeGraphX.WPF.Demo.csproj b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/RealTimeGraphX.WPF.Demo.csproj new file mode 100644 index 000000000..5b430a90c --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/RealTimeGraphX.WPF.Demo.csproj @@ -0,0 +1,116 @@ + + + + + Debug + AnyCPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60} + WinExe + RealTimeGraphX.WPF.Demo + RealTimeGraphX.WPF.Demo + v4.6.1 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + 4.0 + + + + + + + + MSBuild:Compile + Designer + + + + MSBuild:Compile + Designer + + + App.xaml + Code + + + MainWindow.xaml + Code + + + MSBuild:Compile + Designer + + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.cs + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + + + {6b9774f7-960d-438e-ad81-c6b9be328d50} + RealTimeGraphX.WPF + + + {61f001e1-6e17-4ca6-8f3a-8a11d7166815} + RealTimeGraphX + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/Themes/Generic.xaml b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/Themes/Generic.xaml new file mode 100644 index 000000000..6980437f1 --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/Themes/Generic.xaml @@ -0,0 +1,53 @@ + + + + + diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/WpfGraphControl.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/WpfGraphControl.cs new file mode 100644 index 000000000..7c92e18bf --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF.Demo/WpfGraphControl.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace RealTimeGraphX.WPF.Demo +{ + public class WpfGraphControl : Control + { + /// + /// Gets or sets the graph controller. + /// + public IGraphController Controller + { + get { return (IGraphController)GetValue(ControllerProperty); } + set { SetValue(ControllerProperty, value); } + } + public static readonly DependencyProperty ControllerProperty = + DependencyProperty.Register("Controller", typeof(IGraphController), typeof(WpfGraphControl), new PropertyMetadata(null)); + + /// + /// Initializes the class. + /// + static WpfGraphControl() + { + DefaultStyleKeyProperty.OverrideMetadata(typeof(WpfGraphControl), new FrameworkPropertyMetadata(typeof(WpfGraphControl))); + } + } +} diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/ExtensionMethods.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/ExtensionMethods.cs new file mode 100644 index 000000000..39f113924 --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/ExtensionMethods.cs @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace RealTimeGraphX.WPF +{ + /// + /// Contains a collection of extension methods. + /// + internal static class ExtensionMethods + { + /// + /// Converts this WPF color to a GDI color. + /// + /// The color. + /// + internal static Color ToGdiColor(this System.Windows.Media.Color color) + { + return Color.FromArgb(color.A, color.R, color.G, color.B); + } + + /// + /// Converts this WPF brush to a GDI brush. + /// + /// The brush. + /// + internal static Brush ToGdiBrush(this System.Windows.Media.Brush brush) + { + if (brush.GetType() == typeof(System.Windows.Media.SolidColorBrush)) + { + return new SolidBrush((brush as System.Windows.Media.SolidColorBrush).Color.ToGdiColor()); + } + else if (brush.GetType() == typeof(System.Windows.Media.LinearGradientBrush)) + { + System.Windows.Media.LinearGradientBrush b = brush as System.Windows.Media.LinearGradientBrush; + + double angle = Math.Atan2(b.EndPoint.Y - b.StartPoint.Y, b.EndPoint.X - b.StartPoint.X) * 180 / Math.PI; + + LinearGradientBrush gradient = new LinearGradientBrush(new Rectangle(0, 0, 200, 100), Color.Black, Color.Black, (float)angle); + + ColorBlend blend = new ColorBlend(); + + List colors = new List(); + List offsets = new List(); + + foreach (var stop in b.GradientStops) + { + colors.Add(stop.Color.ToGdiColor()); + offsets.Add((float)stop.Offset); + } + + blend.Colors = colors.ToArray(); + blend.Positions = offsets.ToArray(); + + gradient.InterpolationColors = blend; + + return gradient; + } + else + { + return new LinearGradientBrush(new PointF(0, 0), new Point(200, 100), Color.Black, Color.Black); + } + } + + /// + /// Determines whether this dependency object is running in design mode. + /// + /// The object. + internal static bool IsInDesignMode(this System.Windows.DependencyObject obj) + { + return (DesignerProperties.GetIsInDesignMode(obj)); + } + } +} diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/Properties/AssemblyInfo.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..a08459ddd --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/Properties/AssemblyInfo.cs @@ -0,0 +1,55 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows; + +// 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("RealTimeGraphX.WPF")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("RealTimeGraphX.WPF")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[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 +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +//In order to begin building localizable applications, set +//CultureYouAreCodingWith in your .csproj file +//inside a . For example, if you are using US english +//in your source files, set the to en-US. Then uncomment +//the NeutralResourceLanguage attribute below. Update the "en-US" in +//the line below to match the UICulture setting in the project file. + +//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] + + +[assembly:ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] + + +// 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")] diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/Properties/Resources.Designer.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/Properties/Resources.Designer.cs new file mode 100644 index 000000000..601c8ad1d --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/Properties/Resources.Designer.cs @@ -0,0 +1,62 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace RealTimeGraphX.WPF.Properties { + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // 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", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if ((resourceMan == null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("RealTimeGraphX.WPF.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/Properties/Resources.resx b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/Properties/Resources.resx new file mode 100644 index 000000000..af7dbebba --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/Properties/Settings.Designer.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/Properties/Settings.Designer.cs new file mode 100644 index 000000000..18340e385 --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace RealTimeGraphX.WPF.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/Properties/Settings.settings b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/Properties/Settings.settings new file mode 100644 index 000000000..033d7a5e9 --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/RealTimeGraphX.WPF.csproj b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/RealTimeGraphX.WPF.csproj new file mode 100644 index 000000000..6446fc93f --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/RealTimeGraphX.WPF.csproj @@ -0,0 +1,97 @@ + + + + + Debug + AnyCPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50} + library + RealTimeGraphX.WPF + RealTimeGraphX.WPF + v4.6.1 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + 4.0 + + + + + + + + MSBuild:Compile + Designer + + + + + + + + + + + Code + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.cs + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + {61f001e1-6e17-4ca6-8f3a-8a11d7166815} + RealTimeGraphX + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/Themes/Generic.xaml b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/Themes/Generic.xaml new file mode 100644 index 000000000..1070736ef --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/Themes/Generic.xaml @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphAxisControl.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphAxisControl.cs new file mode 100644 index 000000000..23b831abe --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphAxisControl.cs @@ -0,0 +1,172 @@ +using RealTimeGraphX.EventArguments; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace RealTimeGraphX.WPF +{ + /// + /// Represents a horizontal/vertical graph axis component. + /// + /// + public class WpfGraphAxisControl : WpfGraphComponentBase + { + private ItemsControl _items_control; + + /// + /// Initializes the class. + /// + static WpfGraphAxisControl() + { + DefaultStyleKeyProperty.OverrideMetadata(typeof(WpfGraphAxisControl), new FrameworkPropertyMetadata(typeof(WpfGraphAxisControl))); + } + + /// + /// Gets or sets the control orientation. + /// + public Orientation Orientation + { + get { return (Orientation)GetValue(OrientationProperty); } + set { SetValue(OrientationProperty, value); } + } + public static readonly DependencyProperty OrientationProperty = + DependencyProperty.Register("Orientation", typeof(Orientation), typeof(WpfGraphAxisControl), new PropertyMetadata(Orientation.Vertical)); + + /// + /// Gets or sets the tick item template. + /// + public DataTemplate ItemTemplate + { + get { return (DataTemplate)GetValue(ItemTemplateProperty); } + set { SetValue(ItemTemplateProperty, value); } + } + public static readonly DependencyProperty ItemTemplateProperty = + DependencyProperty.Register("ItemTemplate", typeof(DataTemplate), typeof(WpfGraphAxisControl), new PropertyMetadata(null)); + + /// + /// Gets or sets the tick items. + /// + internal ObservableCollection Items + { + get { return (ObservableCollection)GetValue(ItemsProperty); } + set { SetValue(ItemsProperty, value); } + } + public static readonly DependencyProperty ItemsProperty = + DependencyProperty.Register("Items", typeof(ObservableCollection), typeof(WpfGraphAxisControl), new PropertyMetadata(null)); + + /// + /// Gets or sets the number of ticks to display on the control. + /// + public int Ticks + { + get { return (int)GetValue(TicksProperty); } + set { SetValue(TicksProperty, value); } + } + public static readonly DependencyProperty TicksProperty = + DependencyProperty.Register("Ticks", typeof(int), typeof(WpfGraphAxisControl), new PropertyMetadata(9, (d, e) => (d as WpfGraphAxisControl).OnTicksChanged())); + + /// + /// Gets or sets the string format which is used to format the ticks value. + /// + public String StringFormat + { + get { return (String)GetValue(StringFormatProperty); } + set { SetValue(StringFormatProperty, value); } + } + public static readonly DependencyProperty StringFormatProperty = + DependencyProperty.Register("StringFormat", typeof(String), typeof(WpfGraphAxisControl), new PropertyMetadata(null)); + + /// + /// When overridden in a derived class, is invoked whenever application code or internal processes call . + /// + public override void OnApplyTemplate() + { + base.OnApplyTemplate(); + + _items_control = GetTemplateChild("PART_ItemsControl") as ItemsControl; + OnTicksChanged(); + } + + /// + /// Called when the property has changed. + /// + protected virtual void OnTicksChanged() + { + Items = new ObservableCollection(Enumerable.Range(0, Ticks).Select(x => new WpfGraphAxisTickData())); + + if (Controller != null) + { + Controller.RequestVirtualRangeChange(); + } + } + + protected override void OnControllerChanged(IGraphController oldController, IGraphController newController) + { + base.OnControllerChanged(oldController, newController); + + if (newController != null) + { + newController.RequestVirtualRangeChange(); + } + } + + /// + /// Handles the event. + /// + /// The source of the event. + /// The event arguments. + protected override void OnVirtualRangeChanged(object sender, RangeChangedEventArgs e) + { + InvokeUI(() => + { + if (Orientation == Orientation.Vertical) + { + if (Items != null) + { + var steps = e.MinimumY.CreateRange(e.MinimumY, e.MaximumY, Ticks).Reverse().ToList(); + + for (int i = 0; i < steps.Count; i++) + { + var tick_data = Items[i]; + tick_data.Data = steps[i]; + tick_data.DisplayText = tick_data.Data.ToString(StringFormat); + tick_data.IsFirst = i == 0; + tick_data.IsLast = i == steps.Count - 1; + tick_data.IsEven = i % 2 == 0; + } + } + } + else + { + if (Items != null) + { + var steps = e.MinimumX.CreateRange(e.MinimumX, e.MaximumX, Ticks).ToList(); + + for (int i = 0; i < steps.Count; i++) + { + var tick_data = Items[i]; + tick_data.Data = steps[i]; + tick_data.DisplayText = tick_data.Data.ToString(StringFormat); + tick_data.IsFirst = i == 0; + tick_data.IsLast = i == steps.Count - 1; + tick_data.IsEven = i % 2 == 0; + } + } + } + }); + } + } +} diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphAxisPanel.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphAxisPanel.cs new file mode 100644 index 000000000..f10b583f4 --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphAxisPanel.cs @@ -0,0 +1,115 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; + +namespace RealTimeGraphX.WPF +{ + /// + /// Represents a panel that will align its children in an axis labels like arrangement. + /// + /// + public class WpfGraphAxisPanel : Grid + { + /// + /// Gets or sets the panel orientation. + /// + public Orientation Orientation + { + get { return (Orientation)GetValue(OrientationProperty); } + set { SetValue(OrientationProperty, value); } + } + public static readonly DependencyProperty OrientationProperty = + DependencyProperty.Register("Orientation", typeof(Orientation), typeof(WpfGraphAxisPanel), new PropertyMetadata(Orientation.Vertical)); + + /// + /// Initializes a new instance of the class. + /// + public WpfGraphAxisPanel() + { + Loaded += VerticalAxisPanel_Loaded; + } + + /// + /// Handles the Loaded event of the VerticalAxisGrid control. + /// + /// The source of the event. + /// The instance containing the event data. + private void VerticalAxisPanel_Loaded(object sender, RoutedEventArgs e) + { + UpdatePanel(); + } + + /// + /// Updates the panel. + /// + private void UpdatePanel() + { + RowDefinitions.Clear(); + ColumnDefinitions.Clear(); + + + if (Orientation == Orientation.Vertical) + { + for (int i = 0; i < InternalChildren.Count; i++) + { + FrameworkElement element = InternalChildren[i] as FrameworkElement; + + if (i < InternalChildren.Count - 1) + { + RowDefinitions.Add(new RowDefinition() { Height = new GridLength(1, GridUnitType.Star) }); + Grid.SetRow(element, i); + element.VerticalAlignment = VerticalAlignment.Top; + + element.SizeChanged += (_, __) => + { + element.Margin = new Thickness(0, (element.ActualHeight / 2) * -1, 0, 0); + }; + } + else + { + Grid.SetRow(element, i); + element.VerticalAlignment = VerticalAlignment.Bottom; + + element.SizeChanged += (_, __) => + { + element.Margin = new Thickness(0, 0, 0, (element.ActualHeight / 2) * -1); + }; + } + } + } + else + { + for (int i = 0; i < InternalChildren.Count; i++) + { + FrameworkElement element = InternalChildren[i] as FrameworkElement; + + if (i < InternalChildren.Count - 1) + { + ColumnDefinitions.Add(new ColumnDefinition() { Width = new GridLength(1, GridUnitType.Star) }); + Grid.SetColumn(element, i); + element.HorizontalAlignment = HorizontalAlignment.Left; + + element.SizeChanged += (_, __) => + { + element.Margin = new Thickness((element.ActualWidth / 2) * -1, 0, 0, 0); + }; + } + else + { + Grid.SetColumn(element, i); + element.HorizontalAlignment = HorizontalAlignment.Right; + + element.SizeChanged += (_, __) => + { + element.Margin = new Thickness(0, 0, (element.ActualWidth / 2) * -1, 0); + }; + } + } + } + } + } +} diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphAxisTickData.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphAxisTickData.cs new file mode 100644 index 000000000..08c0ae2fa --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphAxisTickData.cs @@ -0,0 +1,98 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; + +namespace RealTimeGraphX.WPF +{ + /// + /// Represents a graph axis data point tick value wrapper. + /// + public class WpfGraphAxisTickData : DependencyObject + { + /// + /// Gets or sets a value indicating whether this tick is the first tick. + /// + public bool IsFirst + { + get { return (bool)GetValue(IsFirstProperty); } + set { SetValue(IsFirstProperty, value); } + } + public static readonly DependencyProperty IsFirstProperty = + DependencyProperty.Register("IsFirst", typeof(bool), typeof(WpfGraphAxisTickData), new PropertyMetadata(false)); + + /// + /// Gets or sets a value indicating whether this tick is the last tick. + /// + public bool IsLast + { + get { return (bool)GetValue(IsLastProperty); } + set { SetValue(IsLastProperty, value); } + } + public static readonly DependencyProperty IsLastProperty = + DependencyProperty.Register("IsLast", typeof(bool), typeof(WpfGraphAxisTickData), new PropertyMetadata(false)); + + /// + /// Gets or sets a value indicating whether this tick is not the first or last. + /// + public bool IsCenter + { + get { return !IsFirst && !IsLast; } + } + + /// + /// Gets or sets a value indicating whether this tick index is even. + /// + public bool IsEven + { + get { return (bool)GetValue(IsEvenProperty); } + set { SetValue(IsEvenProperty, value); } + } + public static readonly DependencyProperty IsEvenProperty = + DependencyProperty.Register("IsEven", typeof(bool), typeof(WpfGraphAxisTickData), new PropertyMetadata(false)); + + /// + /// Gets a value indicating whether this tick index is odd. + /// + public bool IsOdd + { + get { return !IsEven; } + } + + /// + /// Gets or sets the actual graph data point. + /// + public IGraphDataPoint Data + { + get { return (IGraphDataPoint)GetValue(DataProperty); } + set { SetValue(DataProperty, value); } + } + public static readonly DependencyProperty DataProperty = + DependencyProperty.Register("Data", typeof(IGraphDataPoint), typeof(WpfGraphAxisTickData), new PropertyMetadata(null)); + + /// + /// Gets or sets the display text. + /// + public String DisplayText + { + get { return (String)GetValue(DisplayTextProperty); } + set { SetValue(DisplayTextProperty, value); } + } + public static readonly DependencyProperty DisplayTextProperty = + DependencyProperty.Register("DisplayText", typeof(String), typeof(WpfGraphAxisTickData), new PropertyMetadata(null)); + + /// + /// Gets the Data Point value. + /// + public object Value + { + get + { + return Data != null ? Data.GetValue() : null; + } + } + } +} diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphComponentBase.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphComponentBase.cs new file mode 100644 index 000000000..e48c18678 --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphComponentBase.cs @@ -0,0 +1,66 @@ +using RealTimeGraphX.EventArguments; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; + +namespace RealTimeGraphX.WPF +{ + /// + /// Represents a graph component base class. + /// + /// + public abstract class WpfGraphComponentBase : Control + { + /// + /// Gets or sets the graph controller. + /// + public IGraphController Controller + { + get { return (IGraphController)GetValue(ControllerProperty); } + set { SetValue(ControllerProperty, value); } + } + public static readonly DependencyProperty ControllerProperty = + DependencyProperty.Register("Controller", typeof(IGraphController), typeof(WpfGraphComponentBase), new PropertyMetadata(null, (d, e) => (d as WpfGraphComponentBase).OnControllerChanged(e.OldValue as IGraphController, e.NewValue as IGraphController))); + + /// + /// Called when the controller has changed. + /// + /// The old controller. + /// The new controller. + protected virtual void OnControllerChanged(IGraphController oldController, IGraphController newController) + { + if (oldController != null) + { + oldController.VirtualRangeChanged -= OnVirtualRangeChanged; + } + + if (newController != null) + { + newController.VirtualRangeChanged += OnVirtualRangeChanged; + } + } + + /// + /// Handles the event. + /// + /// The source of the event. + /// The event arguments. + protected virtual void OnVirtualRangeChanged(object sender, RangeChangedEventArgs e) + { + //Optional + } + + /// + /// Invokes the specified method on the component dispatcher. + /// + /// The action. + protected void InvokeUI(Action action) + { + Dispatcher.BeginInvoke(action); + } + } +} diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphController.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphController.cs new file mode 100644 index 000000000..6067a7e50 --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphController.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Media; + +namespace RealTimeGraphX.WPF +{ + /// + /// Represents a WPF graph controller. + /// + /// The type of the x data point. + /// The type of the y data point. + /// + public class WpfGraphController : GraphController + where TXDataPoint : GraphDataPoint + where TYDataPoint : GraphDataPoint + { + + } +} diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphDataSeries.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphDataSeries.cs new file mode 100644 index 000000000..15a99ab54 --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphDataSeries.cs @@ -0,0 +1,139 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Media; + +namespace RealTimeGraphX.WPF +{ + /// + /// Represents a WPF data series. + /// + /// + /// + public class WpfGraphDataSeries : GraphObject, IGraphDataSeries + { + #region Internal Properties + + /// + /// Gets the GDI stroke color. + /// + internal System.Drawing.Color GdiStroke { get; private set; } + + /// + /// Gets the GDI fill brush. + /// + internal System.Drawing.Brush GdiFill { get; private set; } + + /// + /// Gets or sets the GDI pen. + /// + internal System.Drawing.Pen GdiPen { get; set; } + + #endregion + + private String _name; + /// + /// Gets or sets the series name. + /// + public String Name + { + get { return _name; } + set { _name = value; RaisePropertyChangedAuto(); } + } + + private float _strokeThickness; + /// + /// Gets or sets the stroke thickness. + /// + public float StrokeThickness + { + get + { + return _strokeThickness; + } + set + { + _strokeThickness = value; + GdiPen = new System.Drawing.Pen(GdiStroke, _strokeThickness); + RaisePropertyChangedAuto(); + } + } + + private bool _isVisible; + /// + /// Gets or sets a value indicating whether this series should be visible. + /// + public bool IsVisible + { + get { return _isVisible; } + set { _isVisible = value; RaisePropertyChangedAuto(); } + } + + private Color _stroke; + /// + /// Gets or sets the series stroke color. + /// + public Color Stroke + { + get { return _stroke; } + set + { + _stroke = value; + RaisePropertyChangedAuto(); + + if (_stroke != null) + { + GdiStroke = _stroke.ToGdiColor(); + GdiPen = new System.Drawing.Pen(GdiStroke, StrokeThickness); + } + else + { + GdiStroke = System.Drawing.Color.Transparent; + } + } + } + + private Brush _fill; + /// + /// Gets or sets the series fill brush. + /// + public Brush Fill + { + get { return _fill; } + set + { + _fill = value; + RaisePropertyChangedAuto(); + + if (_fill != null) + { + GdiFill = _fill.ToGdiBrush(); + } + else + { + GdiFill = null; + } + } + } + + /// + /// Initializes a new instance of the class. + /// + public WpfGraphDataSeries() + { + StrokeThickness = 1; + IsVisible = true; + Stroke = Colors.DodgerBlue; + } + + /// + /// Gets or sets a value indicating whether to fill the series. + /// + public bool UseFill + { + get { return Fill != null; } + } + } +} diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphGridLines.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphGridLines.cs new file mode 100644 index 000000000..3eb25f3d8 --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphGridLines.cs @@ -0,0 +1,92 @@ +using System.Collections.Generic; +using System.Linq; +using System.Windows; + +namespace RealTimeGraphX.WPF +{ + /// + /// Represents a graph grid lines component. + /// + /// + public class WpfGraphGridLines : WpfGraphComponentBase + { + /// + /// Gets or sets the number of grid rows. + /// + public int Rows + { + get { return (int)GetValue(RowsProperty); } + set { SetValue(RowsProperty, value); } + } + public static readonly DependencyProperty RowsProperty = + DependencyProperty.Register("Rows", typeof(int), typeof(WpfGraphGridLines), new PropertyMetadata(8, (d, e) => (d as WpfGraphGridLines).UpdateGridLines())); + + /// + /// Gets or sets the number of grid columns. + /// + public int Columns + { + get { return (int)GetValue(ColumnsProperty); } + set { SetValue(ColumnsProperty, value); } + } + public static readonly DependencyProperty ColumnsProperty = + DependencyProperty.Register("Columns", typeof(int), typeof(WpfGraphGridLines), new PropertyMetadata(8, (d, e) => (d as WpfGraphGridLines).UpdateGridLines())); + + /// + /// Gets or sets the vertical items. + /// + internal IEnumerable VerticalItems + { + get { return (IEnumerable)GetValue(VerticalItemsProperty); } + set { SetValue(VerticalItemsProperty, value); } + } + internal static readonly DependencyProperty VerticalItemsProperty = + DependencyProperty.Register("VerticalItems", typeof(IEnumerable), typeof(WpfGraphGridLines), new PropertyMetadata(null)); + + /// + /// Gets or sets the horizontal items. + /// + internal IEnumerable HorizontalItems + { + get { return (IEnumerable)GetValue(HorizontalItemsProperty); } + set { SetValue(HorizontalItemsProperty, value); } + } + internal static readonly DependencyProperty HorizontalItemsProperty = + DependencyProperty.Register("HorizontalItems", typeof(IEnumerable), typeof(WpfGraphGridLines), new PropertyMetadata(null)); + + /// + /// Initializes the class. + /// + static WpfGraphGridLines() + { + DefaultStyleKeyProperty.OverrideMetadata(typeof(WpfGraphGridLines), new FrameworkPropertyMetadata(typeof(WpfGraphGridLines))); + } + + /// + /// Initializes a new instance of the class. + /// + public WpfGraphGridLines() + { + Loaded += GridLines_Loaded; + } + + /// + /// Handles the Loaded event of the GridLines control. + /// + /// The source of the event. + /// The instance containing the event data. + private void GridLines_Loaded(object sender, RoutedEventArgs e) + { + UpdateGridLines(); + } + + /// + /// Updates the grid lines. + /// + private void UpdateGridLines() + { + VerticalItems = Enumerable.Range(0, Rows).ToList(); + HorizontalItems = Enumerable.Range(0, Columns).ToList(); + } + } +} diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphSurface.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphSurface.cs new file mode 100644 index 000000000..ebcff3472 --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphSurface.cs @@ -0,0 +1,380 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; +using RealTimeGraphX.EventArguments; + +namespace RealTimeGraphX.WPF +{ + /// + /// Represents a WPF graph surface. + /// + /// + /// + public class WpfGraphSurface : Control, IGraphSurface + { + private WriteableBitmap _writeable_bitmap; + private System.Drawing.Bitmap _gdi_bitmap; + private System.Drawing.Graphics _g; + + private bool _size_changed; + private System.Drawing.SizeF _size; + private System.Drawing.RectangleF _zoom_rect; + private Rectangle _selection_rectangle; + private Canvas _selection_canvas; + private bool _is_selection_mouse_down_zoom; + private bool _is_selection_mouse_down_pan; + private Point _selection_start_point; + private bool _is_scaled; + private Point _current_mouse_position; + private Point _last_mouse_position; + private Grid _grid; + + #region Properties + + /// + /// Gets or sets current graph rendered image. + /// + public BitmapSource Image + { + get { return (BitmapSource)GetValue(ImageProperty); } + private set { SetValue(ImageProperty, value); } + } + public static readonly DependencyProperty ImageProperty = + DependencyProperty.Register("Image", typeof(BitmapSource), typeof(WpfGraphSurface), new PropertyMetadata(null)); + + /// + /// Gets or sets the graph controller. + /// + public IGraphController Controller + { + get { return (IGraphController)GetValue(ControllerProperty); } + set { SetValue(ControllerProperty, value); } + } + public static readonly DependencyProperty ControllerProperty = + DependencyProperty.Register("Controller", typeof(IGraphController), typeof(WpfGraphSurface), new PropertyMetadata(null, (d, e) => (d as WpfGraphSurface).OnControllerChanged(e.OldValue as IGraphController, e.NewValue as IGraphController))); + + #endregion + + #region Constructors + + /// + /// Initializes the class. + /// + static WpfGraphSurface() + { + DefaultStyleKeyProperty.OverrideMetadata(typeof(WpfGraphSurface), new FrameworkPropertyMetadata(typeof(WpfGraphSurface))); + } + + /// + /// Initializes a new instance of the class. + /// + public WpfGraphSurface() + { + SizeChanged += WpfGraphSurface_SizeChanged; + } + + #endregion + + #region Apply Template + + /// + /// When overridden in a derived class, is invoked whenever application code or internal processes call . + /// + public override void OnApplyTemplate() + { + base.OnApplyTemplate(); + + _selection_rectangle = GetTemplateChild("PART_SelectionRectangle") as Rectangle; + _selection_canvas = GetTemplateChild("PART_SelectionCanvas") as Canvas; + _grid = GetTemplateChild("PART_Grid") as Grid; + + _selection_canvas.MouseDown += OnSelectionCanvasMouseDown; + _selection_canvas.MouseUp += OnSelectionCanvasMouseUp; + _selection_canvas.MouseMove += OnSelectionCanvasMouseMove; + } + + #endregion + + #region Protected Methods + + /// + /// Called when the mouse moves over the zoom/pan selection canvas. + /// + /// The sender. + /// The instance containing the event data. + protected virtual void OnSelectionCanvasMouseMove(object sender, MouseEventArgs e) + { + _current_mouse_position = e.GetPosition(_selection_canvas); + + if (_is_selection_mouse_down_zoom && Keyboard.IsKeyDown(Key.LeftCtrl)) + { + Canvas.SetLeft(_selection_rectangle, _selection_start_point.X); + Canvas.SetTop(_selection_rectangle, _selection_start_point.Y); + + Point _selection_current_point = e.GetPosition(_selection_canvas); + + if (_selection_current_point.X - _selection_start_point.X > 1) + { + _selection_rectangle.Width = _selection_current_point.X - _selection_start_point.X; + } + + if (_selection_current_point.Y - _selection_start_point.Y > 1) + { + _selection_rectangle.Height = _selection_current_point.Y - _selection_start_point.Y; + } + + if (_selection_current_point.X < _selection_start_point.X) + { + Canvas.SetLeft(_selection_rectangle, _selection_current_point.X); + _selection_rectangle.Width = _selection_start_point.X - _selection_current_point.X; + } + + if (_selection_current_point.Y < _selection_start_point.Y) + { + Canvas.SetTop(_selection_rectangle, _selection_current_point.Y); + _selection_rectangle.Height = _selection_start_point.Y - _selection_current_point.Y; + } + } + else if (_is_selection_mouse_down_pan && _is_scaled) + { + Point _selection_current_point = e.GetPosition(_selection_canvas); + + double delta_x = _current_mouse_position.X - _last_mouse_position.X; + double delta_y = _current_mouse_position.Y - _last_mouse_position.Y; + + double x = _zoom_rect.Left - delta_x; + double y = _zoom_rect.Top - delta_y; + + if (x < 0) + { + x = 0; + } + + if (y < 0) + { + y = 0; + } + + if (x + _zoom_rect.Width > _size.Width) + { + x = x - (x + _zoom_rect.Width - _size.Width); + } + + if (y + _zoom_rect.Height > _size.Height) + { + y = y - (y + _zoom_rect.Height - _size.Height); + } + + _zoom_rect = new System.Drawing.RectangleF((float)x, (float)y, _zoom_rect.Width, _zoom_rect.Height); + } + + _last_mouse_position = _current_mouse_position; + } + + /// + /// Called when the mouse released from the zoom/pan selection canvas. + /// + /// The sender. + /// The instance containing the event data. + protected virtual void OnSelectionCanvasMouseUp(object sender, MouseButtonEventArgs e) + { + _selection_canvas.ReleaseMouseCapture(); + + if (_is_selection_mouse_down_pan) + { + _is_selection_mouse_down_pan = false; + } + else if (_is_selection_mouse_down_zoom) + { + _is_selection_mouse_down_zoom = false; + + _zoom_rect = new System.Drawing.RectangleF((float)Canvas.GetLeft(_selection_rectangle), (float)Canvas.GetTop(_selection_rectangle), (float)_selection_rectangle.Width, (float)_selection_rectangle.Height); + _selection_rectangle.Visibility = Visibility.Hidden; + _is_scaled = true; + } + } + + /// + /// Called when the mouse pressed on the zoom/pan selection canvas. + /// + /// The sender. + /// The instance containing the event data. + protected virtual void OnSelectionCanvasMouseDown(object sender, MouseButtonEventArgs e) + { + Mouse.Capture(_selection_canvas); + + _selection_start_point = e.GetPosition(_selection_canvas); + _current_mouse_position = _selection_start_point; + _last_mouse_position = _current_mouse_position; + + if (e.ClickCount == 2) + { + _zoom_rect = new System.Drawing.RectangleF(); + _is_scaled = false; + } + else if (Keyboard.IsKeyDown(Key.LeftCtrl)) + { + _selection_rectangle.Width = 0; + _selection_rectangle.Height = 0; + _is_selection_mouse_down_zoom = true; + _is_selection_mouse_down_pan = false; + _selection_rectangle.Visibility = Visibility.Visible; + } + else + { + _is_selection_mouse_down_pan = true; + } + } + + /// + /// Called when the property has changed. + /// + /// The old controller. + /// The new controller. + protected virtual void OnControllerChanged(IGraphController oldController, IGraphController newController) + { + if (oldController != null) + { + oldController.Surface = null; + } + + if (newController != null) + { + newController.Surface = this; + } + } + + #endregion + + #region IGraphSurface + + /// + /// Called before drawing has started. + /// + public void BeginDraw() + { + if (_size_changed) + { + _writeable_bitmap = new WriteableBitmap((int)Math.Max(_size.Width, 1), (int)Math.Max(_size.Height, 1), 96.0, 96.0, PixelFormats.Pbgra32, null); + + _gdi_bitmap = new System.Drawing.Bitmap(_writeable_bitmap.PixelWidth, _writeable_bitmap.PixelHeight, + _writeable_bitmap.BackBufferStride, + System.Drawing.Imaging.PixelFormat.Format32bppPArgb, + _writeable_bitmap.BackBuffer); + + _size_changed = false; + } + + _writeable_bitmap.Lock(); + + _g = System.Drawing.Graphics.FromImage(_gdi_bitmap); + _g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; + + _g.Clear(System.Drawing.Color.Transparent); + } + + /// + /// Applies transformation on the current pass. + /// + /// The transform. + public void SetTransform(GraphTransform transform) + { + _g.TranslateTransform((float)transform.TranslateX, (float)transform.TranslateY); + _g.ScaleTransform((float)transform.ScaleX, (float)transform.ScaleY); + } + + /// + /// Draws the stroke of the specified data series points. + /// + /// The data series. + /// The points. + public void DrawSeries(WpfGraphDataSeries dataSeries, IEnumerable points) + { + _g.DrawCurve(dataSeries.GdiPen, points.ToArray()); + } + + /// + /// Fills the specified data series points. + /// + /// The data series. + /// The points. + public void FillSeries(WpfGraphDataSeries dataSeries, IEnumerable points) + { + var brush = dataSeries.GdiFill; + + if (dataSeries.GdiFill is System.Drawing.Drawing2D.LinearGradientBrush) + { + var gradient = dataSeries.GdiFill as System.Drawing.Drawing2D.LinearGradientBrush; + gradient.ResetTransform(); + gradient.ScaleTransform((_size.Width / gradient.Rectangle.Width), (_size.Height / gradient.Rectangle.Height)); + } + + _g.FillPolygon(dataSeries.GdiFill, points.ToArray()); + } + + /// + /// Called when drawing has completed. + /// + public void EndDraw() + { + _writeable_bitmap.AddDirtyRect(new Int32Rect(0, 0, _writeable_bitmap.PixelWidth, _writeable_bitmap.PixelHeight)); + _writeable_bitmap.Unlock(); + + var cloned = _writeable_bitmap.Clone(); + cloned.Freeze(); + + Dispatcher.BeginInvoke(new Action((() => + { + Image = cloned; + }))); + + _g.Dispose(); + } + + /// + /// Returns the actual size of the surface. + /// + /// + public System.Drawing.SizeF GetSize() + { + return _size; + } + + /// + /// Returns the current bounds of the zooming rectangle. + /// + /// + public System.Drawing.RectangleF GetZoomRect() + { + return _zoom_rect; + } + + #endregion + + #region Event Handlers + + /// + /// Handles the WPF Graph Surface Size Changed event. + /// + /// The source of the event. + /// The event arguments. + private void WpfGraphSurface_SizeChanged(object sender, SizeChangedEventArgs e) + { + _size = new System.Drawing.SizeF((float)e.NewSize.Width, (float)e.NewSize.Height); + _size_changed = true; + } + + #endregion + } +} diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/DataPoints/DoubleDataPoint.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/DataPoints/DoubleDataPoint.cs new file mode 100644 index 000000000..b4740fcfa --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/DataPoints/DoubleDataPoint.cs @@ -0,0 +1,178 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace RealTimeGraphX.DataPoints +{ + /// + /// Represents a graph value data point. + /// + /// + public class DoubleDataPoint : GraphDataPoint + { + /// + /// Initializes a new instance of the class. + /// + public DoubleDataPoint() : base() + { + + } + + /// + /// Initializes a new instance of the class. + /// + /// The value. + public DoubleDataPoint(double value) : base(value) + { + + } + + /// + /// Performs an implicit conversion from to . + /// + /// The value. + /// + /// The result of the conversion. + /// + public static implicit operator DoubleDataPoint(double value) + { + return new DoubleDataPoint(value); + } + + /// + /// Implements the operator -. + /// + /// a. + /// The b. + /// + /// The result of the operator. + /// + public static DoubleDataPoint operator -(DoubleDataPoint a, DoubleDataPoint b) + { + return new DoubleDataPoint(a.Value - b.Value); + } + + /// + /// Implements the operator +. + /// + /// a. + /// The b. + /// + /// The result of the operator. + /// + public static DoubleDataPoint operator +(DoubleDataPoint a, DoubleDataPoint b) + { + return new DoubleDataPoint(a.Value + b.Value); + } + + /// + /// Sums the value of this instance with another instance value and returns the result. + /// + /// The other instance. + /// + public override IGraphDataPoint Add(IGraphDataPoint other) + { + return new DoubleDataPoint(this.Value + (other as DoubleDataPoint).Value); + } + + /// + /// Subtract the value of another instance from this instance and returns the result. + /// + /// The other instance. + /// + public override IGraphDataPoint Subtract(IGraphDataPoint other) + { + return new DoubleDataPoint(this.Value - (other as DoubleDataPoint).Value); + } + + /// + /// Multiplies the value of this instance with another instance value and returns the result. + /// + /// The other instance. + /// + public override IGraphDataPoint Multiply(IGraphDataPoint other) + { + return new DoubleDataPoint(this.Value * (other as DoubleDataPoint).Value); + } + + /// + /// Divides the value of this instance with another instance value and returns the result. + /// + /// The other instance. + /// + public override IGraphDataPoint Divide(IGraphDataPoint other) + { + return new DoubleDataPoint(this.Value / (other as DoubleDataPoint).Value); + } + + /// + /// Returns the percentage value of this instance between the specified minimum and maximum values. + /// + /// The minimum. + /// The maximum. + /// + public override double ComputeRelativePosition(IGraphDataPoint min, IGraphDataPoint max) + { + DoubleDataPoint dMin = min as DoubleDataPoint; + DoubleDataPoint dMax = max as DoubleDataPoint; + + var result = ((Value - dMin) * 100) / (dMax - dMin); + + return double.IsNaN(result) || double.IsInfinity(result) ? dMin.Value : result; + } + + /// + /// Returns the absolute value of the specified percentage value between the specified minimum and maximum values. + /// + /// The minimum. + /// The maximum. + /// The percentage. + /// + public override IGraphDataPoint ComputeAbsolutePosition(IGraphDataPoint min, IGraphDataPoint max, double percentage) + { + double minimum = (double)min.GetValue(); + double maximum = (double)max.GetValue(); + + return new DoubleDataPoint(minimum + (maximum - minimum) * percentage); + } + + /// + /// Creates a range of values from the specified minimum and maximum. + /// + /// The minimum. + /// The maximum. + /// The count. + /// + public override IEnumerable CreateRange(IGraphDataPoint min, IGraphDataPoint max, int count) + { + double minimum = (double)min.GetValue(); + double maximum = (double)max.GetValue(); + + return Enumerable.Range(0, count). + Select(i => minimum + (maximum - minimum) * ((double)i / (count - 1))). + Select(x => new DoubleDataPoint(x)); + } + + /// + /// Returns a formated string of this data point. + /// + /// The format. + /// + public override string ToString(string format) + { + return Value.ToString(format); + } + + /// + /// Parses the specified value and returns a new instance of data point. + /// + /// The value. + /// + public override IGraphDataPoint Parse(string value) + { + return new DoubleDataPoint(double.Parse(value)); + } + } +} diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/DataPoints/FloatDataPoint.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/DataPoints/FloatDataPoint.cs new file mode 100644 index 000000000..6e225a679 --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/DataPoints/FloatDataPoint.cs @@ -0,0 +1,178 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace RealTimeGraphX.DataPoints +{ + /// + /// Represents a graph value data point. + /// + /// + public class FloatDataPoint : GraphDataPoint + { + /// + /// Initializes a new instance of the class. + /// + public FloatDataPoint() : base() + { + + } + + /// + /// Initializes a new instance of the class. + /// + /// The value. + public FloatDataPoint(float value) : base(value) + { + + } + + /// + /// Performs an implicit conversion from to . + /// + /// The value. + /// + /// The result of the conversion. + /// + public static implicit operator FloatDataPoint(float value) + { + return new FloatDataPoint(value); + } + + /// + /// Implements the operator -. + /// + /// a. + /// The b. + /// + /// The result of the operator. + /// + public static FloatDataPoint operator -(FloatDataPoint a, FloatDataPoint b) + { + return new FloatDataPoint(a.Value - b.Value); + } + + /// + /// Implements the operator +. + /// + /// a. + /// The b. + /// + /// The result of the operator. + /// + public static FloatDataPoint operator +(FloatDataPoint a, FloatDataPoint b) + { + return new FloatDataPoint(a.Value + b.Value); + } + + /// + /// Sums the value of this instance with another instance value and returns the result. + /// + /// The other instance. + /// + public override IGraphDataPoint Add(IGraphDataPoint other) + { + return new FloatDataPoint(this.Value + (other as FloatDataPoint).Value); + } + + /// + /// Subtract the value of another instance from this instance and returns the result. + /// + /// The other instance. + /// + public override IGraphDataPoint Subtract(IGraphDataPoint other) + { + return new FloatDataPoint(this.Value - (other as FloatDataPoint).Value); + } + + /// + /// Multiplies the value of this instance with another instance value and returns the result. + /// + /// The other instance. + /// + public override IGraphDataPoint Multiply(IGraphDataPoint other) + { + return new FloatDataPoint(this.Value * (other as FloatDataPoint).Value); + } + + /// + /// Divides the value of this instance with another instance value and returns the result. + /// + /// The other instance. + /// + public override IGraphDataPoint Divide(IGraphDataPoint other) + { + return new FloatDataPoint(this.Value / (other as FloatDataPoint).Value); + } + + /// + /// Returns the percentage value of this instance between the specified minimum and maximum values. + /// + /// The minimum. + /// The maximum. + /// + public override double ComputeRelativePosition(IGraphDataPoint min, IGraphDataPoint max) + { + FloatDataPoint dMin = min as FloatDataPoint; + FloatDataPoint dMax = max as FloatDataPoint; + + var result = ((Value - dMin) * 100) / (dMax - dMin); + + return double.IsNaN(result) ? dMin.Value : result; + } + + /// + /// Returns the absolute value of the specified percentage value between the specified minimum and maximum values. + /// + /// The minimum. + /// The maximum. + /// The percentage. + /// + public override IGraphDataPoint ComputeAbsolutePosition(IGraphDataPoint min, IGraphDataPoint max, double percentage) + { + double minimum = (double)min.GetValue(); + double maximum = (double)max.GetValue(); + + return new FloatDataPoint((float)(minimum + (maximum - minimum) * percentage)); + } + + /// + /// Creates a range of values from the specified minimum and maximum. + /// + /// The minimum. + /// The maximum. + /// The count. + /// + public override IEnumerable CreateRange(IGraphDataPoint min, IGraphDataPoint max, int count) + { + double minimum = (double)min.GetValue(); + double maximum = (double)max.GetValue(); + + return Enumerable.Range(0, count). + Select(i => minimum + (maximum - minimum) * ((double)i / (count - 1))). + Select(x => new FloatDataPoint((float)x)); + } + + /// + /// Returns a formated string of this data point. + /// + /// The format. + /// + public override string ToString(string format) + { + return Value.ToString(format); + } + + /// + /// Parses the specified value and returns a new instance of data point. + /// + /// The value. + /// + public override IGraphDataPoint Parse(string value) + { + return new FloatDataPoint(float.Parse(value)); + } + } +} diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/DataPoints/Int32DataPoint.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/DataPoints/Int32DataPoint.cs new file mode 100644 index 000000000..4bccdcb74 --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/DataPoints/Int32DataPoint.cs @@ -0,0 +1,178 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace RealTimeGraphX.DataPoints +{ + /// + /// Represents a graph value data point. + /// + /// + public class Int32DataPoint : GraphDataPoint + { + /// + /// Initializes a new instance of the class. + /// + public Int32DataPoint() : base() + { + + } + + /// + /// Initializes a new instance of the class. + /// + /// The value. + public Int32DataPoint(int value) : base(value) + { + + } + + /// + /// Performs an implicit conversion from to . + /// + /// The value. + /// + /// The result of the conversion. + /// + public static implicit operator Int32DataPoint(int value) + { + return new Int32DataPoint(value); + } + + /// + /// Implements the operator -. + /// + /// a. + /// The b. + /// + /// The result of the operator. + /// + public static Int32DataPoint operator -(Int32DataPoint a, Int32DataPoint b) + { + return new Int32DataPoint(a.Value - b.Value); + } + + /// + /// Implements the operator +. + /// + /// a. + /// The b. + /// + /// The result of the operator. + /// + public static Int32DataPoint operator +(Int32DataPoint a, Int32DataPoint b) + { + return new Int32DataPoint(a.Value + b.Value); + } + + /// + /// Sums the value of this instance with another instance value and returns the result. + /// + /// The other instance. + /// + public override IGraphDataPoint Add(IGraphDataPoint other) + { + return new Int32DataPoint(this.Value + (other as Int32DataPoint).Value); + } + + /// + /// Subtract the value of another instance from this instance and returns the result. + /// + /// The other instance. + /// + public override IGraphDataPoint Subtract(IGraphDataPoint other) + { + return new Int32DataPoint(this.Value - (other as Int32DataPoint).Value); + } + + /// + /// Multiplies the value of this instance with another instance value and returns the result. + /// + /// The other instance. + /// + public override IGraphDataPoint Multiply(IGraphDataPoint other) + { + return new Int32DataPoint(this.Value * (other as Int32DataPoint).Value); + } + + /// + /// Divides the value of this instance with another instance value and returns the result. + /// + /// The other instance. + /// + public override IGraphDataPoint Divide(IGraphDataPoint other) + { + return new Int32DataPoint(this.Value / (other as Int32DataPoint).Value); + } + + /// + /// Returns the percentage value of this instance between the specified minimum and maximum values. + /// + /// The minimum. + /// The maximum. + /// + public override double ComputeRelativePosition(IGraphDataPoint min, IGraphDataPoint max) + { + Int32DataPoint dMin = min as Int32DataPoint; + Int32DataPoint dMax = max as Int32DataPoint; + + var result = ((Value - dMin) * 100) / (dMax - dMin); + + return result; + } + + /// + /// Returns the absolute value of the specified percentage value between the specified minimum and maximum values. + /// + /// The minimum. + /// The maximum. + /// The percentage. + /// + public override IGraphDataPoint ComputeAbsolutePosition(IGraphDataPoint min, IGraphDataPoint max, double percentage) + { + int minimum = (int)min.GetValue(); + int maximum = (int)max.GetValue(); + + return new Int32DataPoint((int)(minimum + (maximum - minimum) * percentage)); + } + + /// + /// Creates a range of values from the specified minimum and maximum. + /// + /// The minimum. + /// The maximum. + /// The count. + /// + public override IEnumerable CreateRange(IGraphDataPoint min, IGraphDataPoint max, int count) + { + int minimum = (int)min.GetValue(); + int maximum = (int)max.GetValue(); + + return Enumerable.Range(0, count). + Select(i => minimum + (maximum - minimum) * ((int)i / (count - 1))). + Select(x => new Int32DataPoint(x)); + } + + /// + /// Returns a formated string of this data point. + /// + /// The format. + /// + public override string ToString(string format) + { + return Value.ToString(format); + } + + /// + /// Parses the specified value and returns a new instance of data point. + /// + /// The value. + /// + public override IGraphDataPoint Parse(string value) + { + return new Int32DataPoint(int.Parse(value)); + } + } +} diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/DataPoints/TimeSpanDataPoint.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/DataPoints/TimeSpanDataPoint.cs new file mode 100644 index 000000000..737c93c81 --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/DataPoints/TimeSpanDataPoint.cs @@ -0,0 +1,180 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace RealTimeGraphX.DataPoints +{ + /// + /// Represents a graph value data point. + /// + /// + public class TimeSpanDataPoint : GraphDataPoint + { + /// + /// Initializes a new instance of the class. + /// + public TimeSpanDataPoint() : base() + { + + } + + /// + /// Initializes a new instance of the class. + /// + /// The value. + public TimeSpanDataPoint(TimeSpan value) : base(value) + { + + } + + /// + /// Performs an implicit conversion from to . + /// + /// The value. + /// + /// The result of the conversion. + /// + public static implicit operator TimeSpanDataPoint(TimeSpan value) + { + return new TimeSpanDataPoint(value); + } + + /// + /// Implements the operator -. + /// + /// a. + /// The b. + /// + /// The result of the operator. + /// + public static TimeSpanDataPoint operator -(TimeSpanDataPoint a, TimeSpanDataPoint b) + { + return new TimeSpanDataPoint(a.Value - b.Value); + } + + /// + /// Implements the operator +. + /// + /// a. + /// The b. + /// + /// The result of the operator. + /// + public static TimeSpanDataPoint operator +(TimeSpanDataPoint a, TimeSpanDataPoint b) + { + return new TimeSpanDataPoint(a.Value + b.Value); + } + + /// + /// Sums the value of this instance with another instance value and returns the result. + /// + /// The other instance. + /// + public override IGraphDataPoint Add(IGraphDataPoint other) + { + return new TimeSpanDataPoint(this.Value + (other as TimeSpanDataPoint).Value); + } + + /// + /// Subtract the value of another instance from this instance and returns the result. + /// + /// The other instance. + /// + public override IGraphDataPoint Subtract(IGraphDataPoint other) + { + return new TimeSpanDataPoint(this.Value - (other as TimeSpanDataPoint).Value); + } + + /// + /// Multiplies the value of this instance with another instance value and returns the result. + /// + /// The other instance. + /// + public override IGraphDataPoint Multiply(IGraphDataPoint other) + { + return new TimeSpanDataPoint(TimeSpan.FromMilliseconds(this.Value.TotalMilliseconds * (other as TimeSpanDataPoint).Value.TotalMilliseconds)); + } + + /// + /// Divides the value of this instance with another instance value and returns the result. + /// + /// The other instance. + /// + public override IGraphDataPoint Divide(IGraphDataPoint other) + { + return new TimeSpanDataPoint(TimeSpan.FromMilliseconds(this.Value.TotalMilliseconds / (other as TimeSpanDataPoint).Value.TotalMilliseconds)); + } + + /// + /// Returns the percentage value of this instance between the specified minimum and maximum values. + /// + /// The minimum. + /// The maximum. + /// + public override double ComputeRelativePosition(IGraphDataPoint min, IGraphDataPoint max) + { + TimeSpan dMin = min as TimeSpanDataPoint; + TimeSpan dMax = max as TimeSpanDataPoint; + + var result = ((Value.TotalMilliseconds - dMin.TotalMilliseconds) * 100) / (dMax.TotalMilliseconds - dMin.TotalMilliseconds); + + return double.IsNaN(result) ? dMin.TotalMilliseconds : result; + } + + /// + /// Returns the absolute value of the specified percentage value between the specified minimum and maximum values. + /// + /// The minimum. + /// The maximum. + /// The percentage. + /// + public override IGraphDataPoint ComputeAbsolutePosition(IGraphDataPoint min, IGraphDataPoint max, double percentage) + { + double minimum = ((TimeSpan)min.GetValue()).TotalMilliseconds; + double maximum = ((TimeSpan)max.GetValue()).TotalMilliseconds; + + return new TimeSpanDataPoint(TimeSpan.FromMilliseconds(minimum + (maximum - minimum) * percentage)); + } + + /// + /// Creates a range of values from the specified minimum and maximum. + /// + /// The minimum. + /// The maximum. + /// The count. + /// + public override IEnumerable CreateRange(IGraphDataPoint min, IGraphDataPoint max, int count) + { + double minimum = ((TimeSpan)min.GetValue()).TotalMilliseconds; + double maximum = ((TimeSpan)max.GetValue()).TotalMilliseconds; + + return Enumerable.Range(0, count). + Select(i => minimum + (maximum - minimum) * ((double)i / (count - 1))). + Select(x => new TimeSpanDataPoint(TimeSpan.FromMilliseconds(x))); + } + + /// + /// Returns a formated string of this data point. + /// + /// The format. + /// + public override string ToString(string format) + { + return Value.ToString(format); + } + + /// + /// Parses the specified value and returns a new instance of data point. + /// + /// The value. + /// + public override IGraphDataPoint Parse(string value) + { + return new TimeSpanDataPoint(TimeSpan.Parse(value)); + } + } +} diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/EventArguments/RangeChangedEventArgs.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/EventArguments/RangeChangedEventArgs.cs new file mode 100644 index 000000000..15d5bb7ba --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/EventArguments/RangeChangedEventArgs.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace RealTimeGraphX.EventArguments +{ + /// + /// Represents a graph range change event arguments. + /// + /// + public class RangeChangedEventArgs : EventArgs + { + /// + /// Gets or sets the minimum x value. + /// + public GraphDataPoint MinimumX { get; set; } + + /// + /// Gets or sets the maximum x value. + /// + public GraphDataPoint MaximumX { get; set; } + + /// + /// Gets or sets the minimum y value. + /// + public GraphDataPoint MinimumY { get; set; } + + /// + /// Gets or sets the maximum y value. + /// + public GraphDataPoint MaximumY { get; set; } + + /// + /// Initializes a new instance of the class. + /// + public RangeChangedEventArgs() + { + + } + + /// + /// Initializes a new instance of the class. + /// + /// The minimum x value. + /// The maximum x value. + /// The minimum y value. + /// The maximum y value. + public RangeChangedEventArgs(GraphDataPoint minimumX, GraphDataPoint maximumX,GraphDataPoint minimumY,GraphDataPoint maximumY) : this() + { + MinimumX = minimumX; + MaximumX = maximumX; + MinimumY = minimumY; + MaximumY = maximumY; + } + } +} diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphCommand.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphCommand.cs new file mode 100644 index 000000000..e16ecd675 --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphCommand.cs @@ -0,0 +1,77 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows.Input; + +namespace RealTimeGraphX +{ + /// + /// Represents a graph relay command. + /// + /// + public class GraphCommand : ICommand + { + private Action _action; + private Func _canExecute; + + /// + /// Initializes a new instance of the class. + /// + /// The action. + /// The can execute. + public GraphCommand(Action action, Func canExecute) + { + _action = action; + _canExecute = canExecute; + } + + /// + /// Initializes a new instance of the class. + /// + /// The action. + public GraphCommand(Action action) : this(action, null) + { + + } + + /// + /// Defines the method that determines whether the command can execute in its current state. + /// + /// Data used by the command. If the command does not require data to be passed, this object can be set to null. + /// + /// true if this command can be executed; otherwise, false. + /// + public bool CanExecute(object parameter) + { + if (_canExecute != null) + { + return _canExecute(); + } + + return true; + } + + /// + /// Defines the method to be called when the command is invoked. + /// + /// Data used by the command. If the command does not require data to be passed, this object can be set to null. + public void Execute(object parameter) + { + _action(); + } + + /// + /// Raises the can execute changed event. + /// + public void RaiseCanExecuteChanged() + { + CanExecuteChanged?.Invoke(this, new EventArgs()); + } + + /// + /// Occurs when changes occur that affect whether or not the command should execute. + /// + /// + public event EventHandler CanExecuteChanged; + } +} diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphController.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphController.cs new file mode 100644 index 000000000..9aabc649a --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphController.cs @@ -0,0 +1,543 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Text; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using System.Drawing; +using RealTimeGraphX.EventArguments; +using RealTimeGraphX.Renderers; + +namespace RealTimeGraphX +{ + /// + /// Represents an base class. + /// + /// The type of the data series. + /// The type of the x data point. + /// The type of the y data point. + /// + /// + public abstract class GraphController : GraphObject, IGraphController + where TXDataPoint : GraphDataPoint + where TYDataPoint : GraphDataPoint + where TDataSeries : IGraphDataSeries + { + private GraphDataQueue> _pending_series_collection; + private Dictionary _to_render; + private DateTime _last_render_time; + private object _render_lock = new object(); + private Thread _render_thread; + + #region Pending Series Class + + protected class PendingSeries + { + public TDataSeries Series { get; set; } + public List XX { get; set; } + public List YY { get; set; } + + public int NewItemsCount + { + get { return XX.Count - RenderedItems; } + } + + public int RenderedItems { get; set; } + + public bool IsClearSeries { get; set; } + } + + #endregion + + #region Events + + /// + /// Occurs when the current effective minimum/maximum has changed. + /// + public event EventHandler EffectiveRangeChanged; + + /// + /// Occurs when the current virtual (effective minimum/maximum after transformation) minimum/maximum has changed. + /// + public event EventHandler VirtualRangeChanged; + + #endregion + + #region Properties + + /// + /// Gets or sets the controller refresh rate. + /// Higher rate requires more CPU time. + /// + public TimeSpan RefreshRate { get; set; } + + /// + /// Gets or sets a value indicating whether to pause rendering. + /// + public bool IsPaused { get; set; } + + /// + /// Gets the data series collection. + /// + public ObservableCollection DataSeriesCollection { get; } + + private IGraphRenderer _renderer; + /// + /// Gets or sets the graph renderer. + /// + public IGraphRenderer Renderer + { + get + { + return _renderer; + } + set + { + _renderer = value; RaisePropertyChangedAuto(); + } + } + + private IGraphSurface _surface; + /// + /// Gets or sets the rendering surface. + /// + public IGraphSurface Surface + { + get { return _surface; } + set + { + _surface = value; + RequestVirtualRangeChange(); + } + } + + private GraphRange _range; + /// + /// Gets or sets the graph range (data point boundaries). + /// + public GraphRange Range + { + get + { + return _range; + } + set + { + _range = value; RaisePropertyChangedAuto(); + } + } + + /// + /// Gets the current effective x-axis minimum. + /// + public GraphDataPoint EffectiveMinimumX { get; private set; } + + /// + /// Gets the current effective x-axis maximum. + /// + public GraphDataPoint EffectiveMaximumX { get; private set; } + + /// + /// Gets the current effective y-axis minimum. + /// + public GraphDataPoint EffectiveMinimumY { get; private set; } + + /// + /// Gets the current effective y-axis maximum. + /// + public GraphDataPoint EffectiveMaximumY { get; private set; } + + /// + /// Gets the current virtual (effective minimum/maximum after transformation) x-axis minimum. + /// + public GraphDataPoint VirtualMinimumX { get; private set; } + + /// + /// Gets the current virtual (effective minimum/maximum after transformation) x-axis maximum. + /// + public GraphDataPoint VirtualMaximumX { get; private set; } + + /// + /// Gets the current virtual (effective minimum/maximum after transformation) y-axis minimum. + /// + public GraphDataPoint VirtualMinimumY { get; private set; } + + /// + /// Gets the current virtual (effective minimum/maximum after transformation) y-axis maximum. + /// + public GraphDataPoint VirtualMaximumY { get; private set; } + + #endregion + + #region Commands + + /// + /// Gets the clear command. + /// + public GraphCommand ClearCommand { get; private set; } + + #endregion + + #region Constructors + + /// + /// Initializes a new instance of the class. + /// + public GraphController() + { + Renderer = new ScrollingLineRenderer(); + + DataSeriesCollection = new ObservableCollection(); + Range = new GraphRange(); + + _last_render_time = DateTime.Now; + _to_render = new Dictionary(); + _pending_series_collection = new GraphDataQueue>(); + RefreshRate = TimeSpan.FromMilliseconds(50); + + ClearCommand = new GraphCommand(Clear); + + _render_thread = new Thread(RenderThreadMethod); + _render_thread.IsBackground = true; + _render_thread.Start(); + } + + #endregion + + #region Render Thread + + /// + /// The rendering thread method. + /// + private void RenderThreadMethod() + { + while (true) + { + if (!IsPaused) + { + var pending_list = _pending_series_collection.BlockDequeue(); + + foreach (var pending_series in pending_list) + { + if (pending_series.IsClearSeries) + { + _pending_series_collection = new GraphDataQueue>(); + _to_render.Clear(); + break; + } + + if (_to_render.ContainsKey(pending_series.Series)) + { + var s = _to_render[pending_series.Series]; + s.XX.AddRange(pending_series.XX); + s.YY.AddRange(pending_series.YY); + } + else + { + _to_render[pending_series.Series] = pending_series; + } + } + + if (DateTime.Now > _last_render_time.AddMilliseconds(RefreshRate.TotalMilliseconds) && _to_render.Count > 0) + { + GraphDataPoint min_x = _range.MaximumX - _range.MaximumX; + GraphDataPoint max_x = _range.MaximumX; + GraphDataPoint min_y = _range.MinimumY; + GraphDataPoint max_y = _range.MaximumY; + + min_x = _to_render.First().Value.XX.First(); + max_x = _to_render.First().Value.XX.Last(); + + if (_range.AutoY) + { + min_y = _to_render.Select(x => x.Value).SelectMany(x => x.YY).Min(); + max_y = _to_render.Select(x => x.Value).SelectMany(x => x.YY).Max(); + } + + if (min_y == max_y) + { + min_y = _range.MinimumY; + max_y = _range.MaximumY; + } + + EffectiveMinimumX = min_x; + EffectiveMaximumX = max_x; + EffectiveMinimumY = min_y; + EffectiveMaximumY = max_y; + + VirtualMinimumX = EffectiveMinimumX; + VirtualMaximumX = EffectiveMaximumX; + VirtualMinimumY = EffectiveMinimumY; + VirtualMaximumY = EffectiveMaximumY; + + _last_render_time = DateTime.Now; + + if (Surface != null) + { + var surface_size = Surface.GetSize(); + var zoom_rect = Surface.GetZoomRect(); + + Surface.BeginDraw(); + + if (zoom_rect.Width > 0 && zoom_rect.Height > 0) + { + var zoom_rect_top_percentage = zoom_rect.Top / surface_size.Height; + var zoom_rect_bottom_percentage = zoom_rect.Bottom / surface_size.Height; + var zoom_rect_left_percentage = zoom_rect.Left / surface_size.Width; + var zoom_rect_right_percentage = zoom_rect.Right / surface_size.Width; + + VirtualMinimumY = EffectiveMaximumY - GraphDataPointHelper.ComputeAbsolutePosition(EffectiveMinimumY, EffectiveMaximumY, zoom_rect_bottom_percentage); + VirtualMaximumY = EffectiveMaximumY - GraphDataPointHelper.ComputeAbsolutePosition(EffectiveMinimumY, EffectiveMaximumY, zoom_rect_top_percentage); + + VirtualMinimumX = GraphDataPointHelper.ComputeAbsolutePosition(EffectiveMinimumX, EffectiveMaximumX, zoom_rect_left_percentage); + VirtualMaximumX = GraphDataPointHelper.ComputeAbsolutePosition(EffectiveMinimumX, EffectiveMaximumX, zoom_rect_right_percentage); + + GraphTransform transform = new GraphTransform(); + var scale_x = (float)(surface_size.Width / zoom_rect.Width); + var scale_y = (float)(surface_size.Height / zoom_rect.Height); + var translate_x = (float)-zoom_rect.Left * scale_x; + var translate_y = (float)-zoom_rect.Top * scale_y; + + transform = new GraphTransform(); + transform.TranslateX = translate_x; + transform.TranslateY = translate_y; + transform.ScaleX = scale_x; + transform.ScaleY = scale_y; + + Surface.SetTransform(transform); + } + + List>> to_draw = new List>>(); + + var to_render = _to_render.Select(x => x.Value).ToList(); + + foreach (var item in to_render) + { + var points = Renderer.Render(Surface, item.Series, _range, item.XX, item.YY, min_x, max_x, min_y, max_y); + to_draw.Add(new Tuple>(item.Series, points)); + } + + for (int i = 0; i < to_draw.Count; i++) + { + if (to_draw[i].Item2.Count() > 2) + { + if (to_draw[i].Item1.IsVisible) + { + Renderer.Draw(Surface, to_draw[i].Item1, to_draw[i].Item2, i, to_draw.Count); + } + } + } + + Surface.EndDraw(); + } + + OnEffectiveRangeChanged(EffectiveMinimumX, EffectiveMaximumX, EffectiveMinimumY, EffectiveMaximumY); + OnVirtualRangeChanged(VirtualMinimumX, VirtualMaximumX, VirtualMinimumY, VirtualMaximumY); + } + } + else + { + Thread.Sleep(RefreshRate); + } + } + } + + #endregion + + #region Protected Methods + + /// + /// Raises the event. + /// + /// The minimum x. + /// The maximum x. + /// The minimum y. + /// The maximum y. + protected virtual void OnEffectiveRangeChanged(GraphDataPoint minimumX, GraphDataPoint maximumX, GraphDataPoint minimumY, GraphDataPoint maximumY) + { + EffectiveRangeChanged?.Invoke(this, new RangeChangedEventArgs(minimumX, maximumX, minimumY, maximumY)); + } + + /// + /// Raises the event. + /// + /// The minimum x. + /// The maximum x. + /// The minimum y. + /// The maximum y. + protected virtual void OnVirtualRangeChanged(GraphDataPoint minimumX, GraphDataPoint maximumX, GraphDataPoint minimumY, GraphDataPoint maximumY) + { + var range = new RangeChangedEventArgs(minimumX, maximumX, minimumY, maximumY); + VirtualRangeChanged?.Invoke(this, range); + } + + /// + /// Converts the specified relative x position to graph absolute position. + /// + /// The relative x position. + /// + protected virtual float ConvertXValueToRendererValue(double x) + { + return (float)(x * Surface.GetSize().Width / 100); + } + + /// + /// Converts the specified relative y position to graph absolute position. + /// + /// The relative y position. + /// + protected virtual float ConvertYValueToRendererValue(double y) + { + return (float)(Surface.GetSize().Height - (y * Surface.GetSize().Height / 100)); + } + + #endregion + + #region Public Methods + + /// + /// Submits the specified x and y data points. + /// If the controller has more than one data series the data points will be duplicated. + /// + /// X data point. + /// Y data point. + public void PushData(TXDataPoint x, TYDataPoint y) + { + if (DataSeriesCollection.Count == 0) return; + + List> xxxx = new List>(); + List> yyyy = new List>(); + + foreach (var series in DataSeriesCollection.ToList()) + { + xxxx.Add(new List() { x }); + yyyy.Add(new List() { y }); + } + + PushData(xxxx, yyyy); + } + + /// + /// Submits the specified collections of x and y data points. + /// If the controller has more than one data series the data points will be distributed evenly. + /// + /// X data point collection. + /// Y data point collection. + public void PushData(IEnumerable xx, IEnumerable yy) + { + if (DataSeriesCollection.Count == 0) return; + + var xList = xx.ToList(); + var yList = yy.ToList(); + + List> xxxx = new List>(); + List> yyyy = new List>(); + + foreach (var series in DataSeriesCollection.ToList()) + { + xxxx.Add(new List()); + yyyy.Add(new List()); + } + + int counter = 0; + + for (int i = 0; i < xList.Count; i++) + { + xxxx[counter].Add(xList[i]); + yyyy[counter].Add(yList[i]); + + counter++; + + if (counter >= xxxx.Count) + { + counter = 0; + } + } + + PushData(xxxx, yyyy); + } + + /// + /// Submits a matrix of x and y data points. Meaning each data series should process a single collection of x/y data points. + /// + /// X matrix. + /// Y matrix. + public void PushData(IEnumerable> xxxx, IEnumerable> yyyy) + { + if (DataSeriesCollection.Count == 0) return; + + IEnumerable> xxxxI = xxxx.Select(x => x.ToList()).ToList(); + IEnumerable> yyyyI = yyyy.Select(x => x.ToList()).ToList(); + + List> xxxxList = xxxxI.Select(x => x.ToList()).ToList(); + List> yyyyList = yyyyI.Select(x => x.ToList()).ToList(); + + int first_count_x = xxxxList[0].Count; + int first_count_y = yyyyList[0].Count; + + + bool is_data_valid = true; + + for (int i = 0; i < xxxxList.Count; i++) + { + if (xxxxList[0].Count != first_count_x) + { + is_data_valid = false; + break; + } + + if (xxxxList[0].Count != yyyyList[0].Count) + { + is_data_valid = false; + break; + } + } + + if (!is_data_valid) + { + throw new ArgumentOutOfRangeException("When pushing data to a multi series renderer, each series must contain the same amount of data."); + } + + var list = DataSeriesCollection.ToList(); + + var pending_list = new List(); + + for (int i = 0; i < list.Count; i++) + { + pending_list.Add(new PendingSeries() + { + Series = list[i], + XX = xxxxList[i].ToList(), + YY = yyyyList[i].ToList(), + }); + } + + _pending_series_collection.BlockEnqueue(pending_list); + } + + /// + /// Clears all data points from this controller. + /// + public void Clear() + { + _pending_series_collection.BlockEnqueue(new List() + { + new PendingSeries() + { + IsClearSeries = true + }, + }); + } + + /// + /// Requests the controller to invoke a virtual range change event. + /// + public void RequestVirtualRangeChange() + { + OnVirtualRangeChanged(Range.MaximumX, Range.MaximumX, Range.MinimumY, Range.MaximumY); + } + + #endregion + } +} diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphDataPoint.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphDataPoint.cs new file mode 100644 index 000000000..e069d8950 --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphDataPoint.cs @@ -0,0 +1,412 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace RealTimeGraphX +{ + /// + /// Represents an base class. + /// + /// + public abstract class GraphDataPoint : IGraphDataPoint + { + #region IComparable + + /// + /// Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. + /// + /// An object to compare with this instance. + /// + /// A value that indicates the relative order of the objects being compared. The return value has these meanings: Value Meaning Less than zero This instance precedes in the sort order. Zero This instance occurs in the same position in the sort order as . Greater than zero This instance follows in the sort order. + /// + public abstract int CompareTo(object obj); + + /// + /// Determines whether the specified , is equal to this instance. + /// + /// The to compare with this instance. + /// + /// true if the specified is equal to this instance; otherwise, false. + /// + public override bool Equals(object obj) + { + return base.Equals(obj); + } + + /// + /// Returns a hash code for this instance. + /// + /// + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + /// + public override int GetHashCode() + { + return base.GetHashCode(); + } + + #endregion + + #region Logical Operators + + /// + /// Implements the operator >. + /// + /// + /// The result of the operator. + /// + public static bool operator >(GraphDataPoint a, GraphDataPoint b) + { + return a.CompareTo(b) == 1; + } + + /// + /// Implements the operator <. + /// + /// + /// The result of the operator. + /// + public static bool operator <(GraphDataPoint a, GraphDataPoint b) + { + return a.CompareTo(b) == -1; + } + + /// + /// Implements the operator ==. + /// + /// + /// The result of the operator. + /// + public static bool operator ==(GraphDataPoint a, GraphDataPoint b) + { + if (Object.ReferenceEquals(a, null) && Object.ReferenceEquals(b, null)) return true; + if (Object.ReferenceEquals(a, null) && !Object.ReferenceEquals(b, null)) return false; + + return a.CompareTo(b) == 0; + } + + /// + /// Implements the operator !=. + /// + /// + /// The result of the operator. + /// + public static bool operator !=(GraphDataPoint a, GraphDataPoint b) + { + if (Object.ReferenceEquals(a, null) && Object.ReferenceEquals(b, null)) return false; + if (Object.ReferenceEquals(a, null) && !Object.ReferenceEquals(b, null)) return true; + + return a.CompareTo(b) != 0; + } + + #endregion + + #region Arithmetic Operators + + /// + /// Implements the operator -. + /// + /// + /// The result of the operator. + /// + public static GraphDataPoint operator -(GraphDataPoint a, GraphDataPoint b) + { + return (GraphDataPoint)a.Subtract(b); + } + + /// + /// Implements the operator +. + /// + /// + /// The result of the operator. + /// + public static GraphDataPoint operator +(GraphDataPoint a, GraphDataPoint b) + { + return (GraphDataPoint)a.Add(b); + } + + /// + /// Implements the operator /. + /// + /// + /// The result of the operator. + /// + public static GraphDataPoint operator /(GraphDataPoint a, GraphDataPoint b) + { + return (GraphDataPoint)a.Divide(b); + } + + /// + /// Implements the operator *. + /// + /// + /// The result of the operator. + /// + public static GraphDataPoint operator *(GraphDataPoint a, GraphDataPoint b) + { + return (GraphDataPoint)a.Multiply(b); + } + + #endregion + + #region IGraphDataPoint + + /// + /// Sums the value of this instance with another instance value and returns the result. + /// + /// The other instance. + /// + public abstract IGraphDataPoint Add(IGraphDataPoint other); + + /// + /// Subtract the value of another instance from this instance and returns the result. + /// + /// The other instance. + /// + public abstract IGraphDataPoint Subtract(IGraphDataPoint other); + + /// + /// Multiplies the value of this instance with another instance value and returns the result. + /// + /// The other instance. + /// + public abstract IGraphDataPoint Multiply(IGraphDataPoint other); + + /// + /// Divides the value of this instance with another instance value and returns the result. + /// + /// The other instance. + /// + public abstract IGraphDataPoint Divide(IGraphDataPoint other); + + /// + /// Returns the percentage value of this instance between the specified minimum and maximum values. + /// + /// The minimum. + /// The maximum. + /// + public abstract double ComputeRelativePosition(IGraphDataPoint min, IGraphDataPoint max); + + /// + /// Returns the absolute value of the specified percentage value between the specified minimum and maximum values. + /// + /// The minimum. + /// The maximum. + /// The percentage. + /// + public abstract IGraphDataPoint ComputeAbsolutePosition(IGraphDataPoint min, IGraphDataPoint max, double percentage); + + /// + /// Creates a range of values from the specified minimum and maximum. + /// + /// The minimum. + /// The maximum. + /// The count. + /// + public abstract IEnumerable CreateRange(IGraphDataPoint min, IGraphDataPoint max, int count); + + /// + /// Gets the inner value. + /// + /// + public abstract object GetValue(); + + /// + /// Sets the inner value. + /// + /// The value. + public abstract void SetValue(object value); + + /// + /// Returns a formated string of this data point. + /// + /// The format. + /// + public abstract string ToString(string format); + + /// + /// Parses the specified value. + /// + /// The value. + /// + public abstract IGraphDataPoint Parse(string value); + + #endregion + + #region Properties + + /// + /// Gets the type of this graph data point. + /// + public Type Type + { + get { return GetType(); } + } + + #endregion + } + + /// + /// Represents an base class. + /// + /// + /// The type of the data type. + /// + public abstract class GraphDataPoint : GraphDataPoint where T : IComparable where TDataType : GraphDataPoint + { + #region Properties + + /// + /// Gets or sets the encapsulated data point value. + /// + public T Value { get; set; } + + #endregion + + #region Constructors + + /// + /// Initializes a new instance of the class. + /// + public GraphDataPoint() + { + + } + + /// + /// Initializes a new instance of the class. + /// + /// The value. + public GraphDataPoint(T value) + { + Value = value; + } + + #endregion + + #region IComparable + + /// + /// Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. + /// + /// An object to compare with this instance. + /// + /// A value that indicates the relative order of the objects being compared. The return value has these meanings: Value Meaning Less than zero This instance precedes in the sort order. Zero This instance occurs in the same position in the sort order as . Greater than zero This instance follows in the sort order. + /// + public override int CompareTo(object obj) + { + if (Object.ReferenceEquals(obj, null)) return -1; + + GraphDataPoint b = obj as GraphDataPoint; + return Value.CompareTo(b.Value); + } + + /// + /// Determines whether the specified , is equal to this instance. + /// + /// The to compare with this instance. + /// + /// true if the specified is equal to this instance; otherwise, false. + /// + public override bool Equals(object obj) + { + var @base = obj as GraphDataPoint; + return @base != null && + EqualityComparer.Default.Equals(Value, @base.Value); + } + + /// + /// Returns a hash code for this instance. + /// + /// + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + /// + public override int GetHashCode() + { + return -1937169414 + EqualityComparer.Default.GetHashCode(Value); + } + + #endregion + + #region ToString + + /// + /// Returns a that represents this instance. + /// + /// + /// A that represents this instance. + /// + public override string ToString() + { + return Value.ToString(); + } + + #endregion + + #region IGraphDataPoint + + /// + /// Gets the inner value. + /// + /// + public override object GetValue() + { + return Value; + } + + /// + /// Sets the inner value. + /// + /// The value. + public override void SetValue(object value) + { + Value = (T)value; + } + + #endregion + + #region Parsing + + /// + /// Parses the specified value and returns a new instance of data point. + /// + /// The value. + /// + public static TDataType ParseFrom(String value) + { + return Activator.CreateInstance().Parse(value) as TDataType; + } + + #endregion + + #region Implicit Operators + + /// + /// Performs an implicit conversion from to . + /// + /// The value. + /// + /// The result of the conversion. + /// + public static implicit operator GraphDataPoint(T value) + { + return Activator.CreateInstance(typeof(TDataType), value) as GraphDataPoint; + } + + /// + /// Performs an implicit conversion from to . + /// + /// The instance. + /// + /// The result of the conversion. + /// + public static implicit operator T(GraphDataPoint instance) + { + return instance.Value; + } + + #endregion + } +} diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphDataPointHelper.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphDataPointHelper.cs new file mode 100644 index 000000000..b28d7a501 --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphDataPointHelper.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace RealTimeGraphX +{ + /// + /// Represents an helper class. + /// + public static class GraphDataPointHelper + { + /// + /// Returns the absolute value of the specified percentage value between the specified minimum and maximum values. + /// + /// The minimum. + /// The maximum. + /// The percentage. + /// + public static T ComputeAbsolutePosition(T min, T max, double percentage) where T : class, IGraphDataPoint + { + return (Activator.CreateInstance(min.GetType()) as T).ComputeAbsolutePosition(min, max, percentage) as T; + } + + /// + /// Creates a range of values from the specified minimum and maximum. + /// + /// The minimum. + /// The maximum. + /// The count. + /// + public static IEnumerable CreateRange(IGraphDataPoint min, IGraphDataPoint max, int count) where T : class, IGraphDataPoint + { + return (Activator.CreateInstance(min.GetType()) as T).CreateRange(min, max, count) as IEnumerable; + } + + /// + /// Initializes a new instance of the specified type. + /// + /// + /// + public static T Init() where T : class, IGraphDataPoint + { + return Activator.CreateInstance(typeof(T)) as T; + } + } +} diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphDataPointTypeConverter.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphDataPointTypeConverter.cs new file mode 100644 index 000000000..edbd78cf1 --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphDataPointTypeConverter.cs @@ -0,0 +1,82 @@ +using RealTimeGraphX.DataPoints; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Globalization; +using System.Text; + +namespace RealTimeGraphX +{ + /// + /// Represents the type converter. + /// + public class GraphDataPointTypeConverter : TypeConverter + { + private IGraphDataPoint _instance; + + /// + /// Returns whether this converter can convert an object of the given type to the type of this converter, using the specified context. + /// + /// An that provides a format context. + /// A that represents the type you want to convert from. + /// + /// true if this converter can perform the conversion; otherwise, false. + /// + public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) + { + return sourceType == typeof(String); + } + + /// + /// Converts the given object to the type of this converter, using the specified context and culture information. + /// + /// An that provides a format context. + /// The to use as the current culture. + /// The to convert. + /// + /// An that represents the converted value. + /// + public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) + { + if (value != null && _instance != null) + { + try + { + return _instance.Parse(value.ToString()); + } + catch {} + } + + return _instance; + } + + /// + /// Returns whether this converter can convert the object to the specified type, using the specified context. + /// + /// An that provides a format context. + /// A that represents the type you want to convert to. + /// + /// true if this converter can perform the conversion; otherwise, false. + /// + public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) + { + return destinationType == typeof(String); + } + + /// + /// Converts the given value object to the specified type, using the specified context and culture information. + /// + /// An that provides a format context. + /// A . If null is passed, the current culture is assumed. + /// The to convert. + /// The to convert the value parameter to. + /// + /// An that represents the converted value. + /// + public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) + { + _instance = value as IGraphDataPoint; + return value != null ? value.ToString() : null; + } + } +} diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphDataQueue.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphDataQueue.cs new file mode 100644 index 000000000..cb28231ab --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphDataQueue.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace RealTimeGraphX +{ + /// + /// Represents a blocking concurrent queue for graph data consumption. + /// + /// + /// + public class GraphDataQueue : BlockingCollection + { + /// + /// Initializes a new instance of the GraphDataQueue, Use Add and TryAdd for Enqueue and TryEnqueue and Take and TryTake for Dequeue and TryDequeue functionality + /// + public GraphDataQueue() + : base(new ConcurrentQueue()) + { + } + + /// + /// Initializes a new instance of the GraphDataQueue, Use Add and TryAdd for Enqueue and TryEnqueue and Take and TryTake for Dequeue and TryDequeue functionality + /// + /// + public GraphDataQueue(int maxSize) + : base(new ConcurrentQueue(), maxSize) + { + } + + /// + /// Enqueues the specified item. + /// + /// The item. + public void BlockEnqueue(T item) + { + Add(item); + } + + /// + /// Blocks until an item is available for dequeuing. + /// + /// + public T BlockDequeue() + { + return Take(); + } + + /// + /// Blocks until an item is available for dequeuing. + /// + /// The cancellation token. + /// + public T BlockDequeue(CancellationToken cancellationToken) + { + return Take(cancellationToken); + } + } +} diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphObject.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphObject.cs new file mode 100644 index 000000000..d37110c5c --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphObject.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading.Tasks; +using System.Windows; + +namespace RealTimeGraphX +{ + /// + /// Represents an supported graph object. + /// + /// + public abstract class GraphObject : INotifyPropertyChanged + { + /// + /// Occurs when a property value changes. + /// + [field: NonSerialized] + public event PropertyChangedEventHandler PropertyChanged; + + /// + /// Raises the property changed event. + /// + /// Name of the property. + protected virtual void RaisePropertyChangedAuto([CallerMemberName] string caller = null) + { + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(caller)); + } + + /// + /// Raises the property changed event. + /// + /// Name of the property. + protected virtual void RaisePropertyChanged(String propName) + { + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propName)); + } + } +} diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphRange.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphRange.cs new file mode 100644 index 000000000..521f9f0b6 --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphRange.cs @@ -0,0 +1,138 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace RealTimeGraphX +{ + /// + /// Represents a graph x/y data points boundaries. + /// + public interface IGraphRange : IGraphComponent + { + /// + /// Gets or sets the maximum x value. + /// + GraphDataPoint MaximumX { get; set; } + + /// + /// Gets or sets the minimum x value. + /// + GraphDataPoint MinimumY { get; set; } + + /// + /// Gets or sets the maximum y value. + /// + GraphDataPoint MaximumY { get; set; } + + /// + /// Gets or sets a value indicating whether to automatically adjust the graph and according to the current effective data points. + /// + bool AutoY { get; set; } + } + + /// + /// Represents a graph X/Y range boundaries. + /// + /// Type of x-axis data point. + /// Type of y-axis data point. + /// + public class GraphRange : GraphObject, IGraphRange where XDataPoint : GraphDataPoint where YDataPoint : GraphDataPoint + { + private XDataPoint _maximumX; + /// + /// Gets or sets the maximum x value. + /// + public XDataPoint MaximumX + { + get { return _maximumX; } + set { _maximumX = value; RaisePropertyChangedAuto(); } + } + + private YDataPoint _minimumY; + /// + /// Gets or sets the minimum x value. + /// + public YDataPoint MinimumY + { + get { return _minimumY; } + set { _minimumY = value; RaisePropertyChangedAuto(); } + } + + private YDataPoint _maximumY; + /// + /// Gets or sets the maximum y value. + /// + public YDataPoint MaximumY + { + get { return _maximumY; } + set { _maximumY = value; RaisePropertyChangedAuto(); } + } + + private bool _autoY; + /// + /// Gets or sets a value indicating whether to automatically adjust the graph and according to the current visible data points. + /// + public bool AutoY + { + get { return _autoY; } + set { _autoY = value; RaisePropertyChangedAuto(); } + } + + /// + /// Initializes a new instance of the class. + /// + public GraphRange() + { + MinimumY = GraphDataPointHelper.Init(); + MaximumX = GraphDataPointHelper.Init(); + MaximumY = GraphDataPointHelper.Init(); + } + + /// + /// Gets or sets the maximum x value. + /// + GraphDataPoint IGraphRange.MaximumX + { + get + { + return MaximumX; + } + set + { + MaximumX = (XDataPoint)value; + } + } + + /// + /// Gets or sets the minimum x value. + /// + GraphDataPoint IGraphRange.MinimumY + { + get + { + return MinimumY; + } + set + { + MinimumY = (YDataPoint)value; + } + } + + /// + /// Gets or sets the maximum y value. + /// + GraphDataPoint IGraphRange.MaximumY + { + get + { + return MaximumY; + } + set + { + MaximumY = (YDataPoint)value; + } + } + } +} diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphRenderer.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphRenderer.cs new file mode 100644 index 000000000..c42fcb4ab --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphRenderer.cs @@ -0,0 +1,76 @@ +using System.Collections.Generic; +using System.Linq; +using System.Drawing; + +namespace RealTimeGraphX +{ + /// + /// Represents an base class. + /// + /// The type of the data series. + /// + /// + public abstract class GraphRenderer : GraphObject, IGraphRenderer where TDataSeries : IGraphDataSeries + { + /// + /// Converts the specified relative x position to a graph surface absolute position. + /// + /// The target surface. + /// The relative x position. + /// + protected virtual float ConvertXValueToRendererValue(IGraphSurface surface, double x) + { + return (float)(x * surface.GetSize().Width / 100); + } + + /// + /// Converts the specified relative y position to a graph surface absolute position. + /// + /// The surface. + /// The relative y position. + /// + protected virtual float ConvertYValueToRendererValue(IGraphSurface surface, double y) + { + return (float)(surface.GetSize().Height - (y * surface.GetSize().Height / 100)); + } + + /// + /// Arranges the series of data points and returns a series of drawing points. + /// + /// The target graph surface. + /// The instance of the current rendered data series. + /// Instance of graph range. + /// Collection of x coordinates. + /// Collection of y coordinates. + /// The minimum x coordinates value. + /// The maximum x coordinates value. + /// The minimum y coordinates value. + /// The maximum y coordinates value. + /// + public abstract IEnumerable Render(IGraphSurface surface, TDataSeries series, IGraphRange range, List xx, List yy, GraphDataPoint minimumX, GraphDataPoint maximumX, GraphDataPoint minimumY, GraphDataPoint maximumY); + + /// + /// Draws the specified data series points on the target surface. + /// + /// The target graph surface. + /// The instance of the current rendered data series. + /// The collection of the current data series drawing points. + /// The index of the current data series within the collection of data series. + /// The length of the data series collection. + public abstract void Draw(IGraphSurface surface, TDataSeries series, IEnumerable points, int index, int count); + + /// + /// Gets a closed polygon version of the specified drawing points. + /// + /// The target surface. + /// The drawing points. + /// + protected virtual IEnumerable GetFillPoints(IGraphSurface surface, IEnumerable points) + { + List closed = points.ToList(); + closed.Add(new PointF(points.Last().X, surface.GetSize().Width)); + closed.Add(new PointF(0, surface.GetSize().Height)); + return closed.ToArray(); + } + } +} diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphTransform.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphTransform.cs new file mode 100644 index 000000000..efcf4b052 --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphTransform.cs @@ -0,0 +1,39 @@ +namespace RealTimeGraphX +{ + /// + /// Represents a graph transformation. + /// + public class GraphTransform + { + /// + /// Gets or sets the horizontal scale factor. + /// + public float ScaleX { get; set; } + + /// + /// Gets or sets the vertical scale factor. + /// + public float ScaleY { get; set; } + + /// + /// Gets or sets the horizontal translate transformation. + /// + public float TranslateX { get; set; } + + /// + /// Gets or sets the vertical translate transformation. + /// + public float TranslateY { get; set; } + + /// + /// Initializes a new instance of the class. + /// + public GraphTransform() + { + ScaleX = 1; + ScaleY = 1; + TranslateX = 0; + TranslateY = 0; + } + } +} diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/IGraphComponent.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/IGraphComponent.cs new file mode 100644 index 000000000..dd8f4ee1d --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/IGraphComponent.cs @@ -0,0 +1,10 @@ +namespace RealTimeGraphX +{ + /// + /// Represents a RealTimeGraphX component. + /// + public interface IGraphComponent + { + + } +} diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/IGraphController.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/IGraphController.cs new file mode 100644 index 000000000..0dbc49ccb --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/IGraphController.cs @@ -0,0 +1,185 @@ +using RealTimeGraphX.EventArguments; +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; + +namespace RealTimeGraphX +{ + /// + /// Represents a graph controller. + /// + /// + public interface IGraphController : IGraphComponent + { + #region Events + + /// + /// Occurs when the current effective minimum/maximum values have changed. + /// + event EventHandler EffectiveRangeChanged; + + /// + /// Occurs when the current virtual (effective minimum/maximum after transformation) minimum/maximum values have changed. + /// + event EventHandler VirtualRangeChanged; + + #endregion + + #region Properties + + /// + /// Gets or sets the controller refresh rate. + /// Higher rate requires more CPU time. + /// + TimeSpan RefreshRate { get; set; } + + /// + /// Gets or sets a value indicating whether to pause the rendering. + /// + bool IsPaused { get; set; } + + /// + /// Gets the current effective x-axis minimum. + /// + GraphDataPoint EffectiveMinimumX { get; } + + /// + /// Gets the current effective x-axis maximum. + /// + GraphDataPoint EffectiveMaximumX { get; } + + /// + /// Gets the current effective y-axis minimum. + /// + GraphDataPoint EffectiveMinimumY { get; } + + /// + /// Gets the current effective y-axis maximum. + /// + GraphDataPoint EffectiveMaximumY { get; } + + /// + /// Gets the current virtual (effective minimum/maximum after transformation) x-axis minimum. + /// + GraphDataPoint VirtualMinimumX { get; } + + /// + /// Gets the current virtual (effective minimum/maximum after transformation) x-axis maximum. + /// + GraphDataPoint VirtualMaximumX { get; } + + /// + /// Gets the current virtual (effective minimum/maximum after transformation) y-axis minimum. + /// + GraphDataPoint VirtualMinimumY { get; } + + /// + /// Gets the current virtual (effective minimum/maximum after transformation) y-axis maximum. + /// + GraphDataPoint VirtualMaximumY { get; } + + /// + /// Clears all data points from this controller. + /// + void Clear(); + + #endregion + + #region Commands + + /// + /// Gets the clear command. + /// + GraphCommand ClearCommand { get; } + + #endregion + + #region Methods + + /// + /// Requests the controller to invoke a virtual range change event. + /// + void RequestVirtualRangeChange(); + + #endregion + } + + /// + /// Represents a graph controller capable of pushing data points to it's associated Graph Renderer + /// and rendering them to it's associated Graph Surface. + /// + /// The type of the data series. + /// + public interface IGraphController : IGraphController where TDataSeries : IGraphDataSeries + { + #region Properties + + /// + /// Gets the data series collection. + /// + ObservableCollection DataSeriesCollection { get; } + + /// + /// Gets or sets the graph renderer. + /// + IGraphRenderer Renderer { get; set; } + + /// + /// Gets or sets the graph surface. + /// + IGraphSurface Surface { get; set; } + + #endregion + } + + + /// + /// Represents a graph controller capable of pushing data points to it's associated Graph Renderer + /// and rendering them to it's associated Graph Surface. + /// + /// The type of the data series. + /// The type of the x data point. + /// The type of the y data point. + /// + public interface IGraphController : IGraphController + where TXDataPoint : GraphDataPoint + where TYDataPoint : GraphDataPoint + where TDataSeries : IGraphDataSeries + { + #region Properties + + /// + /// Gets or sets the graph range (data point boundaries). + /// + GraphRange Range { get; set; } + + #endregion + + #region Methods + + /// + /// Submits the specified x and y data points. + /// If the controller has more than one data series the data points will be duplicated. + /// + /// X data point. + /// Y data point. + void PushData(TXDataPoint x, TYDataPoint y); + + /// + /// Submits the specified collections of x and y data points. + /// If the controller has more than one data series the data points will be distributed evenly. + /// + /// X data point collection. + /// Y data point collection. + void PushData(IEnumerable xx, IEnumerable yy); + + /// + /// Submits a matrix of x and y data points. Meaning each data series should process a single collection of x/y data points. + /// + /// X matrix. + /// Y matrix. + void PushData(IEnumerable> xxxx, IEnumerable> yyyy); + + #endregion + } +} diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/IGraphDataPoint.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/IGraphDataPoint.cs new file mode 100644 index 000000000..9ecae4a8a --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/IGraphDataPoint.cs @@ -0,0 +1,94 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; + +namespace RealTimeGraphX +{ + /// + /// Represents a graph X or Y data point that can be pushed to a Graph Controller. + /// + /// + [TypeConverter(typeof(GraphDataPointTypeConverter))] + public interface IGraphDataPoint : IComparable + { + /// + /// Sums the value of this instance with another instance value and returns the result. + /// + /// The other instance. + /// + IGraphDataPoint Add(IGraphDataPoint other); + + /// + /// Subtract the value of another instance from this instance and returns the result. + /// + /// The other instance. + /// + IGraphDataPoint Subtract(IGraphDataPoint other); + + /// + /// Multiplies the value of this instance with another instance value and returns the result. + /// + /// The other instance. + /// + IGraphDataPoint Multiply(IGraphDataPoint other); + + /// + /// Divides the value of this instance with another instance value and returns the result. + /// + /// The other instance. + /// + IGraphDataPoint Divide(IGraphDataPoint other); + + /// + /// Creates a range of values from the specified minimum and maximum. + /// + /// The minimum. + /// The maximum. + /// The count. + /// + IEnumerable CreateRange(IGraphDataPoint min, IGraphDataPoint max, int count); + + /// + /// Returns the percentage value of this instance between the specified minimum and maximum values. + /// + /// The minimum. + /// The maximum. + /// + double ComputeRelativePosition(IGraphDataPoint min, IGraphDataPoint max); + + /// + /// Returns the absolute value of the specified percentage value between the specified minimum and maximum values. + /// + /// The minimum. + /// The maximum. + /// The percentage. + /// + IGraphDataPoint ComputeAbsolutePosition(IGraphDataPoint min, IGraphDataPoint max, double percentage); + + /// + /// Gets the encapsulated value. + /// + /// + object GetValue(); + + /// + /// Sets the encapsulated value. + /// + /// The value. + void SetValue(object value); + + /// + /// Returns a formated string of this data point. + /// + /// The format. + /// + String ToString(String format); + + /// + /// Parses the specified value. + /// + /// The value. + /// + IGraphDataPoint Parse(String value); + } +} diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/IGraphDataSeries.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/IGraphDataSeries.cs new file mode 100644 index 000000000..dd05da92b --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/IGraphDataSeries.cs @@ -0,0 +1,31 @@ +using System; + +namespace RealTimeGraphX +{ + /// + /// Represents a graph data series. + /// + /// + public interface IGraphDataSeries : IGraphComponent + { + /// + /// Gets or sets the series name. + /// + String Name { get; set; } + + /// + /// Gets or sets the stroke thickness. + /// + float StrokeThickness { get; set; } + + /// + /// Gets or sets a value indicating whether to fill the series. + /// + bool UseFill { get; } + + /// + /// Gets or sets a value indicating whether this series should be visible. + /// + bool IsVisible { get; set; } + } +} diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/IGraphRenderer.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/IGraphRenderer.cs new file mode 100644 index 000000000..fdd3b17e8 --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/IGraphRenderer.cs @@ -0,0 +1,41 @@ +using RealTimeGraphX.EventArguments; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Text; + +namespace RealTimeGraphX +{ + /// + /// Represents a graph renderer capable of receiving a series of data points from a controller and transforming them to drawing points. + /// + /// The type of the data series. + /// + public interface IGraphRenderer : IGraphComponent where TDataSeries : IGraphDataSeries + { + /// + /// Arranges the series of data points and returns a series of drawing points. + /// + /// The target graph surface. + /// The instance of the current rendered data series. + /// Instance of graph range. + /// Collection of x coordinates. + /// Collection of y coordinates. + /// The minimum x coordinates value. + /// The maximum x coordinates value. + /// The minimum y coordinates value. + /// The maximum y coordinates value. + /// + IEnumerable Render(IGraphSurface surface, TDataSeries series, IGraphRange range, List xx, List yy, GraphDataPoint minimumX, GraphDataPoint maximumX, GraphDataPoint minimumY, GraphDataPoint maximumY); + + /// + /// Draws the specified data series points on the target surface. + /// + /// The target graph surface. + /// The instance of the current rendered data series. + /// The collection of the current data series drawing points. + /// The index of the current data series within the collection of data series. + /// The length of the data series collection. + void Draw(IGraphSurface surface, TDataSeries series, IEnumerable points, int index, int count); + } +} diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/IGraphSurface.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/IGraphSurface.cs new file mode 100644 index 000000000..310bc7c3d --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/IGraphSurface.cs @@ -0,0 +1,64 @@ +using RealTimeGraphX.EventArguments; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Text; + +namespace RealTimeGraphX +{ + /// + /// Represents a graph drawing surface capable of drawing a series of points submitted by a graph renderer. + /// + public interface IGraphSurface : IGraphComponent + { + /// + /// Returns the actual size of the surface. + /// + /// + SizeF GetSize(); + + /// + /// Returns the current bounds of the zooming rectangle. + /// + /// + RectangleF GetZoomRect(); + } + + /// + /// Represents a graph drawing surface capable of drawing a series of points submitted by a graph renderer. + /// + /// The type of the data series. + /// + public interface IGraphSurface : IGraphSurface where TDataSeries : IGraphDataSeries + { + /// + /// Called before drawing has started. + /// + void BeginDraw(); + + /// + /// Draws the stroke of the specified data series points. + /// + /// The data series. + /// The points. + void DrawSeries(TDataSeries dataSeries, IEnumerable points); + + /// + /// Fills the specified data series points. + /// + /// The data series. + /// The points. + void FillSeries(TDataSeries dataSeries, IEnumerable points); + + /// + /// Applies transformation on the current pass. + /// + /// The transform. + void SetTransform(GraphTransform transform); + + /// + /// Called when drawing has completed. + /// + void EndDraw(); + } +} diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/RealTimeGraphX.csproj b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/RealTimeGraphX.csproj new file mode 100644 index 000000000..9f5c4f4ab --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/RealTimeGraphX.csproj @@ -0,0 +1,7 @@ + + + + netstandard2.0 + + + diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/Renderers/ScrollingLineRenderer.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/Renderers/ScrollingLineRenderer.cs new file mode 100644 index 000000000..82e80aa0f --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/Renderers/ScrollingLineRenderer.cs @@ -0,0 +1,84 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; + +namespace RealTimeGraphX.Renderers +{ + /// + /// Represents a scrolling style . + /// + /// The type of the data series. + /// + public class ScrollingLineRenderer : GraphRenderer where TDataSeries : IGraphDataSeries + { + /// + /// Arranges the series of data points and returns a series of drawing points. + /// + /// The target graph surface. + /// The instance of the current rendered data series. + /// Instance of graph range. + /// Collection of x coordinates. + /// Collection of y coordinates. + /// The minimum x coordinates value. + /// The maximum x coordinates value. + /// The minimum y coordinates value. + /// The maximum y coordinates value. + /// + public override IEnumerable Render(IGraphSurface surface, TDataSeries series, IGraphRange range, List xx, List yy, GraphDataPoint minimumX, GraphDataPoint maximumX, GraphDataPoint minimumY, GraphDataPoint maximumY) + { + var dxList = xx.Select(x => x.ComputeRelativePosition(minimumX, maximumX)).ToList(); + var dyList = yy.Select(x => x.ComputeRelativePosition(minimumY, maximumY)).ToList(); + + if (maximumX - minimumX > range.MaximumX) + { + var offset = ((maximumX - minimumX) - range.MaximumX) + minimumX; + + for (int i = 0; i < xx.Count; i++) + { + if (xx[i] < offset) + { + xx.RemoveAt(i); + yy.RemoveAt(i); + i--; + } + else + { + break; + } + } + } + + List points = new List(); + + for (int i = 0; i < dxList.Count; i++) + { + float image_x = ConvertXValueToRendererValue(surface,dxList[i]); + float image_y = (float)Math.Min(ConvertYValueToRendererValue(surface, dyList[i]), surface.GetSize().Height - 2); + + PointF point = new PointF(image_x, image_y); + points.Add(point); + } + + return points; + } + + /// + /// Draws the specified data series points on the target surface. + /// + /// The target graph surface. + /// The instance of the current rendered data series. + /// The collection of the current data series drawing points. + /// The index of the current data series within the collection of data series. + /// The length of the data series collection. + public override void Draw(IGraphSurface surface, TDataSeries series, IEnumerable points, int index, int count) + { + if (series.UseFill) + { + surface.FillSeries(series, GetFillPoints(surface, points)); + } + + surface.DrawSeries(series, points); + } + } +} diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX.WPF/RealTimeGraphX.WPF.csproj b/Software/Visual_Studio/SideChains/RealTimeGraphX.WPF/RealTimeGraphX.WPF.csproj index da7d14ce6..fa5852efa 100644 --- a/Software/Visual_Studio/SideChains/RealTimeGraphX.WPF/RealTimeGraphX.WPF.csproj +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX.WPF/RealTimeGraphX.WPF.csproj @@ -91,12 +91,6 @@ Settings.Designer.cs - - - {518eb7c5-9e1d-4c23-a9c1-02ee73c25406} - RealTimeGraphX - - diff --git a/Software/Visual_Studio/Tango.sln b/Software/Visual_Studio/Tango.sln index 265ab727c..c83bdd628 100644 --- a/Software/Visual_Studio/Tango.sln +++ b/Software/Visual_Studio/Tango.sln @@ -104,8 +104,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.DragAndDrop", "Tango. EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.MachineStudio.Technician", "MachineStudio\Modules\Tango.MachineStudio.Technician\Tango.MachineStudio.Technician.csproj", "{5D39C1E1-3ECD-4634-BD1B-2BCF71C54A15}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RealTimeGraphEx", "SideChains\RealTimeGraphEx\RealTimeGraphEx.csproj", "{B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.SQLiteGenerator.CLI", "Utilities\Tango.SQLiteGenerator.CLI\Tango.SQLiteGenerator.CLI.csproj", "{8A03ADC0-991B-4DA8-8A19-E1D03F92E81C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ColorMine", "SideChains\ColorMine\ColorMine.csproj", "{37E4CEAB-B54B-451F-B535-04CF7DA9C459}" @@ -212,10 +210,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.WiFi", "Tango.WiFi\Ta EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.MachineStudio.RML", "MachineStudio\Modules\Tango.MachineStudio.RML\Tango.MachineStudio.RML.csproj", "{D0186AC0-0FCF-4D3B-9619-54812B6E524B}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RealTimeGraphX", "SideChains\RealTimeGraphX\RealTimeGraphX.csproj", "{6D55A3B8-46D3-493A-A143-AEBD2B98D683}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RealTimeGraphX.WPF", "SideChains\RealTimeGraphX.WPF\RealTimeGraphX.WPF.csproj", "{99D233C5-FEE7-418E-9C25-D4584CB52E28}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xceed.Wpf.Toolkit", "SideChains\WpfExtendedToolKit\ExtendedWPFToolkitSolution\Src\Xceed.Wpf.Toolkit\Xceed.Wpf.Toolkit.csproj", "{72E591D6-8F83-4D8C-8F67-9C325E623234}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.MachineStudio.Statistics", "MachineStudio\Modules\Tango.MachineStudio.Statistics\Tango.MachineStudio.Statistics.csproj", "{8A65AD6A-A9B4-48C0-9301-4B7434B712F8}" @@ -297,6 +291,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.Scripting.IDE.UI", "S EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.CatalogImporter", "Utilities\Tango.CatalogImporter\Tango.CatalogImporter.csproj", "{1066BC62-F167-4FC3-8F8B-982A9F632B4A}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RealTimeGraphX", "SideChains\RealTimeGraphX-master\RealTimeGraphX\RealTimeGraphX.csproj", "{F13A489C-80EE-4CD0-BDD4-92D959215646}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RealTimeGraphX.WPF", "SideChains\RealTimeGraphX-master\RealTimeGraphX.WPF\RealTimeGraphX.WPF.csproj", "{6B9774F7-960D-438E-AD81-C6B9BE328D50}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RealTimeGraphX.WPF.Demo", "SideChains\RealTimeGraphX-master\RealTimeGraphX.WPF.Demo\RealTimeGraphX.WPF.Demo.csproj", "{B822CBD9-1113-4668-85C9-22AA9C24CE60}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution AppVeyor|Any CPU = AppVeyor|Any CPU @@ -1876,45 +1876,6 @@ Global {5D39C1E1-3ECD-4634-BD1B-2BCF71C54A15}.Release|x64.Build.0 = Release|Any CPU {5D39C1E1-3ECD-4634-BD1B-2BCF71C54A15}.Release|x86.ActiveCfg = Release|Any CPU {5D39C1E1-3ECD-4634-BD1B-2BCF71C54A15}.Release|x86.Build.0 = Release|Any CPU - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}.AppVeyor|Any CPU.ActiveCfg = Release|Any CPU - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}.AppVeyor|Any CPU.Build.0 = Release|Any CPU - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}.AppVeyor|ARM.ActiveCfg = Release|Any CPU - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}.AppVeyor|ARM.Build.0 = Release|Any CPU - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}.AppVeyor|ARM64.ActiveCfg = Release|Any CPU - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}.AppVeyor|ARM64.Build.0 = Release|Any CPU - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}.AppVeyor|x64.ActiveCfg = Release|Any CPU - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}.AppVeyor|x64.Build.0 = Release|Any CPU - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}.AppVeyor|x86.ActiveCfg = Release|Any CPU - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}.AppVeyor|x86.Build.0 = Release|Any CPU - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}.Debug|ARM.ActiveCfg = Debug|Any CPU - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}.Debug|ARM.Build.0 = Debug|Any CPU - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}.Debug|ARM64.Build.0 = Debug|Any CPU - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}.Debug|x64.ActiveCfg = Debug|Any CPU - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}.Debug|x64.Build.0 = Debug|Any CPU - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}.Debug|x86.ActiveCfg = Debug|Any CPU - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}.Debug|x86.Build.0 = Debug|Any CPU - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}.DefaultBuild|Any CPU.ActiveCfg = Debug|Any CPU - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}.DefaultBuild|Any CPU.Build.0 = Debug|Any CPU - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}.DefaultBuild|ARM.ActiveCfg = Debug|Any CPU - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}.DefaultBuild|ARM.Build.0 = Debug|Any CPU - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}.DefaultBuild|ARM64.ActiveCfg = Debug|Any CPU - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}.DefaultBuild|ARM64.Build.0 = Debug|Any CPU - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}.DefaultBuild|x64.ActiveCfg = Debug|Any CPU - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}.DefaultBuild|x64.Build.0 = Debug|Any CPU - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}.DefaultBuild|x86.ActiveCfg = Debug|Any CPU - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}.DefaultBuild|x86.Build.0 = Debug|Any CPU - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}.Release|Any CPU.Build.0 = Release|Any CPU - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}.Release|ARM.ActiveCfg = Release|Any CPU - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}.Release|ARM.Build.0 = Release|Any CPU - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}.Release|ARM64.ActiveCfg = Release|Any CPU - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}.Release|ARM64.Build.0 = Release|Any CPU - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}.Release|x64.ActiveCfg = Release|Any CPU - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}.Release|x64.Build.0 = Release|Any CPU - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}.Release|x86.ActiveCfg = Release|Any CPU - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC}.Release|x86.Build.0 = Release|Any CPU {8A03ADC0-991B-4DA8-8A19-E1D03F92E81C}.AppVeyor|Any CPU.ActiveCfg = Release|Any CPU {8A03ADC0-991B-4DA8-8A19-E1D03F92E81C}.AppVeyor|Any CPU.Build.0 = Release|Any CPU {8A03ADC0-991B-4DA8-8A19-E1D03F92E81C}.AppVeyor|ARM.ActiveCfg = Release|Any CPU @@ -3801,86 +3762,6 @@ Global {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.Release|x64.Build.0 = Release|Any CPU {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.Release|x86.ActiveCfg = Release|Any CPU {D0186AC0-0FCF-4D3B-9619-54812B6E524B}.Release|x86.Build.0 = Release|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.AppVeyor|Any CPU.ActiveCfg = Debug|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.AppVeyor|Any CPU.Build.0 = Debug|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.AppVeyor|ARM.ActiveCfg = Debug|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.AppVeyor|ARM.Build.0 = Debug|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.AppVeyor|ARM64.ActiveCfg = Debug|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.AppVeyor|ARM64.Build.0 = Debug|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.AppVeyor|x64.ActiveCfg = Debug|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.AppVeyor|x64.Build.0 = Debug|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.AppVeyor|x86.ActiveCfg = Debug|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.AppVeyor|x86.Build.0 = Debug|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.Debug|ARM.ActiveCfg = Debug|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.Debug|ARM.Build.0 = Debug|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.Debug|ARM64.Build.0 = Debug|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.Debug|x64.ActiveCfg = Debug|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.Debug|x64.Build.0 = Debug|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.Debug|x86.ActiveCfg = Debug|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.Debug|x86.Build.0 = Debug|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.DefaultBuild|Any CPU.ActiveCfg = Debug|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.DefaultBuild|Any CPU.Build.0 = Debug|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.DefaultBuild|ARM.ActiveCfg = Debug|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.DefaultBuild|ARM.Build.0 = Debug|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.DefaultBuild|ARM64.ActiveCfg = Debug|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.DefaultBuild|ARM64.Build.0 = Debug|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.DefaultBuild|x64.ActiveCfg = Debug|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.DefaultBuild|x64.Build.0 = Debug|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.DefaultBuild|x86.ActiveCfg = Debug|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.DefaultBuild|x86.Build.0 = Debug|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.Release|Any CPU.Build.0 = Release|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.Release|ARM.ActiveCfg = Release|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.Release|ARM.Build.0 = Release|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.Release|ARM64.ActiveCfg = Release|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.Release|ARM64.Build.0 = Release|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.Release|x64.ActiveCfg = Release|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.Release|x64.Build.0 = Release|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.Release|x86.ActiveCfg = Release|Any CPU - {6D55A3B8-46D3-493A-A143-AEBD2B98D683}.Release|x86.Build.0 = Release|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.AppVeyor|Any CPU.ActiveCfg = Release|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.AppVeyor|Any CPU.Build.0 = Release|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.AppVeyor|ARM.ActiveCfg = Release|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.AppVeyor|ARM.Build.0 = Release|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.AppVeyor|ARM64.ActiveCfg = Release|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.AppVeyor|ARM64.Build.0 = Release|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.AppVeyor|x64.ActiveCfg = Release|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.AppVeyor|x64.Build.0 = Release|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.AppVeyor|x86.ActiveCfg = Release|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.AppVeyor|x86.Build.0 = Release|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.Debug|Any CPU.Build.0 = Debug|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.Debug|ARM.ActiveCfg = Debug|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.Debug|ARM.Build.0 = Debug|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.Debug|ARM64.Build.0 = Debug|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.Debug|x64.ActiveCfg = Debug|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.Debug|x64.Build.0 = Debug|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.Debug|x86.ActiveCfg = Debug|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.Debug|x86.Build.0 = Debug|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.DefaultBuild|Any CPU.ActiveCfg = Debug|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.DefaultBuild|Any CPU.Build.0 = Debug|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.DefaultBuild|ARM.ActiveCfg = Debug|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.DefaultBuild|ARM.Build.0 = Debug|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.DefaultBuild|ARM64.ActiveCfg = Debug|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.DefaultBuild|ARM64.Build.0 = Debug|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.DefaultBuild|x64.ActiveCfg = Debug|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.DefaultBuild|x64.Build.0 = Debug|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.DefaultBuild|x86.ActiveCfg = Debug|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.DefaultBuild|x86.Build.0 = Debug|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.Release|Any CPU.ActiveCfg = Release|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.Release|Any CPU.Build.0 = Release|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.Release|ARM.ActiveCfg = Release|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.Release|ARM.Build.0 = Release|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.Release|ARM64.ActiveCfg = Release|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.Release|ARM64.Build.0 = Release|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.Release|x64.ActiveCfg = Release|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.Release|x64.Build.0 = Release|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.Release|x86.ActiveCfg = Release|Any CPU - {99D233C5-FEE7-418E-9C25-D4584CB52E28}.Release|x86.Build.0 = Release|Any CPU {72E591D6-8F83-4D8C-8F67-9C325E623234}.AppVeyor|Any CPU.ActiveCfg = Release|Any CPU {72E591D6-8F83-4D8C-8F67-9C325E623234}.AppVeyor|Any CPU.Build.0 = Release|Any CPU {72E591D6-8F83-4D8C-8F67-9C325E623234}.AppVeyor|ARM.ActiveCfg = Release|Any CPU @@ -5284,6 +5165,126 @@ Global {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.Release|x64.Build.0 = Release|Any CPU {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.Release|x86.ActiveCfg = Release|Any CPU {1066BC62-F167-4FC3-8F8B-982A9F632B4A}.Release|x86.Build.0 = Release|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.AppVeyor|Any CPU.ActiveCfg = Debug|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.AppVeyor|Any CPU.Build.0 = Debug|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.AppVeyor|ARM.ActiveCfg = Debug|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.AppVeyor|ARM.Build.0 = Debug|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.AppVeyor|ARM64.ActiveCfg = Debug|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.AppVeyor|ARM64.Build.0 = Debug|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.AppVeyor|x64.ActiveCfg = Debug|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.AppVeyor|x64.Build.0 = Debug|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.AppVeyor|x86.ActiveCfg = Debug|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.AppVeyor|x86.Build.0 = Debug|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.Debug|ARM.ActiveCfg = Debug|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.Debug|ARM.Build.0 = Debug|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.Debug|ARM64.Build.0 = Debug|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.Debug|x64.ActiveCfg = Debug|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.Debug|x64.Build.0 = Debug|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.Debug|x86.ActiveCfg = Debug|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.Debug|x86.Build.0 = Debug|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.DefaultBuild|Any CPU.ActiveCfg = Debug|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.DefaultBuild|Any CPU.Build.0 = Debug|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.DefaultBuild|ARM.ActiveCfg = Debug|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.DefaultBuild|ARM.Build.0 = Debug|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.DefaultBuild|ARM64.ActiveCfg = Debug|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.DefaultBuild|ARM64.Build.0 = Debug|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.DefaultBuild|x64.ActiveCfg = Debug|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.DefaultBuild|x64.Build.0 = Debug|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.DefaultBuild|x86.ActiveCfg = Debug|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.DefaultBuild|x86.Build.0 = Debug|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.Release|Any CPU.Build.0 = Release|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.Release|ARM.ActiveCfg = Release|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.Release|ARM.Build.0 = Release|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.Release|ARM64.ActiveCfg = Release|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.Release|ARM64.Build.0 = Release|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.Release|x64.ActiveCfg = Release|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.Release|x64.Build.0 = Release|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.Release|x86.ActiveCfg = Release|Any CPU + {F13A489C-80EE-4CD0-BDD4-92D959215646}.Release|x86.Build.0 = Release|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.AppVeyor|Any CPU.ActiveCfg = Release|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.AppVeyor|Any CPU.Build.0 = Release|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.AppVeyor|ARM.ActiveCfg = Release|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.AppVeyor|ARM.Build.0 = Release|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.AppVeyor|ARM64.ActiveCfg = Release|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.AppVeyor|ARM64.Build.0 = Release|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.AppVeyor|x64.ActiveCfg = Release|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.AppVeyor|x64.Build.0 = Release|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.AppVeyor|x86.ActiveCfg = Release|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.AppVeyor|x86.Build.0 = Release|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.Debug|ARM.ActiveCfg = Debug|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.Debug|ARM.Build.0 = Debug|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.Debug|ARM64.Build.0 = Debug|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.Debug|x64.ActiveCfg = Debug|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.Debug|x64.Build.0 = Debug|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.Debug|x86.ActiveCfg = Debug|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.Debug|x86.Build.0 = Debug|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.DefaultBuild|Any CPU.ActiveCfg = Debug|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.DefaultBuild|Any CPU.Build.0 = Debug|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.DefaultBuild|ARM.ActiveCfg = Debug|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.DefaultBuild|ARM.Build.0 = Debug|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.DefaultBuild|ARM64.ActiveCfg = Debug|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.DefaultBuild|ARM64.Build.0 = Debug|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.DefaultBuild|x64.ActiveCfg = Debug|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.DefaultBuild|x64.Build.0 = Debug|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.DefaultBuild|x86.ActiveCfg = Debug|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.DefaultBuild|x86.Build.0 = Debug|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.Release|Any CPU.Build.0 = Release|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.Release|ARM.ActiveCfg = Release|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.Release|ARM.Build.0 = Release|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.Release|ARM64.ActiveCfg = Release|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.Release|ARM64.Build.0 = Release|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.Release|x64.ActiveCfg = Release|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.Release|x64.Build.0 = Release|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.Release|x86.ActiveCfg = Release|Any CPU + {6B9774F7-960D-438E-AD81-C6B9BE328D50}.Release|x86.Build.0 = Release|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.AppVeyor|Any CPU.ActiveCfg = Release|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.AppVeyor|Any CPU.Build.0 = Release|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.AppVeyor|ARM.ActiveCfg = Release|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.AppVeyor|ARM.Build.0 = Release|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.AppVeyor|ARM64.ActiveCfg = Release|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.AppVeyor|ARM64.Build.0 = Release|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.AppVeyor|x64.ActiveCfg = Release|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.AppVeyor|x64.Build.0 = Release|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.AppVeyor|x86.ActiveCfg = Release|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.AppVeyor|x86.Build.0 = Release|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.Debug|ARM.ActiveCfg = Debug|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.Debug|ARM.Build.0 = Debug|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.Debug|ARM64.Build.0 = Debug|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.Debug|x64.ActiveCfg = Debug|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.Debug|x64.Build.0 = Debug|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.Debug|x86.ActiveCfg = Debug|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.Debug|x86.Build.0 = Debug|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.DefaultBuild|Any CPU.ActiveCfg = Debug|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.DefaultBuild|Any CPU.Build.0 = Debug|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.DefaultBuild|ARM.ActiveCfg = Debug|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.DefaultBuild|ARM.Build.0 = Debug|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.DefaultBuild|ARM64.ActiveCfg = Debug|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.DefaultBuild|ARM64.Build.0 = Debug|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.DefaultBuild|x64.ActiveCfg = Debug|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.DefaultBuild|x64.Build.0 = Debug|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.DefaultBuild|x86.ActiveCfg = Debug|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.DefaultBuild|x86.Build.0 = Debug|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.Release|Any CPU.Build.0 = Release|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.Release|ARM.ActiveCfg = Release|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.Release|ARM.Build.0 = Release|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.Release|ARM64.ActiveCfg = Release|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.Release|ARM64.Build.0 = Release|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.Release|x64.ActiveCfg = Release|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.Release|x64.Build.0 = Release|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.Release|x86.ActiveCfg = Release|Any CPU + {B822CBD9-1113-4668-85C9-22AA9C24CE60}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -5310,7 +5311,6 @@ Global {22C2AA72-9493-4D0D-B421-8EF9789FB192} = {B2AF4F3F-2828-47C3-8F3E-A0EA0BD66FF8} {D0CE8122-077D-42A2-9490-028AE4769B52} = {B2AF4F3F-2828-47C3-8F3E-A0EA0BD66FF8} {5D39C1E1-3ECD-4634-BD1B-2BCF71C54A15} = {B2AF4F3F-2828-47C3-8F3E-A0EA0BD66FF8} - {B9AE25D6-BE35-492F-9079-21A7F3E6F7CC} = {EC62BC9C-F2FE-4333-B7E4-110E38D43958} {8A03ADC0-991B-4DA8-8A19-E1D03F92E81C} = {5F6BBAA8-EAD0-4B18-97E5-55B4F56DD760} {37E4CEAB-B54B-451F-B535-04CF7DA9C459} = {EC62BC9C-F2FE-4333-B7E4-110E38D43958} {5B954D98-4020-4AC6-939F-C52B5646E8E6} = {5F6BBAA8-EAD0-4B18-97E5-55B4F56DD760} @@ -5345,8 +5345,6 @@ Global {D0E71A4D-9EEA-4F07-983F-EEB4416C587F} = {C81ED1A3-D18C-4D80-A8F5-061994A14A60} {0BDA9B52-9879-4C5E-84E3-81D00B75DACC} = {5F6BBAA8-EAD0-4B18-97E5-55B4F56DD760} {D0186AC0-0FCF-4D3B-9619-54812B6E524B} = {B2AF4F3F-2828-47C3-8F3E-A0EA0BD66FF8} - {6D55A3B8-46D3-493A-A143-AEBD2B98D683} = {EC62BC9C-F2FE-4333-B7E4-110E38D43958} - {99D233C5-FEE7-418E-9C25-D4584CB52E28} = {EC62BC9C-F2FE-4333-B7E4-110E38D43958} {72E591D6-8F83-4D8C-8F67-9C325E623234} = {EC62BC9C-F2FE-4333-B7E4-110E38D43958} {8A65AD6A-A9B4-48C0-9301-4B7434B712F8} = {B2AF4F3F-2828-47C3-8F3E-A0EA0BD66FF8} {4EDCF067-E377-42CB-A18C-8368CF484577} = {5F6BBAA8-EAD0-4B18-97E5-55B4F56DD760} @@ -5379,14 +5377,17 @@ Global {C9F60285-91FB-4293-BCF5-164D76755CDD} = {3D750293-C243-48F6-9112-A6B3FF650C0D} {B0EFE7A0-7039-4DC4-8B39-465E521299F6} = {3D750293-C243-48F6-9112-A6B3FF650C0D} {1066BC62-F167-4FC3-8F8B-982A9F632B4A} = {5F6BBAA8-EAD0-4B18-97E5-55B4F56DD760} + {F13A489C-80EE-4CD0-BDD4-92D959215646} = {EC62BC9C-F2FE-4333-B7E4-110E38D43958} + {6B9774F7-960D-438E-AD81-C6B9BE328D50} = {EC62BC9C-F2FE-4333-B7E4-110E38D43958} + {B822CBD9-1113-4668-85C9-22AA9C24CE60} = {EC62BC9C-F2FE-4333-B7E4-110E38D43958} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution - BuildVersion_UseGlobalSettings = False - BuildVersion_AssemblyInfoFilename = Properties\AssemblyInfo.cs - BuildVersion_StartDate = 2000/1/1 - BuildVersion_UpdateFileVersion = False - BuildVersion_UpdateAssemblyVersion = True - BuildVersion_BuildVersioningStyle = None.None.Increment.DeltaBaseYearDayOfYear SolutionGuid = {7986F7F4-A86A-4994-B1B6-0988D7F057B6} + BuildVersion_BuildVersioningStyle = None.None.Increment.DeltaBaseYearDayOfYear + BuildVersion_UpdateAssemblyVersion = True + BuildVersion_UpdateFileVersion = False + BuildVersion_StartDate = 2000/1/1 + BuildVersion_AssemblyInfoFilename = Properties\AssemblyInfo.cs + BuildVersion_UseGlobalSettings = False EndGlobalSection EndGlobal -- cgit v1.3.1