From 02f086e8ecc56838ccf7caab5271cb69e8ac836c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=B6glinger-Stelzer?= Date: Fri, 26 Oct 2018 23:42:59 +0200 Subject: [PATCH] Updated viewer control --- DerpingDrivers/MainWindow.xaml.cs | 64 +++++++++++++------ .../Resources/win10_x64_uefi_clean.md | 7 ++ 2 files changed, 51 insertions(+), 20 deletions(-) diff --git a/DerpingDrivers/MainWindow.xaml.cs b/DerpingDrivers/MainWindow.xaml.cs index 872995a..1dc2fc5 100644 --- a/DerpingDrivers/MainWindow.xaml.cs +++ b/DerpingDrivers/MainWindow.xaml.cs @@ -1,16 +1,11 @@ using System.Diagnostics; -using System.IO; -using System.Reflection; using System.Text; using System.Windows; -using System.Windows.Documents; -using System.Xaml; +using System.Windows.Input; using DerpingDrivers.Util; using MahApps.Metro.Controls; using Markdig; using Markdig.Wpf; -using Markdown = Markdig.Wpf.Markdown; -using XamlReader = System.Windows.Markup.XamlReader; namespace DerpingDrivers { @@ -26,13 +21,6 @@ namespace DerpingDrivers Loaded += OnLoaded; } - private void OnLoaded(object sender, RoutedEventArgs e) - { - SummaryViewer.Pipeline = new MarkdownPipelineBuilder().UseSupportedExtensions().Build(); - - SummaryViewer.Markdown = MatchingSummaryContent; - } - /// /// Gets Operating System Architecture display name. /// @@ -81,20 +69,56 @@ namespace DerpingDrivers { get { - if (!CodeIntegrityHelper.IsTestSignEnabled) - { + #region TESTSIGNING mode + + if (CodeIntegrityHelper.IsTestSignEnabled) return Encoding.UTF8.GetString(Properties.Resources.testsigning); - } - if (OsVersionInfo.IsWindows10) - { + #endregion - } + #region Windows 10, x64 + + if (OsVersionInfo.IsWindows10 + && OsVersionInfo.OsBits == OsVersionInfo.SoftwareArchitecture.Bit64 + && UEFIHelper.IsRunningInUEFIMode + && !UEFIHelper.IsSecureBootEnabled + && !OsUpgradeDetection.IsGrandfathered) + return Encoding.UTF8.GetString(Properties.Resources.win10_x64_uefi_clean); + + if (OsVersionInfo.IsWindows10 + && OsVersionInfo.OsBits == OsVersionInfo.SoftwareArchitecture.Bit64 + && UEFIHelper.IsRunningInUEFIMode + && UEFIHelper.IsSecureBootEnabled + && !OsUpgradeDetection.IsGrandfathered) + return Encoding.UTF8.GetString(Properties.Resources.win10_x64_uefi_secure_clean); + + if (OsVersionInfo.IsWindows10 + && OsVersionInfo.OsBits == OsVersionInfo.SoftwareArchitecture.Bit64 + && UEFIHelper.IsRunningInUEFIMode + && UEFIHelper.IsSecureBootEnabled + && OsUpgradeDetection.IsGrandfathered) + return Encoding.UTF8.GetString(Properties.Resources.win10_x64_uefi_secure_upgraded); + + if (OsVersionInfo.IsWindows10 + && OsVersionInfo.OsBits == OsVersionInfo.SoftwareArchitecture.Bit64 + && UEFIHelper.IsRunningInUEFIMode + && !UEFIHelper.IsSecureBootEnabled + && OsUpgradeDetection.IsGrandfathered) + return Encoding.UTF8.GetString(Properties.Resources.win10_x64_uefi_upgraded); + + #endregion return "*None available*"; } } + private void OnLoaded(object sender, RoutedEventArgs e) + { + SummaryViewer.Pipeline = new MarkdownPipelineBuilder().UseSupportedExtensions().Build(); + + SummaryViewer.Markdown = MatchingSummaryContent; + } + private void Web_OnClick(object sender, RoutedEventArgs e) { Process.Start("https://vigem.org"); @@ -110,7 +134,7 @@ namespace DerpingDrivers Process.Start("https://forums.vigem.org"); } - private void OpenHyperlink(object sender, System.Windows.Input.ExecutedRoutedEventArgs e) + private void OpenHyperlink(object sender, ExecutedRoutedEventArgs e) { Process.Start(e.Parameter.ToString()); } diff --git a/DerpingDrivers/Resources/win10_x64_uefi_clean.md b/DerpingDrivers/Resources/win10_x64_uefi_clean.md index e69de29..6195ceb 100644 --- a/DerpingDrivers/Resources/win10_x64_uefi_clean.md +++ b/DerpingDrivers/Resources/win10_x64_uefi_clean.md @@ -0,0 +1,7 @@ +# Windows 10 64-bits (UEFI) + +## Abstract + +- 👌 running on [64-Bit](https://en.wikipedia.org/wiki/X86-64) installation; you can use more than 4 GiB of memory. +- 👌 running in [UEFI mode](https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface); you can use all modern features of your mainboard and processor like booting from drives greater than 2 TiB and advanced security solutions like [TPM chips](https://en.wikipedia.org/wiki/Trusted_Platform_Module) and [Secure Boot](https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface#Secure_boot_criticism). +- ⚠️ Secure Boot is available but disabled. \ No newline at end of file