diff options
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs index 4f045627d..08b8897d2 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs @@ -22,6 +22,7 @@ using Tango.Video.DirectCapture; using Tango.Integration.Operators; using Tango.PMR.Diagnostics; using System.Reflection; +using Tango.PMR.Common; namespace Tango.MachineStudio.Developer.ViewModels { @@ -470,7 +471,7 @@ namespace Tango.MachineStudio.Developer.ViewModels } } - private void MachineOperator_DiagnosticsDataAvailable(object sender, StartDiagnosticsResponse response) + private void MachineOperator_DiagnosticsDataAvailable(object sender, PushDiagnosticsResponse response) { foreach (var prop in response.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance)) { @@ -485,7 +486,8 @@ namespace Tango.MachineStudio.Developer.ViewModels } else { - //Multi Graph... + DoubleArray[] arrayOfDoubles = Enumerable.ToArray(prop.GetValue(response) as IEnumerable<DoubleArray>); + (controller as GraphMultiController).PushData(arrayOfDoubles.Select(x => x.Data.ToList()).ToList()); } } } @@ -911,11 +913,13 @@ namespace Tango.MachineStudio.Developer.ViewModels for (int i = 0; i < sensor.ChannelCount; i++) { + var randomColor = new SolidColorBrush(Core.Helpers.ColorHelper.GetRandomColor()); + (controller as GraphMultiController).AddSeries(new DataYSeries() { Name = sensor.Description.First().ToString() + (i + 1), UseFillAndStroke = true, - Stroke = new SolidColorBrush(Core.Helpers.ColorHelper.GetRandomColor()) + Stroke = randomColor }); } |
