1
0

Code de-duplication

This commit is contained in:
Benjamin Höglinger-Stelzer 2018-10-26 23:50:33 +02:00
parent 19e42418cd
commit 3649ef508c

View File

@ -79,32 +79,28 @@ namespace DerpingDrivers
#region Windows 10, x64 #region Windows 10, x64
if (OsVersionInfo.IsWindows10 if (OsVersionInfo.IsWindows10
&& OsVersionInfo.OsBits == OsVersionInfo.SoftwareArchitecture.Bit64 && OsVersionInfo.OsBits == OsVersionInfo.SoftwareArchitecture.Bit64)
&& 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 (OsVersionInfo.IsWindows10 if (UEFIHelper.IsRunningInUEFIMode
&& OsVersionInfo.OsBits == OsVersionInfo.SoftwareArchitecture.Bit64
&& 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 (OsVersionInfo.IsWindows10 if (UEFIHelper.IsRunningInUEFIMode
&& OsVersionInfo.OsBits == OsVersionInfo.SoftwareArchitecture.Bit64
&& 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 (OsVersionInfo.IsWindows10 if (UEFIHelper.IsRunningInUEFIMode
&& OsVersionInfo.OsBits == OsVersionInfo.SoftwareArchitecture.Bit64
&& 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);
}
#endregion #endregion