diff --git a/AppControl Manager/Logic/Main/BasePolicyCreator.cs b/AppControl Manager/Logic/Main/BasePolicyCreator.cs index 7d753f53a..d3b9f769a 100644 --- a/AppControl Manager/Logic/Main/BasePolicyCreator.cs +++ b/AppControl Manager/Logic/Main/BasePolicyCreator.cs @@ -137,7 +137,8 @@ internal static void SetAutoUpdateDriverBlockRules() #region Register Task - // Register the scheduled task. If the task's state is disabled, it will be overwritten with a new task that is enabled + // Register the scheduled task. + // If the task's state is disabled or its configuration is invalid, it will be replaced with a new correct task as this step is overwriting. using ManagementClass registerClass = new(scope, new ManagementPath("PS_ScheduledTask"), null); // Prepare method parameters to register the task @@ -163,10 +164,6 @@ internal static void SetAutoUpdateDriverBlockRules() Logger.Write("Successfully created the Microsoft Recommended Driver Block Rules auto updater scheduled task."); - - Logger.Write("Displaying extra info about the Microsoft recommended Drivers block list"); - _ = DriversBlockListInfoGathering(); - } internal sealed class DriverBlockListInfo @@ -312,9 +309,6 @@ internal static void DeployDriversBlockRules(string StagingArea) CiToolHelper.RefreshPolicy(); Logger.Write("SiPolicy.p7b has been deployed and policies refreshed."); - - Logger.Write("Displaying extra info about the Microsoft recommended Drivers block list"); - _ = DriversBlockListInfoGathering(); } @@ -368,9 +362,6 @@ internal static void GetDriversBlockRules(string StagingArea) CiRuleOptions.Set(filePath: xmlPath, rulesToRemove: [CiRuleOptions.PolicyRuleOptions.EnabledAuditMode]); - Logger.Write($"Displaying extra info about the {name}"); - _ = DriversBlockListInfoGathering(); - // The final path where the XML policy file will be located string savePathLocation = Path.Combine(GlobalVars.UserConfigDir, $"{name}.xml"); diff --git a/AppControl Manager/MainWindow.xaml b/AppControl Manager/MainWindow.xaml index eb7f305e6..4a2ec3cd6 100644 --- a/AppControl Manager/MainWindow.xaml +++ b/AppControl Manager/MainWindow.xaml @@ -107,9 +107,8 @@ Width="16" Height="16" Margin="8,0,4,0"/> - - + diff --git a/AppControl Manager/MainWindow.xaml.cs b/AppControl Manager/MainWindow.xaml.cs index dfe792b77..4f44ac6ef 100644 --- a/AppControl Manager/MainWindow.xaml.cs +++ b/AppControl Manager/MainWindow.xaml.cs @@ -237,7 +237,6 @@ public MainWindow() m_AppWindow = this.AppWindow; // Some event handlers - Activated += MainWindow_Activated; AppTitleBar.SizeChanged += AppTitleBar_SizeChanged; AppTitleBar.Loaded += AppTitleBar_Loaded; @@ -440,13 +439,20 @@ private static RectInt32 GetRect(Rect bounds, double scale) } + + /* + + This will make keep the title bar text white even on light theme, making it unreadable + It's not even necessary to change the text based on Window being in focus or not + /// - /// Ensures the TitleBar follows the app's appearance when the window is in and out of focus + /// Ensures the TitleBar's text follows the app's appearance when the window is in and out of focus /// /// /// private void MainWindow_Activated(object sender, WindowActivatedEventArgs args) { + if (args.WindowActivationState == WindowActivationState.Deactivated) { TitleBarTextBlock.Foreground = @@ -457,8 +463,11 @@ private void MainWindow_Activated(object sender, WindowActivatedEventArgs args) TitleBarTextBlock.Foreground = (SolidColorBrush)Application.Current.Resources["WindowCaptionForeground"]; } + } + */ + /// /// Main Window close event diff --git a/AppControl Manager/Pages/CreatePolicy.xaml b/AppControl Manager/Pages/CreatePolicy.xaml index 6e98dd99b..6f58bec73 100644 --- a/AppControl Manager/Pages/CreatePolicy.xaml +++ b/AppControl Manager/Pages/CreatePolicy.xaml @@ -288,14 +288,28 @@ Style="{StaticResource AccentButtonStyle}" Click="SignedAndReputableCreateAndDep Header="Create Microsoft Recommended Driver Block Rules" HeaderIcon="{ui:FontIcon Glyph=}"> + + + + + -