Skip to content

Portable Tool for an Ideal Windows Setup

-re code

Greedeks297ff642ca41
diff --git a/.Source/GTweak/Core/ViewModel/DataSystemVM.cs b/.Source/GTweak/Core/ViewModel/DataSystemVM.cs
index f56b72a0..c7a81584 100644
--- a/.Source/GTweak/Core/ViewModel/DataSystemVM.cs
+++ b/.Source/GTweak/Core/ViewModel/DataSystemVM.cs
@@ -44,20 +44,20 @@ namespace GTweak.Core.ViewModel
DisplayData = new ObservableCollection<DataSystemModel>
{
- new DataSystemModel { Name = "Windows", Data = SystemСonfiguration.СonfigurationData["Windows"] },
- new DataSystemModel { Name = "Processes", Data = new MonitoringSystem().GetNumberRunningProcesses },
- new DataSystemModel { Name = "Bios", Data = !string.IsNullOrEmpty(SystemСonfiguration.СonfigurationData["BIOS"]) ? SystemСonfiguration.СonfigurationData["BIOS"] : (string)Application.Current.Resources["no_device_information_systemInformatin"] },
- new DataSystemModel { Name = "Motherboard", Data = !string.IsNullOrEmpty(SystemСonfiguration.СonfigurationData["MotherBr"]) ? SystemСonfiguration.СonfigurationData["MotherBr"] : (string)Application.Current.Resources["no_device_information_systemInformatin"] },
- new DataSystemModel { Name = "Processor", Data = !string.IsNullOrEmpty(SystemСonfiguration.СonfigurationData["CPU"]) ? SystemСonfiguration.СonfigurationData["CPU"] : (string)Application.Current.Resources["no_device_information_systemInformatin"] },
- new DataSystemModel { Name = "Graphics", Data = !string.IsNullOrEmpty(SystemСonfiguration.СonfigurationData["GPU"]) ? SystemСonfiguration.СonfigurationData["GPU"] : (string)Application.Current.Resources["driver_not_installed_systemInformatin"] },
- new DataSystemModel { Name = "Memory", Data = !string.IsNullOrEmpty(SystemСonfiguration.СonfigurationData["RAM"]) ? SystemСonfiguration.СonfigurationData["RAM"] : (string)Application.Current.Resources["no_device_information_systemInformatin"] },
- new DataSystemModel { Name = "Storage", Data = !string.IsNullOrEmpty(SystemСonfiguration.СonfigurationData["Storage"]) ? SystemСonfiguration.СonfigurationData["Storage"] : (string)Application.Current.Resources["no_device_information_systemInformatin"] },
- new DataSystemModel { Name = "Audio", Data = !string.IsNullOrEmpty(SystemСonfiguration.СonfigurationData["Audio"]) ? SystemСonfiguration.СonfigurationData["Audio"] : (string)Application.Current.Resources["driver_not_installed_systemInformatin"] },
- new DataSystemModel { Name = "Network", Data = !string.IsNullOrEmpty(SystemСonfiguration.СonfigurationData["NetAdapter"]) ? SystemСonfiguration.СonfigurationData["NetAdapter"] : (string)Application.Current.Resources["driver_not_installed_systemInformatin"] },
- new DataSystemModel { Name = "IpAddress", Data = SystemСonfiguration.СonfigurationData["UserIpAddress"] }
+ new DataSystemModel { Name = "Windows", Data = SystemDiagnostics.СonfigurationData["Windows"] },
+ new DataSystemModel { Name = "Processes", Data = new MonitoringSystem().GetNumberRunningProcesses },
+ new DataSystemModel { Name = "Bios", Data = !string.IsNullOrEmpty(SystemDiagnostics.СonfigurationData["BIOS"]) ? SystemDiagnostics.СonfigurationData["BIOS"] : (string)Application.Current.Resources["no_device_information_systemInformatin"] },
+ new DataSystemModel { Name = "Motherboard", Data = !string.IsNullOrEmpty(SystemDiagnostics.СonfigurationData["MotherBr"]) ? SystemDiagnostics.СonfigurationData["MotherBr"] : (string)Application.Current.Resources["no_device_information_systemInformatin"] },
+ new DataSystemModel { Name = "Processor", Data = !string.IsNullOrEmpty(SystemDiagnostics.СonfigurationData["CPU"]) ? SystemDiagnostics.СonfigurationData["CPU"] : (string)Application.Current.Resources["no_device_information_systemInformatin"] },
+ new DataSystemModel { Name = "Graphics", Data = !string.IsNullOrEmpty(SystemDiagnostics.СonfigurationData["GPU"]) ? SystemDiagnostics.СonfigurationData["GPU"] : (string)Application.Current.Resources["driver_not_installed_systemInformatin"] },
+ new DataSystemModel { Name = "Memory", Data = !string.IsNullOrEmpty(SystemDiagnostics.СonfigurationData["RAM"]) ? SystemDiagnostics.СonfigurationData["RAM"] : (string)Application.Current.Resources["no_device_information_systemInformatin"] },
+ new DataSystemModel { Name = "Storage", Data = !string.IsNullOrEmpty(SystemDiagnostics.СonfigurationData["Storage"]) ? SystemDiagnostics.СonfigurationData["Storage"] : (string)Application.Current.Resources["no_device_information_systemInformatin"] },
+ new DataSystemModel { Name = "Audio", Data = !string.IsNullOrEmpty(SystemDiagnostics.СonfigurationData["Audio"]) ? SystemDiagnostics.СonfigurationData["Audio"] : (string)Application.Current.Resources["driver_not_installed_systemInformatin"] },
+ new DataSystemModel { Name = "Network", Data = !string.IsNullOrEmpty(SystemDiagnostics.СonfigurationData["NetAdapter"]) ? SystemDiagnostics.СonfigurationData["NetAdapter"] : (string)Application.Current.Resources["driver_not_installed_systemInformatin"] },
+ new DataSystemModel { Name = "IpAddress", Data = SystemDiagnostics.СonfigurationData["UserIpAddress"] }
};
- if (Settings.IsHiddenIpAddress & SystemСonfiguration.CurrentConnection == SystemСonfiguration.ConnectionStatus.Available)
+ if (Settings.IsHiddenIpAddress & SystemDiagnostics.CurrentConnection == SystemDiagnostics.ConnectionStatus.Available)
{
SetBlurValue = 20;
SetVisibility = Visibility.Visible;
@@ -65,7 +65,7 @@ namespace GTweak.Core.ViewModel
else
{
SetBlurValue = 0;
- SetVisibility = SystemСonfiguration.CurrentConnection == SystemСonfiguration.ConnectionStatus.Available ? Visibility.Visible : Visibility.Hidden;
+ SetVisibility = SystemDiagnostics.CurrentConnection == SystemDiagnostics.ConnectionStatus.Available ? Visibility.Visible : Visibility.Hidden;
}
}
}
diff --git a/.Source/GTweak/Core/ViewModel/InterfaceVM.cs b/.Source/GTweak/Core/ViewModel/InterfaceVM.cs
index 9ddf94c6..39dd422e 100644
--- a/.Source/GTweak/Core/ViewModel/InterfaceVM.cs
+++ b/.Source/GTweak/Core/ViewModel/InterfaceVM.cs
@@ -4,7 +4,7 @@ namespace GTweak.Core.ViewModel
{
internal class InterfaceVM : ViewModelBase
{
- public bool IsBlockForWin10 => SystemСonfiguration.WindowsClientVersion.Contains("11");
+ public bool IsBlockForWin10 => SystemDiagnostics.WindowsClientVersion.Contains("11");
public bool IsBlockWithoutLicense => WindowsLicense.IsWindowsActivated;
}
}
diff --git a/.Source/GTweak/Core/ViewModel/MainViewModel.cs b/.Source/GTweak/Core/ViewModel/MainViewModel.cs
index 45293b9b..39668841 100644
--- a/.Source/GTweak/Core/ViewModel/MainViewModel.cs
+++ b/.Source/GTweak/Core/ViewModel/MainViewModel.cs
@@ -17,9 +17,9 @@ namespace GTweak.Core.ViewModel
set { _currentView = value; OnPropertyChanged(); }
}
- public ImageSource DisplayProfileAvatar => SystemСonfiguration.GetProfileImage() ?? Application.Current.Resources["DI_AvatarProfile"] as DrawingImage;
+ public ImageSource DisplayProfileAvatar => SystemDiagnostics.GetProfileImage() ?? Application.Current.Resources["DI_AvatarProfile"] as DrawingImage;
- public string DisplayProfileName => SystemСonfiguration.GetProfileName();
+ public string DisplayProfileName => SystemDiagnostics.GetProfileName();
public string DisplayTweakVersion => (Assembly.GetEntryAssembly() ?? throw new InvalidOperationException()).GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion;
diff --git a/.Source/GTweak/GTweak.csproj b/.Source/GTweak/GTweak.csproj
index aed80311..b8ae44c8 100644
--- a/.Source/GTweak/GTweak.csproj
+++ b/.Source/GTweak/GTweak.csproj
@@ -273,7 +273,7 @@
<Compile Include="Utilities\Helpers\INIManager.cs" />
<Compile Include="Utilities\SearchUpdates.cs" />
<Compile Include="Utilities\Tweaks\MonitoringSystem.cs" />
- <Compile Include="Utilities\Tweaks\SystemСonfiguration.cs" />
+ <Compile Include="Utilities\Tweaks\SystemDiagnostics.cs" />
<Compile Include="Utilities\ViewNotification.cs" />
<Compile Include="Utilities\Helpers\TrustedInstaller.cs" />
<Compile Include="Utilities\Tweaks\ConfidentialityTweaks.cs" />
diff --git a/.Source/GTweak/Utilities/BlockRunTweaker.cs b/.Source/GTweak/Utilities/BlockRunTweaker.cs
index 9ebcd801..39b8a03f 100644
--- a/.Source/GTweak/Utilities/BlockRunTweaker.cs
+++ b/.Source/GTweak/Utilities/BlockRunTweaker.cs
@@ -54,10 +54,10 @@ namespace GTweak.Utilities
Parallel.Invoke(() =>
{
foreach (var managementObj in new ManagementObjectSearcher(@"root\cimv2", "select Caption from Win32_OperatingSystem", new EnumerationOptions { ReturnImmediately = true }).Get())
- SystemСonfiguration.WindowsClientVersion = Convert.ToString(managementObj["Caption"]); ;
+ SystemDiagnostics.WindowsClientVersion = Convert.ToString(managementObj["Caption"]); ;
});
- if (SystemСonfiguration.WindowsClientVersion.Contains("11") || SystemСonfiguration.WindowsClientVersion.Contains("10")) return;
+ if (SystemDiagnostics.WindowsClientVersion.Contains("11") || SystemDiagnostics.WindowsClientVersion.Contains("10")) return;
new MessageWindow(true).ShowDialog();
}
}
diff --git a/.Source/GTweak/Utilities/SearchUpdates.cs b/.Source/GTweak/Utilities/SearchUpdates.cs
index 4fe981c1..2b132cce 100644
--- a/.Source/GTweak/Utilities/SearchUpdates.cs
+++ b/.Source/GTweak/Utilities/SearchUpdates.cs
@@ -12,8 +12,8 @@ namespace GTweak.Utilities
internal string СurrentVersion { get; set; }
}
- internal static bool IsNeedUpdate { get; set; } = false;
- internal static string DownloadVersion { get; set; } = string.Empty;
+ internal static bool IsNeedUpdate { get; private set; } = false;
+ internal static string DownloadVersion { get; private set; } = string.Empty;
internal void StartСhecking()
{
diff --git a/.Source/GTweak/Utilities/Tweaks/ConfidentialityTweaks.cs b/.Source/GTweak/Utilities/Tweaks/ConfidentialityTweaks.cs
index 995eadee..b6ad8f79 100644
--- a/.Source/GTweak/Utilities/Tweaks/ConfidentialityTweaks.cs
+++ b/.Source/GTweak/Utilities/Tweaks/ConfidentialityTweaks.cs
@@ -187,7 +187,7 @@ namespace GTweak.Utilities.Tweaks
confidentialityV.TglButton16.StateNA = false;
- if (SystemСonfiguration.СonfigurationData["GPU"].ToLower().Contains("nvidia"))
+ if (SystemDiagnostics.СonfigurationData["GPU"].ToLower().Contains("nvidia"))
{
if (Registry.GetValue(@"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NvTelemetryContainer", "Start", null) == null ||
Registry.GetValue(@"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NvTelemetryContainer", "Start", string.Empty).ToString() != "4" ||
diff --git a/.Source/GTweak/Utilities/Tweaks/InterfaceTweaks.cs b/.Source/GTweak/Utilities/Tweaks/InterfaceTweaks.cs
index 7672fc7c..a527592a 100644
--- a/.Source/GTweak/Utilities/Tweaks/InterfaceTweaks.cs
+++ b/.Source/GTweak/Utilities/Tweaks/InterfaceTweaks.cs
@@ -121,7 +121,7 @@ namespace GTweak.Utilities.Tweaks
interfaceV.TglButton14.StateNA = false;
- if (SystemСonfiguration.WindowsClientVersion.Contains("11"))
+ if (SystemDiagnostics.WindowsClientVersion.Contains("11"))
{
if (Registry.GetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "TaskbarAl", null) == null ||
Registry.GetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "TaskbarAl", string.Empty).ToString() != "0")
@@ -131,7 +131,7 @@ namespace GTweak.Utilities.Tweaks
}
- if (SystemСonfiguration.WindowsClientVersion.Contains("11"))
+ if (SystemDiagnostics.WindowsClientVersion.Contains("11"))
{
if (Registry.GetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "Start_Layout", null) == null ||
Registry.GetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "Start_Layout", string.Empty).ToString() != "1")
@@ -141,7 +141,7 @@ namespace GTweak.Utilities.Tweaks
}
- if (SystemСonfiguration.WindowsClientVersion.Contains("11"))
+ if (SystemDiagnostics.WindowsClientVersion.Contains("11"))
{
if (Registry.CurrentUser.OpenSubKey(@"Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32") == null)
interfaceV.TglButton17.StateNA = true;
@@ -150,7 +150,7 @@ namespace GTweak.Utilities.Tweaks
}
- if (SystemСonfiguration.WindowsClientVersion.Contains("11"))
+ if (SystemDiagnostics.WindowsClientVersion.Contains("11"))
{
if (Registry.GetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "SoftLandingEnabled", null) == null ||
Registry.GetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "SoftLandingEnabled", string.Empty).ToString() != "0" ||
@@ -162,7 +162,7 @@ namespace GTweak.Utilities.Tweaks
}
- if (SystemСonfiguration.WindowsClientVersion.Contains("11"))
+ if (SystemDiagnostics.WindowsClientVersion.Contains("11"))
{
if (Registry.GetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "UseCompactMode", null) == null ||
Registry.GetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "UseCompactMode", string.Empty).ToString() != "1")
@@ -172,7 +172,7 @@ namespace GTweak.Utilities.Tweaks
}
- if (SystemСonfiguration.WindowsClientVersion.Contains("11"))
+ if (SystemDiagnostics.WindowsClientVersion.Contains("11"))
{
if (Registry.GetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge", "DefaultBrowserSettingsCampaignEnabled", null) == null ||
Registry.GetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge", "DefaultBrowserSettingsCampaignEnabled", string.Empty).ToString() != "0" ||
@@ -194,7 +194,7 @@ namespace GTweak.Utilities.Tweaks
}
- if (SystemСonfiguration.WindowsClientVersion.Contains("11"))
+ if (SystemDiagnostics.WindowsClientVersion.Contains("11"))
{
if (Registry.GetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "ShowTaskViewButton", null) == null ||
Registry.GetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "ShowTaskViewButton", string.Empty).ToString() != "0" ||
@@ -210,7 +210,7 @@ namespace GTweak.Utilities.Tweaks
else
interfaceV.TglButton21.StateNA = false;
}
- else if (SystemСonfiguration.WindowsClientVersion.Contains("10"))
+ else if (SystemDiagnostics.WindowsClientVersion.Contains("10"))
{
if (Registry.GetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "ShowCortanaButton", null) == null ||
Registry.GetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "ShowCortanaButton", string.Empty).ToString() != "0" ||
@@ -224,7 +224,7 @@ namespace GTweak.Utilities.Tweaks
}
- if (SystemСonfiguration.WindowsClientVersion.Contains("11"))
+ if (SystemDiagnostics.WindowsClientVersion.Contains("11"))
{
if (Registry.GetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo", "Enabled", null) == null ||
Registry.GetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo", "Enabled", string.Empty).ToString() != "0" ||
@@ -250,7 +250,7 @@ namespace GTweak.Utilities.Tweaks
else
interfaceV.TglButton22.StateNA = false;
}
- else if (SystemСonfiguration.WindowsClientVersion.Contains("10"))
+ else if (SystemDiagnostics.WindowsClientVersion.Contains("10"))
{
if (Registry.GetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo", "Enabled", null) == null ||
Registry.GetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo", "Enabled", string.Empty).ToString() != "0" ||
@@ -281,7 +281,7 @@ namespace GTweak.Utilities.Tweaks
interfaceV.TglButton23.StateNA = false;
- if (SystemСonfiguration.WindowsClientVersion.Contains("11"))
+ if (SystemDiagnostics.WindowsClientVersion.Contains("11"))
{
if (Registry.GetValue(@"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\PushNotifications", "ToastEnabled", null) == null ||
Registry.GetValue(@"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\PushNotifications", "ToastEnabled", string.Empty).ToString() != "0" ||
@@ -293,7 +293,7 @@ namespace GTweak.Utilities.Tweaks
else
interfaceV.TglButton24.StateNA = false;
}
- else if (SystemСonfiguration.WindowsClientVersion.Contains("10"))
+ else if (SystemDiagnostics.WindowsClientVersion.Contains("10"))
{
if (Registry.GetValue(@"HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\\Explorer", "DisableNotificationCenter", null) == null ||
Registry.GetValue(@"HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\\Explorer", "DisableNotificationCenter", string.Empty).ToString() != "1" ||
@@ -344,7 +344,7 @@ namespace GTweak.Utilities.Tweaks
interfaceV.TglButton29.StateNA = false;
- if (SystemСonfiguration.WindowsClientVersion.Contains("11"))
+ if (SystemDiagnostics.WindowsClientVersion.Contains("11"))
{
if (Registry.GetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer", "HubMode", null) == null ||
Registry.GetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer", "HubMode", string.Empty).ToString() != "1")
@@ -352,7 +352,7 @@ namespace GTweak.Utilities.Tweaks
else
interfaceV.TglButton30.StateNA = false;
}
- else if (SystemСonfiguration.WindowsClientVersion.Contains("10"))
+ else if (SystemDiagnostics.WindowsClientVersion.Contains("10"))
{
if (Registry.GetValue(@"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "LaunchTo", null) == null ||
Registry.GetValue(@"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "LaunchTo", string.Empty).ToString() != "1")
@@ -591,7 +591,7 @@ namespace GTweak.Utilities.Tweaks
RegistryHelp.Write(Registry.CurrentUser, @"Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "ShowTaskViewButton", 0, RegistryValueKind.DWord);
RegistryHelp.Write(Registry.CurrentUser, @"Software\Microsoft\Windows\CurrentVersion\Search", "SearchboxTaskbarMode", 0, RegistryValueKind.DWord);
- if (SystemСonfiguration.WindowsClientVersion.Contains("11"))
+ if (SystemDiagnostics.WindowsClientVersion.Contains("11"))
{
RegistryHelp.Write(Registry.CurrentUser, @"Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "ShowCopilotButton", 0, RegistryValueKind.DWord);
RegistryHelp.Write(Registry.CurrentUser, @"Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "TaskbarDa", 0, RegistryValueKind.DWord);
@@ -599,7 +599,7 @@ namespace GTweak.Utilities.Tweaks
RegistryHelp.Write(Registry.CurrentUser, @"Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "EnableSnapAssistFlyout", 0, RegistryValueKind.DWord);
RestartExplorer(new Process());
}
- else if (SystemСonfiguration.WindowsClientVersion.Contains("10"))
+ else if (SystemDiagnostics.WindowsClientVersion.Contains("10"))
{
RegistryHelp.Write(Registry.LocalMachine, @"SOFTWARE\Policies\Microsoft\Dsh", "AllowNewsAndInterests", "0", RegistryValueKind.DWord);
RegistryHelp.Write(Registry.LocalMachine, @"SOFTWARE\Policies\Microsoft\Windows\Windows Feeds", "EnableFeeds", "0", RegistryValueKind.DWord);
@@ -614,7 +614,7 @@ namespace GTweak.Utilities.Tweaks
RegistryHelp.Write(Registry.CurrentUser, @"Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "ShowTaskViewButton", 1, RegistryValueKind.DWord);
RegistryHelp.Write(Registry.CurrentUser, @"Software\Microsoft\Windows\CurrentVersion\Search", "SearchboxTaskbarMode", 1, RegistryValueKind.DWord);
- if (SystemСonfiguration.WindowsClientVersion.Contains("11"))
+ if (SystemDiagnostics.WindowsClientVersion.Contains("11"))
{
RegistryHelp.Write(Registry.CurrentUser, @"Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "ShowCopilotButton", 1, RegistryValueKind.DWord);
RegistryHelp.Write(Registry.CurrentUser, @"Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "TaskbarDa", 1, RegistryValueKind.DWord);
@@ -622,7 +622,7 @@ namespace GTweak.Utilities.Tweaks
RegistryHelp.Write(Registry.CurrentUser, @"Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "EnableSnapAssistFlyout", 1, RegistryValueKind.DWord);
RestartExplorer(new Process());
}
- else if (SystemСonfiguration.WindowsClientVersion.Contains("10"))
+ else if (SystemDiagnostics.WindowsClientVersion.Contains("10"))
{
RegistryHelp.DeleteFolderTree(Registry.LocalMachine, @"SOFTWARE\Policies\Microsoft\Dsh");
RegistryHelp.DeleteFolderTree(Registry.LocalMachine, @"SOFTWARE\Policies\Microsoft\Windows\Windows Feeds");
@@ -640,7 +640,7 @@ namespace GTweak.Utilities.Tweaks
RegistryHelp.Write(Registry.CurrentUser, @"SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "SubscribedContent-353696Enabled", 0, RegistryValueKind.DWord);
RegistryHelp.Write(Registry.CurrentUser, @"SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "SubscribedContent-353694Enabled", 0, RegistryValueKind.DWord);
- if (SystemСonfiguration.WindowsClientVersion.Contains("10"))
+ if (SystemDiagnostics.WindowsClientVersion.Contains("10"))
{
RegistryHelp.Write(Registry.CurrentUser, @"SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "SilentInstalledAppsEnabled", 0, RegistryValueKind.DWord);
RegistryHelp.Write(Registry.CurrentUser, @"SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "SystemPaneSuggestionsEnabled", 0, RegistryValueKind.DWord);
@@ -651,7 +651,7 @@ namespace GTweak.Utilities.Tweaks
RegistryHelp.Write(Registry.CurrentUser, @"SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "SubscribedContent-338393Enabled", 0, RegistryValueKind.DWord);
}
- if (SystemСonfiguration.WindowsClientVersion.Contains("11"))
+ if (SystemDiagnostics.WindowsClientVersion.Contains("11"))
{
RegistryHelp.Write(Registry.CurrentUser, @"Software\Microsoft\Windows\CurrentVersion\Privacy", "TailoredExperiencesWithDiagnosticDataEnabled", 0, RegistryValueKind.DWord);
RegistryHelp.Write(Registry.CurrentUser, @"Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "ShowSyncProviderNotifications", 0, RegistryValueKind.DWord);
@@ -669,7 +669,7 @@ namespace GTweak.Utilities.Tweaks
RegistryHelp.Write(Registry.CurrentUser, @"SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "SubscribedContent-353696Enabled", 1, RegistryValueKind.DWord);
RegistryHelp.Write(Registry.CurrentUser, @"SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "SubscribedContent-353694Enabled", 1, RegistryValueKind.DWord);
- if (SystemСonfiguration.WindowsClientVersion.Contains("10"))
+ if (SystemDiagnostics.WindowsClientVersion.Contains("10"))
{
RegistryHelp.Write(Registry.CurrentUser, @"SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "SilentInstalledAppsEnabled", 1, RegistryValueKind.DWord);
RegistryHelp.Write(Registry.CurrentUser, @"SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "SystemPaneSuggestionsEnabled", 1, RegistryValueKind.DWord);
@@ -679,7 +679,7 @@ namespace GTweak.Utilities.Tweaks
RegistryHelp.Write(Registry.CurrentUser, @"SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "SubscribedContent-338393Enabled", 1, RegistryValueKind.DWord);
}
- if (SystemСonfiguration.WindowsClientVersion.Contains("11"))
+ if (SystemDiagnostics.WindowsClientVersion.Contains("11"))
{
RegistryHelp.Write(Registry.CurrentUser, @"Software\Microsoft\Windows\CurrentVersion\Privacy", "TailoredExperiencesWithDiagnosticDataEnabled", 1, RegistryValueKind.DWord);
RegistryHelp.DeleteValue(Registry.CurrentUser, @"Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "ShowSyncProviderNotifications");
@@ -700,9 +700,9 @@ namespace GTweak.Utilities.Tweaks
case "TglButton24":
if (isChoose)
{
- if (SystemСonfiguration.WindowsClientVersion.Contains("10"))
+ if (SystemDiagnostics.WindowsClientVersion.Contains("10"))
RegistryHelp.Write(Registry.CurrentUser, @"Software\Policies\Microsoft\Windows\Explorer", "DisableNotificationCenter", 1, RegistryValueKind.DWord);
- if (SystemСonfiguration.WindowsClientVersion.Contains("11"))
+ if (SystemDiagnostics.WindowsClientVersion.Contains("11"))
{
RegistryHelp.Write(Registry.CurrentUser, @"Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "SubscribedContent-310093Enabled", 0, RegistryValueKind.DWord);
RegistryHelp.Write(Registry.CurrentUser, @"Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "SubscribedContent-338389Enabled", 0, RegistryValueKind.DWord);
@@ -711,9 +711,9 @@ namespace GTweak.Utilities.Tweaks
}
else
{
- if (SystemСonfiguration.WindowsClientVersion.Contains("10"))
+ if (SystemDiagnostics.WindowsClientVersion.Contains("10"))
RegistryHelp.DeleteValue(Registry.CurrentUser, @"Software\Policies\Microsoft\Windows\Explorer", "DisableNotificationCenter");
- if (SystemСonfiguration.WindowsClientVersion.Contains("11"))
+ if (SystemDiagnostics.WindowsClientVersion.Contains("11"))
{
RegistryHelp.Write(Registry.CurrentUser, @"Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "SubscribedContent-310093Enabled", 1, RegistryValueKind.DWord);
RegistryHelp.Write(Registry.CurrentUser, @"Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager", "SubscribedContent-338389Enabled", 1, RegistryValueKind.DWord);
@@ -782,16 +782,16 @@ namespace GTweak.Utilities.Tweaks
case "TglButton30":
if (isChoose)
{
- if (SystemСonfiguration.WindowsClientVersion.Contains("11"))
+ if (SystemDiagnostics.WindowsClientVersion.Contains("11"))
RegistryHelp.Write(Registry.LocalMachine, @"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer", "HubMode", 1, RegistryValueKind.DWord);
- else if (SystemСonfiguration.WindowsClientVersion.Contains("10"))
+ else if (SystemDiagnostics.WindowsClientVersion.Contains("10"))
RegistryHelp.Write(Registry.CurrentUser, @"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "LaunchTo", 1, RegistryValueKind.DWord);
}
else
{
- if (SystemСonfiguration.WindowsClientVersion.Contains("11"))
+ if (SystemDiagnostics.WindowsClientVersion.Contains("11"))
RegistryHelp.DeleteValue(Registry.LocalMachine, @"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer", "HubMode");
- else if (SystemСonfiguration.WindowsClientVersion.Contains("10"))
+ else if (SystemDiagnostics.WindowsClientVersion.Contains("10"))
RegistryHelp.DeleteValue(Registry.CurrentUser, @"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "LaunchTo");
}
break;
diff --git a/.Source/GTweak/Utilities/Tweaks/MonitoringSystem.cs b/.Source/GTweak/Utilities/Tweaks/MonitoringSystem.cs
index 55f8e4bd..cf39dcf1 100644
--- a/.Source/GTweak/Utilities/Tweaks/MonitoringSystem.cs
+++ b/.Source/GTweak/Utilities/Tweaks/MonitoringSystem.cs
@@ -1,4 +1,5 @@
using System;
+using System.ComponentModel;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
@@ -7,8 +8,6 @@ namespace GTweak.Utilities.Tweaks
{
internal sealed class MonitoringSystem
{
- internal static int PercentageProcessorUsage = 1;
-
[StructLayout(LayoutKind.Sequential)]
private struct PerformanceInformation
{
@@ -52,14 +51,17 @@ namespace GTweak.Utilities.Tweaks
internal string GetNumberRunningProcesses => Process.GetProcesses().Length.ToString();
- internal static async Task GetProcessorUsage()
+ internal static int GetProcessorUsage { get; private set; }
+
+ internal static async Task<int> GetTotalProcessorUsage()
{
- await Task.Run(async () =>
+ return await Task.Run(async () =>
{
using PerformanceCounter cpuCounter = new PerformanceCounter("Processor Information", "% Processor Utility", "_Total", true);
cpuCounter.NextValue();
await Task.Delay(1000);
- PercentageProcessorUsage = (int)cpuCounter.NextValue();
+ GetProcessorUsage = (int)cpuCounter.NextValue();
+ return GetProcessorUsage;
});
}
}
diff --git "a/.Source/GTweak/Utilities/Tweaks/System\320\241onfiguration.cs" b/.Source/GTweak/Utilities/Tweaks/SystemDiagnostics.cs
similarity index 98%
rename from ".Source/GTweak/Utilities/Tweaks/System\320\241onfiguration.cs"
rename to .Source/GTweak/Utilities/Tweaks/SystemDiagnostics.cs
index ad4fc928..ae6c85b5 100644
--- "a/.Source/GTweak/Utilities/Tweaks/System\320\241onfiguration.cs"
+++ b/.Source/GTweak/Utilities/Tweaks/SystemDiagnostics.cs
@@ -14,7 +14,7 @@ using System.Windows.Media.Imaging;
namespace GTweak.Utilities.Tweaks
{
- internal sealed class SystemСonfiguration
+ internal sealed class SystemDiagnostics
{
internal static ImageSource GetProfileImage()
{
@@ -76,7 +76,7 @@ namespace GTweak.Utilities.Tweaks
{ "UserIpAddress", Application.Current.Resources["connection_lose_systemInformation"].ToString() }
};
- internal void GetConfiguration()
+ internal void GetHardwareData()
{
Parallel.Invoke(delegate
{
@@ -167,7 +167,7 @@ namespace GTweak.Utilities.Tweaks
});
}
- internal static bool IsNetworkAvailable()
+ private static bool IsNetworkAvailable()
{
try
{
diff --git a/.Source/GTweak/Utilities/Tweaks/WindowsLicense.cs b/.Source/GTweak/Utilities/Tweaks/WindowsLicense.cs
index 9459c9df..8f430a48 100644
--- a/.Source/GTweak/Utilities/Tweaks/WindowsLicense.cs
+++ b/.Source/GTweak/Utilities/Tweaks/WindowsLicense.cs
@@ -10,7 +10,7 @@ namespace GTweak.Utilities.Tweaks
internal sealed class WindowsLicense
{
internal static bool IsWindowsActivated = false;
- private static bool IsVersionWindows(string pattern, byte words) => new Regex(pattern, RegexOptions.IgnoreCase | RegexOptions.CultureInvariant | RegexOptions.IgnorePatternWhitespace | RegexOptions.Compiled).Matches(SystemСonfiguration.WindowsClientVersion).Count == words;
+ private static bool IsVersionWindows(string pattern, byte words) => new Regex(pattern, RegexOptions.IgnoreCase | RegexOptions.CultureInvariant | RegexOptions.IgnorePatternWhitespace | RegexOptions.Compiled).Matches(SystemDiagnostics.WindowsClientVersion).Count == words;
internal void LicenseStatus()
{
@@ -66,7 +66,7 @@ namespace GTweak.Utilities.Tweaks
{
waitingWindow.Show();
- if (SystemСonfiguration.WindowsClientVersion.Contains("10"))
+ if (SystemDiagnostics.WindowsClientVersion.Contains("10"))
{
cmdProcess.StartInfo.Arguments = $"/c assoc .vbs=VBSFile";
cmdProcess.Start();
diff --git a/.Source/GTweak/View/DataSystemView.xaml b/.Source/GTweak/View/DataSystemView.xaml
index a1bb92bf..0001faac 100644
--- a/.Source/GTweak/View/DataSystemView.xaml
+++ b/.Source/GTweak/View/DataSystemView.xaml
@@ -8,7 +8,7 @@
xmlns:vm="clr-namespace:GTweak.Core.ViewModel"
xmlns:xrpb="http://XamlRadialProgressBar/DotNet"
d:DesignHeight="550" d:DesignWidth="1100"
- Style="{StaticResource LaunchPage}" Unloaded="Page_Unloaded" Loaded="Page_Loaded">
+ Style="{StaticResource LaunchPage}" Unloaded="Page_Unloaded">
<UserControl.DataContext>
<vm:DataSystemVM />
</UserControl.DataContext>
@@ -34,7 +34,7 @@
<Grid HorizontalAlignment="Left" Margin="50,20,0,0">
<Ellipse Height="90" Width="90" Stroke="{StaticResource Color_Background_RadialProgressBar}" StrokeThickness="4.5" VerticalAlignment="Center" HorizontalAlignment="Center" Opacity="0.2"/>
- <xrpb:RadialProgressBar x:Name="CPULoad" Value="0" Maximum="100" Width="100" Height="100" ArcWidth="4" VerticalAlignment="Center" HorizontalAlignment="Center">
+ <xrpb:RadialProgressBar x:Name="CPULoad" Value="1" Maximum="100" Width="100" Height="100" ArcWidth="4" VerticalAlignment="Center" HorizontalAlignment="Center">
<xrpb:RadialProgressBar.Foreground>
<LinearGradientBrush EndPoint="0,0.3" StartPoint="0.9,0" ColorInterpolationMode="ScRgbLinearInterpolation" MappingMode="RelativeToBoundingBox" SpreadMethod="Pad">
<GradientStop Color="{StaticResource Color_Border_Gradient_2}" Offset="0.7"/>
diff --git a/.Source/GTweak/View/DataSystemView.xaml.cs b/.Source/GTweak/View/DataSystemView.xaml.cs
index 819b989a..78cea56a 100644
--- a/.Source/GTweak/View/DataSystemView.xaml.cs
+++ b/.Source/GTweak/View/DataSystemView.xaml.cs
@@ -26,16 +26,16 @@ namespace GTweak.View
App.LanguageChanged += delegate
{
- switch (SystemСonfiguration.CurrentConnection)
+ switch (SystemDiagnostics.CurrentConnection)
{
- case SystemСonfiguration.ConnectionStatus.Lose:
- SystemСonfiguration.СonfigurationData["UserIpAddress"] = (string)FindResource("connection_lose_systemInformation");
+ case SystemDiagnostics.ConnectionStatus.Lose:
+ SystemDiagnostics.СonfigurationData["UserIpAddress"] = (string)FindResource("connection_lose_systemInformation");
break;
- case SystemСonfiguration.ConnectionStatus.Block:
- SystemСonfiguration.СonfigurationData["UserIpAddress"] = (string)FindResource("connection_block_systemInformation");
+ case SystemDiagnostics.ConnectionStatus.Block:
+ SystemDiagnostics.СonfigurationData["UserIpAddress"] = (string)FindResource("connection_block_systemInformation");
break;
- case SystemСonfiguration.ConnectionStatus.Limited:
- SystemСonfiguration.СonfigurationData["UserIpAddress"] = (string)FindResource("limited_systemInformation");
+ case SystemDiagnostics.ConnectionStatus.Limited:
+ SystemDiagnostics.СonfigurationData["UserIpAddress"] = (string)FindResource("limited_systemInformation");
break;
}
DataContext = new DataSystemVM();
@@ -48,8 +48,8 @@ namespace GTweak.View
BackgroundQueue backgroundQueue = new BackgroundQueue();
await backgroundQueue.QueueTask(async delegate
{
- Parallel.Invoke(SystemСonfiguration.GetUpdatingDevices);
- await MonitoringSystem.GetProcessorUsage();
+ Parallel.Invoke(SystemDiagnostics.GetUpdatingDevices);
+ await MonitoringSystem.GetTotalProcessorUsage();
});
Application.Current.Dispatcher.Invoke(AnimationProgressBars);
if (BtnHiddenIP.IsChecked.Value & BtnHiddenIP.Visibility == Visibility.Hidden)
@@ -63,13 +63,15 @@ namespace GTweak.View
else if (time.TotalSeconds % 5 == 0)
{
BackgroundQueue backgroundQueue = new BackgroundQueue();
- await backgroundQueue.QueueTask(delegate { SystemСonfiguration.GetUserIpAddress(); });
+ await backgroundQueue.QueueTask(delegate { SystemDiagnostics.GetUserIpAddress(); });
DataContext = new DataSystemVM();
}
time = time.Add(TimeSpan.FromSeconds(+1));
}, Application.Current.Dispatcher);
timer.Start();
+
+ RAMLoad.Value = new MonitoringSystem().GetMemoryUsage();
}
#region Animations
@@ -80,7 +82,7 @@ namespace GTweak.View
DoubleAnimation doubleAnim = new DoubleAnimation()
{
From = CPULoad.Value,
- To = MonitoringSystem.PercentageProcessorUsage,
+ To = MonitoringSystem.GetProcessorUsage,
EasingFunction = new PowerEase(),
Duration = TimeSpan.FromSeconds(0.2)
};
@@ -170,11 +172,5 @@ namespace GTweak.View
}
private void Page_Unloaded(object sender, RoutedEventArgs e) => timer.Stop();
-
- private void Page_Loaded(object sender, RoutedEventArgs e)
- {
- CPULoad.Value = MonitoringSystem.PercentageProcessorUsage;
- RAMLoad.Value = new MonitoringSystem().GetMemoryUsage();
- }
}
}
diff --git a/.Source/GTweak/Windows/LoadingWindow.xaml.cs b/.Source/GTweak/Windows/LoadingWindow.xaml.cs
index 5cb4e8b4..c3aea82a 100644
--- a/.Source/GTweak/Windows/LoadingWindow.xaml.cs
+++ b/.Source/GTweak/Windows/LoadingWindow.xaml.cs
@@ -50,7 +50,7 @@ namespace GTweak.Windows
delegate { Settings.PID = TrustedInstaller.StartTrustedInstallerService(); },
new Settings().СheckingParameters,
new WindowsLicense().LicenseStatus,
- new SystemСonfiguration().GetConfiguration,
+ new SystemDiagnostics().GetHardwareData,
new SearchUpdates().StartСhecking,
new UninstallingPakages().ViewInstalledPackages,
new UninstallingPakages().CheckingForLocalAccount,