From 985cbdb787a65e5ed22a65b90bcd5d9d44569ec5 Mon Sep 17 00:00:00 2001 From: echov1b1t Date: Fri, 9 Jan 2026 00:11:12 +0200 Subject: [PATCH] Fixed EXE and Command generation, made the qr code transparent by default --- BluescreenSimulator/CmdParameterAttribute.cs | 2 +- BluescreenSimulator/Models/Windows10Bluescreen.cs | 5 +++-- BluescreenSimulator/Properties/AssemblyInfo.cs | 4 ++-- .../ViewModels/Windows10BluescreenViewModel.cs | 11 +++++++++-- BluescreenSimulator/Views/BluescreenWindow.xaml | 4 +++- BluescreenSimulator/Views/BluescreenWindow.xaml.cs | 7 ++++--- 6 files changed, 22 insertions(+), 11 deletions(-) diff --git a/BluescreenSimulator/CmdParameterAttribute.cs b/BluescreenSimulator/CmdParameterAttribute.cs index 76a6239..ba431f1 100644 --- a/BluescreenSimulator/CmdParameterAttribute.cs +++ b/BluescreenSimulator/CmdParameterAttribute.cs @@ -98,7 +98,7 @@ private static bool TryGetColor(string c, out Color result) { if (!c.StartsWith("#")) c = $"#{c}"; // Removes the F at the beginning, which makes the resulting hex be 7 chars long, not 6 - c = $"#{c.Substring(2)}"; + c = $"#{c.Substring(3)}"; try { var color = ColorConverter.ConvertFromString(c) as Color?; diff --git a/BluescreenSimulator/Models/Windows10Bluescreen.cs b/BluescreenSimulator/Models/Windows10Bluescreen.cs index bd90e58..310ddb5 100644 --- a/BluescreenSimulator/Models/Windows10Bluescreen.cs +++ b/BluescreenSimulator/Models/Windows10Bluescreen.cs @@ -1,4 +1,4 @@ -using Strings = BluescreenSimulator.Properties.Windows10BluescreenResources; +using Strings = BluescreenSimulator.Properties.Windows10BluescreenResources; namespace BluescreenSimulator { public class Windows10Bluescreen : BluescreenBase @@ -19,7 +19,8 @@ public class Windows10Bluescreen : BluescreenBase public bool HideQR { get; set; } = false; - public bool UseOriginalQR { get; set; } = true; + // NOTE: transparent QR code is used by default + public bool UseOriginalQR { get; set; } = false; public double TextDelay { get; set; } } diff --git a/BluescreenSimulator/Properties/AssemblyInfo.cs b/BluescreenSimulator/Properties/AssemblyInfo.cs index 8c195da..5f67729 100644 --- a/BluescreenSimulator/Properties/AssemblyInfo.cs +++ b/BluescreenSimulator/Properties/AssemblyInfo.cs @@ -49,8 +49,8 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.4.0")] -[assembly: AssemblyFileVersion("3.4.0")] +[assembly: AssemblyVersion("3.4.1")] +[assembly: AssemblyFileVersion("3.4.1")] namespace BluescreenSimulator.Properties { diff --git a/BluescreenSimulator/ViewModels/Windows10BluescreenViewModel.cs b/BluescreenSimulator/ViewModels/Windows10BluescreenViewModel.cs index de2d0ac..ba470ea 100644 --- a/BluescreenSimulator/ViewModels/Windows10BluescreenViewModel.cs +++ b/BluescreenSimulator/ViewModels/Windows10BluescreenViewModel.cs @@ -1,4 +1,4 @@ -using System.Threading; +using System.Threading; using BluescreenSimulator.Views; namespace BluescreenSimulator.ViewModels @@ -65,9 +65,16 @@ public string StopCode public bool HideQR { get => Model.HideQR; - set => SetModelProperty(value, others: nameof(ShowQR)); + set + { + // NOTE: fixed qr visibility issue + SetModelProperty(value, others: nameof(ShowQR)); + OnPropertyChanged(nameof(ShowQR)); + } } + // NOTE: made ShowQR computed property that depends on HideQR + // OnPropertyChanged call above should ensure UI update when this property's value changes public bool ShowQR => !HideQR; [CmdParameter("-oq", Description = "Use original QR code", FullAlias = "origqr")] public bool UseOriginalQR diff --git a/BluescreenSimulator/Views/BluescreenWindow.xaml b/BluescreenSimulator/Views/BluescreenWindow.xaml index 43bbb9b..94f9e11 100644 --- a/BluescreenSimulator/Views/BluescreenWindow.xaml +++ b/BluescreenSimulator/Views/BluescreenWindow.xaml @@ -1,4 +1,4 @@ -