105 lines
3.4 KiB
C#
105 lines
3.4 KiB
C#
using System.Diagnostics;
|
|
using System.Windows;
|
|
using DerpingDrivers.Util;
|
|
using MahApps.Metro.Controls;
|
|
|
|
namespace DerpingDrivers
|
|
{
|
|
/// <summary>
|
|
/// Interaction logic for MainWindow.xaml
|
|
/// </summary>
|
|
public partial class MainWindow : MetroWindow
|
|
{
|
|
public MainWindow()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets Operating System Architecture display name.
|
|
/// </summary>
|
|
public string OsArchitecture =>
|
|
OsVersionInfo.OsBits == OsVersionInfo.SoftwareArchitecture.Bit64 ? "64-bit" : "32-bit";
|
|
|
|
/// <summary>
|
|
/// Gets Operating System display name.
|
|
/// </summary>
|
|
public string OsVersionName => OsVersionInfo.Name;
|
|
|
|
/// <summary>
|
|
/// Gets Operating System edition name.
|
|
/// </summary>
|
|
public string OsEditionName => string.IsNullOrEmpty(OsVersionInfo.Edition) ? "None" : OsVersionInfo.Edition;
|
|
|
|
/// <summary>
|
|
/// Gets Operating System build number.
|
|
/// </summary>
|
|
public string OsVersion => OsVersionInfo.VersionString;
|
|
|
|
/// <summary>
|
|
/// Gets Boot mode (Legacy BIOS, UEFI).
|
|
/// </summary>
|
|
public string BootMode => UefiHelper.IsRunningInUefiMode ? "UEFI" : "Legacy BIOS";
|
|
|
|
/// <summary>
|
|
/// Gets Secure Boot status.
|
|
/// </summary>
|
|
public string SecureBootEnabled => UefiHelper.IsRunningInUefiMode
|
|
? UefiHelper.IsSecureBootEnabled ? "Enabled" : "Disabled"
|
|
: "Not available";
|
|
|
|
/// <summary>
|
|
/// Gets OS upgrade status.
|
|
/// </summary>
|
|
public string OsUpgradeStatus =>
|
|
OsUpgradeDetection.IsGrandfathered ? "In-place upgraded" : "Clean installation";
|
|
|
|
/// <summary>
|
|
/// Gets test-mode status.
|
|
/// </summary>
|
|
public string TestSigningStatus => CodeIntegrityHelper.IsTestSignEnabled ? "Enabled" : "Disabled";
|
|
|
|
/// <summary>
|
|
/// Gets or sets whether prerelease signatures (a.k.a. TESTSIGNING) are accepted by the kernel.
|
|
/// </summary>
|
|
public bool AllowPrereleaseSignatures
|
|
{
|
|
get => BcdHelper.AllowPrereleaseSignatures;
|
|
set => BcdHelper.AllowPrereleaseSignatures = value;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets whether cross-signed drivers will be able to get loaded or not.
|
|
/// </summary>
|
|
public bool WhqlDeveloperTestMode
|
|
{
|
|
get => CodeIntegrityPolicyHelper.WhqlDeveloperTestMode;
|
|
set => CodeIntegrityPolicyHelper.WhqlDeveloperTestMode = value;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets if this system is running Windows 10.
|
|
/// </summary>
|
|
public bool IsWindows10 => OsVersionInfo.IsWindows10;
|
|
|
|
private void Web_OnClick(object sender, RoutedEventArgs e)
|
|
{
|
|
Process.Start("https://vigem.org");
|
|
}
|
|
|
|
private void Discord_OnClick(object sender, RoutedEventArgs e)
|
|
{
|
|
Process.Start("https://discord.vigem.org");
|
|
}
|
|
|
|
private void Forums_OnClick(object sender, RoutedEventArgs e)
|
|
{
|
|
Process.Start("https://forums.vigem.org");
|
|
}
|
|
|
|
private void GitHub_OnClick(object sender, RoutedEventArgs e)
|
|
{
|
|
Process.Start("https://github.com/ViGEm");
|
|
}
|
|
}
|
|
} |