From ae6eee2a5b73bb6e564a7df0614f7b6af8608ffa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=B6glinger-Stelzer?= Date: Mon, 12 Nov 2018 02:17:32 +0100 Subject: [PATCH] Refactored class name --- DerpingDrivers/MainWindow.xaml.cs | 22 +++++++++++----------- DerpingDrivers/Util/UEFIHelper.cs | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/DerpingDrivers/MainWindow.xaml.cs b/DerpingDrivers/MainWindow.xaml.cs index b6273ea..4cf802b 100644 --- a/DerpingDrivers/MainWindow.xaml.cs +++ b/DerpingDrivers/MainWindow.xaml.cs @@ -45,13 +45,13 @@ namespace DerpingDrivers /// /// Gets Boot mode (Legacy BIOS, UEFI). /// - public string BootMode => UEFIHelper.IsRunningInUEFIMode ? "UEFI" : "Legacy BIOS"; + public string BootMode => UefiHelper.IsRunningInUefiMode ? "UEFI" : "Legacy BIOS"; /// /// Gets Secure Boot status. /// - public string SecureBootEnabled => UEFIHelper.IsRunningInUEFIMode - ? (UEFIHelper.IsSecureBootEnabled ? "Enabled" : "Disabled") + public string SecureBootEnabled => UefiHelper.IsRunningInUefiMode + ? (UefiHelper.IsSecureBootEnabled ? "Enabled" : "Disabled") : "Not available"; /// @@ -104,23 +104,23 @@ namespace DerpingDrivers if (OsVersionInfo.IsWindows10 && OsVersionInfo.OsBits == OsVersionInfo.SoftwareArchitecture.Bit64) { - if (UEFIHelper.IsRunningInUEFIMode - && !UEFIHelper.IsSecureBootEnabled + if (UefiHelper.IsRunningInUefiMode + && !UefiHelper.IsSecureBootEnabled && !OsUpgradeDetection.IsGrandfathered) return Encoding.UTF8.GetString(Properties.Resources.win10_x64_uefi_clean); - if (UEFIHelper.IsRunningInUEFIMode - && UEFIHelper.IsSecureBootEnabled + if (UefiHelper.IsRunningInUefiMode + && UefiHelper.IsSecureBootEnabled && !OsUpgradeDetection.IsGrandfathered) return Encoding.UTF8.GetString(Properties.Resources.win10_x64_uefi_secure_clean); - if (UEFIHelper.IsRunningInUEFIMode - && UEFIHelper.IsSecureBootEnabled + if (UefiHelper.IsRunningInUefiMode + && UefiHelper.IsSecureBootEnabled && OsUpgradeDetection.IsGrandfathered) return Encoding.UTF8.GetString(Properties.Resources.win10_x64_uefi_secure_upgraded); - if (UEFIHelper.IsRunningInUEFIMode - && !UEFIHelper.IsSecureBootEnabled + if (UefiHelper.IsRunningInUefiMode + && !UefiHelper.IsSecureBootEnabled && OsUpgradeDetection.IsGrandfathered) return Encoding.UTF8.GetString(Properties.Resources.win10_x64_uefi_upgraded); } diff --git a/DerpingDrivers/Util/UEFIHelper.cs b/DerpingDrivers/Util/UEFIHelper.cs index b870b67..608ecec 100644 --- a/DerpingDrivers/Util/UEFIHelper.cs +++ b/DerpingDrivers/Util/UEFIHelper.cs @@ -4,7 +4,7 @@ using Microsoft.Win32; namespace DerpingDrivers.Util { - public class UEFIHelper + public class UefiHelper { /// /// Checks if Secure Boot is enabled. @@ -26,7 +26,7 @@ namespace DerpingDrivers.Util /// Checks if the current system is running in UEFI or Legacy BIOS mode. /// /// https://theroadtodelphi.com/2013/02/19/how-distinguish-when-windows-was-installed-in-legacy-bios-or-uefi-mode-using-delphi/ - public static bool IsRunningInUEFIMode + public static bool IsRunningInUefiMode { get {