Skip to content

Portable Tool for an Ideal Windows Setup

-connection with access

Greedeks18722053d8ee
diff --git a/.Source/GTweak/Core/ViewModel/PagesViewModel.cs b/.Source/GTweak/Core/ViewModel/PagesViewModel.cs
index e7359e02..c24f14ed 100644
--- a/.Source/GTweak/Core/ViewModel/PagesViewModel.cs
+++ b/.Source/GTweak/Core/ViewModel/PagesViewModel.cs
@@ -107,7 +107,7 @@ namespace GTweak.Core.ViewModel
public int SetBlurValue
{
get => _model.BlurValue;
- set { _model.BlurValue = value; OnPropertyChanged(); }
+ set { _model.BlurValue = value; OnPropertyChanged("SetBlurValue"); }
}
public DrawingImage DisplayImageHidden
@@ -147,7 +147,7 @@ namespace GTweak.Core.ViewModel
DisplayIpAddress = SystemData.СomputerСonfiguration.СonfigurationData["IpAddress"];
DisplayCountProcess = new SystemData.MonitoringSystem().CountProcess.ToString();
- if (Settings.IsHiddenIpAddress & !SystemData.СomputerСonfiguration.isNoInternetConnection & !SystemData.СomputerСonfiguration.isInternetLimited)
+ if (Settings.IsHiddenIpAddress & !SystemData.СomputerСonfiguration.isConnectionLose & !SystemData.СomputerСonfiguration.isInternetLimited & !SystemData.СomputerСonfiguration.isConnectionBlock)
{
SetBlurValue = 20;
DisplayImageHidden = (DrawingImage)Application.Current.Resources["DI_Show"];
@@ -155,10 +155,7 @@ namespace GTweak.Core.ViewModel
else
{
SetBlurValue = 0;
- if (!SystemData.СomputerСonfiguration.isNoInternetConnection & !SystemData.СomputerСonfiguration.isInternetLimited)
- DisplayImageHidden = (DrawingImage)Application.Current.Resources["DI_Hide"];
- else
- DisplayImageHidden = default;
+ DisplayImageHidden = !SystemData.СomputerСonfiguration.isConnectionLose & !SystemData.СomputerСonfiguration.isInternetLimited & !SystemData.СomputerСonfiguration.isConnectionBlock ? (DrawingImage)Application.Current.Resources["DI_Hide"] : default;
}
}
}
diff --git a/.Source/GTweak/Language/lang.ru.xaml b/.Source/GTweak/Language/lang.ru.xaml
index e19ae89d..01239cb7 100644
--- a/.Source/GTweak/Language/lang.ru.xaml
+++ b/.Source/GTweak/Language/lang.ru.xaml
@@ -367,7 +367,8 @@
<v:String x:Key="title_netadapter_systemInformation">Сетевые адаптеры:</v:String>
<v:String x:Key="title_ip_systemInformation">IP-адрес:</v:String>
<v:String x:Key="limited_systemInformation">Доступ к сети ограничен</v:String>
- <v:String x:Key="connection_systemInformation">Отсутствует подключения к интернету</v:String>
+ <v:String x:Key="connection_block_systemInformation">Подключение без доступа к сети</v:String>
+ <v:String x:Key="connection_lose_systemInformation">Отсутствует подключения к интернету</v:String>
<v:String x:Key="text_copy_systemInformatin">Скопировано</v:String>
<v:String x:Key="driver_not_installed_systemInformatin">У вас не установлен драйвер</v:String>
<!--#endregion-->
diff --git a/.Source/GTweak/Language/lang.xaml b/.Source/GTweak/Language/lang.xaml
index 0ba6856d..7069b3d0 100644
--- a/.Source/GTweak/Language/lang.xaml
+++ b/.Source/GTweak/Language/lang.xaml
@@ -367,7 +367,8 @@
<v:String x:Key="title_netadapter_systemInformation">Network adapters:</v:String>
<v:String x:Key="title_ip_systemInformation">IP address:</v:String>
<v:String x:Key="limited_systemInformation">Network access is limited</v:String>
- <v:String x:Key="connection_systemInformation">There is no internet connection</v:String>
+ <v:String x:Key="connection_block_systemInformation">Connecting without network access</v:String>
+ <v:String x:Key="connection_lose_systemInformation">There is no internet connection</v:String>
<v:String x:Key="text_copy_systemInformatin">Copied</v:String>
<v:String x:Key="driver_not_installed_systemInformatin">You don't have a driver installed</v:String>
<!--#endregion-->
diff --git a/.Source/GTweak/Utilities/Tweaks/SystemData.cs b/.Source/GTweak/Utilities/Tweaks/SystemData.cs
index d6037e45..291a813f 100644
--- a/.Source/GTweak/Utilities/Tweaks/SystemData.cs
+++ b/.Source/GTweak/Utilities/Tweaks/SystemData.cs
@@ -120,7 +120,7 @@ namespace GTweak.Utilities
internal sealed class СomputerСonfiguration
{
internal static string clientWinVersion = string.Empty;
- internal static bool isNoInternetConnection = false, isInternetLimited = false;
+ internal static bool isConnectionLose = false, isConnectionBlock = false, isInternetLimited = false;
private static string _type = string.Empty;
private static readonly EnumerationOptions optionsObj = new EnumerationOptions { ReturnImmediately = true };
@@ -269,25 +269,27 @@ namespace GTweak.Utilities
{
if (isInternetLimited)
isInternetLimited = false;
+ if (isConnectionBlock)
+ isConnectionBlock = false;
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;
+ isConnectionLose = false && isConnectionLose;
}
else
{
App.ViewLang();
- СonfigurationData["IpAddress"] = (string)Application.Current.Resources["limited_systemInformation"];
- isNoInternetConnection = true;
+ СonfigurationData["IpAddress"] = (string)Application.Current.Resources["connection_block_systemInformation"];
+ isConnectionBlock = true;
}
}
}
else
{
App.ViewLang();
- СonfigurationData["IpAddress"] = (string)Application.Current.Resources["connection_systemInformation"];
- isNoInternetConnection = true;
+ СonfigurationData["IpAddress"] = (string)Application.Current.Resources["connection_lose_systemInformation"];
+ isConnectionLose = true;
}
});
}
diff --git a/.Source/GTweak/View/InformationSystemView.xaml b/.Source/GTweak/View/InformationSystemView.xaml
index a4bf789e..ca08a1f7 100644
--- a/.Source/GTweak/View/InformationSystemView.xaml
+++ b/.Source/GTweak/View/InformationSystemView.xaml
@@ -177,7 +177,7 @@
<StackPanel Orientation="Horizontal">
<TextBlock x:Name="IpAddress" Text="{Binding DisplayIpAddress}" Style="{StaticResource Text}" HorizontalAlignment="Left" Margin="15,0,0,0" Foreground="#ffffff" Height="Auto" Width="Auto" PreviewMouseLeftButtonDown="TextBlock_PreviewMouseDown" Cursor="Hand">
<TextBlock.Effect>
- <BlurEffect Radius="{Binding SetBlurValue}" RenderingBias="Performance"/>
+ <BlurEffect Radius="{Binding SetBlurValue}"/>
</TextBlock.Effect>
</TextBlock>
<Image x:Name="ImageHidden" Source="{Binding DisplayImageHidden}" Style="{StaticResource Apps}" Height="20" Width="20" Margin="10,0,0,0" PreviewMouseDown="ImageHidden_PreviewMouseDown"/>
diff --git a/.Source/GTweak/View/InformationSystemView.xaml.cs b/.Source/GTweak/View/InformationSystemView.xaml.cs
index 8a35be47..11c09d0e 100644
--- a/.Source/GTweak/View/InformationSystemView.xaml.cs
+++ b/.Source/GTweak/View/InformationSystemView.xaml.cs
@@ -26,14 +26,22 @@ namespace GTweak.View
App.LanguageChanged += (s, e) =>
{
- if (SystemData.СomputerСonfiguration.isNoInternetConnection)
+ if (!SystemData.СomputerСonfiguration.isConnectionLose)
{
- SystemData.СomputerСonfiguration.СonfigurationData["IpAddress"] = (string)FindResource("connection_systemInformation");
- DataContext = new InformationSystemVM();
+ if (SystemData.СomputerСonfiguration.isInternetLimited)
+ {
+ SystemData.СomputerСonfiguration.СonfigurationData["IpAddress"] = (string)FindResource("limited_systemInformation");
+ DataContext = new InformationSystemVM();
+ }
+ else if (SystemData.СomputerСonfiguration.isConnectionBlock)
+ {
+ SystemData.СomputerСonfiguration.СonfigurationData["IpAddress"] = (string)FindResource("connection_block_systemInformation");
+ DataContext = new InformationSystemVM();
+ }
}
- else if (SystemData.СomputerСonfiguration.isInternetLimited)
+ else
{
- SystemData.СomputerСonfiguration.СonfigurationData["IpAddress"] = (string)FindResource("limited_systemInformation");
+ SystemData.СomputerСonfiguration.СonfigurationData["IpAddress"] = (string)FindResource("connection_lose_systemInformation");
DataContext = new InformationSystemVM();
}
};
@@ -52,10 +60,10 @@ namespace GTweak.View
};
backgroundWorker.RunWorkerCompleted += (s, e) =>
{
- DataContext = new InformationSystemVM();
new Thread(() => new SystemData.MonitoringSystem().CountProcess.ToString()).Start();
new Thread(() => new SystemData.MonitoringSystem().CountProcess.ToString()).IsBackground = true;
Application.Current.Dispatcher.Invoke(ProgressBarAnim);
+ DataContext = new InformationSystemVM();
};
}
else if (time.TotalSeconds % 5 == 0)