1
0

Refactored class name

This commit is contained in:
Benjamin Höglinger-Stelzer 2018-11-12 02:17:32 +01:00
parent 43216b4d92
commit ae6eee2a5b
2 changed files with 13 additions and 13 deletions

View File

@ -45,13 +45,13 @@ namespace DerpingDrivers
/// <summary> /// <summary>
/// Gets Boot mode (Legacy BIOS, UEFI). /// Gets Boot mode (Legacy BIOS, UEFI).
/// </summary> /// </summary>
public string BootMode => UEFIHelper.IsRunningInUEFIMode ? "UEFI" : "Legacy BIOS"; public string BootMode => UefiHelper.IsRunningInUefiMode ? "UEFI" : "Legacy BIOS";
/// <summary> /// <summary>
/// Gets Secure Boot status. /// Gets Secure Boot status.
/// </summary> /// </summary>
public string SecureBootEnabled => UEFIHelper.IsRunningInUEFIMode public string SecureBootEnabled => UefiHelper.IsRunningInUefiMode
? (UEFIHelper.IsSecureBootEnabled ? "Enabled" : "Disabled") ? (UefiHelper.IsSecureBootEnabled ? "Enabled" : "Disabled")
: "Not available"; : "Not available";
/// <summary> /// <summary>
@ -104,23 +104,23 @@ namespace DerpingDrivers
if (OsVersionInfo.IsWindows10 if (OsVersionInfo.IsWindows10
&& OsVersionInfo.OsBits == OsVersionInfo.SoftwareArchitecture.Bit64) && OsVersionInfo.OsBits == OsVersionInfo.SoftwareArchitecture.Bit64)
{ {
if (UEFIHelper.IsRunningInUEFIMode if (UefiHelper.IsRunningInUefiMode
&& !UEFIHelper.IsSecureBootEnabled && !UefiHelper.IsSecureBootEnabled
&& !OsUpgradeDetection.IsGrandfathered) && !OsUpgradeDetection.IsGrandfathered)
return Encoding.UTF8.GetString(Properties.Resources.win10_x64_uefi_clean); return Encoding.UTF8.GetString(Properties.Resources.win10_x64_uefi_clean);
if (UEFIHelper.IsRunningInUEFIMode if (UefiHelper.IsRunningInUefiMode
&& UEFIHelper.IsSecureBootEnabled && UefiHelper.IsSecureBootEnabled
&& !OsUpgradeDetection.IsGrandfathered) && !OsUpgradeDetection.IsGrandfathered)
return Encoding.UTF8.GetString(Properties.Resources.win10_x64_uefi_secure_clean); return Encoding.UTF8.GetString(Properties.Resources.win10_x64_uefi_secure_clean);
if (UEFIHelper.IsRunningInUEFIMode if (UefiHelper.IsRunningInUefiMode
&& UEFIHelper.IsSecureBootEnabled && UefiHelper.IsSecureBootEnabled
&& OsUpgradeDetection.IsGrandfathered) && OsUpgradeDetection.IsGrandfathered)
return Encoding.UTF8.GetString(Properties.Resources.win10_x64_uefi_secure_upgraded); return Encoding.UTF8.GetString(Properties.Resources.win10_x64_uefi_secure_upgraded);
if (UEFIHelper.IsRunningInUEFIMode if (UefiHelper.IsRunningInUefiMode
&& !UEFIHelper.IsSecureBootEnabled && !UefiHelper.IsSecureBootEnabled
&& OsUpgradeDetection.IsGrandfathered) && OsUpgradeDetection.IsGrandfathered)
return Encoding.UTF8.GetString(Properties.Resources.win10_x64_uefi_upgraded); return Encoding.UTF8.GetString(Properties.Resources.win10_x64_uefi_upgraded);
} }

View File

@ -4,7 +4,7 @@ using Microsoft.Win32;
namespace DerpingDrivers.Util namespace DerpingDrivers.Util
{ {
public class UEFIHelper public class UefiHelper
{ {
/// <summary> /// <summary>
/// Checks if Secure Boot is enabled. /// 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. /// Checks if the current system is running in UEFI or Legacy BIOS mode.
/// </summary> /// </summary>
/// <remarks>https://theroadtodelphi.com/2013/02/19/how-distinguish-when-windows-was-installed-in-legacy-bios-or-uefi-mode-using-delphi/</remarks> /// <remarks>https://theroadtodelphi.com/2013/02/19/how-distinguish-when-windows-was-installed-in-legacy-bios-or-uefi-mode-using-delphi/</remarks>
public static bool IsRunningInUEFIMode public static bool IsRunningInUefiMode
{ {
get get
{ {