From 856657b8b8f5d8fca2037e3b8ab989b7e0882703 Mon Sep 17 00:00:00 2001 From: Ichimaki Kasura Date: Sun, 18 Jun 2023 21:39:26 +0800 Subject: [PATCH] Dev Commit Setting's "Other" tab are now functional. --- src/App.xaml.cs | 2 +- src/HoyoLauncher.Core/HoyoMain.cs | 6 +- src/HoyoLauncherSettings/HoyoSettings.xaml | 244 +++++++++++++++++- src/HoyoLauncherSettings/HoyoSettings.xaml.cs | 61 +++-- .../Settings.OthersTab/RadioButtons.cs | 35 +++ .../Settings.OthersTab/Tooltips.cs | 34 +++ src/Properties/Settings.Designer.cs | 30 ++- src/Properties/Settings.settings | 8 +- 8 files changed, 387 insertions(+), 33 deletions(-) create mode 100644 src/HoyoLauncherSettings/Settings.OthersTab/RadioButtons.cs create mode 100644 src/HoyoLauncherSettings/Settings.OthersTab/Tooltips.cs diff --git a/src/App.xaml.cs b/src/App.xaml.cs index ffefe27..64ee698 100644 --- a/src/App.xaml.cs +++ b/src/App.xaml.cs @@ -64,7 +64,7 @@ public static void AppMinimizeToTray() { HoyoWindow.WindowState = WindowState.Minimized; - if(AppSettings.Settings.Default.MinimizedTray is false) return; + if(AppSettings.Settings.Default.CHECKBOX_MINIMIZE_TRAY is false) return; HoyoWindow.ShowInTaskbar = false; HoyoWindow.Hide(); diff --git a/src/HoyoLauncher.Core/HoyoMain.cs b/src/HoyoLauncher.Core/HoyoMain.cs index 4e4434c..12e54f3 100644 --- a/src/HoyoLauncher.Core/HoyoMain.cs +++ b/src/HoyoLauncher.Core/HoyoMain.cs @@ -32,7 +32,11 @@ public static void Initialize() ValidateSettings(AppSettings.Settings.Default.HONKAI_STAR_RAIL_DIR, HoyoGames.HonkaiStarRail, HoyoWindow.HONKAI_STAR_RAIL_LAUNCHER, out bool _); ValidateSettings(AppSettings.Settings.Default.HONKAI_IMPACT_THIRD_DIR, HoyoGames.HonkaiImpactThird, HoyoWindow.HONKAI_IMPACT_THIRD_LAUNCHER, out bool _); - LastGame(); + if (!AppSettings.Settings.Default.CHECKBOX_BACKGROUND) + HoyoWindow.MediaElementBG.Source = null; + + if(AppSettings.Settings.Default.CHECKBOX_LASTGAME) + LastGame(); } public static void GameChange(string uid) => diff --git a/src/HoyoLauncherSettings/HoyoSettings.xaml b/src/HoyoLauncherSettings/HoyoSettings.xaml index 1ab1844..c4005d7 100644 --- a/src/HoyoLauncherSettings/HoyoSettings.xaml +++ b/src/HoyoLauncherSettings/HoyoSettings.xaml @@ -1,8 +1,6 @@  - + - - + + + Put the app to System Tray when Game Launched or Minimized. Does not affect the Exit button. + + - + @@ -83,6 +84,9 @@ + + Enable or Disable the Automatic Select on the last game choosed. + @@ -90,7 +94,233 @@ - +