Portable Tool for an Ideal Windows Setup
C# activatorbloatware-removalcsharpdebloatdebloaterdisable-servicesmonitoring-systemportableprivacy-toolsregistry-tweakssystem-tuningsystem-utilitytelemetrytweakerwindows-10windows-11windows-debloatwindows-defenderwindows-optimizationwindows-tweaks
-correcting the deletion of a name with spaces and returning the standard value for the language
Greedekse54003be1720
diff --git a/.Source/GTweak/App.xaml.cs b/.Source/GTweak/App.xaml.csindex 845fd54c..d5e4fc04 100644--- a/.Source/GTweak/App.xaml.cs+++ b/.Source/GTweak/App.xaml.cs@@ -57,17 +57,10 @@ namespace GTweak{Source = value switch{- "en" => new Uri("Languages/en/Localize.xaml", UriKind.Relative),- "ko" => new Uri("Languages/ko/Localize.xaml", UriKind.Relative),"ru" => new Uri("Languages/ru/Localize.xaml", UriKind.Relative),+ "ko" => new Uri("Languages/ko/Localize.xaml", UriKind.Relative),"uk" => new Uri("Languages/uk/Localize.xaml", UriKind.Relative),- _ => GettingSystemLanguage switch- {- string lang when lang.Contains("ko") => new Uri("Languages/ko/Localize.xaml", UriKind.Relative),- string lang when lang.Contains("ru") => new Uri("Languages/ru/Localize.xaml", UriKind.Relative),- string lang when lang.Contains("uk") => new Uri("Languages/uk/Localize.xaml", UriKind.Relative),- _ => new Uri("Languages/en/Localize.xaml", UriKind.Relative)- }+ _ => new Uri("Languages/en/Localize.xaml", UriKind.Relative),}};diff --git a/.Source/GTweak/Utilities/Control/SettingsRepository.cs b/.Source/GTweak/Utilities/Control/SettingsRepository.csindex 5200bd8c..c6c856b6 100644--- a/.Source/GTweak/Utilities/Control/SettingsRepository.cs+++ b/.Source/GTweak/Utilities/Control/SettingsRepository.cs@@ -166,8 +166,8 @@ namespace GTweak.Utilities.ControlRegistryHelp.DeleteFolderTree(Registry.LocalMachine, @"SOFTWARE\Microsoft\Tracing\GTweak_RASAPI32");RegistryHelp.DeleteFolderTree(Registry.LocalMachine, @"SOFTWARE\Microsoft\Tracing\GTweak_RASMANCS");- CommandExecutor.RunCommand($"/c taskkill /f /im {currentName} & choice /c y /n /d y /t 3 & del {new FileInfo(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath).Name} & " +- @$"rd /s /q {StoragePaths.FolderLocation} & rd /s /q {Environment.SystemDirectory}\config\systemprofile\AppData\Local\GTweak");+ CommandExecutor.RunCommand($"/c taskkill /f /im \"{currentName}\" & choice /c y /n /d y /t 3 & del \"{new FileInfo(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath).Name}\" & " ++ @$"rd /s /q ""{StoragePaths.FolderLocation}"" & rd /s /q ""{Environment.SystemDirectory}\config\systemprofile\AppData\Local\GTweak""");}catch (Exception ex) { ErrorLogging.LogDebug(ex); }}diff --git a/.Source/GTweak/Utilities/Tweaks/SystemTweaks.cs b/.Source/GTweak/Utilities/Tweaks/SystemTweaks.csindex d6fb7e02..d6aae42e 100644--- a/.Source/GTweak/Utilities/Tweaks/SystemTweaks.cs+++ b/.Source/GTweak/Utilities/Tweaks/SystemTweaks.cs@@ -455,7 +455,7 @@ namespace GTweak.Utilities.Tweaks_powercfg.Start();}- CommandExecutor.RunCommand($"/c timeout /t 10 && rd /s /q {StoragePaths.FolderLocation}");+ CommandExecutor.RunCommand($"/c timeout /t 10 && rd /s /q \"{StoragePaths.FolderLocation}\"");}}elsediff --git a/.Source/GTweak/View/DataSystemView.xaml.cs b/.Source/GTweak/View/DataSystemView.xaml.csindex 46b4a72f..132aeeae 100644--- a/.Source/GTweak/View/DataSystemView.xaml.cs+++ b/.Source/GTweak/View/DataSystemView.xaml.cs@@ -32,8 +32,7 @@ namespace GTweak.View{ SystemDiagnostics.ConnectionStatus.Lose, "connection_lose_systemInformation" },{ SystemDiagnostics.ConnectionStatus.Block, "connection_block_systemInformation" },{ SystemDiagnostics.ConnectionStatus.Limited, "limited_systemInformation" }- }.TryGetValue(SystemDiagnostics.CurrentConnection,- out string resourceKey)) { SystemDiagnostics.HardwareData["UserIpAddress"] = (string)FindResource(resourceKey); }+ }.TryGetValue(SystemDiagnostics.CurrentConnection, out string resourceKey)) { SystemDiagnostics.HardwareData["UserIpAddress"] = (string)FindResource(resourceKey); }DataContext = new DataSystemVM();};diff --git a/.Source/GTweak/Windows/MainWindow.xaml.cs b/.Source/GTweak/Windows/MainWindow.xaml.csindex 4dd8ff04..d624c006 100644--- a/.Source/GTweak/Windows/MainWindow.xaml.cs+++ b/.Source/GTweak/Windows/MainWindow.xaml.cs@@ -26,17 +26,17 @@ namespace GTweakBtnTopMost.StateNA = Topmost = SettingsRepository.IsTopMost;BtnSoundNtn.IsChecked = SettingsRepository.IsPlayingSound;SliderVolume.Value = SettingsRepository.Volume;- LanguageSelectionMenu.SelectedIndex = GetSelectedIndex(SettingsRepository.Language, SettingsRepository.AvailableLangs);- ThemeSelectionMenu.SelectedIndex = GetSelectedIndex(SettingsRepository.Theme, SettingsRepository.AvailableThemes);+ LanguageSelectionMenu.SelectedIndex = GetSelectedIndex(SettingsRepository.Language, "en", SettingsRepository.AvailableLangs);+ ThemeSelectionMenu.SelectedIndex = GetSelectedIndex(SettingsRepository.Theme, "Dark", SettingsRepository.AvailableThemes);App.ImportTweaksUpdate += delegate { BtnMore.IsChecked = true; };App.ThemeChanged += delegate { this.Close(); new RebootWindow().ShowDialog(); };}- private int GetSelectedIndex(string value, params string[] listing)+ private int GetSelectedIndex(string value, string defaultValue, params string[] listing){int index = Array.IndexOf(listing, value);- return index >= 0 ? index : listing.Length;+ return index >= 0 ? index : Array.IndexOf(listing, defaultValue);}#region Button Title/Animation Window