Added some basic OS properties
This commit is contained in:
parent
692d21d437
commit
20c8d62a21
@ -16,6 +16,7 @@
|
|||||||
</ResourceDictionary.MergedDictionaries>
|
</ResourceDictionary.MergedDictionaries>
|
||||||
<Style TargetType="Label">
|
<Style TargetType="Label">
|
||||||
<Setter Property="FontFamily" Value="Segoe UI Light"/>
|
<Setter Property="FontFamily" Value="Segoe UI Light"/>
|
||||||
|
<Setter Property="FontSize" Value="24px"/>
|
||||||
</Style>
|
</Style>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
</Application.Resources>
|
</Application.Resources>
|
||||||
|
@ -70,6 +70,7 @@
|
|||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</ApplicationDefinition>
|
</ApplicationDefinition>
|
||||||
|
<Compile Include="Util\OSVersionInfo.cs" />
|
||||||
<Page Include="MainWindow.xaml">
|
<Page Include="MainWindow.xaml">
|
||||||
<Generator>MSBuild:Compile</Generator>
|
<Generator>MSBuild:Compile</Generator>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
|
@ -9,24 +9,37 @@
|
|||||||
Title="Derping Drivers - Windows driver settings detection tool"
|
Title="Derping Drivers - Windows driver settings detection tool"
|
||||||
Height="450" Width="800"
|
Height="450" Width="800"
|
||||||
ShowMaxRestoreButton="False"
|
ShowMaxRestoreButton="False"
|
||||||
ResizeMode="NoResize">
|
ResizeMode="NoResize"
|
||||||
<Grid>
|
DataContext="{Binding RelativeSource={RelativeSource Self}}">
|
||||||
|
<Grid Margin="15">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<Label Grid.Row="0" />
|
|
||||||
|
|
||||||
<Grid Grid.Row="1">
|
<Grid Grid.Row="1">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition />
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="*" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition />
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition Width="20" />
|
||||||
|
<ColumnDefinition Width="Auto" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Label Grid.Row="0" Grid.Column="0">Windows version name:</Label>
|
||||||
|
<Label Grid.Row="0" Grid.Column="2" Content="{Binding Path=OsVersionName}"/>
|
||||||
|
|
||||||
|
<Label Grid.Row="1" Grid.Column="0">Windows version number:</Label>
|
||||||
|
<Label Grid.Row="1" Grid.Column="2" Content="{Binding Path=OsVersion}"/>
|
||||||
|
|
||||||
|
<Label Grid.Row="2" Grid.Column="0">Windows architecture:</Label>
|
||||||
|
<Label Grid.Row="2" Grid.Column="2" Content="{Binding Path=OsArchitecture}"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Controls:MetroWindow>
|
</Controls:MetroWindow>
|
@ -1,23 +1,10 @@
|
|||||||
using System;
|
using DerpingDrivers.Util;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Windows;
|
|
||||||
using System.Windows.Controls;
|
|
||||||
using System.Windows.Data;
|
|
||||||
using System.Windows.Documents;
|
|
||||||
using System.Windows.Input;
|
|
||||||
using System.Windows.Media;
|
|
||||||
using System.Windows.Media.Imaging;
|
|
||||||
using System.Windows.Navigation;
|
|
||||||
using System.Windows.Shapes;
|
|
||||||
using MahApps.Metro.Controls;
|
using MahApps.Metro.Controls;
|
||||||
|
|
||||||
namespace DerpingDrivers
|
namespace DerpingDrivers
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Interaction logic for MainWindow.xaml
|
/// Interaction logic for MainWindow.xaml
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class MainWindow : MetroWindow
|
public partial class MainWindow : MetroWindow
|
||||||
{
|
{
|
||||||
@ -25,5 +12,21 @@ namespace DerpingDrivers
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Operating System Architecture display name
|
||||||
|
/// </summary>
|
||||||
|
public string OsArchitecture =>
|
||||||
|
OsVersionInfo.OsBits == OsVersionInfo.SoftwareArchitecture.Bit64 ? "64-bit" : "32-bit";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Operating System display name
|
||||||
|
/// </summary>
|
||||||
|
public string OsVersionName => $"{OsVersionInfo.Name} {OsVersionInfo.Edition}";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Operating System build number
|
||||||
|
/// </summary>
|
||||||
|
public string OsVersion => OsVersionInfo.VersionString;
|
||||||
}
|
}
|
||||||
}
|
}
|
1103
DerpingDrivers/Util/OSVersionInfo.cs
Normal file
1103
DerpingDrivers/Util/OSVersionInfo.cs
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user