Skip to content

Portable Tool for an Ideal Windows Setup

-fixed check limeted connection

Greedeksa29988a24206
diff --git a/.Source/GTweak/Core/ViewModel/PagesViewModel.cs b/.Source/GTweak/Core/ViewModel/PagesViewModel.cs
index 3e8111ad..e7359e02 100644
--- a/.Source/GTweak/Core/ViewModel/PagesViewModel.cs
+++ b/.Source/GTweak/Core/ViewModel/PagesViewModel.cs
@@ -155,7 +155,10 @@ namespace GTweak.Core.ViewModel
else
{
SetBlurValue = 0;
- DisplayImageHidden = (DrawingImage)Application.Current.Resources["DI_Hide"];
+ if (!SystemData.СomputerСonfiguration.isNoInternetConnection & !SystemData.СomputerСonfiguration.isInternetLimited)
+ DisplayImageHidden = (DrawingImage)Application.Current.Resources["DI_Hide"];
+ else
+ DisplayImageHidden = default;
}
}
}
diff --git a/.Source/GTweak/Utilities/Tweaks/SystemData.cs b/.Source/GTweak/Utilities/Tweaks/SystemData.cs
index c1c1b951..d6037e45 100644
--- a/.Source/GTweak/Utilities/Tweaks/SystemData.cs
+++ b/.Source/GTweak/Utilities/Tweaks/SystemData.cs
@@ -270,8 +270,7 @@ namespace GTweak.Utilities
if (isInternetLimited)
isInternetLimited = false;
-
- if (!string.IsNullOrEmpty(clientInternetProtocol.Ip) || !string.IsNullOrEmpty(clientInternetProtocol.Country))
+ if (IPAddress.TryParse(clientInternetProtocol.Ip, out IPAddress ip) && !string.IsNullOrEmpty(clientInternetProtocol.Ip) && !string.IsNullOrEmpty(clientInternetProtocol.Country))
{
СonfigurationData["IpAddress"] = clientInternetProtocol.Ip + " (" + clientInternetProtocol.Country + ")";
isNoInternetConnection = false && isNoInternetConnection;
@@ -279,7 +278,7 @@ namespace GTweak.Utilities
else
{
App.ViewLang();
- СonfigurationData["IpAddress"] = (string)Application.Current.Resources["connection_systemInformation"];
+ СonfigurationData["IpAddress"] = (string)Application.Current.Resources["limited_systemInformation"];
isNoInternetConnection = true;
}
}
diff --git a/.Source/GTweak/View/InformationSystemView.xaml.cs b/.Source/GTweak/View/InformationSystemView.xaml.cs
index 100c06e5..8a35be47 100644
--- a/.Source/GTweak/View/InformationSystemView.xaml.cs
+++ b/.Source/GTweak/View/InformationSystemView.xaml.cs
@@ -56,7 +56,6 @@ namespace GTweak.View
new Thread(() => new SystemData.MonitoringSystem().CountProcess.ToString()).Start();
new Thread(() => new SystemData.MonitoringSystem().CountProcess.ToString()).IsBackground = true;
Application.Current.Dispatcher.Invoke(ProgressBarAnim);
- ImageHidden.Visibility = !SystemData.СomputerСonfiguration.isNoInternetConnection & !SystemData.СomputerСonfiguration.isInternetLimited ? Visibility.Visible : Visibility.Collapsed;
};
}
else if (time.TotalSeconds % 5 == 0)
@@ -186,7 +185,6 @@ namespace GTweak.View
{
Application.Current.Dispatcher.Invoke(() => { CPULoad.Value = SystemData.MonitoringSystem.CpuUsage; });
Application.Current.Dispatcher.Invoke(() => { RAMLoad.Value = new SystemData.MonitoringSystem().RamUsage; });
- ImageHidden.Visibility = !SystemData.СomputerСonfiguration.isNoInternetConnection & !SystemData.СomputerСonfiguration.isInternetLimited ? Visibility.Visible : Visibility.Collapsed;
}
}
}