diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-03-12 17:15:11 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-03-12 17:15:11 +0200 |
| commit | 755f37e3e3e553a91dd2c5a7f0ddad8359287a3b (patch) | |
| tree | 0f9fe447c75a86ff4b647df31bf49b64dd12ee42 | |
| parent | e774f9a90fd812a9de8c3efe966a759bee8be703 (diff) | |
| download | Tango-755f37e3e3e553a91dd2c5a7f0ddad8359287a3b.tar.gz Tango-755f37e3e3e553a91dd2c5a7f0ddad8359287a3b.zip | |
Working on FSE/PPC monitoring/system info.
95 files changed, 4156 insertions, 54 deletions
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 @@ <ResourceDictionary Source="pack://application:,,,/Tango.FSE.Common;component/Resources/Images.xaml" /> <ResourceDictionary Source="pack://application:,,,/Tango.FSE.Common;component/Resources/Styles.xaml" /> <ResourceDictionary Source="pack://application:,,,/Tango.FSE.Common;component/Resources/Controls.xaml" /> + <ResourceDictionary Source="pack://application:,,,/Tango.FSE.Common;component/Resources/Graphs.xaml" /> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Application.Resources> 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>() { (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 @@ <Reference Include="Google.Protobuf, Version=3.4.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL"> <HintPath>..\..\..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll</HintPath> </Reference> + <Reference Include="LiveCharts, Version=0.9.7.0, Culture=neutral, PublicKeyToken=0bc1f845d1ebb8df, processorArchitecture=MSIL"> + <HintPath>..\..\..\packages\LiveCharts.0.9.7\lib\net45\LiveCharts.dll</HintPath> + </Reference> + <Reference Include="LiveCharts.Wpf, Version=0.9.7.0, Culture=neutral, PublicKeyToken=0bc1f845d1ebb8df, processorArchitecture=MSIL"> + <HintPath>..\..\..\packages\LiveCharts.Wpf.0.9.7\lib\net45\LiveCharts.Wpf.dll</HintPath> + </Reference> <Reference Include="MahApps.Metro, Version=1.6.5.1, Culture=neutral, processorArchitecture=MSIL"> <HintPath>..\..\..\packages\MahApps.Metro.1.6.5\lib\net46\MahApps.Metro.dll</HintPath> </Reference> @@ -98,10 +104,12 @@ <Reference Include="PresentationFramework" /> </ItemGroup> <ItemGroup> + <Compile Include="Converters\DoubleToChartValuesConverter.cs" /> <Compile Include="ViewModelLocator.cs" /> <Compile Include="PPCConsoleModule.cs" /> <Compile Include="ViewModels\ConsoleViewVM.cs" /> <Compile Include="ViewModels\MainViewVM.cs" /> + <Compile Include="ViewModels\MonitoringViewVM.cs" /> <Compile Include="ViewModels\RemoteDesktopViewVM.cs" /> <Compile Include="Views\ConsoleView.xaml.cs"> <DependentUpon>ConsoleView.xaml</DependentUpon> @@ -109,6 +117,9 @@ <Compile Include="Views\MainView.xaml.cs"> <DependentUpon>MainView.xaml</DependentUpon> </Compile> + <Compile Include="Views\MonitoringView.xaml.cs"> + <DependentUpon>MonitoringView.xaml</DependentUpon> + </Compile> <Compile Include="Views\RemoteDesktopView.xaml.cs"> <DependentUpon>RemoteDesktopView.xaml</DependentUpon> </Compile> @@ -143,6 +154,14 @@ </None> </ItemGroup> <ItemGroup> + <ProjectReference Include="..\..\..\SideChains\RealTimeGraphX-master\RealTimeGraphX.WPF\RealTimeGraphX.WPF.csproj"> + <Project>{6b9774f7-960d-438e-ad81-c6b9be328d50}</Project> + <Name>RealTimeGraphX.WPF</Name> + </ProjectReference> + <ProjectReference Include="..\..\..\SideChains\RealTimeGraphX-master\RealTimeGraphX\RealTimeGraphX.csproj"> + <Project>{f13a489c-80ee-4cd0-bdd4-92d959215646}</Project> + <Name>RealTimeGraphX</Name> + </ProjectReference> <ProjectReference Include="..\..\..\SideChains\Tango.AutoComplete\Tango.AutoComplete.csproj"> <Project>{bb2abb74-ba58-4812-83aa-ec8171f42df4}</Project> <Name>Tango.AutoComplete</Name> @@ -183,6 +202,10 @@ <Project>{8491d07b-c1f6-4b62-a412-41b9fd2d6538}</Project> <Name>Tango.SharedUI</Name> </ProjectReference> + <ProjectReference Include="..\..\..\Tango.SystemInfo\Tango.SystemInfo.csproj"> + <Project>{997a961c-beda-4b56-aa0f-c39e532f7ffa}</Project> + <Name>Tango.SystemInfo</Name> + </ProjectReference> <ProjectReference Include="..\..\..\Tango.Transport\Tango.Transport.csproj"> <Project>{74e700b0-1156-4126-be40-ee450d3c3026}</Project> <Name>Tango.Transport</Name> @@ -213,6 +236,10 @@ <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> + <Page Include="Views\MonitoringView.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> <Page Include="Views\RemoteDesktopView.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> 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<MainViewVM>(); TangoIOC.Default.Register<ConsoleViewVM>(); TangoIOC.Default.Register<RemoteDesktopViewVM>(); + TangoIOC.Default.Register<MonitoringViewVM>(); } public static MainViewVM MainViewVM @@ -40,5 +41,13 @@ namespace Tango.FSE.PPCConsole return TangoIOC.Default.GetInstance<RemoteDesktopViewVM>(); } } + + public static MonitoringViewVM MonitoringViewVM + { + get + { + return TangoIOC.Default.GetInstance<MonitoringViewVM>(); + } + } } } 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<DateTimeDataPoint, DoubleDataPoint> CPUController { get; set; } + + public WpfGraphController<DateTimeDataPoint, DoubleDataPoint> RAMController { get; set; } + + public Func<ChartPoint, string> 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<DateTimeDataPoint, DoubleDataPoint> CreateController(params WpfGraphDataSeries[] seriesCollection) + { + var controller = new WpfGraphController<DateTimeDataPoint, DoubleDataPoint>(); + + 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<DateTimeDataPoint> xx = new List<DateTimeDataPoint>() + { + DateTime.Now, + DateTime.Now + }; + + //CPU + CPUController.PushData(xx, new List<DoubleDataPoint>() + { + e.Package.CPU, + e.Package.ApplicationCPU + }); + + //App RAM + RAMController.Range.MaximumY = e.Package.MaxRAM; + RAMController.PushData(xx, new List<DoubleDataPoint>() + { + 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 @@ <local:ConsoleView Tag="COMMAND PROMPT" /> <local:RemoteDesktopView Tag="REMOTE DESKTOP" /> <ContentControl Tag="FILE SYSTEM" /> - <ContentControl Tag="MONITORING" /> + <local:MonitoringView Tag="MONITORING" /> <ContentControl Tag="UPDATES" /> </commonControls:FSETabControl> 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 @@ +<UserControl x:Class="Tango.FSE.PPCConsole.Views.MonitoringView" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:graphs="clr-namespace:Tango.FSE.Common.Graphs;assembly=Tango.FSE.Common" + xmlns:global="clr-namespace:Tango.FSE.PPCConsole" + xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf" + xmlns:vm="clr-namespace:Tango.FSE.PPCConsole.ViewModels" + xmlns:converters="clr-namespace:Tango.FSE.PPCConsole.Converters" + xmlns:controls="clr-namespace:Tango.FSE.Common.Controls;assembly=Tango.FSE.Common" + xmlns:local="clr-namespace:Tango.FSE.PPCConsole.Views" + mc:Ignorable="d" + d:DesignHeight="720" d:DesignWidth="1280" d:DataContext="{d:DesignInstance Type=vm:MonitoringViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MonitoringViewVM}"> + + <UserControl.Resources> + + <converters:DoubleToChartValuesConverter x:Key="DoubleToChartValuesConverter" /> + + <Style x:Key="DynamicResolutionGraph" TargetType="graphs:RealTimeGraph" BasedOn="{StaticResource {x:Type graphs:RealTimeGraph}}"> + <Setter Property="VerticalTicks" Value="11"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding ResolutionService.IsLowResolution}" Value="True"> + <Setter Property="VerticalTicks" Value="5"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + + <Style x:Key="ItemsPanel_Legends" TargetType="ItemsControl"> + <Setter Property="Margin" Value="40"></Setter> + <Setter Property="HorizontalAlignment" Value="Right"></Setter> + <Setter Property="VerticalAlignment" Value="Top"></Setter> + <Setter Property="ItemsPanel"> + <Setter.Value> + <ItemsPanelTemplate> + <StackPanel Orientation="Horizontal"></StackPanel> + </ItemsPanelTemplate> + </Setter.Value> + </Setter> + <Setter Property="ItemTemplate"> + <Setter.Value> + <DataTemplate> + <StackPanel Orientation="Horizontal" Margin="0 0 20 0"> + <Ellipse Width="10" Height="10" Fill="{Binding Fill}" /> + <TextBlock Opacity="0.5" FontWeight="SemiBold" Margin="5 0 0 0" FontSize="{StaticResource FSE_SmallFontSize}" Text="{Binding Name}"></TextBlock> + </StackPanel> + </DataTemplate> + </Setter.Value> + </Setter> + </Style> + </UserControl.Resources> + + <Grid> + <Grid Margin="20 20 20 0"> + <Grid.RowDefinitions> + <RowDefinition Height="1*"/> + <RowDefinition Height="1*"/> + </Grid.RowDefinitions> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="1*"/> + <ColumnDefinition Width="1*"/> + </Grid.ColumnDefinitions> + + <Grid Margin="0 0 20 0"> + <graphs:RealTimeGraph Style="{StaticResource DynamicResolutionGraph}" Controller="{Binding CPUController}" StringFormat="0\%"/> + + <ItemsControl Style="{StaticResource ItemsPanel_Legends}" ItemsSource="{Binding CPUController.DataSeriesCollection}"/> + + <Viewbox IsHitTestVisible="False" Margin="90 50 90 90" Stretch="Uniform"> + <Grid Width="200" Height="200"> + <Ellipse Stroke="#38FFFFFF" StrokeThickness="20" /> + + <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center"> + <TextBlock Opacity="0.8" HorizontalAlignment="Center" VerticalAlignment="Center" FontWeight="SemiBold" FontSize="25" Text="{Binding CPUController.DataSeriesCollection[0].CurrentValue,StringFormat='\{0\}%'}"></TextBlock> + <Rectangle Width="120" Margin="0 5" VerticalAlignment="Center" Stroke="{StaticResource FSE_PrimaryForegroundBrush}" StrokeThickness="1" /> + <TextBlock Opacity="0.8" HorizontalAlignment="Center" VerticalAlignment="Center" FontWeight="SemiBold" FontSize="25" Text="{Binding CPUController.DataSeriesCollection[1].CurrentValue,StringFormat='\{0\}%'}"></TextBlock> + </StackPanel> + </Grid> + </Viewbox> + + <TextBlock Foreground="{StaticResource FSE_PrimaryAccentBrush}" Margin="100 30" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="{StaticResource FSE_LargeFontSize}" FontWeight="SemiBold">CPU</TextBlock> + </Grid> + + <Grid Margin="20 0 0 0" Grid.Column="1"> + <graphs:RealTimeGraph Style="{StaticResource DynamicResolutionGraph}" Controller="{Binding RAMController}" StringFormat="0 \MB" /> + + <ItemsControl Style="{StaticResource ItemsPanel_Legends}" ItemsSource="{Binding RAMController.DataSeriesCollection}"/> + + <Viewbox IsHitTestVisible="False" Margin="90 50 90 90" Stretch="Uniform"> + <Grid Width="200" Height="200"> + <Ellipse Stroke="#38FFFFFF" StrokeThickness="20" /> + + <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center"> + <TextBlock Opacity="0.8" HorizontalAlignment="Center" VerticalAlignment="Center" FontWeight="SemiBold" FontSize="25" Text="{Binding RAMController.DataSeriesCollection[0].CurrentValue,StringFormat='\{0\} MB'}"></TextBlock> + <Rectangle Width="120" Margin="0 5" VerticalAlignment="Center" Stroke="{StaticResource FSE_PrimaryForegroundBrush}" StrokeThickness="1" /> + <TextBlock Opacity="0.8" HorizontalAlignment="Center" VerticalAlignment="Center" FontWeight="SemiBold" FontSize="25" Text="{Binding RAMController.DataSeriesCollection[1].CurrentValue,StringFormat='\{0\} MB'}"></TextBlock> + </StackPanel> + </Grid> + </Viewbox> + + <TextBlock Foreground="{StaticResource FSE_PrimaryAccentBrush}" Margin="100 30" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="{StaticResource FSE_LargeFontSize}" FontWeight="SemiBold">RAM</TextBlock> + </Grid> + + <Grid Grid.Row="1" Grid.ColumnSpan="2" Margin="0 40 0 0"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="2*"/> + <ColumnDefinition Width="8*"/> + </Grid.ColumnDefinitions> + + <Grid> + <DockPanel> + + <TextBlock DockPanel.Dock="Top" Foreground="{StaticResource FSE_GrayBrush}" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="{StaticResource FSE_LargeFontSize}" FontWeight="SemiBold">AVAILABLE DISK SPACE</TextBlock> + + <lvc:PieChart Opacity="0.7" DisableAnimations="True" LegendLocation="Bottom" Hoverable="False" DataTooltip="{x:Null}" HorizontalAlignment="Left" Width="250"> + <lvc:PieChart.Series> + <lvc:PieSeries Foreground="{StaticResource FSE_PrimaryForegroundBrush}" Stroke="{StaticResource FSE_PrimaryBackgroundBrush}" Fill="#F47FD121" FontSize="16" Title="Free" Values="{Binding AvailableDiskSpace,Converter={StaticResource DoubleToChartValuesConverter}}" DataLabels="True" + LabelPoint="{Binding DiskSpacePointLabel}"/> + <lvc:PieSeries Foreground="{StaticResource FSE_PrimaryForegroundBrush}" Stroke="{StaticResource FSE_PrimaryBackgroundBrush}" Fill="#FF4F4F" FontSize="16" Title="Used" Values="{Binding UsedDiskSpace,Converter={StaticResource DoubleToChartValuesConverter}}" DataLabels="True" + LabelPoint="{Binding DiskSpacePointLabel}"/> + </lvc:PieChart.Series> + </lvc:PieChart> + </DockPanel> + </Grid> + + <Grid Grid.Column="1"> + <DockPanel> + <TextBlock DockPanel.Dock="Top" Foreground="{StaticResource FSE_GrayBrush}" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="{StaticResource FSE_LargeFontSize}" FontWeight="SemiBold">SYSTEM INFORMATION</TextBlock> + + <controls:FSEPanel Margin="0 10 0 0" Padding="20" > + <Grid> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="200"/> + <ColumnDefinition Width="1*"/> + </Grid.ColumnDefinitions> + + <ListBox ItemsSource="{Binding SystemInfo.System}" SelectedItem="{Binding SelectedSystemObjectCollection}"> + <ListBox.ItemTemplate> + <DataTemplate> + <TextBlock Text="{Binding Name}"></TextBlock> + </DataTemplate> + </ListBox.ItemTemplate> + </ListBox> + + <ScrollViewer Margin="40 0 0 0" Grid.Column="1" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled"> + <ItemsControl ItemsSource="{Binding SelectedSystemObjectCollection.Objects}"> + <ItemsControl.ItemsPanel> + <ItemsPanelTemplate> + <StackPanel Orientation="Horizontal" IsItemsHost="True"></StackPanel> + </ItemsPanelTemplate> + </ItemsControl.ItemsPanel> + <ItemsControl.ItemTemplate> + <DataTemplate> + <DockPanel Width="250" Margin="10 0 0 0"> + <TextBlock TextTrimming="CharacterEllipsis" DockPanel.Dock="Top" Text="{Binding Name}" Foreground="{StaticResource FSE_GrayBrush}"></TextBlock> + <Border TextElement.FontSize="{StaticResource FSE_SmallFontSize}" Margin="0 5 0 0" Padding="3" BorderThickness="1" BorderBrush="{StaticResource FSE_BorderBrush}" CornerRadius="5"> + <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto"> + <ItemsControl Opacity="0.7" ItemsSource="{Binding Properties}"> + <ItemsControl.ItemTemplate> + <DataTemplate> + <DockPanel> + <TextBlock FontWeight="SemiBold" HorizontalAlignment="Left"> + <Run Text="{Binding Name}"></Run><Run>:</Run> + </TextBlock> + <TextBlock HorizontalAlignment="Right" Text="{Binding Value}"></TextBlock> + </DockPanel> + </DataTemplate> + </ItemsControl.ItemTemplate> + </ItemsControl> + </ScrollViewer> + </Border> + </DockPanel> + </DataTemplate> + </ItemsControl.ItemTemplate> + </ItemsControl> + </ScrollViewer> + </Grid> + </controls:FSEPanel> + </DockPanel> + </Grid> + </Grid> + </Grid> + </Grid> +</UserControl> 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 +{ + /// <summary> + /// Interaction logic for MonitoringView.xaml + /// </summary> + public partial class MonitoringView : UserControl + { + public Func<ChartPoint, string> 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 @@ <package id="Dragablz" version="0.0.3.203" targetFramework="net461" /> <package id="EntityFramework" version="6.2.0" targetFramework="net461" /> <package id="Google.Protobuf" version="3.4.1" targetFramework="net461" /> + <package id="LiveCharts" version="0.9.7" targetFramework="net461" /> + <package id="LiveCharts.Wpf" version="0.9.7" targetFramework="net461" /> <package id="MahApps.Metro" version="1.6.5" targetFramework="net461" /> <package id="MaterialDesignColors" version="1.2.2" targetFramework="net461" /> <package id="MaterialDesignThemes" version="3.0.1" targetFramework="net461" /> 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 @@ +<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:local="clr-namespace:Tango.FSE.Common.Controls"> + + <Style TargetType="{x:Type local:FSEPanel}"> + <Setter Property="BorderBrush" Value="{StaticResource FSE_Panel_BorderBrush}"></Setter> + <Setter Property="BorderThickness" Value="1"></Setter> + <Setter Property="Background" Value="{StaticResource FSE_Panel_BackgroundBrush}"></Setter> + <Setter Property="CornerRadius" Value="5"></Setter> + <Setter Property="ScrewSize" Value="10"></Setter> + <Setter Property="ScrewMargin" Value="8"></Setter> + <Setter Property="Padding" Value="15"></Setter> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type local:FSEPanel}"> + <Grid> + <Border Background="{TemplateBinding Background}" + BorderBrush="{TemplateBinding BorderBrush}" + BorderThickness="{TemplateBinding BorderThickness}" + Padding="{TemplateBinding Padding}" + CornerRadius="{TemplateBinding CornerRadius}"> + <ContentPresenter Content="{TemplateBinding Content}"/> + </Border> + + <Image HorizontalAlignment="Left" VerticalAlignment="Top" Margin="{TemplateBinding ScrewMargin}" Source="{StaticResource FSE_Screw}" RenderOptions.BitmapScalingMode="Fant" Width="{TemplateBinding ScrewSize}" Height="{TemplateBinding ScrewSize}" /> + <Image HorizontalAlignment="Right" VerticalAlignment="Top" Margin="{TemplateBinding ScrewMargin}" Source="{StaticResource FSE_Screw}" RenderOptions.BitmapScalingMode="Fant" Width="{TemplateBinding ScrewSize}" Height="{TemplateBinding ScrewSize}" /> + + <Image HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="{TemplateBinding ScrewMargin}" Source="{StaticResource FSE_Screw}" RenderOptions.BitmapScalingMode="Fant" Width="{TemplateBinding ScrewSize}" Height="{TemplateBinding ScrewSize}" /> + <Image HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="{TemplateBinding ScrewMargin}" Source="{StaticResource FSE_Screw}" RenderOptions.BitmapScalingMode="Fant" Width="{TemplateBinding ScrewSize}" Height="{TemplateBinding ScrewSize}" /> + </Grid> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> + +</ResourceDictionary>
\ 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; @@ -99,6 +100,12 @@ namespace Tango.FSE.Common public IPerformanceProvider PerformanceProvider { get; set; } /// <summary> + /// Gets or sets the system information provider. + /// </summary> + [TangoInject] + public ISystemInfoProvider SystemInfoProvider { get; set; } + + /// <summary> /// Gets or sets the resolution service. /// </summary> [TangoInject] 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 + { + /// <summary> + /// Gets or sets the graph controller. + /// </summary> + 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)); + + + /// <summary> + /// Gets or sets the string format of the y-axis. + /// </summary> + 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")); + + + /// <summary> + /// Gets or sets the display name. + /// </summary> + 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)); + + + /// <summary> + /// Gets or sets the display units. + /// </summary> + 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)); + + /// <summary> + /// Gets or sets the graph label visibility. + /// </summary> + 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)); + + + /// <summary> + /// Gets or sets the vertical ticks. + /// </summary> + 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)); + + + /// <summary> + /// Gets or sets the horizontal ticks. + /// </summary> + 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)); + + + /// <summary> + /// Initializes the <see cref="RealTimeGraph"/> class. + /// </summary> + 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 @@ +<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:realTimeGraphX="clr-namespace:RealTimeGraphX.WPF;assembly=RealTimeGraphX.WPF" + xmlns:local="clr-namespace:Tango.FSE.Common.Graphs"> + + + <Style TargetType="{x:Type local:RealTimeGraph}"> + <Setter Property="BorderThickness" Value="1"></Setter> + <Setter Property="BorderBrush" Value="{StaticResource FSE_RealTimeGraph_OuterBorderBrush}"></Setter> + <Setter Property="Padding" Value="20 20 30 20"></Setter> + <Setter Property="FontSize" Value="11"></Setter> + <Setter Property="Foreground" Value="{StaticResource FSE_RealTimeGraph_ForegroundBrush}"></Setter> + <Setter Property="Background" Value="{StaticResource FSE_RealTimeGraph_BackgroundBrush}"></Setter> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type local:RealTimeGraph}"> + <Grid> + <Border Background="{TemplateBinding Background}" + BorderBrush="{TemplateBinding BorderBrush}" + BorderThickness="{TemplateBinding BorderThickness}" + CornerRadius="5" + Padding="{TemplateBinding Padding}"> + <Grid> + <Grid.RowDefinitions> + <RowDefinition Height="1*"/> + <RowDefinition Height="35"/> + </Grid.RowDefinitions> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="70"/> + <ColumnDefinition Width="1*"/> + </Grid.ColumnDefinitions> + + <Grid Grid.Column="1"> + <realTimeGraphX:WpfGraphGridLines Controller="{TemplateBinding Controller}" Foreground="{StaticResource FSE_RealTimeGraph_GridLinesBrush}" /> + <realTimeGraphX:WpfGraphSurface x:Name="surface" Controller="{TemplateBinding Controller}" BorderThickness="1 0 0 1" BorderBrush="{StaticResource FSE_RealTimeGraph_InnerBorderBrush}" /> + + <!--<Grid IsHitTestVisible="False" Visibility="{TemplateBinding GraphLabelVisibility}"> + <Label Style="{StaticResource graphLabel}"> + <StackPanel Orientation="Horizontal"> + <TextBlock Foreground="Gainsboro" FontSize="11" VerticalAlignment="Center" Text="{TemplateBinding DisplayName}"></TextBlock> + <TextBlock Foreground="Gray" Margin="10 0 0 0" FontSize="11" FontFamily="Sylfaen Regular" VerticalAlignment="Center" Text="{TemplateBinding DisplayUnits}"></TextBlock> + </StackPanel> + </Label> + </Grid>--> + </Grid> + + <realTimeGraphX:WpfGraphAxisControl Orientation="Vertical" Controller="{TemplateBinding Controller}" StringFormat="{TemplateBinding StringFormat}" Ticks="{TemplateBinding VerticalTicks}" /> + <realTimeGraphX:WpfGraphAxisControl Orientation="Horizontal" Controller="{TemplateBinding Controller}" Grid.Column="1" Grid.Row="1" Ticks="{TemplateBinding HorizontalTicks}" StringFormat="hh\:mm\:ss"/> + </Grid> + </Border> + <Image HorizontalAlignment="Left" VerticalAlignment="Top" Margin="8" Source="{StaticResource FSE_Screw}" RenderOptions.BitmapScalingMode="Fant" Width="10" Height="10" /> + <Image HorizontalAlignment="Right" VerticalAlignment="Top" Margin="8" Source="{StaticResource FSE_Screw}" RenderOptions.BitmapScalingMode="Fant" Width="10" Height="10" /> + + <Image HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="8" Source="{StaticResource FSE_Screw}" RenderOptions.BitmapScalingMode="Fant" Width="10" Height="10" /> + <Image HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="8" Source="{StaticResource FSE_Screw}" RenderOptions.BitmapScalingMode="Fant" Width="10" Height="10" /> + </Grid> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> + +</ResourceDictionary>
\ 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 Binary files differnew file mode 100644 index 000000000..46a8134fe --- /dev/null +++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Images/screw.png 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 @@ <Color x:Key="FSE_BorderColor">#707070</Color> <Color x:Key="FSE_PrimaryAccentColor">#03A9F4</Color> <Color x:Key="FSE_PrimaryAccentDarkColor">#009FE7</Color> - + <Color x:Key="FSE_ErrorColor">#FF4C4C</Color> <Color x:Key="FSE_WarningColor">#FF914C</Color> <Color x:Key="FSE_SuccessColor">#6DFF72</Color> @@ -27,6 +27,21 @@ <Color x:Key="FSE_RedColor">#FF6F6F</Color> <Color x:Key="FSE_GreenColor">#8EFF6F</Color> <Color x:Key="FSE_OrangeColor">#FA9252</Color> + <Color x:Key="FSE_YellowColor">#FFB84B</Color> + + <Color x:Key="FSE_RealTimeGraph_White">#18FFFFFF</Color> + <Color x:Key="FSE_RealTimeGraph_Red">#B6FF6F6F</Color> + <Color x:Key="FSE_RealTimeGraph_Yellow">#BBFFB84B</Color> + <Color x:Key="FSE_RealTimeGraph_Green">#B958C13B</Color> + <Color x:Key="FSE_RealTimeGraph_Orange">#BBFA9252</Color> + + <Color x:Key="FSE_RealTimeGraph_ForegroundColor">#7C98B3</Color> + <Color x:Key="FSE_RealTimeGraph_OuterBorderColor">#202020</Color> + <Color x:Key="FSE_RealTimeGraph_InnerBorderColor">#505050</Color> + <Color x:Key="FSE_RealTimeGraph_GridLinesColor">#303030</Color> + + <Color x:Key="FSE_Panel_BorderColor">#202020</Color> + <Color x:Key="FSE_Panel_BackgroundColor">#252525</Color> <!--BRUSHES--> <SolidColorBrush x:Key="FSE_PrimaryBackgroundDarkBrush" Color="{StaticResource FSE_PrimaryBackgroundDarkColor}"></SolidColorBrush> @@ -39,7 +54,7 @@ <SolidColorBrush x:Key="FSE_GrayBrush" Color="{StaticResource FSE_GrayColor}"></SolidColorBrush> <SolidColorBrush x:Key="FSE_PrimaryAccentBrush" Color="{StaticResource FSE_PrimaryAccentColor}"></SolidColorBrush> <SolidColorBrush x:Key="FSE_PrimaryAccentDarkBrush" Color="{StaticResource FSE_PrimaryAccentDarkColor}"></SolidColorBrush> - + <SolidColorBrush x:Key="FSE_ErrorBrush" Color="{StaticResource FSE_ErrorColor}"></SolidColorBrush> <SolidColorBrush x:Key="FSE_WarningBrush" Color="{StaticResource FSE_WarningColor}"></SolidColorBrush> <SolidColorBrush x:Key="FSE_SuccessBrush" Color="{StaticResource FSE_SuccessColor}"></SolidColorBrush> @@ -54,7 +69,27 @@ <SolidColorBrush x:Key="FSE_RedBrush" Color="{StaticResource FSE_RedColor}"></SolidColorBrush> <SolidColorBrush x:Key="FSE_GreenBrush" Color="{StaticResource FSE_GreenColor}"></SolidColorBrush> <SolidColorBrush x:Key="FSE_OrangeBrush" Color="{StaticResource FSE_OrangeColor}"></SolidColorBrush> - + <SolidColorBrush x:Key="FSE_YellowBrush" Color="{StaticResource FSE_YellowColor}"></SolidColorBrush> + + <SolidColorBrush x:Key="FSE_RealTimeGraph_ForegroundBrush" Color="{StaticResource FSE_RealTimeGraph_ForegroundColor}" /> + <SolidColorBrush x:Key="FSE_RealTimeGraph_OuterBorderBrush" Color="{StaticResource FSE_RealTimeGraph_OuterBorderColor}" /> + <SolidColorBrush x:Key="FSE_RealTimeGraph_InnerBorderBrush" Color="{StaticResource FSE_RealTimeGraph_InnerBorderColor}" /> + <SolidColorBrush x:Key="FSE_RealTimeGraph_GridLinesBrush" Color="{StaticResource FSE_RealTimeGraph_GridLinesColor}" /> + + <LinearGradientBrush x:Key="FSE_RealTimeGraph_BackgroundBrush" EndPoint="0.5,1" StartPoint="0.5,0" > + <GradientStop Color="#202020"/> + <GradientStop Color="#FF333333" Offset="1"/> + </LinearGradientBrush> + + <SolidColorBrush x:Key="FSE_RealTimeGraph_WhiteBrush" Color="{StaticResource FSE_RealTimeGraph_White}"></SolidColorBrush> + <SolidColorBrush x:Key="FSE_RealTimeGraph_RedBrush" Color="{StaticResource FSE_RealTimeGraph_Red}"></SolidColorBrush> + <SolidColorBrush x:Key="FSE_RealTimeGraph_YellowBrush" Color="{StaticResource FSE_RealTimeGraph_Yellow}"></SolidColorBrush> + <SolidColorBrush x:Key="FSE_RealTimeGraph_GreenBrush" Color="{StaticResource FSE_RealTimeGraph_Green}"></SolidColorBrush> + <SolidColorBrush x:Key="FSE_RealTimeGraph_OrangeBrush" Color="{StaticResource FSE_RealTimeGraph_Orange}"></SolidColorBrush> + + <SolidColorBrush x:Key="FSE_Panel_BorderBrush" Color="{StaticResource FSE_Panel_BorderColor}"></SolidColorBrush> + <SolidColorBrush x:Key="FSE_Panel_BackgroundBrush" Color="{StaticResource FSE_Panel_BackgroundColor}"></SolidColorBrush> + <!--IMAGE BRUSHES--> <ImageBrush x:Key="FSE_AbstractBrush" ImageSource="{StaticResource FSE_Abstract}" Stretch="UniformToFill"></ImageBrush> @@ -69,7 +104,7 @@ <!-- primary --> <!--<SolidColorBrush x:Key="PrimaryHueDarkBrush" Color="#4D1DCF"/> <SolidColorBrush x:Key="PrimaryHueDarkForegroundBrush" Color="#FFFFFF"/>--> - <!--accent--> + <!--accent--> <SolidColorBrush x:Key="SecondaryAccentBrush" Color="{StaticResource FSE_PrimaryAccentColor}"/> <SolidColorBrush x:Key="SecondaryAccentForegroundBrush" Color="{StaticResource FSE_PrimaryForegroundColor}"/> 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 @@ <ResourceDictionary Source="pack://application:,,,/Tango.FSE.Common;component/Controls/IconButton.xaml" /> <ResourceDictionary Source="pack://application:,,,/Tango.FSE.Common;component/Controls/TextIconButton.xaml" /> <ResourceDictionary Source="pack://application:,,,/Tango.FSE.Common;component/Controls/FSETabControl.xaml" /> + <ResourceDictionary Source="pack://application:,,,/Tango.FSE.Common;component/Controls/FSEPanel.xaml" /> </ResourceDictionary.MergedDictionaries> </ResourceDictionary>
\ 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 @@ +<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:local="clr-namespace:Tango.FSE.Common.Resources"> + + <ResourceDictionary.MergedDictionaries> + <ResourceDictionary Source="pack://application:,,,/Tango.FSE.Common;component/Graphs/RealTimeGraph.xaml" /> + </ResourceDictionary.MergedDictionaries> + +</ResourceDictionary>
\ 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 @@ <BitmapImage x:Key="FSE_PPC" UriSource="../Images/tablet.png" /> <BitmapImage x:Key="FSE_PPC_Back" UriSource="../Images/tablet_background.png" /> <BitmapImage x:Key="FSE_Abstract" UriSource="../Images/abstract1.png" /> + <BitmapImage x:Key="FSE_Screw" UriSource="../Images/screw.png" /> </ResourceDictionary>
\ 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<InformationPackage> 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 @@ <Compile Include="Controls\ConnectedMachineIcon.xaml.cs"> <DependentUpon>ConnectedMachineIcon.xaml</DependentUpon> </Compile> + <Compile Include="Controls\FSEPanel.cs" /> <Compile Include="Controls\FSETabControl.cs" /> <Compile Include="Controls\IconButton.cs" /> <Compile Include="Controls\TextIconButton.cs" /> @@ -107,6 +108,8 @@ <Compile Include="FSEModuleAttribute.cs" /> <Compile Include="Gateway\GatewayClient.cs" /> <Compile Include="Gateway\IGatewayService.cs" /> + <Compile Include="Graphs\RealTimeGraph.cs" /> + <Compile Include="Graphs\GraphHelper.cs" /> <Compile Include="Helpers\DesignModeHelper.cs" /> <Compile Include="Helpers\EncryptionHelper.cs" /> <Compile Include="Modules\IFSEModuleLoader.cs" /> @@ -128,6 +131,7 @@ <Compile Include="Resolution\IResolutionService.cs" /> <Compile Include="Resolution\ResolutionHelper.cs" /> <Compile Include="Resolution\ResolutionMode.cs" /> + <Compile Include="SystemInfo\ISystemInfoProvider.cs" /> <Compile Include="Threading\IDispatcherProvider.cs" /> <Compile Include="Web\FSEWebClient.cs" /> <Compile Include="Web\FSEWebClientBase.cs" /> @@ -139,6 +143,10 @@ <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> + <Page Include="Controls\FSEPanel.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> <Page Include="Controls\FSETabControl.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> @@ -151,6 +159,10 @@ <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> + <Page Include="Graphs\RealTimeGraph.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> <Page Include="Resources\Colors.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> @@ -167,6 +179,10 @@ <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> + <Page Include="Resources\Graphs.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> <Page Include="Resources\Images.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> @@ -236,6 +252,14 @@ </None> </ItemGroup> <ItemGroup> + <ProjectReference Include="..\..\SideChains\RealTimeGraphX-master\RealTimeGraphX.WPF\RealTimeGraphX.WPF.csproj"> + <Project>{6b9774f7-960d-438e-ad81-c6b9be328d50}</Project> + <Name>RealTimeGraphX.WPF</Name> + </ProjectReference> + <ProjectReference Include="..\..\SideChains\RealTimeGraphX-master\RealTimeGraphX\RealTimeGraphX.csproj"> + <Project>{f13a489c-80ee-4cd0-bdd4-92d959215646}</Project> + <Name>RealTimeGraphX</Name> + </ProjectReference> <ProjectReference Include="..\..\SideChains\Tango.AutoComplete\Tango.AutoComplete.csproj"> <Project>{bb2abb74-ba58-4812-83aa-ec8171f42df4}</Project> <Name>Tango.AutoComplete</Name> @@ -311,7 +335,9 @@ <ItemGroup> <Resource Include="Images\abstract1.png" /> </ItemGroup> - <ItemGroup /> + <ItemGroup> + <Resource Include="Images\screw.png" /> + </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <PropertyGroup> <PreBuildEvent>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"</PreBuildEvent> 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 @@ <ResourceDictionary Source="pack://application:,,,/Tango.FSE.Common;component/Resources/Fonts.xaml" /> <ResourceDictionary Source="pack://application:,,,/Tango.FSE.Common;component/Resources/Styles.xaml" /> <ResourceDictionary Source="pack://application:,,,/Tango.FSE.Common;component/Resources/Controls.xaml" /> + <ResourceDictionary Source="pack://application:,,,/Tango.FSE.Common;component/Resources/Graphs.xaml" /> </ResourceDictionary.MergedDictionaries> <!-- tell Dragablz tab control to use the Material Design theme --> 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<InformationPackage> GetSystemInformationPackage() + { + if (_package == null) + { + var response = await MachineProvider.MachineOperator.SendGenericRequest<GetMachineInformationRequest, GetMachineInformationResponse>(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 @@ <Compile Include="Performance\DefaultPerformanceProvider.cs" /> <Compile Include="RemoteDesktop\DefaultRemoteDesktopProvider.cs" /> <Compile Include="Resolution\DefaultResolutionService.cs" /> + <Compile Include="SystemInfo\DefaultSystemInfoProvider.cs" /> <Compile Include="Threading\DefaultDispatcherProvider.cs" /> <Compile Include="ViewModelLocator.cs" /> <Compile Include="ViewModels\AccountViewVM.cs" /> 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<IResolutionService>(); TangoIOC.Default.Unregister<IConsoleService>(); TangoIOC.Default.Unregister<IPerformanceProvider>(); + TangoIOC.Default.Unregister<ISystemInfoProvider>(); //TangoIOC.Default.Unregister<ExternalBridgeScanner>(); //TangoIOC.Default.Unregister<IDiagnosticsFrameProvider>(); //TangoIOC.Default.Unregister<IEventLogger>(); @@ -77,6 +80,7 @@ namespace Tango.FSE.UI TangoIOC.Default.Register<IResolutionService, DefaultResolutionService>(); TangoIOC.Default.Register<IConsoleService, DefaultConsoleService>(); TangoIOC.Default.Register<IPerformanceProvider, DefaultPerformanceProvider>(); + TangoIOC.Default.Register<ISystemInfoProvider, DefaultSystemInfoProvider>(); TangoIOC.Default.Register<MainWindowVM>(); TangoIOC.Default.Register<MainViewVM>(); 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 @@ <Reference Include="Microsoft.Azure.Common.NetFramework, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" /> <Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" /> <Reference Include="Microsoft.SqlServer.AzureStorageEnum, Version=14.100.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91, processorArchitecture=MSIL" /> + <Reference Include="Microsoft.VisualBasic" /> <Reference Include="Microsoft.WindowsAzure.Storage, Version=4.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" /> <Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <HintPath>..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> @@ -169,6 +170,8 @@ <Compile Include="Synchronization\SynchronizationState.cs" /> <Compile Include="Synchronization\SynchronizationStatus.cs" /> <Compile Include="Synchronization\SynchronizationStatusChangedEventArgs.cs" /> + <Compile Include="SystemInfo\DefaultSystemInfoService.cs" /> + <Compile Include="SystemInfo\ISystemInfoService.cs" /> <Compile Include="UpdatePackages\DefaultPackageRunner.cs" /> <Compile Include="UpdatePackages\IPackageRunner.cs" /> <Compile Include="UpdatePackages\IPPCPackage.cs" /> @@ -393,6 +396,10 @@ <Project>{e1e66ed9-597d-45fa-8048-de90a6930484}</Project> <Name>Tango.SQLExaminer</Name> </ProjectReference> + <ProjectReference Include="..\..\Tango.SystemInfo\Tango.SystemInfo.csproj"> + <Project>{997a961c-beda-4b56-aa0f-c39e532f7ffa}</Project> + <Name>Tango.SystemInfo</Name> + </ProjectReference> <ProjectReference Include="..\..\Tango.Touch\Tango.Touch.csproj"> <Project>{fd86424c-6e84-491b-8df9-3d0f5c236a2a}</Project> <Name>Tango.Touch</Name> @@ -439,7 +446,7 @@ </Target> <ProjectExtensions> <VisualStudio> - <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" /> + <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" /> </VisualStudio> </ProjectExtensions> </Project>
\ 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<IConsoleEngineService>(); TangoIOC.Default.Unregister<IRemoteDesktopService>(); TangoIOC.Default.Unregister<IPerformanceService>(); + TangoIOC.Default.Unregister<ISystemInfoService>(); if (App.StartupArgs.Contains("-webDebug")) { @@ -120,6 +122,7 @@ namespace Tango.PPC.UI TangoIOC.Default.Register<IOperationSystemManager, DefaultOperationSystemManager>(); TangoIOC.Default.Register<IBackupManager, DefaultBackupManager>(); TangoIOC.Default.Register<IPerformanceService, DefaultPerformanceService>(); + TangoIOC.Default.Register<ISystemInfoService, DefaultSystemInfoService>(); TangoIOC.Default.Register<LoadingViewVM>(); TangoIOC.Default.Register<MainViewVM>(); 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 @@ <ItemsControl x:Name="PART_ItemsControl" ItemsSource="{TemplateBinding Items}" ItemTemplate="{TemplateBinding ItemTemplate}"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> - <local:WpfGraphAxisPanel Orientation="{Binding RelativeSource={RelativeSource AncestorType=local:WpfGraphAxisControl},Path=Orientation}"></local:WpfGraphAxisPanel> + <local:WpfGraphAxisPanel x:Name="PART_AxisPanel" Orientation="{Binding RelativeSource={RelativeSource AncestorType=local:WpfGraphAxisControl},Path=Orientation}"></local:WpfGraphAxisPanel> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> </ItemsControl> 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; /// <summary> /// Initializes the <see cref="WpfGraphAxisControl"/> 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<ItemsPresenter>(_items_control); + _axisPanel = VisualTreeHelper.GetChild(itemsPresenter, 0) as WpfGraphAxisPanel; + }; + OnTicksChanged(); } + private static T GetVisualChild<T>(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<T>(v); + } + if (child != null) + { + break; + } + } + return child; + } + /// <summary> /// Called when the <see cref="Ticks"/> property has changed. /// </summary> @@ -107,16 +136,15 @@ namespace RealTimeGraphX.WPF { Items = new ObservableCollection<WpfGraphAxisTickData>(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 /// <summary> /// Updates the panel. /// </summary> - 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; + /// <summary> + /// Gets the current value. + /// </summary> + 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 + + /// <summary> + /// Occurs when the surface size has changed. + /// </summary> + public event EventHandler SurfaceSizeChanged; + + /// <summary> + /// Occurs when the surface zoom rectangle has changed. + /// </summary> + public event EventHandler ZoomRectChanged; + + #endregion + #region Properties /// <summary> @@ -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 /// <param name="points">The points.</param> public void DrawSeries(WpfGraphDataSeries dataSeries, IEnumerable<System.Drawing.PointF> points) { - _g.DrawCurve(dataSeries.GdiPen, points.ToArray()); + _g.DrawPolygon(dataSeries.GdiPen, points.ToArray()); } /// <summary> @@ -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<DateTime, DateTimeDataPoint> + { + /// <summary> + /// Initializes a new instance of the <see cref="DateTimeDataPoint"/> class. + /// </summary> + public DateTimeDataPoint() : base() + { + + } + + /// <summary> + /// Initializes a new instance of the <see cref="DateTimeDataPoint"/> class. + /// </summary> + /// <param name="value">The value.</param> + public DateTimeDataPoint(DateTime value) : base(value) + { + + } + + /// <summary> + /// Performs an implicit conversion from <see cref="System.TimeSpan"/> to <see cref="DateTimeDataPoint"/>. + /// </summary> + /// <param name="value">The value.</param> + /// <returns> + /// The result of the conversion. + /// </returns> + public static implicit operator DateTimeDataPoint(DateTime value) + { + return new DateTimeDataPoint(value); + } + + /// <summary> + /// Implements the operator -. + /// </summary> + /// <param name="a">a.</param> + /// <param name="b">The b.</param> + /// <returns> + /// The result of the operator. + /// </returns> + public static DateTimeDataPoint operator -(DateTimeDataPoint a, DateTimeDataPoint b) + { + return new DateTimeDataPoint(new DateTime(a.Value.Ticks - b.Value.Ticks)); + } + + /// <summary> + /// Implements the operator +. + /// </summary> + /// <param name="a">a.</param> + /// <param name="b">The b.</param> + /// <returns> + /// The result of the operator. + /// </returns> + public static DateTimeDataPoint operator +(DateTimeDataPoint a, DateTimeDataPoint b) + { + return new DateTimeDataPoint(new DateTime(a.Value.Ticks + b.Value.Ticks)); + } + + /// <summary> + /// Sums the value of this instance with another instance value and returns the result. + /// </summary> + /// <param name="other">The other instance.</param> + /// <returns></returns> + public override IGraphDataPoint Add(IGraphDataPoint other) + { + return new DateTimeDataPoint(new DateTime(this.Value.Ticks + (other as DateTimeDataPoint).Value.Ticks)); + } + + /// <summary> + /// Subtract the value of another instance from this instance and returns the result. + /// </summary> + /// <param name="other">The other instance.</param> + /// <returns></returns> + public override IGraphDataPoint Subtract(IGraphDataPoint other) + { + return new DateTimeDataPoint(new DateTime(this.Value.Ticks - (other as DateTimeDataPoint).Value.Ticks)); + } + + /// <summary> + /// Multiplies the value of this instance with another instance value and returns the result. + /// </summary> + /// <param name="other">The other instance.</param> + /// <returns></returns> + public override IGraphDataPoint Multiply(IGraphDataPoint other) + { + return new DateTimeDataPoint(new DateTime(this.Value.Ticks * (other as DateTimeDataPoint).Value.Ticks)); + } + + /// <summary> + /// Divides the value of this instance with another instance value and returns the result. + /// </summary> + /// <param name="other">The other instance.</param> + /// <returns></returns> + public override IGraphDataPoint Divide(IGraphDataPoint other) + { + return new DateTimeDataPoint(new DateTime(this.Value.Ticks / (other as DateTimeDataPoint).Value.Ticks)); + } + + /// <summary> + /// Returns the percentage value of this instance between the specified minimum and maximum values. + /// </summary> + /// <param name="min">The minimum.</param> + /// <param name="max">The maximum.</param> + /// <returns></returns> + 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; + } + + /// <summary> + /// Returns the absolute value of the specified percentage value between the specified minimum and maximum values. + /// </summary> + /// <param name="min">The minimum.</param> + /// <param name="max">The maximum.</param> + /// <param name="percentage">The percentage.</param> + /// <returns></returns> + 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))); + } + + /// <summary> + /// Creates a range of values from the specified minimum and maximum. + /// </summary> + /// <param name="min">The minimum.</param> + /// <param name="max">The maximum.</param> + /// <param name="count">The count.</param> + /// <returns></returns> + public override IEnumerable<IGraphDataPoint> 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))); + } + + /// <summary> + /// Returns a formated string of this data point. + /// </summary> + /// <param name="format">The format.</param> + /// <returns></returns> + public override string ToString(string format) + { + return Value.ToString(format); + } + + /// <summary> + /// Parses the specified value and returns a new instance of <see cref="!:TDataType" /> data point. + /// </summary> + /// <param name="value">The value.</param> + /// <returns></returns> + 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 /// <returns></returns> public override IEnumerable<IGraphDataPoint> 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)); } /// <summary> 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<List<PendingSeries>> pending_lists = new List<List<PendingSeries>>(); - 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<List<PendingSeries>>(); _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<TDataSeries, IEnumerable<PointF>>(item.Series, points)); } @@ -385,6 +391,26 @@ namespace RealTimeGraphX #region Protected Methods /// <summary> + /// Called when the surface has changed. + /// </summary> + /// <param name="previous">The previous.</param> + /// <param name="surface">The surface.</param> + protected virtual void OnSurfaceChanged(IGraphSurface<TDataSeries> previous, IGraphSurface<TDataSeries> surface) + { + if (previous != null) + { + previous.SurfaceSizeChanged += Surface_SurfaceSizeChanged; + previous.ZoomRectChanged += Surface_ZoomRectChanged; + } + + if (surface != null) + { + surface.SurfaceSizeChanged += Surface_SurfaceSizeChanged; + surface.ZoomRectChanged += Surface_ZoomRectChanged; + } + } + + /// <summary> /// Raises the <see cref="EffectiveRangeChanged"/> event. /// </summary> /// <param name="minimumX">The minimum x.</param> @@ -431,6 +457,62 @@ namespace RealTimeGraphX #endregion + #region Surface Event Handlers + + /// <summary> + /// Handles the ZoomRectChanged event of the Surface control. + /// </summary> + /// <param name="sender">The source of the event.</param> + /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param> + private void Surface_ZoomRectChanged(object sender, EventArgs e) + { + if (!_pending_series_collection.ToList().SelectMany(x => x).ToList().Exists(x => x.IsUpdateSeries)) + { + List<PendingSeries> updateSeries = new List<PendingSeries>(); + + foreach (var pending_Series in _to_render) + { + updateSeries.Add(new PendingSeries() + { + IsUpdateSeries = true, + Series = pending_Series.Value.Series, + XX = new List<GraphDataPoint>(), + YY = new List<GraphDataPoint>(), + }); + } + + _pending_series_collection.BlockEnqueue(updateSeries); + } + } + + /// <summary> + /// Handles the SurfaceSizeChanged event of the Surface control. + /// </summary> + /// <param name="sender">The source of the event.</param> + /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param> + private void Surface_SurfaceSizeChanged(object sender, EventArgs e) + { + if (!_pending_series_collection.ToList().SelectMany(x => x).ToList().Exists(x => x.IsUpdateSeries)) + { + List<PendingSeries> updateSeries = new List<PendingSeries>(); + + foreach (var pending_Series in _to_render) + { + updateSeries.Add(new PendingSeries() + { + IsUpdateSeries = true, + Series = pending_Series.Value.Series, + XX = new List<GraphDataPoint>(), + YY = new List<GraphDataPoint>(), + }); + } + + _pending_series_collection.BlockEnqueue(updateSeries); + } + } + + #endregion + #region Public Methods /// <summary> 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. /// </summary> bool IsVisible { get; set; } + + /// <summary> + /// Gets the current value. + /// </summary> + 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 @@ -12,6 +12,16 @@ namespace RealTimeGraphX public interface IGraphSurface : IGraphComponent { /// <summary> + /// Occurs when the surface size has changed. + /// </summary> + event EventHandler SurfaceSizeChanged; + + /// <summary> + /// Occurs when the surface zoom rectangle has changed. + /// </summary> + event EventHandler ZoomRectChanged; + + /// <summary> /// Returns the actual size of the surface. /// </summary> /// <returns></returns> 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<MachineProperty> Properties { get; set; } + public List<SystemObjectsCollection> System { get; set; } public InformationPackage() { - Properties = new List<MachineProperty>(); + System = new List<SystemObjectsCollection>(); } } } 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 @@ <Compile Include="ExternalBridge\Network\Information\GetMachineInformationRequest.cs" /> <Compile Include="ExternalBridge\Network\Information\GetMachineInformationResponse.cs" /> <Compile Include="ExternalBridge\Network\Information\InformationPackage.cs" /> - <Compile Include="ExternalBridge\Network\Information\MachineProperty.cs" /> <Compile Include="ExternalBridge\Network\Performance\PerformancePackage.cs" /> <Compile Include="ExternalBridge\Network\Performance\StartPerformanceUpdatesRequest.cs" /> <Compile Include="ExternalBridge\Network\Performance\StartPerformanceUpdatesResponse.cs" /> @@ -205,6 +204,10 @@ <Project>{d8f1ad85-526a-4f50-b6dc-d437af63d8d8}</Project> <Name>Tango.Settings</Name> </ProjectReference> + <ProjectReference Include="..\Tango.SystemInfo\Tango.SystemInfo.csproj"> + <Project>{997a961c-beda-4b56-aa0f-c39e532f7ffa}</Project> + <Name>Tango.SystemInfo</Name> + </ProjectReference> <ProjectReference Include="..\Tango.Transport\Tango.Transport.csproj"> <Project>{74e700b0-1156-4126-be40-ee450d3c3026}</Project> <Name>Tango.Transport</Name> @@ -218,7 +221,7 @@ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <ProjectExtensions> <VisualStudio> - <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" /> + <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" /> </VisualStudio> </ProjectExtensions> </Project>
\ 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<SystemObject> 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<SystemObjectProperty> Properties { get; set; } + + public SystemObject() + { + Properties = new List<SystemObjectProperty>(); + } + + 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.Integration/ExternalBridge/Network/Information/MachineProperty.cs b/Software/Visual_Studio/Tango.SystemInfo/SystemObjectProperty.cs index 99232d624..c2d04e2a5 100644 --- a/Software/Visual_Studio/Tango.Integration/ExternalBridge/Network/Information/MachineProperty.cs +++ b/Software/Visual_Studio/Tango.SystemInfo/SystemObjectProperty.cs @@ -1,12 +1,10 @@ using System; using System.Collections.Generic; -using System.Linq; using System.Text; -using System.Threading.Tasks; -namespace Tango.Integration.ExternalBridge.Network.Information +namespace Tango.SystemInfo { - public class MachineProperty + 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<SystemObject> Objects { get; set; } + + public SystemObjectsCollection() + { + Objects = new List<SystemObject>(); + } + + 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<SystemObjectsCollection> Create() + { + List<SystemObjectsCollection> list = new List<SystemObjectsCollection>(); + + 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{997A961C-BEDA-4B56-AA0F-C39E532F7FFA}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>Tango.SystemInfo</RootNamespace> + <AssemblyName>Tango.SystemInfo</AssemblyName> + <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <Deterministic>true</Deterministic> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Core" /> + <Reference Include="System.Management" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Data" /> + <Reference Include="System.Net.Http" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Connection.cs" /> + <Compile Include="SystemObject.cs" /> + <Compile Include="SystemObjectProperty.cs" /> + <Compile Include="SystemObjectsCollection.cs" /> + <Compile Include="WMIReader.cs" /> + <Compile Include="XMLConfig.cs" /> + <Compile Include="IWMI.cs" /> + <Compile Include="Win32_BaseBoard.cs" /> + <Compile Include="Win32_Battery.cs" /> + <Compile Include="Win32_BIOS.cs" /> + <Compile Include="Win32_Bus.cs" /> + <Compile Include="Win32_CDROMDrive.cs" /> + <Compile Include="Win32_DiskDrive.cs" /> + <Compile Include="Win32_DMAChannel.cs" /> + <Compile Include="Win32_Fan.cs" /> + <Compile Include="Win32_FloppyController.cs" /> + <Compile Include="Win32_FloppyDrive.cs" /> + <Compile Include="Win32_IDEController.cs" /> + <Compile Include="Win32_IRQResource.cs" /> + <Compile Include="Win32_Keyboard.cs" /> + <Compile Include="Win32_MemoryDevice.cs" /> + <Compile Include="Win32_NetworkAdapter.cs" /> + <Compile Include="Win32_NetworkAdapterConfiguration.cs" /> + <Compile Include="Win32_OnBoardDevice.cs" /> + <Compile Include="Win32_OperatingSystem.cs" /> + <Compile Include="Win32_ParallelPort.cs" /> + <Compile Include="Win32_PCMCIController.cs" /> + <Compile Include="Win32_PhysicalMedia.cs" /> + <Compile Include="Win32_PhysicalMemory.cs" /> + <Compile Include="Win32_PortConnector.cs" /> + <Compile Include="Win32_PortResource.cs" /> + <Compile Include="Win32_POTSModem.cs" /> + <Compile Include="Win32_Processor.cs" /> + <Compile Include="Win32_SCSIController.cs" /> + <Compile Include="Win32_SerialPort.cs" /> + <Compile Include="Win32_SerialPortConfiguration.cs" /> + <Compile Include="Win32_SoundDevice.cs" /> + <Compile Include="Win32_SystemEnclosure.cs" /> + <Compile Include="Win32_TapeDrive.cs" /> + <Compile Include="Win32_TemperatureProbe.cs" /> + <Compile Include="Win32_UninterruptiblePowerSupply.cs" /> + <Compile Include="Win32_USBController.cs" /> + <Compile Include="Win32_USBHub.cs" /> + <Compile Include="Win32_VideoController.cs" /> + <Compile Include="Win32_VoltageProbe.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="settings.xml" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\Tango.Core\Tango.Core.csproj"> + <Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project> + <Name>Tango.Core</Name> + </ProjectReference> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> +</Project>
\ 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<SystemObject> GetPropertyValues(Connection WMIConnection, + string SelectQuery, + string className) + { + List<SystemObject> hardwareList = new List<SystemObject>(); + + ManagementScope connectionScope = WMIConnection.GetConnectionScope; + List<string> alProperties = new List<string>(); + 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<SystemObject> 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<SystemObject> 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<SystemObject> 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<SystemObject> 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<SystemObject> 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<SystemObject> 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<SystemObject> 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<SystemObject> 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<SystemObject> 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<SystemObject> 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<SystemObject> 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<SystemObject> 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<SystemObject> 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<SystemObject> 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<SystemObject> 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<SystemObject> 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<SystemObject> 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<SystemObject> 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<SystemObject> 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<SystemObject> 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<SystemObject> 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<SystemObject> 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<SystemObject> 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<SystemObject> 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<SystemObject> 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<SystemObject> 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<SystemObject> 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<SystemObject> 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<SystemObject> 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<SystemObject> 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<SystemObject> 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<SystemObject> 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<SystemObject> 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<SystemObject> 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<SystemObject> 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<SystemObject> 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<SystemObject> 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<SystemObject> 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<string> propNames; + + public static List<string> GetSettings(string WMIClassName) + { + if (propNames == null) + { + propNames = new List<string>(); + 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 @@ +<?xmlversion = "1.0"encoding="utf-8"?> +<AppSettings> + <WMI> + <Win32_OperatingSystem> + <property>BootDevice</property> + <property>BuildNumber</property> + <property>BuildType</property> + <property>Caption</property> + <property>CodeSet</property> + <property>CountryCode</property> + <property>CreationClassName</property> + <property>CSCreationClassName</property> + <property>CSDVersion</property> + <property>CSName</property> + <property>CurrentTimeZone</property> + <property>DataExecutionPrevention_Available</property> + <property>DataExecutionPrevention_32BitApplications</property> + <property>DataExecutionPrevention_Drivers</property> + <property>DataExecutionPrevention_SupportPolicy</property> + <property>Debug</property> + <property>Description</property> + <property>Distributed</property> + <property>EncryptionLevel</property> + <property>FreePhysicalMemory</property> + <property>FreeSpaceInPagingFiles</property> + <property>FreeVirtualMemory</property> + <property>InstallDate</property> + <property>LargeSystemCache</property> + <property>LastBootUpTime</property> + <property>LocalDateTime</property> + <property>Locale</property> + <property>Manufacturer</property> + <property>MaxNumberOfProcesses</property> + <property>MaxProcessMemorySize</property> + <property>Name</property> + <property>NumberOfLicensedUsers</property> + <property>NumberOfProcesses</property> + <property>NumberOfUsers</property> + <property>OperatingSystemSKU</property> + <property>Organization</property> + <property>OSArchitecture</property> + <property>OSLanguage</property> + <property>OSProductSuite</property> + <property>OSType</property> + <property>OtherTypeDescription</property> + <property>PAEEnabled</property> + <property>PlusProductID</property> + <property>PlusVersionNumber</property> + <property>PortableOperatingSystem</property> + <property>Primary</property> + <property>ProductType</property> + <property>RegisteredUser</property> + <property>SerialNumber</property> + <property>ServicePackMajorVersion</property> + <property>ServicePackMinorVersion</property> + <property>SizeStoredInPagingFiles</property> + <property>Status</property> + <property>SuiteMask</property> + <property>SystemDevice</property> + <property>SystemDirectory</property> + <property>SystemDrive</property> + <property>TotalSwapSpaceSize</property> + <property>TotalVirtualMemorySize</property> + <property>TotalVisibleMemorySize</property> + <property>Version</property> + <property>WindowsDirectory</property> + <property>QuantumLength</property> + <property>QuantumType</property> + </Win32_OperatingSystem> + <Win32_BaseBoard> + <property>Caption</property> + <property>CreationClassName</property> + <property>Depth</property> + <property>Description</property> + <property>Height</property> + <property>HostingBoard</property> + <property>HotSwappable</property> + <property>InstallDate</property> + <property>Manufacturer</property> + <property>Model</property> + <property>Name</property> + <property>OtherIdentifyingInfo</property> + <property>PartNumber</property> + <property>PoweredOn</property> + <property>Product</property> + <property>Removable</property> + <property>Replaceable</property> + <property>RequirementsDescription</property> + <property>RequiresDaughterBoard</property> + <property>SerialNumber</property> + <property>SKU</property> + <property>SlotLayout</property> + <property>SpecialRequirements</property> + <property>Status</property> + <property>Tag</property> + <property>Version</property> + <property>Weight</property> + <property>Width</property> + </Win32_BaseBoard> + <Win32_Battery> + <property>Availability</property> + <property>BatteryRechargeTime</property> + <property>BatteryStatus</property> + <property>Caption</property> + <property>Chemistry</property> + <property>ConfigManagerErrorCode</property> + <property>ConfigManagerUserConfig</property> + <property>CreationClassName</property> + <property>Description</property> + <property>DesignCapacity</property> + <property>DesignVoltage</property> + <property>DeviceID</property> + <property>ErrorCleared</property> + <property>ErrorDescription</property> + <property>EstimatedChargeRemaining</property> + <property>EstimatedRunTime</property> + <property>ExpectedBatteryLife</property> + <property>ExpectedLife</property> + <property>FullChargeCapacity</property> + <property>InstallDate</property> + <property>LastErrorCode</property> + <property>MaxRechargeTime</property> + <property>Name</property> + <property>PNPDeviceID</property> + <property>PowerManagementSupported</property> + <property>SmartBatteryVersion</property> + <property>Status</property> + <property>StatusInfo</property> + <property>SystemCreationClassName</property> + <property>SystemName</property> + <property>TimeOnBattery</property> + <property>TimeToFullCharge</property> + </Win32_Battery> + <Win32_BIOS> + <property>BuildNumber</property> + <property>Caption</property> + <property>CodeSet</property> + <property>CurrentLanguage</property> + <property>Description</property> + <property>IdentificationCode</property> + <property>InstallableLanguages</property> + <property>InstallDate</property> + <property>LanguageEdition</property> + <property>Manufacturer</property> + <property>Name</property> + <property>OtherTargetOS</property> + <property>PrimaryBIOS</property> + <property>ReleaseDate</property> + <property>SerialNumber</property> + <property>SMBIOSBIOSVersion</property> + <property>SMBIOSMajorVersion</property> + <property>SMBIOSMinorVersion</property> + <property>SMBIOSPresent</property> + <property>SoftwareElementID</property> + <property>SoftwareElementState</property> + <property>Status</property> + <property>TargetOperatingSystem</property> + <property>Version</property> + </Win32_BIOS> + <Win32_Bus> + <property>Availability</property> + <property>BusNum</property> + <property>BusType</property> + <property>Caption</property> + <property>ConfigManagerErrorCode</property> + <property>ConfigManagerUserConfig</property> + <property>CreationClassName</property> + <property>Description</property> + <property>DeviceID</property> + <property>ErrorCleared</property> + <property>ErrorDescription</property> + <property>InstallDate</property> + <property>LastErrorCode</property> + <property>Name</property> + <property>PNPDeviceID</property> + <property>PowerManagementSupported</property> + <property>Status</property> + <property>StatusInfo</property> + <property>SystemCreationClassName</property> + <property>SystemName</property> + </Win32_Bus> + <Win32_CDROMDrive> + <property>Availability</property> + <property>Caption</property> + <property>CompressionMethod</property> + <property>ConfigManagerErrorCode</property> + <property>ConfigManagerUserConfig</property> + <property>CreationClassName</property> + <property>DefaultBlockSize</property> + <property>Description</property> + <property>DeviceID</property> + <property>Drive</property> + <property>DriveIntegrity</property> + <property>ErrorCleared</property> + <property>ErrorDescription</property> + <property>ErrorMethodology</property> + <property>FileSystemFlags</property> + <property>FileSystemFlagsEx</property> + <property>InstallDate</property> + <property>LastErrorCode</property> + <property>Manufacturer</property> + <property>MaxBlockSize</property> + <property>MaximumComponentLength</property> + <property>MaxMediaSize</property> + <property>MediaLoaded</property> + <property>MediaType</property> + <property>MfrAssignedRevisionLevel</property> + <property>MinBlockSize</property> + <property>Name</property> + <property>NeedsCleaning</property> + <property>NumberOfMediaSupported</property> + <property>PNPDeviceID</property> + <property>PowerManagementSupported</property> + <property>RevisionLevel</property> + <property>SCSIBus</property> + <property>SCSILogicalUnit</property> + <property>SCSIPort</property> + <property>SCSITargetId</property> + <property>SerialNumber</property> + <property>Size</property> + <property>Status</property> + <property>StatusInfo</property> + <property>SystemCreationClassName</property> + <property>SystemName</property> + <property>TransferRate</property> + <property>VolumeName</property> + <property>VolumeSerialNumber</property> + </Win32_CDROMDrive> + <Win32_DiskDrive> + <property>Availability</property> + <property>BytesPerSector</property> + <property>Capabilities[]</property> + <property>CapabilityDescriptions[]</property> + <property>Caption</property> + <property>CompressionMethod</property> + <property>ConfigManagerErrorCode</property> + <property>ConfigManagerUserConfig</property> + <property>CreationClassName</property> + <property>DefaultBlockSize</property> + <property>Description</property> + <property>DeviceID</property> + <property>ErrorCleared</property> + <property>ErrorDescription</property> + <property>ErrorMethodology</property> + <property>FirmwareRevision</property> + <property>Index</property> + <property>InstallDate</property> + <property>InterfaceType</property> + <property>LastErrorCode</property> + <property>Manufacturer</property> + <property>MaxBlockSize</property> + <property>MaxMediaSize</property> + <property>MediaLoaded</property> + <property>MediaType</property> + <property>MinBlockSize</property> + <property>Model</property> + <property>Name</property> + <property>NeedsCleaning</property> + <property>NumberOfMediaSupported</property> + <property>Partitions</property> + <property>PNPDeviceID</property> + <property>PowerManagementCapabilities[]</property> + <property>PowerManagementSupported</property> + <property>SCSIBus</property> + <property>SCSILogicalUnit</property> + <property>SCSIPort</property> + <property>SCSITargetId</property> + <property>SectorsPerTrack</property> + <property>SerialNumber</property> + <property>Signature</property> + <property>Size</property> + <property>Status</property> + <property>StatusInfo</property> + <property>SystemCreationClassName</property> + <property>SystemName</property> + <property>TotalCylinders</property> + <property>TotalHeads</property> + <property>TotalSectors</property> + <property>TotalTracks</property> + <property>TracksPerCylinder</property> + </Win32_DiskDrive> + <Win32_DMAChannel> + <property>16AddressSize</property> + <property>16Availability</property> + <property>BurstMode</property> + <property>16ByteMode</property> + <property>Caption</property> + <property>16ChannelTiming</property> + <property>CreationClassName</property> + <property>CSCreationClassName</property> + <property>CSName</property> + <property>Description</property> + <property>32DMAChannel</property> + <property>InstallDate</property> + <property>32MaxTransferSize</property> + <property>Name</property> + <property>32Port</property> + <property>Status</property> + <property>16TransferWidths[]</property> + <property>16TypeCTiming</property> + <property>16WordMode</property> + </Win32_DMAChannel> + <Win32_Fan> + <property>ActiveCooling</property> + <property>Availability</property> + <property>Caption</property> + <property>ConfigManagerErrorCode</property> + <property>ConfigManagerUserConfig</property> + <property>CreationClassName</property> + <property>Description</property> + <property>DesiredSpeed</property> + <property>DeviceID</property> + <property>ErrorCleared</property> + <property>ErrorDescription</property> + <property>InstallDate</property> + <property>LastErrorCode</property> + <property>Name</property> + <property>PNPDeviceID</property> + <property>PowerManagementCapabilities[]</property> + <property>PowerManagementSupported</property> + <property>Status</property> + <property>StatusInfo</property> + <property>SystemCreationClassName</property> + <property>SystemName</property> + <property>VariableSpeed</property> + </Win32_Fan> + <Win32_FloppyController> + <property>Availability</property> + <property>Caption</property> + <property>ConfigManagerErrorCode</property> + <property>ConfigManagerUserConfig</property> + <property>CreationClassName</property> + <property>Description</property> + <property>DeviceID</property> + <property>ErrorCleared</property> + <property>ErrorDescription</property> + <property>InstallDate</property> + <property>LastErrorCode</property> + <property>Manufacturer</property> + <property>MaxNumberControlled</property> + <property>Name</property> + <property>PNPDeviceID</property> + <property>PowerManagementSupported</property> + <property>ProtocolSupported</property> + <property>Status</property> + <property>StatusInfo</property> + <property>SystemCreationClassName</property> + <property>SystemName</property> + <property>TimeOfLastReset</property> + </Win32_FloppyController> + <Win32_FloppyDrive> + <property>Availability</property> + <property>Caption</property> + <property>CompressionMethod</property> + <property>ConfigManagerErrorCode</property> + <property>ConfigManagerUserConfig</property> + <property>CreationClassName</property> + <property>DefaultBlockSize</property> + <property>Description</property> + <property>DeviceID</property> + <property>ErrorCleared</property> + <property>ErrorDescription</property> + <property>ErrorMethodology</property> + <property>InstallDate</property> + <property>LastErrorCode</property> + <property>Manufacturer</property> + <property>MaxBlockSize</property> + <property>MaxMediaSize</property> + <property>MinBlockSize</property> + <property>Name</property> + <property>NeedsCleaning</property> + <property>NumberOfMediaSupported</property> + <property>PNPDeviceID</property> + <property>PowerManagementCapabilities[]</property> + <property>PowerManagementSupported</property> + <property>Status</property> + <property>StatusInfo</property> + <property>SystemCreationClassName</property> + <property>SystemName</property> + </Win32_FloppyDrive> + <Win32_IDEController> + <property>Availability</property> + <property>Caption</property> + <property>ConfigManagerErrorCode</property> + <property>ConfigManagerUserConfig</property> + <property>CreationClassName</property> + <property>Description</property> + <property>DeviceID</property> + <property>ErrorCleared</property> + <property>ErrorDescription</property> + <property>InstallDate</property> + <property>LastErrorCode</property> + <property>Manufacturer</property> + <property>MaxNumberControlled</property> + <property>Name</property> + <property>PNPDeviceID</property> + <property>PowerManagementCapabilities[]</property> + <property>PowerManagementSupported</property> + <property>ProtocolSupported</property> + <property>Status</property> + <property>StatusInfo</property> + <property>SystemCreationClassName</property> + <property>SystemName</property> + <property>TimeOfLastReset</property> + </Win32_IDEController> + <Win32_IRQResource> + <property>Availability</property> + <property>Caption</property> + <property>CreationClassName</property> + <property>CSCreationClassName</property> + <property>CSName</property> + <property>Description</property> + <property>Hardware</property> + <property>InstallDate</property> + <property>IRQNumber</property> + <property>Name</property> + <property>Shareable</property> + <property>Status</property> + <property>TriggerLevel</property> + <property>TriggerType</property> + <property>Vector</property> + </Win32_IRQResource> + <Win32_Keyboard> + <property>Availability</property> + <property>Caption</property> + <property>ConfigManagerErrorCode</property> + <property>ConfigManagerUserConfig</property> + <property>CreationClassName</property> + <property>Description</property> + <property>DeviceID</property> + <property>ErrorCleared</property> + <property>ErrorDescription</property> + <property>InstallDate</property> + <property>IsLocked</property> + <property>LastErrorCode</property> + <property>Layout</property> + <property>Name</property> + <property>NumberOfFunctionKeys</property> + <property>Password</property> + <property>PNPDeviceID</property> + <property>PowerManagementSupported</property> + <property>Status</property> + <property>StatusInfo</property> + <property>SystemCreationClassName</property> + <property>SystemName</property> + </Win32_Keyboard> + <Win32_MemoryDevice> + <property>Access</property> + <property>AdditionalErrorData[]</property> + <property>Availability</property> + <property>BlockSize</property> + <property>Caption</property> + <property>ConfigManagerErrorCode</property> + <property>ConfigManagerUserConfig</property> + <property>CorrectableError</property> + <property>CreationClassName</property> + <property>Description</property> + <property>DeviceID</property> + <property>EndingAddress</property> + <property>ErrorAccess</property> + <property>ErrorAddress</property> + <property>ErrorCleared</property> + <property>ErrorDataOrder</property> + <property>ErrorDescription</property> + <property>ErrorGranularity</property> + <property>ErrorInfo</property> + <property>ErrorMethodology</property> + <property>ErrorResolution</property> + <property>ErrorTime</property> + <property>ErrorTransferSize</property> + <property>InstallDate</property> + <property>LastErrorCode</property> + <property>Name</property> + <property>NumberOfBlocks</property> + <property>OtherErrorDescription</property> + <property>PNPDeviceID</property> + <property>PowerManagementCapabilities[]</property> + <property>PowerManagementSupported</property> + <property>Purpose</property> + <property>StartingAddress</property> + <property>Status</property> + <property>StatusInfo</property> + <property>SystemCreationClassName</property> + <property>SystemLevelAddress</property> + <property>SystemName</property> + </Win32_MemoryDevice> + <Win32_NetworkAdapter> + <property>AdapterType</property> + <property>AdapterTypeID</property> + <property>AutoSense</property> + <property>Availability</property> + <property>Caption</property> + <property>ConfigManagerErrorCode</property> + <property>ConfigManagerUserConfig</property> + <property>CreationClassName</property> + <property>Description</property> + <property>DeviceID</property> + <property>ErrorCleared</property> + <property>ErrorDescription</property> + <property>GUID</property> + <property>Index</property> + <property>InstallDate</property> + <property>Installed</property> + <property>InterfaceIndex</property> + <property>LastErrorCode</property> + <property>MACAddress</property> + <property>Manufacturer</property> + <property>MaxNumberControlled</property> + <property>MaxSpeed</property> + <property>Name</property> + <property>NetConnectionID</property> + <property>NetConnectionStatus</property> + <property>NetEnabled</property> + <property>NetworkAddresses[]</property> + <property>PermanentAddress</property> + <property>PhysicalAdapter</property> + <property>PNPDeviceID</property> + <property>PowerManagementCapabilities[]</property> + <property>PowerManagementSupported</property> + <property>ProductName</property> + <property>ServiceName</property> + <property>Speed</property> + <property>Status</property> + <property>StatusInfo</property> + <property>SystemCreationClassName</property> + <property>SystemName</property> + <property>TimeOfLastReset</property> + </Win32_NetworkAdapter> + <Win32_NetworkAdapterConfiguration> + <property>ArpAlwaysSourceRoute</property> + <property>ArpUseEtherSNAP</property> + <property>Caption</property> + <property>DatabasePath</property> + <property>DeadGWDetectEnabled</property> + <property>DefaultIPGateway[]</property> + <property>DefaultTOS</property> + <property>DefaultTTL</property> + <property>Description</property> + <property>DHCPEnabled</property> + <property>DHCPLeaseExpires</property> + <property>DHCPLeaseObtained</property> + <property>DHCPServer</property> + <property>DNSDomain</property> + <property>DNSDomainSuffixSearchOrder[]</property> + <property>DNSEnabledForWINSResolution</property> + <property>DNSHostName</property> + <property>DNSServerSearchOrder[]</property> + <property>DomainDNSRegistrationEnabled</property> + <property>ForwardBufferMemory</property> + <property>FullDNSRegistrationEnabled</property> + <property>GatewayCostMetric[]</property> + <property>IGMPLevel</property> + <property>Index</property> + <property>InterfaceIndex</property> + <property>IPAddress[]</property> + <property>IPConnectionMetric</property> + <property>IPEnabled</property> + <property>IPFilterSecurityEnabled</property> + <property>IPPortSecurityEnabled</property> + <property>IPSecPermitIPProtocols[]</property> + <property>IPSecPermitTCPPorts[]</property> + <property>IPSecPermitUDPPorts[]</property> + <property>IPSubnet[]</property> + <property>IPUseZeroBroadcast</property> + <property>IPXAddress</property> + <property>IPXEnabled</property> + <property>IPXFrameType[]</property> + <property>IPXMediaType</property> + <property>IPXNetworkNumber[]</property> + <property>IPXVirtualNetNumber</property> + <property>KeepAliveInterval</property> + <property>KeepAliveTime</property> + <property>MACAddress</property> + <property>MTU</property> + <property>NumForwardPackets</property> + <property>PMTUBHDetectEnabled</property> + <property>PMTUDiscoveryEnabled</property> + <property>ServiceName</property> + <property>SettingID</property> + <property>TcpipNetbiosOptions</property> + <property>TcpMaxConnectRetransmissions</property> + <property>TcpMaxDataRetransmissions</property> + <property>TcpNumConnections</property> + <property>TcpUseRFC1122UrgentPointer</property> + <property>TcpWindowSize</property> + <property>WINSEnableLMHostsLookup</property> + <property>WINSHostLookupFile</property> + <property>WINSPrimaryServer</property> + <property>WINSScopeID</property> + <property>WINSSecondaryServer</property> + </Win32_NetworkAdapterConfiguration> + <Win32_OnBoardDevice> + <property>Caption</property> + <property>CreationClassName</property> + <property>Description</property> + <property>DeviceType</property> + <property>Enabled</property> + <property>HotSwappable</property> + <property>InstallDate</property> + <property>Manufacturer</property> + <property>Model</property> + <property>Name</property> + <property>OtherIdentifyingInfo</property> + <property>PartNumber</property> + <property>PoweredOn</property> + <property>Removable</property> + <property>Replaceable</property> + <property>SerialNumber</property> + <property>SKU</property> + <property>Status</property> + <property>Tag</property> + <property>Version</property> + </Win32_OnBoardDevice> + <Win32_ParallelPort> + <property>Availability</property> + <property>Capabilities[]</property> + <property>CapabilityDescriptions[]</property> + <property>Caption</property> + <property>ConfigManagerErrorCode</property> + <property>ConfigManagerUserConfig</property> + <property>CreationClassName</property> + <property>Description</property> + <property>DeviceID</property> + <property>DMASupport</property> + <property>ErrorCleared</property> + <property>ErrorDescription</property> + <property>InstallDate</property> + <property>LastErrorCode</property> + <property>MaxNumberControlled</property> + <property>Name</property> + <property>OSAutoDiscovered</property> + <property>PNPDeviceID</property> + <property>PowerManagementCapabilities[]</property> + <property>PowerManagementSupported</property> + <property>ProtocolSupported</property> + <property>Status</property> + <property>StatusInfo</property> + <property>SystemCreationClassName</property> + <property>SystemName</property> + <property>TimeOfLastReset</property> + </Win32_ParallelPort> + <Win32_PCMCIAController> + <property>Availability</property> + <property>Caption</property> + <property>ConfigManagerErrorCode</property> + <property>ConfigManagerUserConfig</property> + <property>CreationClassName</property> + <property>Description</property> + <property>DeviceID</property> + <property>ErrorCleared</property> + <property>ErrorDescription</property> + <property>InstallDate</property> + <property>LastErrorCode</property> + <property>Manufacturer</property> + <property>MaxNumberControlled</property> + <property>Name</property> + <property>PNPDeviceID</property> + <property>PowerManagementCapabilities[]</property> + <property>PowerManagementSupported</property> + <property>ProtocolSupported</property> + <property>Status</property> + <property>StatusInfo</property> + <property>SystemCreationClassName</property> + <property>SystemName</property> + <property>TimeOfLastReset</property> + </Win32_PCMCIAController> + <Win32_PhysicalMedia> + <property>Caption</property> + <property>Description</property> + <property>InstallDate</property> + <property>Name</property> + <property>Status</property> + <property>CreationClassName</property> + <property>Manufacturer</property> + <property>Model</property> + <property>SKU</property> + <property>SerialNumber</property> + <property>Tag</property> + <property>Version</property> + <property>PartNumber</property> + <property>OtherIdentifyingInfo</property> + <property>PoweredOn</property> + <property>Removable</property> + <property>Replaceable</property> + <property>HotSwappable</property> + <property>Capacity</property> + <property>MediaType</property> + <property>MediaDescription</property> + <property>WriteProtectOn</property> + <property>CleanerMedia</property> + </Win32_PhysicalMedia> + <Win32_PhysicalMemory> + <property>BankLabel</property> + <property>Capacity</property> + <property>Caption</property> + <property>CreationClassName</property> + <property>DataWidth</property> + <property>Description</property> + <property>DeviceLocator</property> + <property>FormFactor</property> + <property>HotSwappable</property> + <property>InstallDate</property> + <property>InterleaveDataDepth</property> + <property>InterleavePosition</property> + <property>Manufacturer</property> + <property>MemoryType</property> + <property>Model</property> + <property>Name</property> + <property>OtherIdentifyingInfo</property> + <property>PartNumber</property> + <property>PositionInRow</property> + <property>PoweredOn</property> + <property>Removable</property> + <property>Replaceable</property> + <property>SerialNumber</property> + <property>SKU</property> + <property>Speed</property> + <property>Status</property> + <property>Tag</property> + <property>TotalWidth</property> + <property>TypeDetail</property> + <property>Version</property> + </Win32_PhysicalMemory> + <Win32_PortConnector> + <property>Caption</property> + <property>ConnectorPinout</property> + <property>ConnectorType[]</property> + <property>CreationClassName</property> + <property>Description</property> + <property>ExternalReferenceDesignator</property> + <property>InstallDate</property> + <property>InternalReferenceDesignator</property> + <property>Manufacturer</property> + <property>Model</property> + <property>Name</property> + <property>OtherIdentifyingInfo</property> + <property>PartNumber</property> + <property>PortType</property> + <property>PoweredOn</property> + <property>SerialNumber</property> + <property>SKU</property> + <property>Status</property> + <property>Tag</property> + <property>Version</property> + </Win32_PortConnector> + <Win32_PortResource> + <property>Alias</property> + <property>Caption</property> + <property>CreationClassName</property> + <property>CSCreationClassName</property> + <property>CSName</property> + <property>Description</property> + <property>EndingAddress</property> + <property>InstallDate</property> + <property>Name</property> + <property>StartingAddress</property> + <property>Status</property> + </Win32_PortResource> + <Win32_POTSModem> + <property>AnswerMode</property> + <property>AttachedTo</property> + <property>Availability</property> + <property>BlindOff</property> + <property>BlindOn</property> + <property>Caption</property> + <property>CompatibilityFlags</property> + <property>CompressionInfo</property> + <property>CompressionOff</property> + <property>CompressionOn</property> + <property>ConfigManagerErrorCode</property> + <property>ConfigManagerUserConfig</property> + <property>ConfigurationDialog</property> + <property>CountriesSupported[]</property> + <property>CountrySelected</property> + <property>CreationClassName</property> + <property>CurrentPasswords[]</property> + <property>DCB[]</property> + <property>Default[]</property> + <property>Description</property> + <property>DeviceID</property> + <property>DeviceLoader</property> + <property>DeviceType</property> + <property>DialType</property> + <property>DriverDate</property> + <property>ErrorCleared</property> + <property>ErrorControlForced</property> + <property>ErrorControlInfo</property> + <property>ErrorControlOff</property> + <property>ErrorControlOn</property> + <property>ErrorDescription</property> + <property>FlowControlHard</property> + <property>FlowControlOff</property> + <property>FlowControlSoft</property> + <property>InactivityScale</property> + <property>InactivityTimeout</property> + <property>Index</property> + <property>InstallDate</property> + <property>LastErrorCode</property> + <property>MaxBaudRateToPhone</property> + <property>MaxBaudRateToSerialPort</property> + <property>MaxNumberOfPasswords</property> + <property>Model</property> + <property>ModemInfPath</property> + <property>ModemInfSection</property> + <property>ModulationBell</property> + <property>ModulationCCITT</property> + <property>ModulationScheme</property> + <property>Name</property> + <property>PNPDeviceID</property> + <property>PortSubClass</property> + <property>PowerManagementCapabilities[]</property> + <property>PowerManagementSupported</property> + <property>Prefix</property> + <property>Properties[]</property> + <property>ProviderName</property> + <property>Pulse</property> + <property>Reset</property> + <property>ResponsesKeyName</property> + <property>RingsBeforeAnswer</property> + <property>SpeakerModeDial</property> + <property>SpeakerModeOff</property> + <property>SpeakerModeOn</property> + <property>SpeakerModeSetup</property> + <property>SpeakerVolumeHigh</property> + <property>SpeakerVolumeInfo</property> + <property>SpeakerVolumeLow</property> + <property>SpeakerVolumeMed</property> + <property>Status</property> + <property>StatusInfo</property> + <property>StringFormat</property> + <property>SupportsCallback</property> + <property>SupportsSynchronousConnect</property> + <property>SystemCreationClassName</property> + <property>SystemName</property> + <property>Terminator</property> + <property>TimeOfLastReset</property> + <property>Tone</property> + <property>VoiceSwitchFeature</property> + </Win32_POTSModem> + <Win32_Processor> + <property>AddressWidth</property> + <property>Architecture</property> + <property>Availability</property> + <property>Caption</property> + <property>ConfigManagerErrorCode</property> + <property>ConfigManagerUserConfig</property> + <property>CpuStatus</property> + <property>CreationClassName</property> + <property>CurrentClockSpeed</property> + <property>CurrentVoltage</property> + <property>DataWidth</property> + <property>Description</property> + <property>DeviceID</property> + <property>ErrorCleared</property> + <property>ErrorDescription</property> + <property>ExtClock</property> + <property>Family</property> + <property>InstallDate</property> + <property>L2CacheSize</property> + <property>L2CacheSpeed</property> + <property>L3CacheSize</property> + <property>L3CacheSpeed</property> + <property>LastErrorCode</property> + <property>Level</property> + <property>LoadPercentage</property> + <property>Manufacturer</property> + <property>MaxClockSpeed</property> + <property>Name</property> + <property>NumberOfCores</property> + <property>NumberOfLogicalProcessors</property> + <property>OtherFamilyDescription</property> + <property>PNPDeviceID</property> + <property>PowerManagementSupported</property> + <property>ProcessorId</property> + <property>ProcessorType</property> + <property>Revision</property> + <property>Role</property> + <property>SocketDesignation</property> + <property>Status</property> + <property>StatusInfo</property> + <property>Stepping</property> + <property>SystemCreationClassName</property> + <property>SystemName</property> + <property>UniqueId</property> + <property>UpgradeMethod</property> + <property>Version</property> + <property>VoltageCaps</property> + </Win32_Processor> + <Win32_SCSIController> + <property>Availability</property> + <property>Caption</property> + <property>ConfigManagerErrorCode</property> + <property>ConfigManagerUserConfig</property> + <property>ControllerTimeouts</property> + <property>CreationClassName</property> + <property>Description</property> + <property>DeviceID</property> + <property>DeviceMap</property> + <property>DriverName</property> + <property>ErrorCleared</property> + <property>ErrorDescription</property> + <property>HardwareVersion</property> + <property>Index</property> + <property>InstallDate</property> + <property>LastErrorCode</property> + <property>Manufacturer</property> + <property>MaxDataWidth</property> + <property>MaxNumberControlled</property> + <property>MaxTransferRate</property> + <property>Name</property> + <property>PNPDeviceID</property> + <property>PowerManagementCapabilities[]</property> + <property>PowerManagementSupported</property> + <property>ProtectionManagement</property> + <property>ProtocolSupported</property> + <property>Status</property> + <property>StatusInfo</property> + <property>SystemCreationClassName</property> + <property>SystemName</property> + <property>TimeOfLastReset</property> + </Win32_SCSIController> + <Win32_SerialPort> + <property>Availability</property> + <property>Binary</property> + <property>Capabilities[]</property> + <property>CapabilityDescriptions[]</property> + <property>Caption</property> + <property>ConfigManagerErrorCode</property> + <property>ConfigManagerUserConfig</property> + <property>CreationClassName</property> + <property>Description</property> + <property>DeviceID</property> + <property>ErrorCleared</property> + <property>ErrorDescription</property> + <property>InstallDate</property> + <property>LastErrorCode</property> + <property>MaxBaudRate</property> + <property>MaximumInputBufferSize</property> + <property>MaximumOutputBufferSize</property> + <property>MaxNumberControlled</property> + <property>Name</property> + <property>OSAutoDiscovered</property> + <property>PNPDeviceID</property> + <property>PowerManagementCapabilities[]</property> + <property>PowerManagementSupported</property> + <property>ProtocolSupported</property> + <property>ProviderType</property> + <property>SettableBaudRate</property> + <property>SettableDataBits</property> + <property>SettableFlowControl</property> + <property>SettableParity</property> + <property>SettableParityCheck</property> + <property>SettableRLSD</property> + <property>SettableStopBits</property> + <property>Status</property> + <property>StatusInfo</property> + <property>Supports16BitMode</property> + <property>SupportsDTRDSR</property> + <property>SupportsElapsedTimeouts</property> + <property>SupportsIntTimeouts</property> + <property>SupportsParityCheck</property> + <property>SupportsRLSD</property> + <property>SupportsRTSCTS</property> + <property>SupportsSpecialCharacters</property> + <property>SupportsXOnXOff</property> + <property>SupportsXOnXOffSet</property> + <property>SystemCreationClassName</property> + <property>SystemName</property> + <property>TimeOfLastReset</property> + </Win32_SerialPort> + <Win32_SerialPortConfiguration> + <property>AbortReadWriteOnError</property> + <property>BaudRate</property> + <property>BinaryModeEnabled</property> + <property>BitsPerByte</property> + <property>Caption</property> + <property>ContinueXMitOnXOff</property> + <property>CTSOutflowControl</property> + <property>Description</property> + <property>DiscardNULLBytes</property> + <property>DSROutflowControl</property> + <property>DSRSensitivity</property> + <property>DTRFlowControlType</property> + <property>EOFCharacter</property> + <property>ErrorReplaceCharacter</property> + <property>ErrorReplacementEnabled</property> + <property>EventCharacter</property> + <property>IsBusy</property> + <property>Name</property> + <property>Parity</property> + <property>ParityCheckEnabled</property> + <property>RTSFlowControlType</property> + <property>SettingID</property> + <property>StopBits</property> + <property>XOffCharacter</property> + <property>XOffXMitThreshold</property> + <property>XOnCharacter</property> + <property>XOnXMitThreshold</property> + <property>XOnXOffInFlowControl</property> + <property>XOnXOffOutFlowControl</property> + </Win32_SerialPortConfiguration> + <Win32_SoundDevice> + <property>Availability</property> + <property>Caption</property> + <property>ConfigManagerErrorCode</property> + <property>ConfigManagerUserConfig</property> + <property>CreationClassName</property> + <property>Description</property> + <property>DeviceID</property> + <property>DMABufferSize</property> + <property>ErrorCleared</property> + <property>ErrorDescription</property> + <property>InstallDate</property> + <property>LastErrorCode</property> + <property>Manufacturer</property> + <property>MPU401Address</property> + <property>Name</property> + <property>PNPDeviceID</property> + <property>PowerManagementCapabilities[]</property> + <property>PowerManagementSupported</property> + <property>ProductName</property> + <property>Status</property> + <property>StatusInfo</property> + <property>SystemCreationClassName</property> + <property>SystemName</property> + </Win32_SoundDevice> + <Win32_SystemEnclosure> + <property>AudibleAlarm</property> + <property>BreachDescription</property> + <property>CableManagementStrategy</property> + <property>Caption</property> + <property>ChassisTypes[]</property> + <property>CreationClassName</property> + <property>CurrentRequiredOrProduced</property> + <property>Depth</property> + <property>Description</property> + <property>HeatGeneration</property> + <property>Height</property> + <property>HotSwappable</property> + <property>InstallDate</property> + <property>LockPresent</property> + <property>Manufacturer</property> + <property>Model</property> + <property>Name</property> + <property>NumberOfPowerCords</property> + <property>OtherIdentifyingInfo</property> + <property>PartNumber</property> + <property>PoweredOn</property> + <property>Removable</property> + <property>Replaceable</property> + <property>SecurityBreach</property> + <property>SecurityStatus</property> + <property>SerialNumber</property> + <property>ServiceDescriptions[]</property> + <property>ServicePhilosophy[]</property> + <property>SKU</property> + <property>SMBIOSAssetTag</property> + <property>Status</property> + <property>Tag</property> + <property>TypeDescriptions[]</property> + <property>Version</property> + <property>VisibleAlarm</property> + <property>Weight</property> + <property>Width</property> + </Win32_SystemEnclosure> + <Win32_TapeDrive> + <property>Availability</property> + <property>Capabilities[]</property> + <property>CapabilityDescriptions[]</property> + <property>Caption</property> + <property>Compression</property> + <property>CompressionMethod</property> + <property>ConfigManagerErrorCode</property> + <property>ConfigManagerUserConfig</property> + <property>CreationClassName</property> + <property>DefaultBlockSize</property> + <property>Description</property> + <property>DeviceID</property> + <property>ECC</property> + <property>EOTWarningZoneSize</property> + <property>ErrorCleared</property> + <property>ErrorDescription</property> + <property>ErrorMethodology</property> + <property>FeaturesHigh</property> + <property>FeaturesLow</property> + <property>Id</property> + <property>InstallDate</property> + <property>LastErrorCode</property> + <property>Manufacturer</property> + <property>MaxBlockSize</property> + <property>MaxMediaSize</property> + <property>MaxPartitionCount</property> + <property>MediaType</property> + <property>MinBlockSize</property> + <property>Name</property> + <property>NeedsCleaning</property> + <property>NumberOfMediaSupported</property> + <property>Padding</property> + <property>PNPDeviceID</property> + <property>PowerManagementCapabilities[]</property> + <property>PowerManagementSupported</property> + <property>ReportSetMarks</property> + <property>Status</property> + <property>StatusInfo</property> + <property>SystemCreationClassName</property> + <property>SystemName</property> + </Win32_TapeDrive> + <Win32_TemperatureProbe> + <property>Accuracy</property> + <property>Availability</property> + <property>Caption</property> + <property>ConfigManagerErrorCode</property> + <property>ConfigManagerUserConfig</property> + <property>CreationClassName</property> + <property>CurrentReading</property> + <property>Description</property> + <property>DeviceID</property> + <property>ErrorCleared</property> + <property>ErrorDescription</property> + <property>InstallDate</property> + <property>IsLinear</property> + <property>LastErrorCode</property> + <property>LowerThresholdCritical</property> + <property>LowerThresholdFatal</property> + <property>LowerThresholdNonCritical</property> + <property>MaxReadable</property> + <property>MinReadable</property> + <property>Name</property> + <property>NominalReading</property> + <property>NormalMax</property> + <property>NormalMin</property> + <property>PNPDeviceID</property> + <property>PowerManagementCapabilities[]</property> + <property>PowerManagementSupported</property> + <property>Resolution</property> + <property>Status</property> + <property>StatusInfo</property> + <property>SystemCreationClassName</property> + <property>SystemName</property> + <property>Tolerance</property> + <property>UpperThresholdCritical</property> + <property>UpperThresholdFatal</property> + <property>UpperThresholdNonCritical</property> + </Win32_TemperatureProbe> + <Win32_UninterruptiblePowerSupply> + <property>ActiveInputVoltage</property> + <property>Availability</property> + <property>BatteryInstalled</property> + <property>CanTurnOffRemotely</property> + <property>Caption</property> + <property>CommandFile</property> + <property>ConfigManagerErrorCode</property> + <property>ConfigManagerUserConfig</property> + <property>CreationClassName</property> + <property>Description</property> + <property>DeviceID</property> + <property>ErrorCleared</property> + <property>ErrorDescription</property> + <property>EstimatedChargeRemaining</property> + <property>EstimatedRunTime</property> + <property>FirstMessageDelay</property> + <property>InstallDate</property> + <property>IsSwitchingSupply</property> + <property>LastErrorCode</property> + <property>LowBatterySignal</property> + <property>MessageInterval</property> + <property>Name</property> + <property>PNPDeviceID</property> + <property>PowerFailSignal</property> + <property>PowerManagementCapabilities[]</property> + <property>PowerManagementSupported</property> + <property>Range1InputFrequencyHigh</property> + <property>Range1InputFrequencyLow</property> + <property>Range1InputVoltageHigh</property> + <property>Range1InputVoltageLow</property> + <property>Range2InputFrequencyHigh</property> + <property>Range2InputFrequencyLow</property> + <property>Range2InputVoltageHigh</property> + <property>Range2InputVoltageLow</property> + <property>RemainingCapacityStatus</property> + <property>Status</property> + <property>StatusInfo</property> + <property>SystemCreationClassName</property> + <property>SystemName</property> + <property>TimeOnBackup</property> + <property>TotalOutputPower</property> + <property>TypeOfRangeSwitching</property> + <property>UPSPort</property> + </Win32_UninterruptiblePowerSupply> + <Win32_USBController> + <property>Availability</property> + <property>Caption</property> + <property>ConfigManagerErrorCode</property> + <property>ConfigManagerUserConfig</property> + <property>CreationClassName</property> + <property>Description</property> + <property>DeviceID</property> + <property>ErrorCleared</property> + <property>ErrorDescription</property> + <property>InstallDate</property> + <property>LastErrorCode</property> + <property>Manufacturer</property> + <property>MaxNumberControlled</property> + <property>Name</property> + <property>PNPDeviceID</property> + <property>PowerManagementCapabilities[]</property> + <property>PowerManagementSupported</property> + <property>ProtocolSupported</property> + <property>Status</property> + <property>StatusInfo</property> + <property>SystemCreationClassName</property> + <property>SystemName</property> + <property>TimeOfLastReset</property> + </Win32_USBController> + <Win32_USBHub> + <property>Availability</property> + <property>Caption</property> + <property>ClassCode</property> + <property>ConfigManagerErrorCode</property> + <property>ConfigManagerUserCode</property> + <property>CreationClassName</property> + <property>CurrentAlternativeSettings</property> + <property>CurrentConfigValue</property> + <property>Description</property> + <property>DeviceID</property> + <property>ErrorCleared</property> + <property>ErrorDescription</property> + <property>GangSwitched</property> + <property>InstallDate</property> + <property>LastErrorCode</property> + <property>Name</property> + <property>NumberOfConfigs</property> + <property>NumberOfPorts</property> + <property>PNPDeviceID</property> + <property>PowerManagementCapabilities[]</property> + <property>PowerManagementSupported</property> + <property>ProtocolCode</property> + <property>Status</property> + <property>StatusInfo</property> + <property>SubclassCode</property> + <property>SystemCreationClassName</property> + <property>SystemName</property> + <property>USBVersion</property> + </Win32_USBHub> + <Win32_VideoController> + <property>AcceleratorCapabilities[]</property> + <property>AdapterCompatibility</property> + <property>AdapterDACType</property> + <property>AdapterRAM</property> + <property>Availability</property> + <property>CapabilityDescriptions[]</property> + <property>Caption</property> + <property>ColorTableEntries</property> + <property>ConfigManagerErrorCode</property> + <property>ConfigManagerUserConfig</property> + <property>CreationClassName</property> + <property>CurrentBitsPerPixel</property> + <property>CurrentHorizontalResolution</property> + <property>CurrentNumberOfColors</property> + <property>CurrentNumberOfColumns</property> + <property>CurrentNumberOfRows</property> + <property>CurrentRefreshRate</property> + <property>CurrentScanMode</property> + <property>CurrentVerticalResolution</property> + <property>Description</property> + <property>DeviceID</property> + <property>DeviceSpecificPens</property> + <property>DitherType</property> + <property>DriverDate</property> + <property>DriverVersion</property> + <property>ErrorCleared</property> + <property>ErrorDescription</property> + <property>ICMIntent</property> + <property>ICMMethod</property> + <property>InfFilename</property> + <property>InfSection</property> + <property>InstallDate</property> + <property>InstalledDisplayDrivers</property> + <property>LastErrorCode</property> + <property>MaxMemorySupported</property> + <property>MaxNumberControlled</property> + <property>MaxRefreshRate</property> + <property>MinRefreshRate</property> + <property>Monochrome</property> + <property>Name</property> + <property>NumberOfColorPlanes</property> + <property>NumberOfVideoPages</property> + <property>PNPDeviceID</property> + <property>PowerManagementCapabilities[]</property> + <property>PowerManagementSupported</property> + <property>ProtocolSupported</property> + <property>ReservedSystemPaletteEntries</property> + <property>SpecificationVersion</property> + <property>Status</property> + <property>StatusInfo</property> + <property>SystemCreationClassName</property> + <property>SystemName</property> + <property>SystemPaletteEntries</property> + <property>TimeOfLastReset</property> + <property>VideoArchitecture</property> + <property>VideoMemoryType</property> + <property>VideoMode</property> + <property>VideoModeDescription</property> + <property>VideoProcessor</property> + </Win32_VideoController> + <Win32_VoltageProbe> + <property>Accuracy</property> + <property>Availability</property> + <property>Caption</property> + <property>ConfigManagerErrorCode</property> + <property>ConfigManagerUserConfig</property> + <property>CreationClassName</property> + <property>CurrentReading</property> + <property>Description</property> + <property>DeviceID</property> + <property>ErrorCleared</property> + <property>ErrorDescription</property> + <property>InstallDate</property> + <property>IsLinear</property> + <property>LastErrorCode</property> + <property>LowerThresholdCritical</property> + <property>LowerThresholdFatal</property> + <property>LowerThresholdNonCritical</property> + <property>MaxReadable</property> + <property>MinReadable</property> + <property>Name</property> + <property>NominalReading</property> + <property>NormalMax</property> + <property>NormalMin</property> + <property>PNPDeviceID</property> + <property>PowerManagementCapabilities[]</property> + <property>PowerManagementSupported</property> + <property>Resolution</property> + <property>Status</property> + <property>StatusInfo</property> + <property>SystemCreationClassName</property> + <property>SystemName</property> + <property>Tolerance</property> + <property>UpperThresholdCritical</property> + <property>UpperThresholdFatal</property> + <property>UpperThresholdNonCritical</property> + </Win32_VoltageProbe> + + </WMI> + +</AppSettings> + 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 |
