Portable Tool for an Ideal Windows Setup
C# activatorbloatware-removalcsharpdebloatdebloaterdisable-servicesmonitoring-systemportableprivacy-toolsregistry-tweakssystem-tuningsystem-utilitytelemetrytweakerwindows-10windows-11windows-debloatwindows-defenderwindows-optimizationwindows-tweaks
correction language codes & add. official DNS sites per region
Greedeksfce85c2e0a87
diff --git a/.Source/GTweak/Utilities/Configuration/SystemDiagnostics.cs b/.Source/GTweak/Utilities/Configuration/SystemDiagnostics.csindex 8ed2f096..56b7df48 100644--- a/.Source/GTweak/Utilities/Configuration/SystemDiagnostics.cs+++ b/.Source/GTweak/Utilities/Configuration/SystemDiagnostics.cs@@ -78,10 +78,11 @@ namespace GTweak.Utilities.Configurationinternal static ConnectionStatus CurrentConnection = ConnectionStatus.Lose;- internal static (string Сode, string Region) GetCurrentSystemLang()+ internal static (string Code, string Region) GetCurrentSystemLang(){- Match systemLang = Regex.Match(CultureInfo.CurrentUICulture.Name, @"^(?<code>[a-z]{2,3})(?:-(?<region>[A-Za-z]{2,4}))?$", RegexOptions.IgnoreCase | RegexOptions.ExplicitCapture | RegexOptions.CultureInvariant);- return (systemLang.Groups["code"].Value, systemLang.Groups["region"].Value);+ CultureInfo culture = CultureInfo.CurrentUICulture;+ string[] parts = culture.Name.Split('-');+ return (culture.TwoLetterISOLanguageName.ToLowerInvariant(), parts.Length > 1 ? parts[1].ToLowerInvariant() : string.Empty);}internal static bool IsNeedUpdate { get; private set; } = false;@@ -492,7 +493,7 @@ namespace GTweak.Utilities.Configuration{try{- string dns = GetCurrentSystemLang().Сode switch+ string dns = GetCurrentSystemLang().Code switch{"fa" => "aparat.com","zh" => "baidu.com",@@ -500,19 +501,26 @@ namespace GTweak.Utilities.Configuration"kk" => "yandex.kz","ko" => "naver.com","cs" => "seznam.cz",- "tm" => "turkmenportal.com",- "vn" => "coccoc.com",- "cu" => "ecured.cu",- "kp" => "naenara.com.kp",- "sy" => "duckduckgo.com",- "jp" => "yahoo.co.jp",+ "tk" => "turkmenportal.com",+ "vi" => "fpt.vn",+ "es" => "terra.es",+ "ja" => "yahoo.co.jp","de" => "t-online.de","fr" => "orange.fr",- "es" => "terra.es","it" => "libero.it","th" => "true.th",- "vi" => "fpt.vn",- string name when new[] { "tr", "in", "ar" }.Contains(name) => "bing.com",+ "pl" => "wp.pl",+ "nl" => "nu.nl",+ "pt" => "globo.com",+ "sv" => "aftonbladet.se",+ "no" => "vg.no",+ "fi" => "yle.fi",+ "ro" => "digisport.ro",+ "gr" => "in.gr",+ "id" => "detik.com",+ "mx" => "univision.com",+ "ar" => "claro.com.ar",+ string name when new[] { "tr", "hi", "ar" }.Contains(name) => "bing.com",_ => "google.com"};diff --git a/.Source/GTweak/Utilities/Controls/SettingsEngine.cs b/.Source/GTweak/Utilities/Controls/SettingsEngine.csindex a8501830..446e0cfa 100644--- a/.Source/GTweak/Utilities/Controls/SettingsEngine.cs+++ b/.Source/GTweak/Utilities/Controls/SettingsEngine.cs@@ -33,7 +33,7 @@ namespace GTweak.Utilities.Controls["EnableIpBlur"] = true,["EnableSound"] = true,["VolumeLevel"] = 50,- ["Language"] = SystemDiagnostics.GetCurrentSystemLang().Сode,+ ["Language"] = SystemDiagnostics.GetCurrentSystemLang().Code,["Theme"] = "Dark"};diff --git a/.Source/GTweak/Utilities/Tweaks/DefenderManager/BackupRights.cs b/.Source/GTweak/Utilities/Tweaks/DefenderManager/BackupRights.csindex 2de9f39f..909bee7a 100644--- a/.Source/GTweak/Utilities/Tweaks/DefenderManager/BackupRights.cs+++ b/.Source/GTweak/Utilities/Tweaks/DefenderManager/BackupRights.cs@@ -6,7 +6,6 @@ using System;using System.Collections.Generic;using System.IO;using System.Security.AccessControl;-using System.Windows.Shapes;namespace GTweak.Utilities.Tweaks.DefenderManager{