From e774f9a90fd812a9de8c3efe966a759bee8be703 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Wed, 11 Mar 2020 03:41:20 +0200 Subject: Working on FSE/PPC performance provider. Implemented resolution service. a lot of work! --- Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs index a8cbcfe2d..da6c630d4 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs @@ -20,6 +20,7 @@ using Tango.PPC.Common.Modules; using Tango.PPC.Common.Navigation; using Tango.PPC.Common.Notifications; using Tango.PPC.Common.OS; +using Tango.PPC.Common.Performance; using Tango.PPC.Common.Printing; using Tango.PPC.Common.RemoteAssistance; using Tango.PPC.Common.RemoteDesktop; @@ -82,6 +83,7 @@ namespace Tango.PPC.UI TangoIOC.Default.Unregister(); TangoIOC.Default.Unregister(); TangoIOC.Default.Unregister(); + TangoIOC.Default.Unregister(); if (App.StartupArgs.Contains("-webDebug")) { @@ -117,6 +119,7 @@ namespace Tango.PPC.UI TangoIOC.Default.Register(); TangoIOC.Default.Register(); TangoIOC.Default.Register(); + TangoIOC.Default.Register(); TangoIOC.Default.Register(); TangoIOC.Default.Register(); -- cgit v1.3.1 From 755f37e3e3e553a91dd2c5a7f0ddad8359287a3b Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Thu, 12 Mar 2020 17:15:11 +0200 Subject: Working on FSE/PPC monitoring/system info. --- .../FSE/Modules/Tango.FSE.PPCConsole/App.xaml | 1 + .../Converters/DoubleToChartValuesConverter.cs | 23 + .../Tango.FSE.PPCConsole.csproj | 27 + .../Tango.FSE.PPCConsole/ViewModelLocator.cs | 9 + .../Tango.FSE.PPCConsole/ViewModels/MainViewVM.cs | 2 +- .../ViewModels/MonitoringViewVM.cs | 182 +++ .../Tango.FSE.PPCConsole/Views/MainView.xaml | 2 +- .../Tango.FSE.PPCConsole/Views/MonitoringView.xaml | 184 +++ .../Views/MonitoringView.xaml.cs | 33 + .../Modules/Tango.FSE.PPCConsole/packages.config | 2 + .../FSE/Tango.FSE.Common/Controls/FSEPanel.cs | 49 + .../FSE/Tango.FSE.Common/Controls/FSEPanel.xaml | 36 + .../FSE/Tango.FSE.Common/FSEViewModel.cs | 7 + .../FSE/Tango.FSE.Common/Graphs/GraphHelper.cs | 37 + .../FSE/Tango.FSE.Common/Graphs/RealTimeGraph.cs | 101 ++ .../FSE/Tango.FSE.Common/Graphs/RealTimeGraph.xaml | 62 + .../FSE/Tango.FSE.Common/Images/screw.png | Bin 0 -> 937 bytes .../FSE/Tango.FSE.Common/Resources/Colors.xaml | 43 +- .../FSE/Tango.FSE.Common/Resources/Controls.xaml | 1 + .../FSE/Tango.FSE.Common/Resources/Graphs.xaml | 9 + .../FSE/Tango.FSE.Common/Resources/Images.xaml | 1 + .../SystemInfo/ISystemInfoProvider.cs | 14 + .../FSE/Tango.FSE.Common/Tango.FSE.Common.csproj | 28 +- Software/Visual_Studio/FSE/Tango.FSE.UI/App.xaml | 1 + .../SystemInfo/DefaultSystemInfoProvider.cs | 39 + .../FSE/Tango.FSE.UI/Tango.FSE.UI.csproj | 1 + .../FSE/Tango.FSE.UI/ViewModelLocator.cs | 4 + .../Performance/DefaultPerformanceService.cs | 6 +- .../SystemInfo/DefaultSystemInfoService.cs | 55 + .../SystemInfo/ISystemInfoService.cs | 13 + .../PPC/Tango.PPC.Common/Tango.PPC.Common.csproj | 9 +- .../PPC/Tango.PPC.UI/ViewModelLocator.cs | 3 + .../RealTimeGraphX.WPF/Themes/Generic.xaml | 2 +- .../RealTimeGraphX.WPF/WpfGraphAxisControl.cs | 38 +- .../RealTimeGraphX.WPF/WpfGraphAxisPanel.cs | 2 +- .../RealTimeGraphX.WPF/WpfGraphDataSeries.cs | 10 + .../RealTimeGraphX.WPF/WpfGraphSurface.cs | 21 +- .../RealTimeGraphX/DataPoints/DateTimeDataPoint.cs | 178 +++ .../RealTimeGraphX/DataPoints/Int32DataPoint.cs | 13 +- .../RealTimeGraphX/GraphController.cs | 114 +- .../RealTimeGraphX/IGraphDataSeries.cs | 5 + .../RealTimeGraphX/IGraphSurface.cs | 10 + .../Renderers/ScrollingLineRenderer.cs | 2 +- .../Information/GetMachineInformationResponse.cs | 1 + .../Network/Information/InformationPackage.cs | 5 +- .../Network/Information/MachineProperty.cs | 14 - .../Tango.Integration/Tango.Integration.csproj | 7 +- .../Visual_Studio/Tango.SystemInfo/Connection.cs | 83 ++ Software/Visual_Studio/Tango.SystemInfo/IWMI.cs | 11 + .../Tango.SystemInfo/Properties/AssemblyInfo.cs | 36 + .../Visual_Studio/Tango.SystemInfo/SystemObject.cs | 31 + .../Tango.SystemInfo/SystemObjectProperty.cs | 12 + .../Tango.SystemInfo/SystemObjectsCollection.cs | 111 ++ .../Tango.SystemInfo/Tango.SystemInfo.csproj | 102 ++ .../Visual_Studio/Tango.SystemInfo/WMIReader.cs | 60 + .../Visual_Studio/Tango.SystemInfo/Win32_BIOS.cs | 25 + .../Tango.SystemInfo/Win32_BaseBoard.cs | 27 + .../Tango.SystemInfo/Win32_Battery.cs | 25 + .../Visual_Studio/Tango.SystemInfo/Win32_Bus.cs | 25 + .../Tango.SystemInfo/Win32_CDROMDrive.cs | 25 + .../Tango.SystemInfo/Win32_DMAChannel.cs | 25 + .../Tango.SystemInfo/Win32_DiskDrive.cs | 25 + .../Visual_Studio/Tango.SystemInfo/Win32_Fan.cs | 25 + .../Tango.SystemInfo/Win32_FloppyController.cs | 25 + .../Tango.SystemInfo/Win32_FloppyDrive.cs | 25 + .../Tango.SystemInfo/Win32_IDEController.cs | 25 + .../Tango.SystemInfo/Win32_IRQResource.cs | 25 + .../Tango.SystemInfo/Win32_Keyboard.cs | 25 + .../Tango.SystemInfo/Win32_MemoryDevice.cs | 25 + .../Tango.SystemInfo/Win32_NetworkAdapter.cs | 25 + .../Win32_NetworkAdapterConfiguration.cs | 25 + .../Tango.SystemInfo/Win32_OnBoardDevice.cs | 25 + .../Tango.SystemInfo/Win32_OperatingSystem.cs | 21 + .../Tango.SystemInfo/Win32_PCMCIController.cs | 25 + .../Tango.SystemInfo/Win32_POTSModem.cs | 25 + .../Tango.SystemInfo/Win32_ParallelPort.cs | 25 + .../Tango.SystemInfo/Win32_PhysicalMedia.cs | 25 + .../Tango.SystemInfo/Win32_PhysicalMemory.cs | 25 + .../Tango.SystemInfo/Win32_PortConnector.cs | 25 + .../Tango.SystemInfo/Win32_PortResource.cs | 25 + .../Tango.SystemInfo/Win32_Processor.cs | 25 + .../Tango.SystemInfo/Win32_SCSIController.cs | 25 + .../Tango.SystemInfo/Win32_SerialPort.cs | 25 + .../Win32_SerialPortConfiguration.cs | 25 + .../Tango.SystemInfo/Win32_SoundDevice.cs | 25 + .../Tango.SystemInfo/Win32_SystemEnclosure.cs | 25 + .../Tango.SystemInfo/Win32_TapeDrive.cs | 25 + .../Tango.SystemInfo/Win32_TemperatureProbe.cs | 25 + .../Tango.SystemInfo/Win32_USBController.cs | 25 + .../Visual_Studio/Tango.SystemInfo/Win32_USBHub.cs | 25 + .../Win32_UninterruptiblePowerSupply.cs | 25 + .../Tango.SystemInfo/Win32_VideoController.cs | 25 + .../Tango.SystemInfo/Win32_VoltageProbe.cs | 25 + .../Visual_Studio/Tango.SystemInfo/XMLConfig.cs | 29 + .../Visual_Studio/Tango.SystemInfo/settings.xml | 1347 ++++++++++++++++++++ Software/Visual_Studio/Tango.sln | 54 +- 96 files changed, 4166 insertions(+), 64 deletions(-) create mode 100644 Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/Converters/DoubleToChartValuesConverter.cs create mode 100644 Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/ViewModels/MonitoringViewVM.cs create mode 100644 Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/Views/MonitoringView.xaml create mode 100644 Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/Views/MonitoringView.xaml.cs create mode 100644 Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/FSEPanel.cs create mode 100644 Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/FSEPanel.xaml create mode 100644 Software/Visual_Studio/FSE/Tango.FSE.Common/Graphs/GraphHelper.cs create mode 100644 Software/Visual_Studio/FSE/Tango.FSE.Common/Graphs/RealTimeGraph.cs create mode 100644 Software/Visual_Studio/FSE/Tango.FSE.Common/Graphs/RealTimeGraph.xaml create mode 100644 Software/Visual_Studio/FSE/Tango.FSE.Common/Images/screw.png create mode 100644 Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Graphs.xaml create mode 100644 Software/Visual_Studio/FSE/Tango.FSE.Common/SystemInfo/ISystemInfoProvider.cs create mode 100644 Software/Visual_Studio/FSE/Tango.FSE.UI/SystemInfo/DefaultSystemInfoProvider.cs create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.Common/SystemInfo/DefaultSystemInfoService.cs create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.Common/SystemInfo/ISystemInfoService.cs create mode 100644 Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/DataPoints/DateTimeDataPoint.cs delete mode 100644 Software/Visual_Studio/Tango.Integration/ExternalBridge/Network/Information/MachineProperty.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Connection.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/IWMI.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Properties/AssemblyInfo.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/SystemObject.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/SystemObjectProperty.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/SystemObjectsCollection.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Tango.SystemInfo.csproj create mode 100644 Software/Visual_Studio/Tango.SystemInfo/WMIReader.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Win32_BIOS.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Win32_BaseBoard.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Win32_Battery.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Win32_Bus.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Win32_CDROMDrive.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Win32_DMAChannel.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Win32_DiskDrive.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Win32_Fan.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Win32_FloppyController.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Win32_FloppyDrive.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Win32_IDEController.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Win32_IRQResource.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Win32_Keyboard.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Win32_MemoryDevice.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Win32_NetworkAdapter.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Win32_NetworkAdapterConfiguration.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Win32_OnBoardDevice.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Win32_OperatingSystem.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Win32_PCMCIController.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Win32_POTSModem.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Win32_ParallelPort.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Win32_PhysicalMedia.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Win32_PhysicalMemory.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Win32_PortConnector.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Win32_PortResource.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Win32_Processor.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Win32_SCSIController.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Win32_SerialPort.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Win32_SerialPortConfiguration.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Win32_SoundDevice.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Win32_SystemEnclosure.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Win32_TapeDrive.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Win32_TemperatureProbe.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Win32_USBController.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Win32_USBHub.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Win32_UninterruptiblePowerSupply.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Win32_VideoController.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/Win32_VoltageProbe.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/XMLConfig.cs create mode 100644 Software/Visual_Studio/Tango.SystemInfo/settings.xml (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs') diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/App.xaml b/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/App.xaml index cfb949890..cf17cb88e 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/App.xaml +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/App.xaml @@ -39,6 +39,7 @@ + diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/Converters/DoubleToChartValuesConverter.cs b/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/Converters/DoubleToChartValuesConverter.cs new file mode 100644 index 000000000..1ac86b849 --- /dev/null +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/Converters/DoubleToChartValuesConverter.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Data; + +namespace Tango.FSE.PPCConsole.Converters +{ + public class DoubleToChartValuesConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + return new LiveCharts.ChartValues() { (double)value }; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/Tango.FSE.PPCConsole.csproj b/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/Tango.FSE.PPCConsole.csproj index 0948b8f5c..dd869dcfe 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/Tango.FSE.PPCConsole.csproj +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/Tango.FSE.PPCConsole.csproj @@ -49,6 +49,12 @@ ..\..\..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll + + ..\..\..\packages\LiveCharts.0.9.7\lib\net45\LiveCharts.dll + + + ..\..\..\packages\LiveCharts.Wpf.0.9.7\lib\net45\LiveCharts.Wpf.dll + ..\..\..\packages\MahApps.Metro.1.6.5\lib\net46\MahApps.Metro.dll @@ -98,10 +104,12 @@ + + ConsoleView.xaml @@ -109,6 +117,9 @@ MainView.xaml + + MonitoringView.xaml + RemoteDesktopView.xaml @@ -143,6 +154,14 @@ + + {6b9774f7-960d-438e-ad81-c6b9be328d50} + RealTimeGraphX.WPF + + + {f13a489c-80ee-4cd0-bdd4-92d959215646} + RealTimeGraphX + {bb2abb74-ba58-4812-83aa-ec8171f42df4} Tango.AutoComplete @@ -183,6 +202,10 @@ {8491d07b-c1f6-4b62-a412-41b9fd2d6538} Tango.SharedUI + + {997a961c-beda-4b56-aa0f-c39e532f7ffa} + Tango.SystemInfo + {74e700b0-1156-4126-be40-ee450d3c3026} Tango.Transport @@ -213,6 +236,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/ViewModelLocator.cs b/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/ViewModelLocator.cs index 1d07a1684..88b16a04f 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/ViewModelLocator.cs +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/ViewModelLocator.cs @@ -15,6 +15,7 @@ namespace Tango.FSE.PPCConsole TangoIOC.Default.Register(); TangoIOC.Default.Register(); TangoIOC.Default.Register(); + TangoIOC.Default.Register(); } public static MainViewVM MainViewVM @@ -40,5 +41,13 @@ namespace Tango.FSE.PPCConsole return TangoIOC.Default.GetInstance(); } } + + public static MonitoringViewVM MonitoringViewVM + { + get + { + return TangoIOC.Default.GetInstance(); + } + } } } diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/ViewModels/MainViewVM.cs b/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/ViewModels/MainViewVM.cs index 8b9c4169a..1dbb37fdc 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/ViewModels/MainViewVM.cs @@ -17,6 +17,7 @@ namespace Tango.FSE.PPCConsole.ViewModels { ConsoleView, RemoteDesktopView, + MonitoringView, } private NavigationView _selectedView; @@ -36,7 +37,6 @@ namespace Tango.FSE.PPCConsole.ViewModels SelectedView = NavigationView.RemoteDesktopView; } - public override void OnApplicationReady() { base.OnApplicationReady(); diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/ViewModels/MonitoringViewVM.cs b/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/ViewModels/MonitoringViewVM.cs new file mode 100644 index 000000000..4562cab75 --- /dev/null +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/ViewModels/MonitoringViewVM.cs @@ -0,0 +1,182 @@ +using LiveCharts; +using RealTimeGraphX.DataPoints; +using RealTimeGraphX.WPF; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Media; +using Tango.FSE.Common; +using Tango.FSE.Common.Graphs; +using Tango.FSE.Common.Performance; +using Tango.Integration.ExternalBridge.Network.Information; +using Tango.SystemInfo; +using static Tango.SharedUI.Controls.NavigationControl; + +namespace Tango.FSE.PPCConsole.ViewModels +{ + public class MonitoringViewVM : FSEViewModel, INavigationViewModel + { + public WpfGraphController CPUController { get; set; } + + public WpfGraphController RAMController { get; set; } + + public Func DiskSpacePointLabel { get; set; } + + private InformationPackage _systemInfo; + public InformationPackage SystemInfo + { + get { return _systemInfo; } + set { _systemInfo = value; RaisePropertyChangedAuto(); } + } + + private SystemObjectsCollection _selectedSystemObjectCollection; + public SystemObjectsCollection SelectedSystemObjectCollection + { + get { return _selectedSystemObjectCollection; } + set { _selectedSystemObjectCollection = value; RaisePropertyChangedAuto(); } + } + + private bool _fetchingSystemInfo; + public bool FetchingSystemInfo + { + get { return _fetchingSystemInfo; } + set { _fetchingSystemInfo = value; RaisePropertyChangedAuto(); } + } + + private double _usedDiskSpace; + public double UsedDiskSpace + { + get { return _usedDiskSpace; } + set + { + if (_usedDiskSpace != value) + { + _usedDiskSpace = value; + RaisePropertyChangedAuto(); + } + } + } + + private double _availableDiskSpace; + public double AvailableDiskSpace + { + get { return _availableDiskSpace; } + set + { + if (_availableDiskSpace != value) + { + _availableDiskSpace = value; + RaisePropertyChangedAuto(); + } + } + } + + public MonitoringViewVM() + { + CPUController = CreateController(CreateSeries("Total", GraphHelper.GraphColor.White), CreateSeries("Application", GraphHelper.GraphColor.Red)); + RAMController = CreateController(CreateSeries("Total", GraphHelper.GraphColor.White), CreateSeries("Application", GraphHelper.GraphColor.Yellow)); + UsedDiskSpace = 1000 * 40; + AvailableDiskSpace = 1000 * 60; + DiskSpacePointLabel = (point) => + { + return $"{(point.Y / 1000d).ToString("0.0")} GB"; + }; + } + + private WpfGraphController CreateController(params WpfGraphDataSeries[] seriesCollection) + { + var controller = new WpfGraphController(); + + foreach (var series in seriesCollection) + { + controller.DataSeriesCollection.Add(series); + } + + controller.Range.AutoY = false; + controller.Range.MaximumY = 100; + controller.Range.MinimumY = 0; + controller.Range.MaximumX = new DateTime(0).AddMinutes(1); + + controller.RefreshRate = TimeSpan.FromMilliseconds(100); + + return controller; + } + + private WpfGraphDataSeries CreateSeries(String name, GraphHelper.GraphColor fill) + { + WpfGraphDataSeries series = new WpfGraphDataSeries(); + series.Name = name; + series.Fill = GraphHelper.GetGraphBrush(fill); + series.StrokeThickness = 1; + series.Stroke = GraphHelper.GetGraphStrokeColor(); + return series; + } + + public override void OnApplicationStarted() + { + base.OnApplicationStarted(); + PerformanceProvider.PerformancePackageAvailable += PerformanceProvider_PerformancePackageAvailable; + MachineProvider.MachineDisconnected += MachineProvider_MachineDisconnected; + } + + private void MachineProvider_MachineDisconnected(object sender, Common.Connection.MachineDisconnectedEventArgs e) + { + SystemInfo = null; + } + + private void PerformanceProvider_PerformancePackageAvailable(object sender, PerformancePackageEventArgs e) + { + List xx = new List() + { + DateTime.Now, + DateTime.Now + }; + + //CPU + CPUController.PushData(xx, new List() + { + e.Package.CPU, + e.Package.ApplicationCPU + }); + + //App RAM + RAMController.Range.MaximumY = e.Package.MaxRAM; + RAMController.PushData(xx, new List() + { + e.Package.RAM, + e.Package.ApplicationRAM + }); + + UsedDiskSpace = e.Package.DiskCapacity - e.Package.AvailableDiskSpace; + AvailableDiskSpace = e.Package.AvailableDiskSpace; + } + + public override async void OnNavigatedTo() + { + base.OnNavigatedTo(); + + if (SystemInfo == null) + { + try + { + FetchingSystemInfo = true; + SystemInfo = await SystemInfoProvider.GetSystemInformationPackage(); + SelectedSystemObjectCollection = SystemInfo.System.FirstOrDefault(); + } + catch (Exception ex) + { + FetchingSystemInfo = false; + LogManager.Log(ex, "Error retrieving system information from remote machine."); + await NotificationProvider.ShowWarning("Error retrieving the remote machine tablet system information."); + } + finally + { + FetchingSystemInfo = false; + } + } + } + } +} diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/Views/MainView.xaml b/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/Views/MainView.xaml index 1b7a6ceea..e94c05041 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/Views/MainView.xaml +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/Views/MainView.xaml @@ -33,7 +33,7 @@ - + diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/Views/MonitoringView.xaml b/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/Views/MonitoringView.xaml new file mode 100644 index 000000000..fbe53327f --- /dev/null +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/Views/MonitoringView.xaml @@ -0,0 +1,184 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CPU + + + + + + + + + + + + + + + + + + + + RAM + + + + + + + + + + + + AVAILABLE DISK SPACE + + + + + + + + + + + + + SYSTEM INFORMATION + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + : + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/Views/MonitoringView.xaml.cs b/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/Views/MonitoringView.xaml.cs new file mode 100644 index 000000000..84672dd50 --- /dev/null +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/Views/MonitoringView.xaml.cs @@ -0,0 +1,33 @@ +using LiveCharts; +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.FSE.PPCConsole.Views +{ + /// + /// Interaction logic for MonitoringView.xaml + /// + public partial class MonitoringView : UserControl + { + public Func PointLabel { get; set; } + + public MonitoringView() + { + PointLabel = chartPoint => string.Format("{0} ({1:P})", chartPoint.Y, chartPoint.Participation); + + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/packages.config b/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/packages.config index c795da787..626240206 100644 --- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/packages.config +++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/packages.config @@ -4,6 +4,8 @@ + + diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/FSEPanel.cs b/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/FSEPanel.cs new file mode 100644 index 000000000..3eaabb595 --- /dev/null +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/FSEPanel.cs @@ -0,0 +1,49 @@ +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.FSE.Common.Controls +{ + public class FSEPanel : ContentControl + { + public CornerRadius CornerRadius + { + get { return (CornerRadius)GetValue(CornerRadiusProperty); } + set { SetValue(CornerRadiusProperty, value); } + } + public static readonly DependencyProperty CornerRadiusProperty = + DependencyProperty.Register("CornerRadius", typeof(CornerRadius), typeof(FSEPanel), new PropertyMetadata(default(CornerRadius))); + + public double ScrewSize + { + get { return (double)GetValue(ScrewSizeProperty); } + set { SetValue(ScrewSizeProperty, value); } + } + public static readonly DependencyProperty ScrewSizeProperty = + DependencyProperty.Register("ScrewSize", typeof(double), typeof(FSEPanel), new PropertyMetadata(10.0)); + + public Thickness ScrewMargin + { + get { return (Thickness)GetValue(ScrewMarginProperty); } + set { SetValue(ScrewMarginProperty, value); } + } + public static readonly DependencyProperty ScrewMarginProperty = + DependencyProperty.Register("ScrewMargin", typeof(Thickness), typeof(FSEPanel), new PropertyMetadata(default(Thickness))); + + static FSEPanel() + { + DefaultStyleKeyProperty.OverrideMetadata(typeof(FSEPanel), new FrameworkPropertyMetadata(typeof(FSEPanel))); + } + } +} diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/FSEPanel.xaml b/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/FSEPanel.xaml new file mode 100644 index 000000000..986899490 --- /dev/null +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/FSEPanel.xaml @@ -0,0 +1,36 @@ + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/FSEViewModel.cs b/Software/Visual_Studio/FSE/Tango.FSE.Common/FSEViewModel.cs index 75d9e593c..5d560d754 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.Common/FSEViewModel.cs +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/FSEViewModel.cs @@ -24,6 +24,7 @@ using Tango.FSE.Common.Notifications; using Tango.FSE.Common.Performance; using Tango.FSE.Common.RemoteDesktop; using Tango.FSE.Common.Resolution; +using Tango.FSE.Common.SystemInfo; using Tango.Settings; using Tango.SharedUI; using static Tango.SharedUI.Controls.NavigationControl; @@ -98,6 +99,12 @@ namespace Tango.FSE.Common [TangoInject] public IPerformanceProvider PerformanceProvider { get; set; } + /// + /// Gets or sets the system information provider. + /// + [TangoInject] + public ISystemInfoProvider SystemInfoProvider { get; set; } + /// /// Gets or sets the resolution service. /// diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Graphs/GraphHelper.cs b/Software/Visual_Studio/FSE/Tango.FSE.Common/Graphs/GraphHelper.cs new file mode 100644 index 000000000..7227f5f0d --- /dev/null +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Graphs/GraphHelper.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Media; + +namespace Tango.FSE.Common.Graphs +{ + public static class GraphHelper + { + public enum GraphColor + { + White, + Red, + Yellow, + Green, + Orange + } + + public static Color GetGraphColor(GraphColor graphColor) + { + return (Color)Application.Current.Resources[$"FSE_RealTimeGraph_{graphColor.ToString()}"]; + } + + public static Brush GetGraphBrush(GraphColor graphColor) + { + return new SolidColorBrush(GetGraphColor(graphColor)); + } + + public static Color GetGraphStrokeColor() + { + return (Color)Application.Current.Resources["FSE_RealTimeGraph_ForegroundColor"]; + } + } +} diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Graphs/RealTimeGraph.cs b/Software/Visual_Studio/FSE/Tango.FSE.Common/Graphs/RealTimeGraph.cs new file mode 100644 index 000000000..5a2dd3eed --- /dev/null +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Graphs/RealTimeGraph.cs @@ -0,0 +1,101 @@ +using RealTimeGraphX; +using System; +using System.Windows; +using System.Windows.Controls; + +namespace Tango.FSE.Common.Graphs +{ + public class RealTimeGraph : 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(RealTimeGraph), 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(RealTimeGraph), 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(RealTimeGraph), 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(RealTimeGraph), 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(RealTimeGraph), new PropertyMetadata(Visibility.Visible)); + + + /// + /// Gets or sets the vertical ticks. + /// + public int VerticalTicks + { + get { return (int)GetValue(VerticalTicksProperty); } + set { SetValue(VerticalTicksProperty, value); } + } + public static readonly DependencyProperty VerticalTicksProperty = + DependencyProperty.Register("VerticalTicks", typeof(int), typeof(RealTimeGraph), new PropertyMetadata(10)); + + + /// + /// Gets or sets the horizontal ticks. + /// + public int HorizontalTicks + { + get { return (int)GetValue(HorizontalTicksProperty); } + set { SetValue(HorizontalTicksProperty, value); } + } + public static readonly DependencyProperty HorizontalTicksProperty = + DependencyProperty.Register("HorizontalTicks", typeof(int), typeof(RealTimeGraph), new PropertyMetadata(10)); + + + /// + /// Initializes the class. + /// + static RealTimeGraph() + { + DefaultStyleKeyProperty.OverrideMetadata(typeof(RealTimeGraph), new FrameworkPropertyMetadata(typeof(RealTimeGraph))); + } + } +} diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Graphs/RealTimeGraph.xaml b/Software/Visual_Studio/FSE/Tango.FSE.Common/Graphs/RealTimeGraph.xaml new file mode 100644 index 000000000..64f7e300e --- /dev/null +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Graphs/RealTimeGraph.xaml @@ -0,0 +1,62 @@ + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Images/screw.png b/Software/Visual_Studio/FSE/Tango.FSE.Common/Images/screw.png new file mode 100644 index 000000000..46a8134fe Binary files /dev/null and b/Software/Visual_Studio/FSE/Tango.FSE.Common/Images/screw.png differ diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Colors.xaml b/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Colors.xaml index 27ba83315..1a355ebf0 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Colors.xaml +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Colors.xaml @@ -13,7 +13,7 @@ #707070 #03A9F4 #009FE7 - + #FF4C4C #FF914C #6DFF72 @@ -27,6 +27,21 @@ #FF6F6F #8EFF6F #FA9252 + #FFB84B + + #18FFFFFF + #B6FF6F6F + #BBFFB84B + #B958C13B + #BBFA9252 + + #7C98B3 + #202020 + #505050 + #303030 + + #202020 + #252525 @@ -39,7 +54,7 @@ - + @@ -54,7 +69,27 @@ - + + + + + + + + + + + + + + + + + + + + + @@ -69,7 +104,7 @@ - + diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Controls.xaml b/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Controls.xaml index bc2425b0e..b4afcd7f2 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Controls.xaml +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Controls.xaml @@ -6,6 +6,7 @@ + \ No newline at end of file diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Graphs.xaml b/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Graphs.xaml new file mode 100644 index 000000000..813fb9841 --- /dev/null +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Graphs.xaml @@ -0,0 +1,9 @@ + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Images.xaml b/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Images.xaml index cad9b5f0d..c0ce6434d 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Images.xaml +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Resources/Images.xaml @@ -10,5 +10,6 @@ + \ No newline at end of file diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/SystemInfo/ISystemInfoProvider.cs b/Software/Visual_Studio/FSE/Tango.FSE.Common/SystemInfo/ISystemInfoProvider.cs new file mode 100644 index 000000000..d21224c4d --- /dev/null +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/SystemInfo/ISystemInfoProvider.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Integration.ExternalBridge.Network.Information; + +namespace Tango.FSE.Common.SystemInfo +{ + public interface ISystemInfoProvider + { + Task GetSystemInformationPackage(); + } +} diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Tango.FSE.Common.csproj b/Software/Visual_Studio/FSE/Tango.FSE.Common/Tango.FSE.Common.csproj index 119ab74d4..58b12d625 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.Common/Tango.FSE.Common.csproj +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Tango.FSE.Common.csproj @@ -91,6 +91,7 @@ ConnectedMachineIcon.xaml + @@ -107,6 +108,8 @@ + + @@ -128,6 +131,7 @@ + @@ -139,6 +143,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -151,6 +159,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -167,6 +179,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -236,6 +252,14 @@ + + {6b9774f7-960d-438e-ad81-c6b9be328d50} + RealTimeGraphX.WPF + + + {f13a489c-80ee-4cd0-bdd4-92d959215646} + RealTimeGraphX + {bb2abb74-ba58-4812-83aa-ec8171f42df4} Tango.AutoComplete @@ -311,7 +335,9 @@ - + + + REM nswag run "$(SolutionDir)Web\Tango.MachineService.Gateway\Nswag\GatewayClient.nswag" /variables:assembly="$(SolutionDir)Web\Tango.MachineService.Gateway\bin\Tango.MachineService.Gateway.dll",output="$(ProjectDir)Gateway\GatewayClient.cs" diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/App.xaml b/Software/Visual_Studio/FSE/Tango.FSE.UI/App.xaml index de6694069..7b311a10a 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.UI/App.xaml +++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/App.xaml @@ -57,6 +57,7 @@ + diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/SystemInfo/DefaultSystemInfoProvider.cs b/Software/Visual_Studio/FSE/Tango.FSE.UI/SystemInfo/DefaultSystemInfoProvider.cs new file mode 100644 index 000000000..cfa840793 --- /dev/null +++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/SystemInfo/DefaultSystemInfoProvider.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Core; +using Tango.Core.DI; +using Tango.FSE.Common.Connection; +using Tango.FSE.Common.SystemInfo; +using Tango.Integration.ExternalBridge.Network.Information; + +namespace Tango.FSE.UI.SystemInfo +{ + public class DefaultSystemInfoProvider : ExtendedObject, ISystemInfoProvider + { + private InformationPackage _package; + + [TangoInject] + private IMachineProvider MachineProvider { get; set; } + + public async Task GetSystemInformationPackage() + { + if (_package == null) + { + var response = await MachineProvider.MachineOperator.SendGenericRequest(new GetMachineInformationRequest(), new Transport.TransportRequestConfig() + { + Timeout = TimeSpan.FromSeconds(30) + }); + + _package = response.Package; + return _package; + } + else + { + return _package; + } + } + } +} diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/Tango.FSE.UI.csproj b/Software/Visual_Studio/FSE/Tango.FSE.UI/Tango.FSE.UI.csproj index eb59d67d0..ab7fe2cb7 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.UI/Tango.FSE.UI.csproj +++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/Tango.FSE.UI.csproj @@ -153,6 +153,7 @@ + diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModelLocator.cs b/Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModelLocator.cs index 52be9581c..dab997c58 100644 --- a/Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModelLocator.cs +++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/ViewModelLocator.cs @@ -18,6 +18,7 @@ using Tango.FSE.Common.Notifications; using Tango.FSE.Common.Performance; using Tango.FSE.Common.RemoteDesktop; using Tango.FSE.Common.Resolution; +using Tango.FSE.Common.SystemInfo; using Tango.FSE.Common.Threading; using Tango.FSE.Common.Web; using Tango.FSE.UI.Authentication; @@ -32,6 +33,7 @@ using Tango.FSE.UI.Notifications; using Tango.FSE.UI.Performance; using Tango.FSE.UI.RemoteDesktop; using Tango.FSE.UI.Resolution; +using Tango.FSE.UI.SystemInfo; using Tango.FSE.UI.Threading; using Tango.FSE.UI.ViewModels; @@ -55,6 +57,7 @@ namespace Tango.FSE.UI TangoIOC.Default.Unregister(); TangoIOC.Default.Unregister(); TangoIOC.Default.Unregister(); + TangoIOC.Default.Unregister(); //TangoIOC.Default.Unregister(); //TangoIOC.Default.Unregister(); //TangoIOC.Default.Unregister(); @@ -77,6 +80,7 @@ namespace Tango.FSE.UI TangoIOC.Default.Register(); TangoIOC.Default.Register(); TangoIOC.Default.Register(); + TangoIOC.Default.Register(); TangoIOC.Default.Register(); TangoIOC.Default.Register(); diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Performance/DefaultPerformanceService.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Performance/DefaultPerformanceService.cs index 700cc0d47..2279d204c 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Performance/DefaultPerformanceService.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Performance/DefaultPerformanceService.cs @@ -148,8 +148,8 @@ namespace Tango.PPC.Common.Performance _package.ApplicationCPU = (int)GetAppCPU(); _package.CPU = (int)GetTotalCPU(); _package.ApplicationRAM = (int)BytesToMegaBytes(GetAppRam()); - _package.RAM = (int)PerformanceInfo.GetTotalMemoryInMiB(); - _package.MaxRAM = (int)PerformanceInfo.GetPhysicalAvailableMemoryInMiB(); + _package.MaxRAM = (int)BytesToMegaBytes((long)new Microsoft.VisualBasic.Devices.ComputerInfo().TotalPhysicalMemory); + _package.RAM = _package.MaxRAM - (int)PerformanceInfo.GetPhysicalAvailableMemoryInMiB(); DriveInfo info = new DriveInfo("C"); _package.DiskCapacity = (int)BytesToMegaBytes(info.TotalSize); @@ -173,7 +173,7 @@ namespace Tango.PPC.Common.Performance LogManager.Log(ex, "Error creating performance package."); } - Thread.Sleep(2000); + Thread.Sleep(200); } } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/SystemInfo/DefaultSystemInfoService.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/SystemInfo/DefaultSystemInfoService.cs new file mode 100644 index 000000000..0f1c81416 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/SystemInfo/DefaultSystemInfoService.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Core; +using Tango.Core.DI; +using Tango.Integration.ExternalBridge; +using Tango.Integration.ExternalBridge.Network.Information; +using Tango.PPC.Common.ExternalBridge; + +namespace Tango.PPC.Common.SystemInfo +{ + [TangoCreateWhenRegistered] + public class DefaultSystemInfoService : ExtendedObject, ISystemInfoService, IExternalBridgeRequestHandler + { + public bool Enabled { get; set; } = true; + + private GetMachineInformationResponse response; + + public DefaultSystemInfoService(IPPCExternalBridgeService externalBridge) + { + externalBridge.RegisterRequestHandler(this); + } + + [ExternalBridgeRequestHandlerMethod(typeof(GetMachineInformationRequest))] + public async void OnGetMachineInformationRequest(GetMachineInformationRequest request, String token, ExternalBridgeReceiver receiver) + { + try + { + if (response == null) + { + response = new GetMachineInformationResponse() + { + Package = new InformationPackage() + { + System = Tango.SystemInfo.SystemObjectsCollection.Create(), + } + }; + } + + await receiver.SendGenericResponse(response, token); + } + catch (Exception ex) + { + LogManager.Log(ex, "Error sending system information."); + } + } + + public void OnReceiverDisconnected(ExternalBridgeReceiver receiver) + { + + } + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/SystemInfo/ISystemInfoService.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/SystemInfo/ISystemInfoService.cs new file mode 100644 index 000000000..0cc493891 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/SystemInfo/ISystemInfoService.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.PPC.Common.SystemInfo +{ + public interface ISystemInfoService + { + bool Enabled { get; set; } + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj b/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj index df6b881a0..4551fe427 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj @@ -72,6 +72,7 @@ + ..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll @@ -169,6 +170,8 @@ + + @@ -393,6 +396,10 @@ {e1e66ed9-597d-45fa-8048-de90a6930484} Tango.SQLExaminer + + {997a961c-beda-4b56-aa0f-c39e532f7ffa} + Tango.SystemInfo + {fd86424c-6e84-491b-8df9-3d0f5c236a2a} Tango.Touch @@ -439,7 +446,7 @@ - + \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs index da6c630d4..9e150221d 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs @@ -26,6 +26,7 @@ using Tango.PPC.Common.RemoteAssistance; using Tango.PPC.Common.RemoteDesktop; using Tango.PPC.Common.Storage; using Tango.PPC.Common.Synchronization; +using Tango.PPC.Common.SystemInfo; using Tango.PPC.Common.Threading; using Tango.PPC.Common.UpdatePackages; using Tango.PPC.Common.UWF; @@ -84,6 +85,7 @@ namespace Tango.PPC.UI TangoIOC.Default.Unregister(); TangoIOC.Default.Unregister(); TangoIOC.Default.Unregister(); + TangoIOC.Default.Unregister(); if (App.StartupArgs.Contains("-webDebug")) { @@ -120,6 +122,7 @@ namespace Tango.PPC.UI TangoIOC.Default.Register(); TangoIOC.Default.Register(); TangoIOC.Default.Register(); + TangoIOC.Default.Register(); TangoIOC.Default.Register(); TangoIOC.Default.Register(); 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 index 1070736ef..64145bcfa 100644 --- a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/Themes/Generic.xaml +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/Themes/Generic.xaml @@ -34,7 +34,7 @@ - + diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphAxisControl.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphAxisControl.cs index 23b831abe..aa738b203 100644 --- a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphAxisControl.cs +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphAxisControl.cs @@ -25,6 +25,7 @@ namespace RealTimeGraphX.WPF public class WpfGraphAxisControl : WpfGraphComponentBase { private ItemsControl _items_control; + private WpfGraphAxisPanel _axisPanel; /// /// Initializes the class. @@ -97,9 +98,37 @@ namespace RealTimeGraphX.WPF base.OnApplyTemplate(); _items_control = GetTemplateChild("PART_ItemsControl") as ItemsControl; + + _items_control.Loaded += (x, e) => + { + ItemsPresenter itemsPresenter = GetVisualChild(_items_control); + _axisPanel = VisualTreeHelper.GetChild(itemsPresenter, 0) as WpfGraphAxisPanel; + }; + OnTicksChanged(); } + private static T GetVisualChild(DependencyObject parent) where T : Visual + { + T child = default(T); + + int numVisuals = VisualTreeHelper.GetChildrenCount(parent); + for (int i = 0; i < numVisuals; i++) + { + Visual v = (Visual)VisualTreeHelper.GetChild(parent, i); + child = v as T; + if (child == null) + { + child = GetVisualChild(v); + } + if (child != null) + { + break; + } + } + return child; + } + /// /// Called when the property has changed. /// @@ -107,16 +136,15 @@ namespace RealTimeGraphX.WPF { Items = new ObservableCollection(Enumerable.Range(0, Ticks).Select(x => new WpfGraphAxisTickData())); - if (Controller != null) - { - Controller.RequestVirtualRangeChange(); - } + Controller?.RequestVirtualRangeChange(); + + _axisPanel?.UpdatePanel(); } protected override void OnControllerChanged(IGraphController oldController, IGraphController newController) { base.OnControllerChanged(oldController, newController); - + if (newController != null) { newController.RequestVirtualRangeChange(); diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphAxisPanel.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphAxisPanel.cs index f10b583f4..4fb6d94bc 100644 --- a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphAxisPanel.cs +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphAxisPanel.cs @@ -46,7 +46,7 @@ namespace RealTimeGraphX.WPF /// /// Updates the panel. /// - private void UpdatePanel() + public void UpdatePanel() { RowDefinitions.Clear(); ColumnDefinitions.Clear(); diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphDataSeries.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphDataSeries.cs index 15a99ab54..8eab3eabe 100644 --- a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphDataSeries.cs +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphDataSeries.cs @@ -135,5 +135,15 @@ namespace RealTimeGraphX.WPF { get { return Fill != null; } } + + private object _currentValue; + /// + /// Gets the current value. + /// + public object CurrentValue + { + get { return _currentValue; } + set { _currentValue = value; RaisePropertyChangedAuto(); } + } } } diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphSurface.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphSurface.cs index ebcff3472..1a3015728 100644 --- a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphSurface.cs +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX.WPF/WpfGraphSurface.cs @@ -40,6 +40,20 @@ namespace RealTimeGraphX.WPF private Point _last_mouse_position; private Grid _grid; + #region Events + + /// + /// Occurs when the surface size has changed. + /// + public event EventHandler SurfaceSizeChanged; + + /// + /// Occurs when the surface zoom rectangle has changed. + /// + public event EventHandler ZoomRectChanged; + + #endregion + #region Properties /// @@ -177,6 +191,8 @@ namespace RealTimeGraphX.WPF } _zoom_rect = new System.Drawing.RectangleF((float)x, (float)y, _zoom_rect.Width, _zoom_rect.Height); + + ZoomRectChanged?.Invoke(this, new EventArgs()); } _last_mouse_position = _current_mouse_position; @@ -202,6 +218,7 @@ namespace RealTimeGraphX.WPF _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; + ZoomRectChanged?.Invoke(this, new EventArgs()); } } @@ -222,6 +239,7 @@ namespace RealTimeGraphX.WPF { _zoom_rect = new System.Drawing.RectangleF(); _is_scaled = false; + ZoomRectChanged?.Invoke(this, new EventArgs()); } else if (Keyboard.IsKeyDown(Key.LeftCtrl)) { @@ -301,7 +319,7 @@ namespace RealTimeGraphX.WPF /// The points. public void DrawSeries(WpfGraphDataSeries dataSeries, IEnumerable points) { - _g.DrawCurve(dataSeries.GdiPen, points.ToArray()); + _g.DrawPolygon(dataSeries.GdiPen, points.ToArray()); } /// @@ -373,6 +391,7 @@ namespace RealTimeGraphX.WPF { _size = new System.Drawing.SizeF((float)e.NewSize.Width, (float)e.NewSize.Height); _size_changed = true; + SurfaceSizeChanged?.Invoke(this, new EventArgs()); } #endregion diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/DataPoints/DateTimeDataPoint.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/DataPoints/DateTimeDataPoint.cs new file mode 100644 index 000000000..9ec750af9 --- /dev/null +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/DataPoints/DateTimeDataPoint.cs @@ -0,0 +1,178 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace RealTimeGraphX.DataPoints +{ + public class DateTimeDataPoint : GraphDataPoint + { + /// + /// Initializes a new instance of the class. + /// + public DateTimeDataPoint() : base() + { + + } + + /// + /// Initializes a new instance of the class. + /// + /// The value. + public DateTimeDataPoint(DateTime value) : base(value) + { + + } + + /// + /// Performs an implicit conversion from to . + /// + /// The value. + /// + /// The result of the conversion. + /// + public static implicit operator DateTimeDataPoint(DateTime value) + { + return new DateTimeDataPoint(value); + } + + /// + /// Implements the operator -. + /// + /// a. + /// The b. + /// + /// The result of the operator. + /// + public static DateTimeDataPoint operator -(DateTimeDataPoint a, DateTimeDataPoint b) + { + return new DateTimeDataPoint(new DateTime(a.Value.Ticks - b.Value.Ticks)); + } + + /// + /// Implements the operator +. + /// + /// a. + /// The b. + /// + /// The result of the operator. + /// + public static DateTimeDataPoint operator +(DateTimeDataPoint a, DateTimeDataPoint b) + { + return new DateTimeDataPoint(new DateTime(a.Value.Ticks + b.Value.Ticks)); + } + + /// + /// 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 DateTimeDataPoint(new DateTime(this.Value.Ticks + (other as DateTimeDataPoint).Value.Ticks)); + } + + /// + /// Subtract the value of another instance from this instance and returns the result. + /// + /// The other instance. + /// + public override IGraphDataPoint Subtract(IGraphDataPoint other) + { + return new DateTimeDataPoint(new DateTime(this.Value.Ticks - (other as DateTimeDataPoint).Value.Ticks)); + } + + /// + /// 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 DateTimeDataPoint(new DateTime(this.Value.Ticks * (other as DateTimeDataPoint).Value.Ticks)); + } + + /// + /// 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 DateTimeDataPoint(new DateTime(this.Value.Ticks / (other as DateTimeDataPoint).Value.Ticks)); + } + + /// + /// 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) + { + DateTime dMin = min as DateTimeDataPoint; + DateTime dMax = max as DateTimeDataPoint; + + if (dMax.Ticks - dMin.Ticks == 0) //Prevent divide by zero + { + return dMin.Ticks; + } + + var result = ((Value.Ticks - dMin.Ticks) * 100) / (dMax.Ticks - dMin.Ticks); + + return double.IsNaN(result) ? dMin.Ticks : 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 = ((DateTime)min.GetValue()).Ticks; + double maximum = ((DateTime)max.GetValue()).Ticks; + + return new DateTimeDataPoint(new DateTime((long)(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 = ((DateTime)min.GetValue()).Ticks; + double maximum = ((DateTime)max.GetValue()).Ticks; + + return Enumerable.Range(0, count). + Select(i => minimum + (maximum - minimum) * ((double)i / (count - 1))). + Select(x => new DateTimeDataPoint(new DateTime((long)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 DateTimeDataPoint(DateTime.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 index 4bccdcb74..787e59aae 100644 --- a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/DataPoints/Int32DataPoint.cs +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/DataPoints/Int32DataPoint.cs @@ -118,6 +118,11 @@ namespace RealTimeGraphX.DataPoints Int32DataPoint dMin = min as Int32DataPoint; Int32DataPoint dMax = max as Int32DataPoint; + if (dMax - dMin == 0) //Prevent divide by zero + { + return dMin; + } + var result = ((Value - dMin) * 100) / (dMax - dMin); return result; @@ -147,12 +152,12 @@ namespace RealTimeGraphX.DataPoints /// public override IEnumerable CreateRange(IGraphDataPoint min, IGraphDataPoint max, int count) { - int minimum = (int)min.GetValue(); - int maximum = (int)max.GetValue(); + double minimum = (int)min.GetValue(); + double maximum = (int)max.GetValue(); return Enumerable.Range(0, count). - Select(i => minimum + (maximum - minimum) * ((int)i / (count - 1))). - Select(x => new Int32DataPoint(x)); + Select(i => minimum + (maximum - minimum) * ((double)i / (count - 1))). + Select(x => new Int32DataPoint((int)x)); } /// diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphController.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphController.cs index 328f0736e..1b452df57 100644 --- a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphController.cs +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/GraphController.cs @@ -47,6 +47,8 @@ namespace RealTimeGraphX public int RenderedItems { get; set; } public bool IsClearSeries { get; set; } + + public bool IsUpdateSeries { get; set; } } #endregion @@ -113,8 +115,10 @@ namespace RealTimeGraphX get { return _surface; } set { + var previous = _surface; _surface = value; RequestVirtualRangeChange(); + OnSurfaceChanged(previous, _surface); } } @@ -227,11 +231,8 @@ namespace RealTimeGraphX { List> pending_lists = new List>(); - if (_pending_series_collection.Count == 0) - { - Thread.Sleep(TimeSpan.FromSeconds(1)); - continue; - } + var pending_list_first = _pending_series_collection.BlockDequeue(); + pending_lists.Add(pending_list_first); while (_pending_series_collection.Count > 0) { @@ -247,24 +248,24 @@ namespace RealTimeGraphX { _pending_series_collection = new GraphDataQueue>(); _to_render.Clear(); - break; } - - if (_to_render.ContainsKey(pending_series.Series)) + else if (!pending_series.IsUpdateSeries) { - 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 (_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 (_to_render.Count > 0) - //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; @@ -346,6 +347,11 @@ namespace RealTimeGraphX foreach (var item in to_render) { + if (item.YY.Count > 0) + { + item.Series.CurrentValue = item.YY.Last().GetValue(); + } + 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)); } @@ -384,6 +390,26 @@ namespace RealTimeGraphX #region Protected Methods + /// + /// Called when the surface has changed. + /// + /// The previous. + /// The surface. + protected virtual void OnSurfaceChanged(IGraphSurface previous, IGraphSurface surface) + { + if (previous != null) + { + previous.SurfaceSizeChanged += Surface_SurfaceSizeChanged; + previous.ZoomRectChanged += Surface_ZoomRectChanged; + } + + if (surface != null) + { + surface.SurfaceSizeChanged += Surface_SurfaceSizeChanged; + surface.ZoomRectChanged += Surface_ZoomRectChanged; + } + } + /// /// Raises the event. /// @@ -431,6 +457,62 @@ namespace RealTimeGraphX #endregion + #region Surface Event Handlers + + /// + /// Handles the ZoomRectChanged event of the Surface control. + /// + /// The source of the event. + /// The instance containing the event data. + private void Surface_ZoomRectChanged(object sender, EventArgs e) + { + if (!_pending_series_collection.ToList().SelectMany(x => x).ToList().Exists(x => x.IsUpdateSeries)) + { + List updateSeries = new List(); + + foreach (var pending_Series in _to_render) + { + updateSeries.Add(new PendingSeries() + { + IsUpdateSeries = true, + Series = pending_Series.Value.Series, + XX = new List(), + YY = new List(), + }); + } + + _pending_series_collection.BlockEnqueue(updateSeries); + } + } + + /// + /// Handles the SurfaceSizeChanged event of the Surface control. + /// + /// The source of the event. + /// The instance containing the event data. + private void Surface_SurfaceSizeChanged(object sender, EventArgs e) + { + if (!_pending_series_collection.ToList().SelectMany(x => x).ToList().Exists(x => x.IsUpdateSeries)) + { + List updateSeries = new List(); + + foreach (var pending_Series in _to_render) + { + updateSeries.Add(new PendingSeries() + { + IsUpdateSeries = true, + Series = pending_Series.Value.Series, + XX = new List(), + YY = new List(), + }); + } + + _pending_series_collection.BlockEnqueue(updateSeries); + } + } + + #endregion + #region Public Methods /// diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/IGraphDataSeries.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/IGraphDataSeries.cs index dd05da92b..03640e44a 100644 --- a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/IGraphDataSeries.cs +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/IGraphDataSeries.cs @@ -27,5 +27,10 @@ namespace RealTimeGraphX /// Gets or sets a value indicating whether this series should be visible. /// bool IsVisible { get; set; } + + /// + /// Gets the current value. + /// + Object CurrentValue { get; set; } } } diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/IGraphSurface.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/IGraphSurface.cs index 310bc7c3d..a3aeb90d9 100644 --- a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/IGraphSurface.cs +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/IGraphSurface.cs @@ -11,6 +11,16 @@ namespace RealTimeGraphX /// public interface IGraphSurface : IGraphComponent { + /// + /// Occurs when the surface size has changed. + /// + event EventHandler SurfaceSizeChanged; + + /// + /// Occurs when the surface zoom rectangle has changed. + /// + event EventHandler ZoomRectChanged; + /// /// Returns the actual size of the surface. /// diff --git a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/Renderers/ScrollingLineRenderer.cs b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/Renderers/ScrollingLineRenderer.cs index 82e80aa0f..0a4ac8368 100644 --- a/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/Renderers/ScrollingLineRenderer.cs +++ b/Software/Visual_Studio/SideChains/RealTimeGraphX-master/RealTimeGraphX/Renderers/ScrollingLineRenderer.cs @@ -78,7 +78,7 @@ namespace RealTimeGraphX.Renderers surface.FillSeries(series, GetFillPoints(surface, points)); } - surface.DrawSeries(series, points); + surface.DrawSeries(series, GetFillPoints(surface, points)); } } } diff --git a/Software/Visual_Studio/Tango.Integration/ExternalBridge/Network/Information/GetMachineInformationResponse.cs b/Software/Visual_Studio/Tango.Integration/ExternalBridge/Network/Information/GetMachineInformationResponse.cs index d44382b2e..5ae1aa440 100644 --- a/Software/Visual_Studio/Tango.Integration/ExternalBridge/Network/Information/GetMachineInformationResponse.cs +++ b/Software/Visual_Studio/Tango.Integration/ExternalBridge/Network/Information/GetMachineInformationResponse.cs @@ -8,5 +8,6 @@ namespace Tango.Integration.ExternalBridge.Network.Information { public class GetMachineInformationResponse { + public InformationPackage Package { get; set; } } } diff --git a/Software/Visual_Studio/Tango.Integration/ExternalBridge/Network/Information/InformationPackage.cs b/Software/Visual_Studio/Tango.Integration/ExternalBridge/Network/Information/InformationPackage.cs index 3e004d4f5..afa23492e 100644 --- a/Software/Visual_Studio/Tango.Integration/ExternalBridge/Network/Information/InformationPackage.cs +++ b/Software/Visual_Studio/Tango.Integration/ExternalBridge/Network/Information/InformationPackage.cs @@ -3,16 +3,17 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using Tango.SystemInfo; namespace Tango.Integration.ExternalBridge.Network.Information { public class InformationPackage { - public List Properties { get; set; } + public List System { get; set; } public InformationPackage() { - Properties = new List(); + System = new List(); } } } diff --git a/Software/Visual_Studio/Tango.Integration/ExternalBridge/Network/Information/MachineProperty.cs b/Software/Visual_Studio/Tango.Integration/ExternalBridge/Network/Information/MachineProperty.cs deleted file mode 100644 index 99232d624..000000000 --- a/Software/Visual_Studio/Tango.Integration/ExternalBridge/Network/Information/MachineProperty.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Tango.Integration.ExternalBridge.Network.Information -{ - public class MachineProperty - { - public String Name { get; set; } - public String Value { get; set; } - } -} diff --git a/Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj b/Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj index b439fc211..1356c115c 100644 --- a/Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj +++ b/Software/Visual_Studio/Tango.Integration/Tango.Integration.csproj @@ -109,7 +109,6 @@ - @@ -205,6 +204,10 @@ {d8f1ad85-526a-4f50-b6dc-d437af63d8d8} Tango.Settings + + {997a961c-beda-4b56-aa0f-c39e532f7ffa} + Tango.SystemInfo + {74e700b0-1156-4126-be40-ee450d3c3026} Tango.Transport @@ -218,7 +221,7 @@ - + \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.SystemInfo/Connection.cs b/Software/Visual_Studio/Tango.SystemInfo/Connection.cs new file mode 100644 index 000000000..3e4e1e73d --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Connection.cs @@ -0,0 +1,83 @@ +using System; +using System.Management; +using System.Collections.Generic; +using System.Text; + +//Tango.SystemInfo +namespace Tango.SystemInfo +{ + class Connection + { + ManagementScope connectionScope; + ConnectionOptions options; + + #region "properties" + public ManagementScope GetConnectionScope + { + get { return connectionScope; } + } + public ConnectionOptions GetOptions + { + get { return options; } + } + #endregion + + #region "static helpers" + public static ConnectionOptions SetConnectionOptions() + { + ConnectionOptions options = new ConnectionOptions(); + options.Impersonation = ImpersonationLevel.Impersonate; + options.Authentication = AuthenticationLevel.Default; + options.EnablePrivileges = true; + return options; + } + + public static ManagementScope SetConnectionScope(string machineName, + ConnectionOptions options) + { + ManagementScope connectScope = new ManagementScope(); + connectScope.Path = new ManagementPath(@"\\" + machineName + @"\root\CIMV2"); + connectScope.Options = options; + + try + { + connectScope.Connect(); + } + catch (ManagementException e) + { + Console.WriteLine("An Error Occurred: " + e.Message.ToString()); + } + return connectScope; + } + #endregion + + #region "constructors" + public Connection() + { + EstablishConnection(null, null, null, Environment.MachineName); + } + + public Connection(string userName, + string password, + string domain, + string machineName) + { + EstablishConnection(userName, password, domain, machineName); + } + #endregion + + #region "private helpers" + private void EstablishConnection(string userName, string password, string domain, string machineName) + { + options = Connection.SetConnectionOptions(); + if (domain != null || userName != null) + { + options.Username = domain + "\\" + userName; + options.Password = password; + } + connectionScope = Connection.SetConnectionScope(machineName, options); + } + #endregion + + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/IWMI.cs b/Software/Visual_Studio/Tango.SystemInfo/IWMI.cs new file mode 100644 index 000000000..06252731f --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/IWMI.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + interface IWMI + { + IList GetHardwareInfoList(); + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Tango.SystemInfo/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..1ff929bce --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Tango.SystemInfo")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Tango.SystemInfo")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[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)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("997a961c-beda-4b56-aa0f-c39e532f7ffa")] + +// 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/Tango.SystemInfo/SystemObject.cs b/Software/Visual_Studio/Tango.SystemInfo/SystemObject.cs new file mode 100644 index 000000000..be1c74fe5 --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/SystemObject.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + public class SystemObject + { + public String Name { get; set; } + public List Properties { get; set; } + + public SystemObject() + { + Properties = new List(); + } + + public override string ToString() + { + String msg = String.Empty; + + msg = $"Name: {Name}\n"; + + foreach (var prop in Properties) + { + msg += $"{prop.Name}: {prop.Value}\n"; + } + + return msg; + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/SystemObjectProperty.cs b/Software/Visual_Studio/Tango.SystemInfo/SystemObjectProperty.cs new file mode 100644 index 000000000..c2d04e2a5 --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/SystemObjectProperty.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + public class SystemObjectProperty + { + public String Name { get; set; } + public String Value { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/SystemObjectsCollection.cs b/Software/Visual_Studio/Tango.SystemInfo/SystemObjectsCollection.cs new file mode 100644 index 000000000..ec191750c --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/SystemObjectsCollection.cs @@ -0,0 +1,111 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.SystemInfo +{ + public class SystemObjectsCollection + { + public String Name { get; set; } + + public List Objects { get; set; } + + public SystemObjectsCollection() + { + Objects = new List(); + } + + public override string ToString() + { + String str = String.Empty; + + str += Name + "\n\n"; + + foreach (var obj in Objects) + { + str += obj.ToString(); + str += "\n"; + } + + str += "\n"; + + return str; + } + + public static List Create() + { + List list = new List(); + + Connection wmiConnection = new Connection(); + + SystemObjectsCollection board = new SystemObjectsCollection() { Name = "Board" }; + Win32_BaseBoard boardConnection = new Win32_BaseBoard(wmiConnection); + board.Objects = boardConnection.GetHardwareInfoList().ToList(); + list.Add(board); + + SystemObjectsCollection bios = new SystemObjectsCollection() { Name = "BIOS" }; + Win32_BIOS biosConnection = new Win32_BIOS(wmiConnection); + bios.Objects = biosConnection.GetHardwareInfoList().ToList(); + list.Add(bios); + + SystemObjectsCollection disk = new SystemObjectsCollection() { Name = "Disk Drives" }; + Win32_DiskDrive diskConnection = new Win32_DiskDrive(wmiConnection); + disk.Objects = diskConnection.GetHardwareInfoList().ToList(); + list.Add(disk); + + SystemObjectsCollection fan = new SystemObjectsCollection() { Name = "Fan" }; + Win32_Fan fanConnection = new Win32_Fan(wmiConnection); + fan.Objects = fanConnection.GetHardwareInfoList().ToList(); + list.Add(fan); + + SystemObjectsCollection network = new SystemObjectsCollection() { Name = "Network" }; + Win32_NetworkAdapter networkConnection = new Win32_NetworkAdapter(wmiConnection); + network.Objects = networkConnection.GetHardwareInfoList().ToList(); + list.Add(network); + + SystemObjectsCollection memory = new SystemObjectsCollection() { Name = "Memory" }; + Win32_PhysicalMemory memoryConnection = new Win32_PhysicalMemory(wmiConnection); + memory.Objects = memoryConnection.GetHardwareInfoList().ToList(); + list.Add(memory); + + SystemObjectsCollection processor = new SystemObjectsCollection() { Name = "Processor" }; + Win32_Processor processorConnection = new Win32_Processor(wmiConnection); + processor.Objects = processorConnection.GetHardwareInfoList().ToList(); + list.Add(processor); + + SystemObjectsCollection serial = new SystemObjectsCollection() { Name = "Serial Ports" }; + Win32_SerialPort serialConnection = new Win32_SerialPort(wmiConnection); + serial.Objects = serialConnection.GetHardwareInfoList().ToList(); + list.Add(serial); + + SystemObjectsCollection sound = new SystemObjectsCollection() { Name = "Sound" }; + Win32_SoundDevice soundConnection = new Win32_SoundDevice(wmiConnection); + sound.Objects = soundConnection.GetHardwareInfoList().ToList(); + list.Add(sound); + + SystemObjectsCollection temp = new SystemObjectsCollection() { Name = "Temperature" }; + Win32_TemperatureProbe tempConnection = new Win32_TemperatureProbe(wmiConnection); + temp.Objects = tempConnection.GetHardwareInfoList().ToList(); + list.Add(temp); + + SystemObjectsCollection power = new SystemObjectsCollection() { Name = "Power Supply" }; + Win32_UninterruptiblePowerSupply powerConnection = new Win32_UninterruptiblePowerSupply(wmiConnection); + power.Objects = powerConnection.GetHardwareInfoList().ToList(); + list.Add(power); + + SystemObjectsCollection video = new SystemObjectsCollection() { Name = "Video Controller" }; + Win32_VideoController videoConnection = new Win32_VideoController(wmiConnection); + video.Objects = videoConnection.GetHardwareInfoList().ToList(); + list.Add(video); + + SystemObjectsCollection voltage = new SystemObjectsCollection() { Name = "Voltage" }; + Win32_VoltageProbe voltageConnection = new Win32_VoltageProbe(wmiConnection); + voltage.Objects = voltageConnection.GetHardwareInfoList().ToList(); + list.Add(voltage); + + return list; + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Tango.SystemInfo.csproj b/Software/Visual_Studio/Tango.SystemInfo/Tango.SystemInfo.csproj new file mode 100644 index 000000000..90cf14c29 --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Tango.SystemInfo.csproj @@ -0,0 +1,102 @@ + + + + + Debug + AnyCPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA} + Library + Properties + Tango.SystemInfo + Tango.SystemInfo + v4.6.1 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {a34ee0f0-649d-41c8-8489-b6f1cc6924ee} + Tango.Core + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.SystemInfo/WMIReader.cs b/Software/Visual_Studio/Tango.SystemInfo/WMIReader.cs new file mode 100644 index 000000000..d7d909089 --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/WMIReader.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Management; + +namespace Tango.SystemInfo +{ + class WMIReader + { + public static IList GetPropertyValues(Connection WMIConnection, + string SelectQuery, + string className) + { + List hardwareList = new List(); + + ManagementScope connectionScope = WMIConnection.GetConnectionScope; + List alProperties = new List(); + SelectQuery msQuery = new SelectQuery(SelectQuery); + ManagementObjectSearcher searchProcedure = new ManagementObjectSearcher(connectionScope, msQuery); + + try + { + foreach (ManagementObject item in searchProcedure.Get()) + { + SystemObject hardware = new SystemObject(); + + try + { + hardware.Name = item["Name"].ToString(); + } + catch + { + hardware.Name = item.ToString(); + } + + hardwareList.Add(hardware); + + foreach (string property in XMLConfig.GetSettings(className)) + { + try + { + hardware.Properties.Add(new SystemObjectProperty() + { + Name = property, + Value = item[property].ToString() + }); + } + catch (SystemException) { /* ignore error */ } + } + } + } + catch (ManagementException e) + { + /* Do Nothing */ + } + + return hardwareList; + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Win32_BIOS.cs b/Software/Visual_Studio/Tango.SystemInfo/Win32_BIOS.cs new file mode 100644 index 000000000..f86c0d5ca --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Win32_BIOS.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + class Win32_BIOS : IWMI + { + Connection WMIConnection; + + public Win32_BIOS(Connection WMIConnection) + { + this.WMIConnection = WMIConnection; + } + public IList GetHardwareInfoList() + { + string className = System.Text.RegularExpressions.Regex.Match( + this.GetType().ToString(), "Win32_.*").Value; + + return WMIReader.GetPropertyValues(WMIConnection, + "SELECT * FROM " + className, + className); + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Win32_BaseBoard.cs b/Software/Visual_Studio/Tango.SystemInfo/Win32_BaseBoard.cs new file mode 100644 index 000000000..f9030ff54 --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Win32_BaseBoard.cs @@ -0,0 +1,27 @@ +using System; +using System.Management; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + class Win32_BaseBoard: IWMI + { + Connection WMIConnection; + + public Win32_BaseBoard(Connection WMIConnection) + { + this.WMIConnection = WMIConnection; + } + + public IList GetHardwareInfoList() + { + string className = System.Text.RegularExpressions.Regex.Match( + this.GetType().ToString(), "Win32_.*").Value; + + return WMIReader.GetPropertyValues(WMIConnection, + "SELECT * FROM " + className, + className); + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Win32_Battery.cs b/Software/Visual_Studio/Tango.SystemInfo/Win32_Battery.cs new file mode 100644 index 000000000..91700d678 --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Win32_Battery.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + class Win32_Battery : IWMI + { + Connection WMIConnection; + + public Win32_Battery(Connection WMIConnection) + { + this.WMIConnection = WMIConnection; + } + public IList GetHardwareInfoList() + { + string className = System.Text.RegularExpressions.Regex.Match( + this.GetType().ToString(), "Win32_.*").Value; + + return WMIReader.GetPropertyValues(WMIConnection, + "SELECT * FROM " + className, + className); + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Win32_Bus.cs b/Software/Visual_Studio/Tango.SystemInfo/Win32_Bus.cs new file mode 100644 index 000000000..8aba00430 --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Win32_Bus.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + class Win32_Bus : IWMI + { + Connection WMIConnection; + + public Win32_Bus(Connection WMIConnection) + { + this.WMIConnection = WMIConnection; + } + public IList GetHardwareInfoList() + { + string className = System.Text.RegularExpressions.Regex.Match( + this.GetType().ToString(), "Win32_.*").Value; + + return WMIReader.GetPropertyValues(WMIConnection, + "SELECT * FROM " + className, + className); + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Win32_CDROMDrive.cs b/Software/Visual_Studio/Tango.SystemInfo/Win32_CDROMDrive.cs new file mode 100644 index 000000000..e6eaa08a9 --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Win32_CDROMDrive.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + class Win32_CDROMDrive : IWMI + { + Connection WMIConnection; + + public Win32_CDROMDrive(Connection WMIConnection) + { + this.WMIConnection = WMIConnection; + } + public IList GetHardwareInfoList() + { + string className = System.Text.RegularExpressions.Regex.Match( + this.GetType().ToString(), "Win32_.*").Value; + + return WMIReader.GetPropertyValues(WMIConnection, + "SELECT * FROM " + className, + className); + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Win32_DMAChannel.cs b/Software/Visual_Studio/Tango.SystemInfo/Win32_DMAChannel.cs new file mode 100644 index 000000000..12e0228fb --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Win32_DMAChannel.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + class Win32_DMAChannel : IWMI + { + Connection WMIConnection; + + public Win32_DMAChannel(Connection WMIConnection) + { + this.WMIConnection = WMIConnection; + } + public IList GetHardwareInfoList() + { + string className = System.Text.RegularExpressions.Regex.Match( + this.GetType().ToString(), "Win32_.*").Value; + + return WMIReader.GetPropertyValues(WMIConnection, + "SELECT * FROM " + className, + className); + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Win32_DiskDrive.cs b/Software/Visual_Studio/Tango.SystemInfo/Win32_DiskDrive.cs new file mode 100644 index 000000000..8600a663d --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Win32_DiskDrive.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + class Win32_DiskDrive : IWMI + { + Connection WMIConnection; + + public Win32_DiskDrive(Connection WMIConnection) + { + this.WMIConnection = WMIConnection; + } + public IList GetHardwareInfoList() + { + string className = System.Text.RegularExpressions.Regex.Match( + this.GetType().ToString(), "Win32_.*").Value; + + return WMIReader.GetPropertyValues(WMIConnection, + "SELECT * FROM " + className, + className); + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Win32_Fan.cs b/Software/Visual_Studio/Tango.SystemInfo/Win32_Fan.cs new file mode 100644 index 000000000..afc241c37 --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Win32_Fan.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + class Win32_Fan : IWMI + { + Connection WMIConnection; + + public Win32_Fan(Connection WMIConnection) + { + this.WMIConnection = WMIConnection; + } + public IList GetHardwareInfoList() + { + string className = System.Text.RegularExpressions.Regex.Match( + this.GetType().ToString(), "Win32_.*").Value; + + return WMIReader.GetPropertyValues(WMIConnection, + "SELECT * FROM " + className, + className); + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Win32_FloppyController.cs b/Software/Visual_Studio/Tango.SystemInfo/Win32_FloppyController.cs new file mode 100644 index 000000000..5ac1f9d8f --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Win32_FloppyController.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + class Win32_FloppyController : IWMI + { + Connection WMIConnection; + + public Win32_FloppyController(Connection WMIConnection) + { + this.WMIConnection = WMIConnection; + } + public IList GetHardwareInfoList() + { + string className = System.Text.RegularExpressions.Regex.Match( + this.GetType().ToString(), "Win32_.*").Value; + + return WMIReader.GetPropertyValues(WMIConnection, + "SELECT * FROM " + className, + className); + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Win32_FloppyDrive.cs b/Software/Visual_Studio/Tango.SystemInfo/Win32_FloppyDrive.cs new file mode 100644 index 000000000..10b1b8fde --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Win32_FloppyDrive.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + class Win32_FloppyDrive : IWMI + { + Connection WMIConnection; + + public Win32_FloppyDrive(Connection WMIConnection) + { + this.WMIConnection = WMIConnection; + } + public IList GetHardwareInfoList() + { + string className = System.Text.RegularExpressions.Regex.Match( + this.GetType().ToString(), "Win32_.*").Value; + + return WMIReader.GetPropertyValues(WMIConnection, + "SELECT * FROM " + className, + className); + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Win32_IDEController.cs b/Software/Visual_Studio/Tango.SystemInfo/Win32_IDEController.cs new file mode 100644 index 000000000..899a4ad5e --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Win32_IDEController.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + class Win32_IDEController : IWMI + { + Connection WMIConnection; + + public Win32_IDEController(Connection WMIConnection) + { + this.WMIConnection = WMIConnection; + } + public IList GetHardwareInfoList() + { + string className = System.Text.RegularExpressions.Regex.Match( + this.GetType().ToString(), "Win32_.*").Value; + + return WMIReader.GetPropertyValues(WMIConnection, + "SELECT * FROM " + className, + className); + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Win32_IRQResource.cs b/Software/Visual_Studio/Tango.SystemInfo/Win32_IRQResource.cs new file mode 100644 index 000000000..ff39c68fd --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Win32_IRQResource.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + class Win32_IRQResource : IWMI + { + Connection WMIConnection; + + public Win32_IRQResource(Connection WMIConnection) + { + this.WMIConnection = WMIConnection; + } + public IList GetHardwareInfoList() + { + string className = System.Text.RegularExpressions.Regex.Match( + this.GetType().ToString(), "Win32_.*").Value; + + return WMIReader.GetPropertyValues(WMIConnection, + "SELECT * FROM " + className, + className); + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Win32_Keyboard.cs b/Software/Visual_Studio/Tango.SystemInfo/Win32_Keyboard.cs new file mode 100644 index 000000000..2657b5954 --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Win32_Keyboard.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + class Win32_Keyboard : IWMI + { + Connection WMIConnection; + + public Win32_Keyboard(Connection WMIConnection) + { + this.WMIConnection = WMIConnection; + } + public IList GetHardwareInfoList() + { + string className = System.Text.RegularExpressions.Regex.Match( + this.GetType().ToString(), "Win32_.*").Value; + + return WMIReader.GetPropertyValues(WMIConnection, + "SELECT * FROM " + className, + className); + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Win32_MemoryDevice.cs b/Software/Visual_Studio/Tango.SystemInfo/Win32_MemoryDevice.cs new file mode 100644 index 000000000..8ed21c13d --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Win32_MemoryDevice.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + class Win32_MemoryDevice : IWMI + { + Connection WMIConnection; + + public Win32_MemoryDevice(Connection WMIConnection) + { + this.WMIConnection = WMIConnection; + } + public IList GetHardwareInfoList() + { + string className = System.Text.RegularExpressions.Regex.Match( + this.GetType().ToString(), "Win32_.*").Value; + + return WMIReader.GetPropertyValues(WMIConnection, + "SELECT * FROM " + className, + className); + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Win32_NetworkAdapter.cs b/Software/Visual_Studio/Tango.SystemInfo/Win32_NetworkAdapter.cs new file mode 100644 index 000000000..561919a2d --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Win32_NetworkAdapter.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + class Win32_NetworkAdapter : IWMI + { + Connection WMIConnection; + + public Win32_NetworkAdapter(Connection WMIConnection) + { + this.WMIConnection = WMIConnection; + } + public IList GetHardwareInfoList() + { + string className = System.Text.RegularExpressions.Regex.Match( + this.GetType().ToString(), "Win32_.*").Value; + + return WMIReader.GetPropertyValues(WMIConnection, + "SELECT * FROM " + className, + className); + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Win32_NetworkAdapterConfiguration.cs b/Software/Visual_Studio/Tango.SystemInfo/Win32_NetworkAdapterConfiguration.cs new file mode 100644 index 000000000..ba22e1d01 --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Win32_NetworkAdapterConfiguration.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + class Win32_NetworkAdapterConfiguration : IWMI + { + Connection WMIConnection; + + public Win32_NetworkAdapterConfiguration(Connection WMIConnection) + { + this.WMIConnection = WMIConnection; + } + public IList GetHardwareInfoList() + { + string className = System.Text.RegularExpressions.Regex.Match( + this.GetType().ToString(), "Win32_.*").Value; + + return WMIReader.GetPropertyValues(WMIConnection, + "SELECT * FROM " + className, + className); + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Win32_OnBoardDevice.cs b/Software/Visual_Studio/Tango.SystemInfo/Win32_OnBoardDevice.cs new file mode 100644 index 000000000..7c4bea2a3 --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Win32_OnBoardDevice.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + class Win32_OnBoardDevice : IWMI + { + Connection WMIConnection; + + public Win32_OnBoardDevice(Connection WMIConnection) + { + this.WMIConnection = WMIConnection; + } + public IList GetHardwareInfoList() + { + string className = System.Text.RegularExpressions.Regex.Match( + this.GetType().ToString(), "Win32_.*").Value; + + return WMIReader.GetPropertyValues(WMIConnection, + "SELECT * FROM " + className, + className); + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Win32_OperatingSystem.cs b/Software/Visual_Studio/Tango.SystemInfo/Win32_OperatingSystem.cs new file mode 100644 index 000000000..24b93d92c --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Win32_OperatingSystem.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + class Win32_OperatingSystem : IWMI + { + Connection WMIConnection; + + public Win32_OperatingSystem(Connection WMIConnection) + { + this.WMIConnection = WMIConnection; + } + + public IList GetHardwareInfoList() + { + return WMIReader.GetPropertyValues(WMIConnection, "select * from Win32_OperatingSystem", "Win32_OperatingSystem"); + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Win32_PCMCIController.cs b/Software/Visual_Studio/Tango.SystemInfo/Win32_PCMCIController.cs new file mode 100644 index 000000000..772af0a28 --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Win32_PCMCIController.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + class Win32_PCMCIController : IWMI + { + Connection WMIConnection; + + public Win32_PCMCIController(Connection WMIConnection) + { + this.WMIConnection = WMIConnection; + } + public IList GetHardwareInfoList() + { + string className = System.Text.RegularExpressions.Regex.Match( + this.GetType().ToString(), "Win32_.*").Value; + + return WMIReader.GetPropertyValues(WMIConnection, + "SELECT * FROM " + className, + className); + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Win32_POTSModem.cs b/Software/Visual_Studio/Tango.SystemInfo/Win32_POTSModem.cs new file mode 100644 index 000000000..29f9549ca --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Win32_POTSModem.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + class Win32_POTSModem : IWMI + { + Connection WMIConnection; + + public Win32_POTSModem(Connection WMIConnection) + { + this.WMIConnection = WMIConnection; + } + public IList GetHardwareInfoList() + { + string className = System.Text.RegularExpressions.Regex.Match( + this.GetType().ToString(), "Win32_.*").Value; + + return WMIReader.GetPropertyValues(WMIConnection, + "SELECT * FROM " + className, + className); + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Win32_ParallelPort.cs b/Software/Visual_Studio/Tango.SystemInfo/Win32_ParallelPort.cs new file mode 100644 index 000000000..81244c588 --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Win32_ParallelPort.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + class Win32_ParallelPort : IWMI + { + Connection WMIConnection; + + public Win32_ParallelPort(Connection WMIConnection) + { + this.WMIConnection = WMIConnection; + } + public IList GetHardwareInfoList() + { + string className = System.Text.RegularExpressions.Regex.Match( + this.GetType().ToString(), "Win32_.*").Value; + + return WMIReader.GetPropertyValues(WMIConnection, + "SELECT * FROM " + className, + className); + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Win32_PhysicalMedia.cs b/Software/Visual_Studio/Tango.SystemInfo/Win32_PhysicalMedia.cs new file mode 100644 index 000000000..816944da4 --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Win32_PhysicalMedia.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + class Win32_PhysicalMedia : IWMI + { + Connection WMIConnection; + + public Win32_PhysicalMedia(Connection WMIConnection) + { + this.WMIConnection = WMIConnection; + } + public IList GetHardwareInfoList() + { + string className = System.Text.RegularExpressions.Regex.Match( + this.GetType().ToString(), "Win32_.*").Value; + + return WMIReader.GetPropertyValues(WMIConnection, + "SELECT * FROM " + className, + className); + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Win32_PhysicalMemory.cs b/Software/Visual_Studio/Tango.SystemInfo/Win32_PhysicalMemory.cs new file mode 100644 index 000000000..d319a3fa7 --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Win32_PhysicalMemory.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + class Win32_PhysicalMemory : IWMI + { + Connection WMIConnection; + + public Win32_PhysicalMemory(Connection WMIConnection) + { + this.WMIConnection = WMIConnection; + } + public IList GetHardwareInfoList() + { + string className = System.Text.RegularExpressions.Regex.Match( + this.GetType().ToString(), "Win32_.*").Value; + + return WMIReader.GetPropertyValues(WMIConnection, + "SELECT * FROM " + className, + className); + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Win32_PortConnector.cs b/Software/Visual_Studio/Tango.SystemInfo/Win32_PortConnector.cs new file mode 100644 index 000000000..20288cec7 --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Win32_PortConnector.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + class Win32_PortConnector : IWMI + { + Connection WMIConnection; + + public Win32_PortConnector(Connection WMIConnection) + { + this.WMIConnection = WMIConnection; + } + public IList GetHardwareInfoList() + { + string className = System.Text.RegularExpressions.Regex.Match( + this.GetType().ToString(), "Win32_.*").Value; + + return WMIReader.GetPropertyValues(WMIConnection, + "SELECT * FROM " + className, + className); + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Win32_PortResource.cs b/Software/Visual_Studio/Tango.SystemInfo/Win32_PortResource.cs new file mode 100644 index 000000000..8a8da41e7 --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Win32_PortResource.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + class Win32_PortResource : IWMI + { + Connection WMIConnection; + + public Win32_PortResource(Connection WMIConnection) + { + this.WMIConnection = WMIConnection; + } + public IList GetHardwareInfoList() + { + string className = System.Text.RegularExpressions.Regex.Match( + this.GetType().ToString(), "Win32_.*").Value; + + return WMIReader.GetPropertyValues(WMIConnection, + "SELECT * FROM " + className, + className); + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Win32_Processor.cs b/Software/Visual_Studio/Tango.SystemInfo/Win32_Processor.cs new file mode 100644 index 000000000..e8387c2bd --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Win32_Processor.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + class Win32_Processor : IWMI + { + Connection WMIConnection; + + public Win32_Processor(Connection WMIConnection) + { + this.WMIConnection = WMIConnection; + } + public IList GetHardwareInfoList() + { + string className = System.Text.RegularExpressions.Regex.Match( + this.GetType().ToString(), "Win32_.*").Value; + + return WMIReader.GetPropertyValues(WMIConnection, + "SELECT * FROM " + className, + className); + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Win32_SCSIController.cs b/Software/Visual_Studio/Tango.SystemInfo/Win32_SCSIController.cs new file mode 100644 index 000000000..dfe689951 --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Win32_SCSIController.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + class Win32_SCSIController : IWMI + { + Connection WMIConnection; + + public Win32_SCSIController(Connection WMIConnection) + { + this.WMIConnection = WMIConnection; + } + public IList GetHardwareInfoList() + { + string className = System.Text.RegularExpressions.Regex.Match( + this.GetType().ToString(), "Win32_.*").Value; + + return WMIReader.GetPropertyValues(WMIConnection, + "SELECT * FROM " + className, + className); + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Win32_SerialPort.cs b/Software/Visual_Studio/Tango.SystemInfo/Win32_SerialPort.cs new file mode 100644 index 000000000..6b20763f9 --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Win32_SerialPort.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + class Win32_SerialPort : IWMI + { + Connection WMIConnection; + + public Win32_SerialPort(Connection WMIConnection) + { + this.WMIConnection = WMIConnection; + } + public IList GetHardwareInfoList() + { + string className = System.Text.RegularExpressions.Regex.Match( + this.GetType().ToString(), "Win32_.*").Value; + + return WMIReader.GetPropertyValues(WMIConnection, + "SELECT * FROM " + className, + className); + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Win32_SerialPortConfiguration.cs b/Software/Visual_Studio/Tango.SystemInfo/Win32_SerialPortConfiguration.cs new file mode 100644 index 000000000..d1efe826b --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Win32_SerialPortConfiguration.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + class Win32_SerialPortConfiguration : IWMI + { + Connection WMIConnection; + + public Win32_SerialPortConfiguration(Connection WMIConnection) + { + this.WMIConnection = WMIConnection; + } + public IList GetHardwareInfoList() + { + string className = System.Text.RegularExpressions.Regex.Match( + this.GetType().ToString(), "Win32_.*").Value; + + return WMIReader.GetPropertyValues(WMIConnection, + "SELECT * FROM " + className, + className); + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Win32_SoundDevice.cs b/Software/Visual_Studio/Tango.SystemInfo/Win32_SoundDevice.cs new file mode 100644 index 000000000..bece1f169 --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Win32_SoundDevice.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + class Win32_SoundDevice : IWMI + { + Connection WMIConnection; + + public Win32_SoundDevice(Connection WMIConnection) + { + this.WMIConnection = WMIConnection; + } + public IList GetHardwareInfoList() + { + string className = System.Text.RegularExpressions.Regex.Match( + this.GetType().ToString(), "Win32_.*").Value; + + return WMIReader.GetPropertyValues(WMIConnection, + "SELECT * FROM " + className, + className); + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Win32_SystemEnclosure.cs b/Software/Visual_Studio/Tango.SystemInfo/Win32_SystemEnclosure.cs new file mode 100644 index 000000000..184ee3b99 --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Win32_SystemEnclosure.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + class Win32_SystemEnclosure : IWMI + { + Connection WMIConnection; + + public Win32_SystemEnclosure(Connection WMIConnection) + { + this.WMIConnection = WMIConnection; + } + public IList GetHardwareInfoList() + { + string className = System.Text.RegularExpressions.Regex.Match( + this.GetType().ToString(), "Win32_.*").Value; + + return WMIReader.GetPropertyValues(WMIConnection, + "SELECT * FROM " + className, + className); + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Win32_TapeDrive.cs b/Software/Visual_Studio/Tango.SystemInfo/Win32_TapeDrive.cs new file mode 100644 index 000000000..94600d518 --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Win32_TapeDrive.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + class Win32_TapeDrive : IWMI + { + Connection WMIConnection; + + public Win32_TapeDrive(Connection WMIConnection) + { + this.WMIConnection = WMIConnection; + } + public IList GetHardwareInfoList() + { + string className = System.Text.RegularExpressions.Regex.Match( + this.GetType().ToString(), "Win32_.*").Value; + + return WMIReader.GetPropertyValues(WMIConnection, + "SELECT * FROM " + className, + className); + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Win32_TemperatureProbe.cs b/Software/Visual_Studio/Tango.SystemInfo/Win32_TemperatureProbe.cs new file mode 100644 index 000000000..579203237 --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Win32_TemperatureProbe.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + class Win32_TemperatureProbe : IWMI + { + Connection WMIConnection; + + public Win32_TemperatureProbe(Connection WMIConnection) + { + this.WMIConnection = WMIConnection; + } + public IList GetHardwareInfoList() + { + string className = System.Text.RegularExpressions.Regex.Match( + this.GetType().ToString(), "Win32_.*").Value; + + return WMIReader.GetPropertyValues(WMIConnection, + "SELECT * FROM " + className, + className); + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Win32_USBController.cs b/Software/Visual_Studio/Tango.SystemInfo/Win32_USBController.cs new file mode 100644 index 000000000..6df7b4799 --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Win32_USBController.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + class Win32_USBController : IWMI + { + Connection WMIConnection; + + public Win32_USBController(Connection WMIConnection) + { + this.WMIConnection = WMIConnection; + } + public IList GetHardwareInfoList() + { + string className = System.Text.RegularExpressions.Regex.Match( + this.GetType().ToString(), "Win32_.*").Value; + + return WMIReader.GetPropertyValues(WMIConnection, + "SELECT * FROM " + className, + className); + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Win32_USBHub.cs b/Software/Visual_Studio/Tango.SystemInfo/Win32_USBHub.cs new file mode 100644 index 000000000..b0f812ebe --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Win32_USBHub.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + class Win32_USBHub : IWMI + { + Connection WMIConnection; + + public Win32_USBHub(Connection WMIConnection) + { + this.WMIConnection = WMIConnection; + } + public IList GetHardwareInfoList() + { + string className = System.Text.RegularExpressions.Regex.Match( + this.GetType().ToString(), "Win32_.*").Value; + + return WMIReader.GetPropertyValues(WMIConnection, + "SELECT * FROM " + className, + className); + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Win32_UninterruptiblePowerSupply.cs b/Software/Visual_Studio/Tango.SystemInfo/Win32_UninterruptiblePowerSupply.cs new file mode 100644 index 000000000..d8dc7bacd --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Win32_UninterruptiblePowerSupply.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + class Win32_UninterruptiblePowerSupply : IWMI + { + Connection WMIConnection; + + public Win32_UninterruptiblePowerSupply(Connection WMIConnection) + { + this.WMIConnection = WMIConnection; + } + public IList GetHardwareInfoList() + { + string className = System.Text.RegularExpressions.Regex.Match( + this.GetType().ToString(), "Win32_.*").Value; + + return WMIReader.GetPropertyValues(WMIConnection, + "SELECT * FROM " + className, + className); + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Win32_VideoController.cs b/Software/Visual_Studio/Tango.SystemInfo/Win32_VideoController.cs new file mode 100644 index 000000000..973303b98 --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Win32_VideoController.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + class Win32_VideoController : IWMI + { + Connection WMIConnection; + + public Win32_VideoController(Connection WMIConnection) + { + this.WMIConnection = WMIConnection; + } + public IList GetHardwareInfoList() + { + string className = System.Text.RegularExpressions.Regex.Match( + this.GetType().ToString(), "Win32_.*").Value; + + return WMIReader.GetPropertyValues(WMIConnection, + "SELECT * FROM " + className, + className); + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/Win32_VoltageProbe.cs b/Software/Visual_Studio/Tango.SystemInfo/Win32_VoltageProbe.cs new file mode 100644 index 000000000..818898aa8 --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/Win32_VoltageProbe.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Tango.SystemInfo +{ + class Win32_VoltageProbe : IWMI + { + Connection WMIConnection; + + public Win32_VoltageProbe(Connection WMIConnection) + { + this.WMIConnection = WMIConnection; + } + public IList GetHardwareInfoList() + { + string className = System.Text.RegularExpressions.Regex.Match( + this.GetType().ToString(), "Win32_.*").Value; + + return WMIReader.GetPropertyValues(WMIConnection, + "SELECT * FROM " + className, + className); + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/XMLConfig.cs b/Software/Visual_Studio/Tango.SystemInfo/XMLConfig.cs new file mode 100644 index 000000000..a6113a0cb --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/XMLConfig.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Xml; + +namespace Tango.SystemInfo +{ + class XMLConfig + { + private static List propNames; + + public static List GetSettings(string WMIClassName) + { + if (propNames == null) + { + propNames = new List(); + System.Xml.XmlDocument xmldoc = new System.Xml.XmlDocument(); + xmldoc.Load(Tango.Core.Helpers.EmbeddedResourceHelper.GetEmbeddedResourceStream("Tango.SystemInfo.settings.xml")); + System.Xml.XmlNode properties = xmldoc.SelectSingleNode("//" + WMIClassName); + + for (int i = 0; i < properties.ChildNodes.Count; i++) + propNames.Add(properties.ChildNodes[i].InnerText); + + } + + return propNames; + } + } +} diff --git a/Software/Visual_Studio/Tango.SystemInfo/settings.xml b/Software/Visual_Studio/Tango.SystemInfo/settings.xml new file mode 100644 index 000000000..ae3059407 --- /dev/null +++ b/Software/Visual_Studio/Tango.SystemInfo/settings.xml @@ -0,0 +1,1347 @@ + + + + + BootDevice + BuildNumber + BuildType + Caption + CodeSet + CountryCode + CreationClassName + CSCreationClassName + CSDVersion + CSName + CurrentTimeZone + DataExecutionPrevention_Available + DataExecutionPrevention_32BitApplications + DataExecutionPrevention_Drivers + DataExecutionPrevention_SupportPolicy + Debug + Description + Distributed + EncryptionLevel + FreePhysicalMemory + FreeSpaceInPagingFiles + FreeVirtualMemory + InstallDate + LargeSystemCache + LastBootUpTime + LocalDateTime + Locale + Manufacturer + MaxNumberOfProcesses + MaxProcessMemorySize + Name + NumberOfLicensedUsers + NumberOfProcesses + NumberOfUsers + OperatingSystemSKU + Organization + OSArchitecture + OSLanguage + OSProductSuite + OSType + OtherTypeDescription + PAEEnabled + PlusProductID + PlusVersionNumber + PortableOperatingSystem + Primary + ProductType + RegisteredUser + SerialNumber + ServicePackMajorVersion + ServicePackMinorVersion + SizeStoredInPagingFiles + Status + SuiteMask + SystemDevice + SystemDirectory + SystemDrive + TotalSwapSpaceSize + TotalVirtualMemorySize + TotalVisibleMemorySize + Version + WindowsDirectory + QuantumLength + QuantumType + + + Caption + CreationClassName + Depth + Description + Height + HostingBoard + HotSwappable + InstallDate + Manufacturer + Model + Name + OtherIdentifyingInfo + PartNumber + PoweredOn + Product + Removable + Replaceable + RequirementsDescription + RequiresDaughterBoard + SerialNumber + SKU + SlotLayout + SpecialRequirements + Status + Tag + Version + Weight + Width + + + Availability + BatteryRechargeTime + BatteryStatus + Caption + Chemistry + ConfigManagerErrorCode + ConfigManagerUserConfig + CreationClassName + Description + DesignCapacity + DesignVoltage + DeviceID + ErrorCleared + ErrorDescription + EstimatedChargeRemaining + EstimatedRunTime + ExpectedBatteryLife + ExpectedLife + FullChargeCapacity + InstallDate + LastErrorCode + MaxRechargeTime + Name + PNPDeviceID + PowerManagementSupported + SmartBatteryVersion + Status + StatusInfo + SystemCreationClassName + SystemName + TimeOnBattery + TimeToFullCharge + + + BuildNumber + Caption + CodeSet + CurrentLanguage + Description + IdentificationCode + InstallableLanguages + InstallDate + LanguageEdition + Manufacturer + Name + OtherTargetOS + PrimaryBIOS + ReleaseDate + SerialNumber + SMBIOSBIOSVersion + SMBIOSMajorVersion + SMBIOSMinorVersion + SMBIOSPresent + SoftwareElementID + SoftwareElementState + Status + TargetOperatingSystem + Version + + + Availability + BusNum + BusType + Caption + ConfigManagerErrorCode + ConfigManagerUserConfig + CreationClassName + Description + DeviceID + ErrorCleared + ErrorDescription + InstallDate + LastErrorCode + Name + PNPDeviceID + PowerManagementSupported + Status + StatusInfo + SystemCreationClassName + SystemName + + + Availability + Caption + CompressionMethod + ConfigManagerErrorCode + ConfigManagerUserConfig + CreationClassName + DefaultBlockSize + Description + DeviceID + Drive + DriveIntegrity + ErrorCleared + ErrorDescription + ErrorMethodology + FileSystemFlags + FileSystemFlagsEx + InstallDate + LastErrorCode + Manufacturer + MaxBlockSize + MaximumComponentLength + MaxMediaSize + MediaLoaded + MediaType + MfrAssignedRevisionLevel + MinBlockSize + Name + NeedsCleaning + NumberOfMediaSupported + PNPDeviceID + PowerManagementSupported + RevisionLevel + SCSIBus + SCSILogicalUnit + SCSIPort + SCSITargetId + SerialNumber + Size + Status + StatusInfo + SystemCreationClassName + SystemName + TransferRate + VolumeName + VolumeSerialNumber + + + Availability + BytesPerSector + Capabilities[] + CapabilityDescriptions[] + Caption + CompressionMethod + ConfigManagerErrorCode + ConfigManagerUserConfig + CreationClassName + DefaultBlockSize + Description + DeviceID + ErrorCleared + ErrorDescription + ErrorMethodology + FirmwareRevision + Index + InstallDate + InterfaceType + LastErrorCode + Manufacturer + MaxBlockSize + MaxMediaSize + MediaLoaded + MediaType + MinBlockSize + Model + Name + NeedsCleaning + NumberOfMediaSupported + Partitions + PNPDeviceID + PowerManagementCapabilities[] + PowerManagementSupported + SCSIBus + SCSILogicalUnit + SCSIPort + SCSITargetId + SectorsPerTrack + SerialNumber + Signature + Size + Status + StatusInfo + SystemCreationClassName + SystemName + TotalCylinders + TotalHeads + TotalSectors + TotalTracks + TracksPerCylinder + + + 16AddressSize + 16Availability + BurstMode + 16ByteMode + Caption + 16ChannelTiming + CreationClassName + CSCreationClassName + CSName + Description + 32DMAChannel + InstallDate + 32MaxTransferSize + Name + 32Port + Status + 16TransferWidths[] + 16TypeCTiming + 16WordMode + + + ActiveCooling + Availability + Caption + ConfigManagerErrorCode + ConfigManagerUserConfig + CreationClassName + Description + DesiredSpeed + DeviceID + ErrorCleared + ErrorDescription + InstallDate + LastErrorCode + Name + PNPDeviceID + PowerManagementCapabilities[] + PowerManagementSupported + Status + StatusInfo + SystemCreationClassName + SystemName + VariableSpeed + + + Availability + Caption + ConfigManagerErrorCode + ConfigManagerUserConfig + CreationClassName + Description + DeviceID + ErrorCleared + ErrorDescription + InstallDate + LastErrorCode + Manufacturer + MaxNumberControlled + Name + PNPDeviceID + PowerManagementSupported + ProtocolSupported + Status + StatusInfo + SystemCreationClassName + SystemName + TimeOfLastReset + + + Availability + Caption + CompressionMethod + ConfigManagerErrorCode + ConfigManagerUserConfig + CreationClassName + DefaultBlockSize + Description + DeviceID + ErrorCleared + ErrorDescription + ErrorMethodology + InstallDate + LastErrorCode + Manufacturer + MaxBlockSize + MaxMediaSize + MinBlockSize + Name + NeedsCleaning + NumberOfMediaSupported + PNPDeviceID + PowerManagementCapabilities[] + PowerManagementSupported + Status + StatusInfo + SystemCreationClassName + SystemName + + + Availability + Caption + ConfigManagerErrorCode + ConfigManagerUserConfig + CreationClassName + Description + DeviceID + ErrorCleared + ErrorDescription + InstallDate + LastErrorCode + Manufacturer + MaxNumberControlled + Name + PNPDeviceID + PowerManagementCapabilities[] + PowerManagementSupported + ProtocolSupported + Status + StatusInfo + SystemCreationClassName + SystemName + TimeOfLastReset + + + Availability + Caption + CreationClassName + CSCreationClassName + CSName + Description + Hardware + InstallDate + IRQNumber + Name + Shareable + Status + TriggerLevel + TriggerType + Vector + + + Availability + Caption + ConfigManagerErrorCode + ConfigManagerUserConfig + CreationClassName + Description + DeviceID + ErrorCleared + ErrorDescription + InstallDate + IsLocked + LastErrorCode + Layout + Name + NumberOfFunctionKeys + Password + PNPDeviceID + PowerManagementSupported + Status + StatusInfo + SystemCreationClassName + SystemName + + + Access + AdditionalErrorData[] + Availability + BlockSize + Caption + ConfigManagerErrorCode + ConfigManagerUserConfig + CorrectableError + CreationClassName + Description + DeviceID + EndingAddress + ErrorAccess + ErrorAddress + ErrorCleared + ErrorDataOrder + ErrorDescription + ErrorGranularity + ErrorInfo + ErrorMethodology + ErrorResolution + ErrorTime + ErrorTransferSize + InstallDate + LastErrorCode + Name + NumberOfBlocks + OtherErrorDescription + PNPDeviceID + PowerManagementCapabilities[] + PowerManagementSupported + Purpose + StartingAddress + Status + StatusInfo + SystemCreationClassName + SystemLevelAddress + SystemName + + + AdapterType + AdapterTypeID + AutoSense + Availability + Caption + ConfigManagerErrorCode + ConfigManagerUserConfig + CreationClassName + Description + DeviceID + ErrorCleared + ErrorDescription + GUID + Index + InstallDate + Installed + InterfaceIndex + LastErrorCode + MACAddress + Manufacturer + MaxNumberControlled + MaxSpeed + Name + NetConnectionID + NetConnectionStatus + NetEnabled + NetworkAddresses[] + PermanentAddress + PhysicalAdapter + PNPDeviceID + PowerManagementCapabilities[] + PowerManagementSupported + ProductName + ServiceName + Speed + Status + StatusInfo + SystemCreationClassName + SystemName + TimeOfLastReset + + + ArpAlwaysSourceRoute + ArpUseEtherSNAP + Caption + DatabasePath + DeadGWDetectEnabled + DefaultIPGateway[] + DefaultTOS + DefaultTTL + Description + DHCPEnabled + DHCPLeaseExpires + DHCPLeaseObtained + DHCPServer + DNSDomain + DNSDomainSuffixSearchOrder[] + DNSEnabledForWINSResolution + DNSHostName + DNSServerSearchOrder[] + DomainDNSRegistrationEnabled + ForwardBufferMemory + FullDNSRegistrationEnabled + GatewayCostMetric[] + IGMPLevel + Index + InterfaceIndex + IPAddress[] + IPConnectionMetric + IPEnabled + IPFilterSecurityEnabled + IPPortSecurityEnabled + IPSecPermitIPProtocols[] + IPSecPermitTCPPorts[] + IPSecPermitUDPPorts[] + IPSubnet[] + IPUseZeroBroadcast + IPXAddress + IPXEnabled + IPXFrameType[] + IPXMediaType + IPXNetworkNumber[] + IPXVirtualNetNumber + KeepAliveInterval + KeepAliveTime + MACAddress + MTU + NumForwardPackets + PMTUBHDetectEnabled + PMTUDiscoveryEnabled + ServiceName + SettingID + TcpipNetbiosOptions + TcpMaxConnectRetransmissions + TcpMaxDataRetransmissions + TcpNumConnections + TcpUseRFC1122UrgentPointer + TcpWindowSize + WINSEnableLMHostsLookup + WINSHostLookupFile + WINSPrimaryServer + WINSScopeID + WINSSecondaryServer + + + Caption + CreationClassName + Description + DeviceType + Enabled + HotSwappable + InstallDate + Manufacturer + Model + Name + OtherIdentifyingInfo + PartNumber + PoweredOn + Removable + Replaceable + SerialNumber + SKU + Status + Tag + Version + + + Availability + Capabilities[] + CapabilityDescriptions[] + Caption + ConfigManagerErrorCode + ConfigManagerUserConfig + CreationClassName + Description + DeviceID + DMASupport + ErrorCleared + ErrorDescription + InstallDate + LastErrorCode + MaxNumberControlled + Name + OSAutoDiscovered + PNPDeviceID + PowerManagementCapabilities[] + PowerManagementSupported + ProtocolSupported + Status + StatusInfo + SystemCreationClassName + SystemName + TimeOfLastReset + + + Availability + Caption + ConfigManagerErrorCode + ConfigManagerUserConfig + CreationClassName + Description + DeviceID + ErrorCleared + ErrorDescription + InstallDate + LastErrorCode + Manufacturer + MaxNumberControlled + Name + PNPDeviceID + PowerManagementCapabilities[] + PowerManagementSupported + ProtocolSupported + Status + StatusInfo + SystemCreationClassName + SystemName + TimeOfLastReset + + + Caption + Description + InstallDate + Name + Status + CreationClassName + Manufacturer + Model + SKU + SerialNumber + Tag + Version + PartNumber + OtherIdentifyingInfo + PoweredOn + Removable + Replaceable + HotSwappable + Capacity + MediaType + MediaDescription + WriteProtectOn + CleanerMedia + + + BankLabel + Capacity + Caption + CreationClassName + DataWidth + Description + DeviceLocator + FormFactor + HotSwappable + InstallDate + InterleaveDataDepth + InterleavePosition + Manufacturer + MemoryType + Model + Name + OtherIdentifyingInfo + PartNumber + PositionInRow + PoweredOn + Removable + Replaceable + SerialNumber + SKU + Speed + Status + Tag + TotalWidth + TypeDetail + Version + + + Caption + ConnectorPinout + ConnectorType[] + CreationClassName + Description + ExternalReferenceDesignator + InstallDate + InternalReferenceDesignator + Manufacturer + Model + Name + OtherIdentifyingInfo + PartNumber + PortType + PoweredOn + SerialNumber + SKU + Status + Tag + Version + + + Alias + Caption + CreationClassName + CSCreationClassName + CSName + Description + EndingAddress + InstallDate + Name + StartingAddress + Status + + + AnswerMode + AttachedTo + Availability + BlindOff + BlindOn + Caption + CompatibilityFlags + CompressionInfo + CompressionOff + CompressionOn + ConfigManagerErrorCode + ConfigManagerUserConfig + ConfigurationDialog + CountriesSupported[] + CountrySelected + CreationClassName + CurrentPasswords[] + DCB[] + Default[] + Description + DeviceID + DeviceLoader + DeviceType + DialType + DriverDate + ErrorCleared + ErrorControlForced + ErrorControlInfo + ErrorControlOff + ErrorControlOn + ErrorDescription + FlowControlHard + FlowControlOff + FlowControlSoft + InactivityScale + InactivityTimeout + Index + InstallDate + LastErrorCode + MaxBaudRateToPhone + MaxBaudRateToSerialPort + MaxNumberOfPasswords + Model + ModemInfPath + ModemInfSection + ModulationBell + ModulationCCITT + ModulationScheme + Name + PNPDeviceID + PortSubClass + PowerManagementCapabilities[] + PowerManagementSupported + Prefix + Properties[] + ProviderName + Pulse + Reset + ResponsesKeyName + RingsBeforeAnswer + SpeakerModeDial + SpeakerModeOff + SpeakerModeOn + SpeakerModeSetup + SpeakerVolumeHigh + SpeakerVolumeInfo + SpeakerVolumeLow + SpeakerVolumeMed + Status + StatusInfo + StringFormat + SupportsCallback + SupportsSynchronousConnect + SystemCreationClassName + SystemName + Terminator + TimeOfLastReset + Tone + VoiceSwitchFeature + + + AddressWidth + Architecture + Availability + Caption + ConfigManagerErrorCode + ConfigManagerUserConfig + CpuStatus + CreationClassName + CurrentClockSpeed + CurrentVoltage + DataWidth + Description + DeviceID + ErrorCleared + ErrorDescription + ExtClock + Family + InstallDate + L2CacheSize + L2CacheSpeed + L3CacheSize + L3CacheSpeed + LastErrorCode + Level + LoadPercentage + Manufacturer + MaxClockSpeed + Name + NumberOfCores + NumberOfLogicalProcessors + OtherFamilyDescription + PNPDeviceID + PowerManagementSupported + ProcessorId + ProcessorType + Revision + Role + SocketDesignation + Status + StatusInfo + Stepping + SystemCreationClassName + SystemName + UniqueId + UpgradeMethod + Version + VoltageCaps + + + Availability + Caption + ConfigManagerErrorCode + ConfigManagerUserConfig + ControllerTimeouts + CreationClassName + Description + DeviceID + DeviceMap + DriverName + ErrorCleared + ErrorDescription + HardwareVersion + Index + InstallDate + LastErrorCode + Manufacturer + MaxDataWidth + MaxNumberControlled + MaxTransferRate + Name + PNPDeviceID + PowerManagementCapabilities[] + PowerManagementSupported + ProtectionManagement + ProtocolSupported + Status + StatusInfo + SystemCreationClassName + SystemName + TimeOfLastReset + + + Availability + Binary + Capabilities[] + CapabilityDescriptions[] + Caption + ConfigManagerErrorCode + ConfigManagerUserConfig + CreationClassName + Description + DeviceID + ErrorCleared + ErrorDescription + InstallDate + LastErrorCode + MaxBaudRate + MaximumInputBufferSize + MaximumOutputBufferSize + MaxNumberControlled + Name + OSAutoDiscovered + PNPDeviceID + PowerManagementCapabilities[] + PowerManagementSupported + ProtocolSupported + ProviderType + SettableBaudRate + SettableDataBits + SettableFlowControl + SettableParity + SettableParityCheck + SettableRLSD + SettableStopBits + Status + StatusInfo + Supports16BitMode + SupportsDTRDSR + SupportsElapsedTimeouts + SupportsIntTimeouts + SupportsParityCheck + SupportsRLSD + SupportsRTSCTS + SupportsSpecialCharacters + SupportsXOnXOff + SupportsXOnXOffSet + SystemCreationClassName + SystemName + TimeOfLastReset + + + AbortReadWriteOnError + BaudRate + BinaryModeEnabled + BitsPerByte + Caption + ContinueXMitOnXOff + CTSOutflowControl + Description + DiscardNULLBytes + DSROutflowControl + DSRSensitivity + DTRFlowControlType + EOFCharacter + ErrorReplaceCharacter + ErrorReplacementEnabled + EventCharacter + IsBusy + Name + Parity + ParityCheckEnabled + RTSFlowControlType + SettingID + StopBits + XOffCharacter + XOffXMitThreshold + XOnCharacter + XOnXMitThreshold + XOnXOffInFlowControl + XOnXOffOutFlowControl + + + Availability + Caption + ConfigManagerErrorCode + ConfigManagerUserConfig + CreationClassName + Description + DeviceID + DMABufferSize + ErrorCleared + ErrorDescription + InstallDate + LastErrorCode + Manufacturer + MPU401Address + Name + PNPDeviceID + PowerManagementCapabilities[] + PowerManagementSupported + ProductName + Status + StatusInfo + SystemCreationClassName + SystemName + + + AudibleAlarm + BreachDescription + CableManagementStrategy + Caption + ChassisTypes[] + CreationClassName + CurrentRequiredOrProduced + Depth + Description + HeatGeneration + Height + HotSwappable + InstallDate + LockPresent + Manufacturer + Model + Name + NumberOfPowerCords + OtherIdentifyingInfo + PartNumber + PoweredOn + Removable + Replaceable + SecurityBreach + SecurityStatus + SerialNumber + ServiceDescriptions[] + ServicePhilosophy[] + SKU + SMBIOSAssetTag + Status + Tag + TypeDescriptions[] + Version + VisibleAlarm + Weight + Width + + + Availability + Capabilities[] + CapabilityDescriptions[] + Caption + Compression + CompressionMethod + ConfigManagerErrorCode + ConfigManagerUserConfig + CreationClassName + DefaultBlockSize + Description + DeviceID + ECC + EOTWarningZoneSize + ErrorCleared + ErrorDescription + ErrorMethodology + FeaturesHigh + FeaturesLow + Id + InstallDate + LastErrorCode + Manufacturer + MaxBlockSize + MaxMediaSize + MaxPartitionCount + MediaType + MinBlockSize + Name + NeedsCleaning + NumberOfMediaSupported + Padding + PNPDeviceID + PowerManagementCapabilities[] + PowerManagementSupported + ReportSetMarks + Status + StatusInfo + SystemCreationClassName + SystemName + + + Accuracy + Availability + Caption + ConfigManagerErrorCode + ConfigManagerUserConfig + CreationClassName + CurrentReading + Description + DeviceID + ErrorCleared + ErrorDescription + InstallDate + IsLinear + LastErrorCode + LowerThresholdCritical + LowerThresholdFatal + LowerThresholdNonCritical + MaxReadable + MinReadable + Name + NominalReading + NormalMax + NormalMin + PNPDeviceID + PowerManagementCapabilities[] + PowerManagementSupported + Resolution + Status + StatusInfo + SystemCreationClassName + SystemName + Tolerance + UpperThresholdCritical + UpperThresholdFatal + UpperThresholdNonCritical + + + ActiveInputVoltage + Availability + BatteryInstalled + CanTurnOffRemotely + Caption + CommandFile + ConfigManagerErrorCode + ConfigManagerUserConfig + CreationClassName + Description + DeviceID + ErrorCleared + ErrorDescription + EstimatedChargeRemaining + EstimatedRunTime + FirstMessageDelay + InstallDate + IsSwitchingSupply + LastErrorCode + LowBatterySignal + MessageInterval + Name + PNPDeviceID + PowerFailSignal + PowerManagementCapabilities[] + PowerManagementSupported + Range1InputFrequencyHigh + Range1InputFrequencyLow + Range1InputVoltageHigh + Range1InputVoltageLow + Range2InputFrequencyHigh + Range2InputFrequencyLow + Range2InputVoltageHigh + Range2InputVoltageLow + RemainingCapacityStatus + Status + StatusInfo + SystemCreationClassName + SystemName + TimeOnBackup + TotalOutputPower + TypeOfRangeSwitching + UPSPort + + + Availability + Caption + ConfigManagerErrorCode + ConfigManagerUserConfig + CreationClassName + Description + DeviceID + ErrorCleared + ErrorDescription + InstallDate + LastErrorCode + Manufacturer + MaxNumberControlled + Name + PNPDeviceID + PowerManagementCapabilities[] + PowerManagementSupported + ProtocolSupported + Status + StatusInfo + SystemCreationClassName + SystemName + TimeOfLastReset + + + Availability + Caption + ClassCode + ConfigManagerErrorCode + ConfigManagerUserCode + CreationClassName + CurrentAlternativeSettings + CurrentConfigValue + Description + DeviceID + ErrorCleared + ErrorDescription + GangSwitched + InstallDate + LastErrorCode + Name + NumberOfConfigs + NumberOfPorts + PNPDeviceID + PowerManagementCapabilities[] + PowerManagementSupported + ProtocolCode + Status + StatusInfo + SubclassCode + SystemCreationClassName + SystemName + USBVersion + + + AcceleratorCapabilities[] + AdapterCompatibility + AdapterDACType + AdapterRAM + Availability + CapabilityDescriptions[] + Caption + ColorTableEntries + ConfigManagerErrorCode + ConfigManagerUserConfig + CreationClassName + CurrentBitsPerPixel + CurrentHorizontalResolution + CurrentNumberOfColors + CurrentNumberOfColumns + CurrentNumberOfRows + CurrentRefreshRate + CurrentScanMode + CurrentVerticalResolution + Description + DeviceID + DeviceSpecificPens + DitherType + DriverDate + DriverVersion + ErrorCleared + ErrorDescription + ICMIntent + ICMMethod + InfFilename + InfSection + InstallDate + InstalledDisplayDrivers + LastErrorCode + MaxMemorySupported + MaxNumberControlled + MaxRefreshRate + MinRefreshRate + Monochrome + Name + NumberOfColorPlanes + NumberOfVideoPages + PNPDeviceID + PowerManagementCapabilities[] + PowerManagementSupported + ProtocolSupported + ReservedSystemPaletteEntries + SpecificationVersion + Status + StatusInfo + SystemCreationClassName + SystemName + SystemPaletteEntries + TimeOfLastReset + VideoArchitecture + VideoMemoryType + VideoMode + VideoModeDescription + VideoProcessor + + + Accuracy + Availability + Caption + ConfigManagerErrorCode + ConfigManagerUserConfig + CreationClassName + CurrentReading + Description + DeviceID + ErrorCleared + ErrorDescription + InstallDate + IsLinear + LastErrorCode + LowerThresholdCritical + LowerThresholdFatal + LowerThresholdNonCritical + MaxReadable + MinReadable + Name + NominalReading + NormalMax + NormalMin + PNPDeviceID + PowerManagementCapabilities[] + PowerManagementSupported + Resolution + Status + StatusInfo + SystemCreationClassName + SystemName + Tolerance + UpperThresholdCritical + UpperThresholdFatal + UpperThresholdNonCritical + + + + + + diff --git a/Software/Visual_Studio/Tango.sln b/Software/Visual_Studio/Tango.sln index f29a631e2..d1ef102ad 100644 --- a/Software/Visual_Studio/Tango.sln +++ b/Software/Visual_Studio/Tango.sln @@ -365,6 +365,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebRtc.NET", "SideChains\We EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.WebRTC", "Tango.WebRTC\Tango.WebRTC.csproj", "{09F81A12-0F77-4336-854D-9E0A74A17F9E}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.SystemInfo", "Tango.SystemInfo\Tango.SystemInfo.csproj", "{997A961C-BEDA-4B56-AA0F-C39E532F7FFA}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution AppVeyor|Any CPU = AppVeyor|Any CPU @@ -6491,6 +6493,46 @@ Global {09F81A12-0F77-4336-854D-9E0A74A17F9E}.Release|x64.Build.0 = Release|Any CPU {09F81A12-0F77-4336-854D-9E0A74A17F9E}.Release|x86.ActiveCfg = Release|Any CPU {09F81A12-0F77-4336-854D-9E0A74A17F9E}.Release|x86.Build.0 = Release|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.AppVeyor|Any CPU.ActiveCfg = Release|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.AppVeyor|Any CPU.Build.0 = Release|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.AppVeyor|ARM.ActiveCfg = Release|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.AppVeyor|ARM.Build.0 = Release|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.AppVeyor|ARM64.ActiveCfg = Release|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.AppVeyor|ARM64.Build.0 = Release|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.AppVeyor|x64.ActiveCfg = Release|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.AppVeyor|x64.Build.0 = Release|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.AppVeyor|x86.ActiveCfg = Release|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.AppVeyor|x86.Build.0 = Release|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.Debug|ARM.ActiveCfg = Debug|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.Debug|ARM.Build.0 = Debug|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.Debug|ARM64.Build.0 = Debug|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.Debug|x64.ActiveCfg = Debug|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.Debug|x64.Build.0 = Debug|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.Debug|x86.ActiveCfg = Debug|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.Debug|x86.Build.0 = Debug|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.DefaultBuild|Any CPU.ActiveCfg = Debug|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.DefaultBuild|Any CPU.Build.0 = Debug|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.DefaultBuild|ARM.ActiveCfg = Debug|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.DefaultBuild|ARM.Build.0 = Debug|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.DefaultBuild|ARM64.ActiveCfg = Debug|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.DefaultBuild|ARM64.Build.0 = Debug|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.DefaultBuild|x64.ActiveCfg = Debug|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.DefaultBuild|x64.Build.0 = Debug|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.DefaultBuild|x86.ActiveCfg = Debug|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.DefaultBuild|x86.Build.0 = Debug|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.Release|Any CPU.Build.0 = Release|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.Release|ARM.ActiveCfg = Release|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.Release|ARM.Build.0 = Release|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.Release|ARM64.ActiveCfg = Release|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.Release|ARM64.Build.0 = Release|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.Release|x64.ActiveCfg = Release|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.Release|x64.Build.0 = Release|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.Release|x86.ActiveCfg = Release|Any CPU + {997A961C-BEDA-4B56-AA0F-C39E532F7FFA}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -6615,12 +6657,12 @@ Global {A07E6CB4-0132-4EB1-9A38-C8C057884DC2} = {EC62BC9C-F2FE-4333-B7E4-110E38D43958} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution - 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 + 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} EndGlobalSection EndGlobal -- cgit v1.3.1