Skip to content

Portable Tool for an Ideal Windows Setup

-correction -added hide ipaddress -added glow effect with button

Greedeks963f7ce0cd27
diff --git a/.Source/GTweak/Assets/DrawingImage/Other.xaml b/.Source/GTweak/Assets/DrawingImage/Other.xaml
index a92504b8..230b8fdd 100644
--- a/.Source/GTweak/Assets/DrawingImage/Other.xaml
+++ b/.Source/GTweak/Assets/DrawingImage/Other.xaml
@@ -361,5 +361,38 @@
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>
-
+
+ <DrawingImage x:Key="DI_Show">
+ <DrawingImage.Drawing>
+ <DrawingGroup ClipGeometry="M0,0 V48 H48 V0 H0 Z">
+ <DrawingGroup.Transform>
+ <TranslateTransform X="0.2460940033197403" Y="0" />
+ </DrawingGroup.Transform>
+ <DrawingGroup Opacity="1">
+ <GeometryDrawing Brush="{DynamicResource Color_Accent}" Geometry="F1 M48,48z M0,0z M38.398438,15.671875C37.324219,14.9375 36.34375,14.300781 35.949219,14.007812 35.753906,13.960938 35.558594,13.859375 35.363281,13.761719 35.363281,13.761719 35.3125,13.761719 35.3125,13.761719 35.167969,13.714844 35.070312,13.617188 34.921875,13.566406 34.777344,13.519531 34.675781,13.519531 34.578125,13.46875 34.53125,13.46875 34.480469,13.421875 34.433594,13.421875 34.335938,13.421875 34.238281,13.371094 34.1875,13.371094 33.941406,13.324219 33.746094,13.222656 33.550781,13.125L31.640625,12.441406C28.457031,11.265625 21.84375,11.070312 18.21875,12 12.636719,13.421875 9.894531,15.085938 4.652344,20.179688L-0.246094,24.980469 2.9375,28.164062C4.703125,29.976562 7.25,32.230469 8.570312,33.207031 9.746094,34.039062 10.777344,34.777344 11.117188,35.019531 11.414062,35.117188 11.65625,35.265625 11.851562,35.460938 12.148438,35.558594 12.441406,35.753906 12.6875,35.949219 12.882812,36 13.078125,36.097656 13.273438,36.246094L16.359375,37.175781C23.167969,39.28125 31.152344,38.300781 37.421875,34.53125 40.40625,32.71875 47.949219,25.714844 47.949219,24.6875 48,23.902344 41.339844,17.679688 38.398438,15.671875z M12.980469,33.699219C12.441406,34.238281,9.894531,32.425781,5.976562,28.652344L1.859375,24.734375 5.535156,21.207031C8.472656,18.367188 13.617188,14.742188 14.644531,14.695312 14.792969,14.695312 14.398438,15.183594 13.859375,15.769531 10.285156,19.691406 9.453125,26.15625 11.902344,30.855469 12.636719,32.277344 13.125,33.550781 12.980469,33.699219z M30.171875,35.019531C28.015625,36.292969 27.332031,36.488281 24.050781,36.488281 20.816406,36.488281 19.984375,36.292969 17.925781,35.070312L15.574219,33.699219C15.378906,33.550781 15.183594,33.355469 15.035156,33.160156 14.9375,33.0625 14.839844,32.914062 14.742188,32.765625 14.597656,32.570312 14.449219,32.375 14.351562,32.179688 14.15625,31.933594 14.058594,31.640625 13.960938,31.394531 13.960938,31.347656 13.910156,31.347656 13.910156,31.296875 13.078125,30.074219 12.195312,27.085938 12.195312,24.882812 12.195312,19.347656 15.429688,15.035156 21.011719,13.222656 22.972656,12.585938 27.085938,13.078125 29.339844,14.253906L31.445312,15.332031C31.542969,15.378906 31.640625,15.429688 31.738281,15.476562 32.179688,15.769531 32.523438,16.113281 32.867188,16.507812 33.011719,16.652344 33.160156,16.847656 33.304688,16.996094 33.503906,17.242188 33.601562,17.4375 33.746094,17.679688 33.84375,17.878906 33.941406,18.074219 34.039062,18.269531 34.089844,18.417969 34.1875,18.5625 34.238281,18.710938 34.53125,19.25 34.824219,19.835938 35.070312,20.425781 37.078125,25.617188 34.921875,32.082031 30.171875,35.019531z M41.976562,28.75C38.496094,32.082031 34.726562,34.777344 33.550781,34.777344 33.453125,34.777344 34.089844,33.796875 34.972656,32.570312 38.546875,27.917969 38.300781,20.472656 34.382812,16.015625 33.402344,14.9375 33.894531,14.9375 36.34375,16.210938 37.421875,16.75 40.066406,18.90625 42.21875,20.964844L46.140625,24.734375z M41.976562,28.75" />
+ <DrawingGroup Transform="0.489796,0,0,0.489796,0,0">
+ <GeometryDrawing Geometry="F1 M48,48z M0,0z M62.597819,49C62.597819,41.487305 56.512695,35.402181 49,35.402181 41.487305,35.402181 35.402181,41.487305 35.402181,49 35.402181,56.512695 41.487305,62.597819 49,62.597819 56.512695,62.597819 62.597819,56.512695 62.597819,49z M62.597819,49">
+ <GeometryDrawing.Pen>
+ <Pen Brush="{DynamicResource Color_Accent}" Thickness="4" StartLineCap="Flat" EndLineCap="Flat" LineJoin="Miter" />
+ </GeometryDrawing.Pen>
+ </GeometryDrawing>
+ </DrawingGroup>
+ </DrawingGroup>
+ </DrawingGroup>
+ </DrawingImage.Drawing>
+ </DrawingImage>
+
+ <DrawingImage x:Key="DI_Hide">
+ <DrawingImage.Drawing>
+ <DrawingGroup ClipGeometry="M0,0 V48 H48 V0 H0 Z">
+ <DrawingGroup.Transform>
+ <TranslateTransform X="0.24218800663948059" Y="0" />
+ </DrawingGroup.Transform>
+ <DrawingGroup Opacity="1">
+ <GeometryDrawing Brush="{DynamicResource Color_Accent}" Geometry="F1 M48,48z M0,0z M40.046875,6.535156L33.511719,13.074219 31.511719,12.339844C28.339844,11.171875 21.757812,10.976562 18.144531,11.902344 12.585938,13.316406 9.855469,14.976562 4.632812,20.046875L-0.242188,24.828125 2.925781,28.046875C4.683594,29.855469 7.21875,32.097656 8.535156,33.074219 9.902344,34 11.074219,34.878906 11.21875,34.976562 11.316406,35.074219 8.78125,37.757812 5.609375,40.976562 0.976562,45.609375 -0.0976562,46.925781 0.390625,47.414062 0.878906,47.902344 2.242188,46.78125 7.023438,42L13.023438,36 16.339844,37.023438C23.121094,39.121094 31.074219,38.144531 37.316406,34.390625 40.292969,32.585938 47.804688,25.609375 47.804688,24.585938 47.804688,23.804688 41.171875,17.609375 38.242188,15.609375 36.925781,14.730469 35.757812,13.902344 35.609375,13.804688 35.511719,13.707031 38.242188,10.78125 41.660156,7.367188 47.121094,1.902344 48.488281,0 46.925781,0 46.730469,0 43.660156,2.925781 40.046875,6.535156z M29.269531,14.144531L31.367188,15.21875 29.953125,16.632812C28.535156,18 28.535156,18 26.4375,17.269531 24.046875,16.488281 20.976562,16.78125 20.976562,17.855469 20.976562,18.339844 21.660156,18.535156 23.316406,18.535156 27.511719,18.535156 27.511719,19.074219 23.269531,23.269531 18.925781,27.609375 18.292969,27.5625 18.730469,22.78125 18.976562,20.585938 18.878906,20 18.292969,20 17.902344,20 17.367188,20.828125 17.074219,22 16.632812,23.609375 16.683594,24.488281 17.269531,26.292969L18,28.535156 16.488281,30.097656C15.609375,30.976562 14.730469,31.707031 14.535156,31.707031 13.609375,31.707031 12.195312,27.511719 12.195312,24.730469 12.195312,19.21875 15.414062,14.925781 20.976562,13.121094 22.925781,12.488281 27.023438,12.976562 29.269531,14.144531z M13.804688,15.707031C10.242188,19.609375 9.414062,26.046875 11.855469,30.730469 12.585938,32.144531 13.074219,33.414062 12.925781,33.5625 12.390625,34.097656 9.855469,32.292969 5.953125,28.535156L1.855469,24.632812 5.511719,21.121094C8.4375,18.292969 13.5625,14.683594 14.585938,14.632812 14.730469,14.632812 14.339844,15.121094 13.804688,15.707031z M36.195312,16.144531C37.269531,16.683594,39.902344,18.828125,42.046875,20.878906L45.953125,24.632812 41.804688,28.632812C38.339844,31.953125 34.585938,34.632812 33.414062,34.632812 33.316406,34.632812 33.953125,33.660156 34.828125,32.4375 38.390625,27.804688 38.144531,20.390625 34.242188,15.953125 33.269531,14.878906 33.757812,14.878906 36.195312,16.144531z M34.925781,20.292969C36.925781,25.511719 34.78125,31.953125 30.046875,34.878906 27.902344,36.144531 27.21875,36.339844 23.953125,36.339844 20.730469,36.339844 19.902344,36.144531 17.855469,34.925781L15.511719,33.5625 17.367188,31.660156 19.269531,29.804688 21.367188,30.535156C24.097656,31.464844 26.488281,31.023438 28.585938,29.171875 30.828125,27.171875 31.511719,24.488281 30.535156,21.511719 29.804688,19.316406 29.804688,19.269531 31.074219,17.953125 32.292969,16.683594 32.4375,16.632812 33.21875,17.367188 33.707031,17.804688 34.488281,19.121094 34.925781,20.292969z M28.976562,21.757812C29.902344,24.195312 28.730469,27.707031 26.585938,28.683594 25.074219,29.367188 22.488281,29.414062 21.464844,28.78125 20.878906,28.390625 21.414062,27.609375 24.390625,24.632812 26.390625,22.632812 28.195312,20.976562 28.339844,20.976562 28.535156,20.976562 28.828125,21.316406 28.976562,21.757812z M28.976562,21.757812" />
+ </DrawingGroup>
+ </DrawingGroup>
+ </DrawingImage.Drawing>
+ </DrawingImage>
+
</ResourceDictionary>
\ No newline at end of file
diff --git a/.Source/GTweak/Core/Model/MainModel.cs b/.Source/GTweak/Core/Model/MainModel.cs
index 7db3e04f..e615554f 100644
--- a/.Source/GTweak/Core/Model/MainModel.cs
+++ b/.Source/GTweak/Core/Model/MainModel.cs
@@ -23,6 +23,8 @@ namespace GTweak.Core.Model
internal string NetAdapterName { get; set; }
internal string IpAddress { get; set; }
internal string CountProcess { get; set; }
+ internal int BlurValue { get; set; }
+ internal DrawingImage ImageHidden { get; set; }
}
internal sealed class MainWindowModel
diff --git a/.Source/GTweak/Core/ViewModel/PagesViewModel.cs b/.Source/GTweak/Core/ViewModel/PagesViewModel.cs
index f7e3ce51..2f1428b0 100644
--- a/.Source/GTweak/Core/ViewModel/PagesViewModel.cs
+++ b/.Source/GTweak/Core/ViewModel/PagesViewModel.cs
@@ -2,6 +2,7 @@
using GTweak.Utilities;
using GTweak.Utilities.Tweaks;
using System.Windows;
+using System.Windows.Media;
namespace GTweak.Core.ViewModel
{
@@ -103,6 +104,19 @@ namespace GTweak.Core.ViewModel
set { _model.CountProcess = value; OnPropertyChanged(); }
}
+ public int SetBlurValue
+ {
+ get => _model.BlurValue;
+ set { _model.BlurValue = value; OnPropertyChanged(); }
+ }
+
+ public DrawingImage DisplayImageHidden
+ {
+ get => _model.ImageHidden;
+ set { _model.ImageHidden = value; OnPropertyChanged(); }
+ }
+
+
public InformationSystemVM()
{
_model = new MainModel.InformationSystemModel();
@@ -132,6 +146,17 @@ 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)
+ {
+ SetBlurValue = 15;
+ DisplayImageHidden = (DrawingImage)Application.Current.Resources["DI_Show"];
+ }
+ else
+ {
+ SetBlurValue = 0;
+ DisplayImageHidden = (DrawingImage)Application.Current.Resources["DI_Hide"];
+ }
}
}
}
diff --git a/.Source/GTweak/Language/lang.ru.xaml b/.Source/GTweak/Language/lang.ru.xaml
index 15721252..771690d5 100644
--- a/.Source/GTweak/Language/lang.ru.xaml
+++ b/.Source/GTweak/Language/lang.ru.xaml
@@ -71,7 +71,7 @@
<v:String x:Key="title_settings_main">Настройки</v:String>
<v:String x:Key="btgl_notifications_main">Показывать уведомления</v:String>
<v:String x:Key="btgl_sound_main">Звук уведомление</v:String>
- <v:String x:Key="slider_volume_main">Громкость уведомление:</v:String>
+ <v:String x:Key="slider_volume_main">Громкость уведомлений:</v:String>
<v:String x:Key="btgl_toast_main">Закрепить поверх всех окон</v:String>
<v:String x:Key="cmbox_lang_main">Язык интерфейса:</v:String>
<v:String x:Key="cmbox_eng_main">Английский</v:String>
diff --git a/.Source/GTweak/Language/lang.xaml b/.Source/GTweak/Language/lang.xaml
index ad61a941..5da4d142 100644
--- a/.Source/GTweak/Language/lang.xaml
+++ b/.Source/GTweak/Language/lang.xaml
@@ -71,7 +71,7 @@
<v:String x:Key="title_settings_main">Settings</v:String>
<v:String x:Key="btgl_notifications_main">Show notifications</v:String>
<v:String x:Key="btgl_sound_main">Notification sound</v:String>
- <v:String x:Key="slider_volume_main">Notification volume:</v:String>
+ <v:String x:Key="slider_volume_main">Notifications volume:</v:String>
<v:String x:Key="btgl_toast_main">Pin on top of all windows</v:String>
<v:String x:Key="cmbox_lang_main">Interface language:</v:String>
<v:String x:Key="cmbox_eng_main">English</v:String>
diff --git a/.Source/GTweak/Styles/Buttons.xaml b/.Source/GTweak/Styles/Buttons.xaml
index 4f56e96a..43bea5ab 100644
--- a/.Source/GTweak/Styles/Buttons.xaml
+++ b/.Source/GTweak/Styles/Buttons.xaml
@@ -55,7 +55,6 @@
</Style.Triggers>
</Style>
-
<Style TargetType="{x:Type Button}" x:Key="BtnDefault">
<Setter Property="Foreground" Value="{StaticResource Color_Background_Dark}"/>
<Setter Property="Background" Value="{StaticResource Color_Accent}"/>
@@ -80,6 +79,37 @@
<ScaleTransform x:Name="ImageScale" ScaleX="1" ScaleY="1"/>
</Setter.Value>
</Setter>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="Button">
+ <Grid>
+ <Border CornerRadius="5" Background="{TemplateBinding Background}">
+ <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
+ <Border.Style>
+ <Style TargetType="Border">
+ <Setter Property="Visibility" Value="Hidden"/>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Button}}, Path = IsMouseOver}" Value="true">
+ <DataTrigger.Setters>
+ <Setter Property="Effect">
+ <Setter.Value>
+ <BlurEffect Radius="5"/>
+ </Setter.Value>
+ </Setter>
+ <Setter Property="Visibility" Value="Visible"/>
+ </DataTrigger.Setters>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Border.Style>
+ </Border>
+ <Border CornerRadius="5" Background="{TemplateBinding Background}">
+ <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
+ </Border>
+ </Grid>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{StaticResource Color_ButtonOver}"/>
@@ -107,5 +137,4 @@
</Style.Triggers>
</Style>
-
</ResourceDictionary>
\ No newline at end of file
diff --git a/.Source/GTweak/Styles/Colors.xaml b/.Source/GTweak/Styles/Colors.xaml
index 88a899df..3d045de2 100644
--- a/.Source/GTweak/Styles/Colors.xaml
+++ b/.Source/GTweak/Styles/Colors.xaml
@@ -6,7 +6,7 @@
<SolidColorBrush x:Key="Color_Accent" Color="#54FF9F"/>
<SolidColorBrush x:Key="Color_Inactive" Color="#808080"/>
<SolidColorBrush x:Key="Color_Over" Color="#6AECA3"/>
- <SolidColorBrush x:Key="Color_ButtonOver" Color="#93E9BE"/>
+ <SolidColorBrush x:Key="Color_ButtonOver" Color="#60f0a8"/>
<SolidColorBrush x:Key="Color_Border" Color="#00D65E"/>
<SolidColorBrush x:Key="Color_ToggleButtonBackground" Color="#737373"/>
diff --git a/.Source/GTweak/Utilities/Settings.cs b/.Source/GTweak/Utilities/Settings.cs
index f85b4cd2..4da1d90a 100644
--- a/.Source/GTweak/Utilities/Settings.cs
+++ b/.Source/GTweak/Utilities/Settings.cs
@@ -27,12 +27,14 @@ namespace GTweak.Utilities
private static string _language_ = string.Empty;
private static bool _isTopMost = false;
internal static int PID = 0;
+ internal static bool _isHiddenIpAddress = false;
internal static bool IsViewNotification { get => _isViewNotification; set => _isViewNotification = value; }
internal static bool IsSoundNotification { get => _isSoundNotification; set => _isSoundNotification = value; }
internal static byte VolumeNotification { get => _volumeNotification; set => _volumeNotification = value; }
internal static bool IsTopMost { get => _isTopMost; set => _isTopMost = value; }
internal static string Language { get => _language_; set => _language_ = value; }
+ internal static bool IsHiddenIpAddress { get => _isHiddenIpAddress; set => _isHiddenIpAddress = value; }
internal readonly void RunAnalysis()
{
@@ -44,13 +46,14 @@ namespace GTweak.Utilities
{
RegistryKey registryKey = Registry.CurrentUser.OpenSubKey(@"Software\GTweak");
if (registryKey == null || registryKey.GetValue("Notification", null) == null || registryKey.GetValue("Sound", null) == null || registryKey.GetValue("Volume", null) == null ||
- registryKey.GetValue("TopMost", null) == null || registryKey.GetValue("Language", null) == null)
+ registryKey.GetValue("TopMost", null) == null || registryKey.GetValue("Language", null) == null || registryKey.GetValue("HiddenIP", null) == null)
{
registryKey = Registry.CurrentUser.CreateSubKey(@"Software\GTweak");
registryKey?.SetValue("Notification", IsViewNotification, RegistryValueKind.String);
registryKey?.SetValue("Sound", IsSoundNotification, RegistryValueKind.String);
registryKey?.SetValue("Volume", VolumeNotification, RegistryValueKind.String);
registryKey?.SetValue("TopMost", IsTopMost, RegistryValueKind.String);
+ registryKey?.SetValue("HiddenIP", IsHiddenIpAddress, RegistryValueKind.String);
if (string.IsNullOrEmpty(Language))
{
if (System.Text.RegularExpressions.Regex.Replace(CultureInfo.CurrentCulture.ToString(), @"-.+$", "", System.Text.RegularExpressions.RegexOptions.Multiline).ToString().Contains("ru"))
@@ -68,6 +71,7 @@ namespace GTweak.Utilities
IsSoundNotification = bool.Parse(registryKey?.GetValue("Sound").ToString() ?? "True");
VolumeNotification = byte.Parse(registryKey?.GetValue("Volume").ToString() ?? "100");
IsTopMost = bool.Parse(registryKey?.GetValue("TopMost").ToString() ?? "False");
+ IsHiddenIpAddress = bool.Parse(registryKey?.GetValue("HiddenIP").ToString() ?? "False");
Language = registryKey?.GetValue("Language").ToString();
}
registryKey.Close();
@@ -95,8 +99,12 @@ namespace GTweak.Utilities
break;
case "Language":
Language = registryKey?.GetValue("Language").ToString();
- break;
- }
+ break;
+ case "HiddenIP":
+ IsHiddenIpAddress = bool.Parse(registryKey?.GetValue("HiddenIP").ToString() ?? "False");
+ break;
+
+ }
registryKey.Close();
});
}
diff --git a/.Source/GTweak/Utilities/Tweaks/SystemData.cs b/.Source/GTweak/Utilities/Tweaks/SystemData.cs
index 2ba79f60..c1c1b951 100644
--- a/.Source/GTweak/Utilities/Tweaks/SystemData.cs
+++ b/.Source/GTweak/Utilities/Tweaks/SystemData.cs
@@ -110,17 +110,11 @@ namespace GTweak.Utilities
internal sealed class ClientInternetProtocol
{
- [JsonProperty("ip")]
- internal string Ip { get; set; }
-
- [JsonProperty("country")]
- internal string Country { get; set; }
-
[JsonProperty("query")]
- internal string Ip_Reserve { get; set; }
+ internal string Ip { get; set; }
[JsonProperty("countryCode")]
- internal string Country_Reserve { get; set; }
+ internal string Country { get; set; }
}
internal sealed class СomputerСonfiguration
@@ -263,10 +257,7 @@ namespace GTweak.Utilities
try
{
HttpClient client = new HttpClient { Timeout = TimeSpan.FromSeconds(5.0) };
- clientInternetProtocol = JsonConvert.DeserializeObject<ClientInternetProtocol>(client.GetStringAsync("https://ipinfo.io/json").Result);
-
- if (string.IsNullOrEmpty(clientInternetProtocol.Ip) || string.IsNullOrEmpty(clientInternetProtocol.Country))
- clientInternetProtocol = JsonConvert.DeserializeObject<ClientInternetProtocol>(client.GetStringAsync("http://ip-api.com/json/?fields=61439").Result);
+ clientInternetProtocol = JsonConvert.DeserializeObject<ClientInternetProtocol>(client.GetStringAsync("http://ip-api.com/json/?fields=61439").Result);
}
catch
{
@@ -279,14 +270,10 @@ namespace GTweak.Utilities
if (isInternetLimited)
isInternetLimited = false;
+
if (!string.IsNullOrEmpty(clientInternetProtocol.Ip) || !string.IsNullOrEmpty(clientInternetProtocol.Country))
{
- СonfigurationData["IpAddress"] = clientInternetProtocol.Ip + " (" + clientInternetProtocol.Country + ")";
- isNoInternetConnection = false && isNoInternetConnection;
- }
- else if (!string.IsNullOrEmpty(clientInternetProtocol.Ip_Reserve) || !string.IsNullOrEmpty(clientInternetProtocol.Country_Reserve))
- {
- СonfigurationData["IpAddress"] = clientInternetProtocol.Ip_Reserve + " (" + clientInternetProtocol.Country_Reserve + ")";
+ СonfigurationData["IpAddress"] = clientInternetProtocol.Ip + " (" + clientInternetProtocol.Country + ")";
isNoInternetConnection = false && isNoInternetConnection;
}
else
diff --git a/.Source/GTweak/View/InformationSystemView.xaml b/.Source/GTweak/View/InformationSystemView.xaml
index 4e2ad030..8614de1e 100644
--- a/.Source/GTweak/View/InformationSystemView.xaml
+++ b/.Source/GTweak/View/InformationSystemView.xaml
@@ -174,7 +174,14 @@
<Grid Grid.Row="3">
<StackPanel Orientation="Vertical" Margin="50,20,0,0">
<TextBlock Text="{DynamicResource title_ip_systemInformation}" Style="{StaticResource Text}" Foreground="{StaticResource Color_Accent}" Height="Auto" Width="Auto"/>
- <TextBlock Text="{Binding DisplayIpAddress}" Style="{StaticResource Text}" HorizontalAlignment="Left" Margin="15,0,0,0" Foreground="#ffffff" Height="Auto" Width="Auto" PreviewMouseLeftButtonDown="TextBlock_PreviewMouseDown" Cursor="Hand"/>
+ <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}"/>
+ </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"/>
+ </StackPanel>
</StackPanel>
</Grid>
</Grid>
diff --git a/.Source/GTweak/View/InformationSystemView.xaml.cs b/.Source/GTweak/View/InformationSystemView.xaml.cs
index ce28678b..03f9bf4f 100644
--- a/.Source/GTweak/View/InformationSystemView.xaml.cs
+++ b/.Source/GTweak/View/InformationSystemView.xaml.cs
@@ -10,6 +10,7 @@ using System.Windows.Controls.Primitives;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media.Animation;
+using System.Windows.Media.Effects;
using System.Windows.Threading;
namespace GTweak.View
@@ -54,7 +55,8 @@ namespace GTweak.View
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);
+ 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)
@@ -70,7 +72,7 @@ namespace GTweak.View
timer.Start();
}
-
+
private void AnimationPopup(bool _reverse)
{
PopupCopy.IsOpen = true;
@@ -87,6 +89,24 @@ namespace GTweak.View
Timeline.SetDesiredFrameRate(doubleAnim, 400);
CopyTextToastBody.BeginAnimation(ContextMenu.OpacityProperty, doubleAnim);
}
+ private void ImageHidden_PreviewMouseDown(object sender, MouseButtonEventArgs e)
+ {
+ if (e.LeftButton == MouseButtonState.Pressed)
+ {
+ DoubleAnimation doubleAnim = new DoubleAnimation()
+ {
+ From = Settings.IsHiddenIpAddress ? 15: 0,
+ To = Settings.IsHiddenIpAddress ? 0 : 15,
+ EasingFunction = new QuadraticEase(),
+ Duration = TimeSpan.FromSeconds(0.3)
+ };
+ Timeline.SetDesiredFrameRate(doubleAnim, 400);
+ IpAddress.Effect.BeginAnimation(BlurEffect.RadiusProperty, doubleAnim);
+
+ Settings.ChangingParameters(!Settings.IsHiddenIpAddress, "HiddenIP");
+ DataContext = new InformationSystemVM();
+ }
+ }
private async void TextBlock_PreviewMouseDown(object sender, MouseButtonEventArgs e)
{
@@ -112,6 +132,7 @@ namespace GTweak.View
{
From = CPULoad.Value,
To = SystemData.MonitoringSystem.CpuUsage,
+ EasingFunction = new QuadraticEase(),
Duration = TimeSpan.FromSeconds(0.2)
};
Timeline.SetDesiredFrameRate(doubleAnim, 400);
@@ -122,6 +143,7 @@ namespace GTweak.View
{
From = RAMLoad.Value,
To = new SystemData.MonitoringSystem().RamUsage,
+ EasingFunction = new QuadraticEase(),
Duration = TimeSpan.FromSeconds(0.2)
};
Timeline.SetDesiredFrameRate(doubleAnim, 400);
@@ -161,6 +183,7 @@ 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;
}
private void Page_KeyDown(object sender, KeyEventArgs e)
diff --git a/.Source/GTweak/Windows/ImportWindow.xaml.cs b/.Source/GTweak/Windows/ImportWindow.xaml.cs
index e9aafa4e..aaef97a5 100644
--- a/.Source/GTweak/Windows/ImportWindow.xaml.cs
+++ b/.Source/GTweak/Windows/ImportWindow.xaml.cs
@@ -50,7 +50,7 @@ namespace GTweak.Windows
_token.ThrowIfCancellationRequested();
СonfigSettings configSettings = new СonfigSettings(Settings.PathConfig);
- if (i == 2 && configSettings.IsThereSection("Confidentiality Tweaks"))
+ if (i == 2 & configSettings.IsThereSection("Confidentiality Tweaks"))
{
for (byte number = 1; number <= 18; number++)
{
@@ -70,7 +70,7 @@ namespace GTweak.Windows
}
}
- if (i == 30 && configSettings.IsThereSection("Interface Tweaks"))
+ if (i == 30 & configSettings.IsThereSection("Interface Tweaks"))
{
for (byte number = 1; number <= 28; number++)
{
@@ -102,7 +102,7 @@ namespace GTweak.Windows
}
}
- if (i == 50 && configSettings.IsThereSection("Services Tweaks"))
+ if (i == 50 & configSettings.IsThereSection("Services Tweaks"))
{
for (byte number = 1; number <= 28; number++)
{
@@ -116,7 +116,7 @@ namespace GTweak.Windows
}
}
- if (i == 80 && configSettings.IsThereSection("System Tweaks"))
+ if (i == 80 & configSettings.IsThereSection("System Tweaks"))
{
for (byte number = 1; number <= 3; number++)
{
diff --git a/Assets/GTweak_Intro.png b/Assets/GTweak_Intro.png
deleted file mode 100644
index 93ba0af0..00000000
Binary files a/Assets/GTweak_Intro.png and /dev/null differ
diff --git a/Assets/SVG Others/hide.svg b/Assets/SVG Others/hide.svg
new file mode 100644
index 00000000..8cc9bc23
--- /dev/null
+++ b/Assets/SVG Others/hide.svg
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48px" height="48px" viewBox="0 0 48 48" version="1.1">
+<g id="surface1">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 40.046875 6.535156 L 33.511719 13.074219 L 31.511719 12.339844 C 28.339844 11.171875 21.757812 10.976562 18.144531 11.902344 C 12.585938 13.316406 9.855469 14.976562 4.632812 20.046875 L -0.242188 24.828125 L 2.925781 28.046875 C 4.683594 29.855469 7.21875 32.097656 8.535156 33.074219 C 9.902344 34 11.074219 34.878906 11.21875 34.976562 C 11.316406 35.074219 8.78125 37.757812 5.609375 40.976562 C 0.976562 45.609375 -0.0976562 46.925781 0.390625 47.414062 C 0.878906 47.902344 2.242188 46.78125 7.023438 42 L 13.023438 36 L 16.339844 37.023438 C 23.121094 39.121094 31.074219 38.144531 37.316406 34.390625 C 40.292969 32.585938 47.804688 25.609375 47.804688 24.585938 C 47.804688 23.804688 41.171875 17.609375 38.242188 15.609375 C 36.925781 14.730469 35.757812 13.902344 35.609375 13.804688 C 35.511719 13.707031 38.242188 10.78125 41.660156 7.367188 C 47.121094 1.902344 48.488281 0 46.925781 0 C 46.730469 0 43.660156 2.925781 40.046875 6.535156 Z M 29.269531 14.144531 L 31.367188 15.21875 L 29.953125 16.632812 C 28.535156 18 28.535156 18 26.4375 17.269531 C 24.046875 16.488281 20.976562 16.78125 20.976562 17.855469 C 20.976562 18.339844 21.660156 18.535156 23.316406 18.535156 C 27.511719 18.535156 27.511719 19.074219 23.269531 23.269531 C 18.925781 27.609375 18.292969 27.5625 18.730469 22.78125 C 18.976562 20.585938 18.878906 20 18.292969 20 C 17.902344 20 17.367188 20.828125 17.074219 22 C 16.632812 23.609375 16.683594 24.488281 17.269531 26.292969 L 18 28.535156 L 16.488281 30.097656 C 15.609375 30.976562 14.730469 31.707031 14.535156 31.707031 C 13.609375 31.707031 12.195312 27.511719 12.195312 24.730469 C 12.195312 19.21875 15.414062 14.925781 20.976562 13.121094 C 22.925781 12.488281 27.023438 12.976562 29.269531 14.144531 Z M 13.804688 15.707031 C 10.242188 19.609375 9.414062 26.046875 11.855469 30.730469 C 12.585938 32.144531 13.074219 33.414062 12.925781 33.5625 C 12.390625 34.097656 9.855469 32.292969 5.953125 28.535156 L 1.855469 24.632812 L 5.511719 21.121094 C 8.4375 18.292969 13.5625 14.683594 14.585938 14.632812 C 14.730469 14.632812 14.339844 15.121094 13.804688 15.707031 Z M 36.195312 16.144531 C 37.269531 16.683594 39.902344 18.828125 42.046875 20.878906 L 45.953125 24.632812 L 41.804688 28.632812 C 38.339844 31.953125 34.585938 34.632812 33.414062 34.632812 C 33.316406 34.632812 33.953125 33.660156 34.828125 32.4375 C 38.390625 27.804688 38.144531 20.390625 34.242188 15.953125 C 33.269531 14.878906 33.757812 14.878906 36.195312 16.144531 Z M 34.925781 20.292969 C 36.925781 25.511719 34.78125 31.953125 30.046875 34.878906 C 27.902344 36.144531 27.21875 36.339844 23.953125 36.339844 C 20.730469 36.339844 19.902344 36.144531 17.855469 34.925781 L 15.511719 33.5625 L 17.367188 31.660156 L 19.269531 29.804688 L 21.367188 30.535156 C 24.097656 31.464844 26.488281 31.023438 28.585938 29.171875 C 30.828125 27.171875 31.511719 24.488281 30.535156 21.511719 C 29.804688 19.316406 29.804688 19.269531 31.074219 17.953125 C 32.292969 16.683594 32.4375 16.632812 33.21875 17.367188 C 33.707031 17.804688 34.488281 19.121094 34.925781 20.292969 Z M 28.976562 21.757812 C 29.902344 24.195312 28.730469 27.707031 26.585938 28.683594 C 25.074219 29.367188 22.488281 29.414062 21.464844 28.78125 C 20.878906 28.390625 21.414062 27.609375 24.390625 24.632812 C 26.390625 22.632812 28.195312 20.976562 28.339844 20.976562 C 28.535156 20.976562 28.828125 21.316406 28.976562 21.757812 Z M 28.976562 21.757812 "/>
+</g>
+</svg>
diff --git a/Assets/SVG Others/show.svg b/Assets/SVG Others/show.svg
new file mode 100644
index 00000000..179f791a
--- /dev/null
+++ b/Assets/SVG Others/show.svg
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48px" height="48px" viewBox="0 0 48 48" version="1.1">
+<g id="surface1">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 38.398438 15.671875 C 37.324219 14.9375 36.34375 14.300781 35.949219 14.007812 C 35.753906 13.960938 35.558594 13.859375 35.363281 13.761719 C 35.363281 13.761719 35.3125 13.761719 35.3125 13.761719 C 35.167969 13.714844 35.070312 13.617188 34.921875 13.566406 C 34.777344 13.519531 34.675781 13.519531 34.578125 13.46875 C 34.53125 13.46875 34.480469 13.421875 34.433594 13.421875 C 34.335938 13.421875 34.238281 13.371094 34.1875 13.371094 C 33.941406 13.324219 33.746094 13.222656 33.550781 13.125 L 31.640625 12.441406 C 28.457031 11.265625 21.84375 11.070312 18.21875 12 C 12.636719 13.421875 9.894531 15.085938 4.652344 20.179688 L -0.246094 24.980469 L 2.9375 28.164062 C 4.703125 29.976562 7.25 32.230469 8.570312 33.207031 C 9.746094 34.039062 10.777344 34.777344 11.117188 35.019531 C 11.414062 35.117188 11.65625 35.265625 11.851562 35.460938 C 12.148438 35.558594 12.441406 35.753906 12.6875 35.949219 C 12.882812 36 13.078125 36.097656 13.273438 36.246094 L 16.359375 37.175781 C 23.167969 39.28125 31.152344 38.300781 37.421875 34.53125 C 40.40625 32.71875 47.949219 25.714844 47.949219 24.6875 C 48 23.902344 41.339844 17.679688 38.398438 15.671875 Z M 12.980469 33.699219 C 12.441406 34.238281 9.894531 32.425781 5.976562 28.652344 L 1.859375 24.734375 L 5.535156 21.207031 C 8.472656 18.367188 13.617188 14.742188 14.644531 14.695312 C 14.792969 14.695312 14.398438 15.183594 13.859375 15.769531 C 10.285156 19.691406 9.453125 26.15625 11.902344 30.855469 C 12.636719 32.277344 13.125 33.550781 12.980469 33.699219 Z M 30.171875 35.019531 C 28.015625 36.292969 27.332031 36.488281 24.050781 36.488281 C 20.816406 36.488281 19.984375 36.292969 17.925781 35.070312 L 15.574219 33.699219 C 15.378906 33.550781 15.183594 33.355469 15.035156 33.160156 C 14.9375 33.0625 14.839844 32.914062 14.742188 32.765625 C 14.597656 32.570312 14.449219 32.375 14.351562 32.179688 C 14.15625 31.933594 14.058594 31.640625 13.960938 31.394531 C 13.960938 31.347656 13.910156 31.347656 13.910156 31.296875 C 13.078125 30.074219 12.195312 27.085938 12.195312 24.882812 C 12.195312 19.347656 15.429688 15.035156 21.011719 13.222656 C 22.972656 12.585938 27.085938 13.078125 29.339844 14.253906 L 31.445312 15.332031 C 31.542969 15.378906 31.640625 15.429688 31.738281 15.476562 C 32.179688 15.769531 32.523438 16.113281 32.867188 16.507812 C 33.011719 16.652344 33.160156 16.847656 33.304688 16.996094 C 33.503906 17.242188 33.601562 17.4375 33.746094 17.679688 C 33.84375 17.878906 33.941406 18.074219 34.039062 18.269531 C 34.089844 18.417969 34.1875 18.5625 34.238281 18.710938 C 34.53125 19.25 34.824219 19.835938 35.070312 20.425781 C 37.078125 25.617188 34.921875 32.082031 30.171875 35.019531 Z M 41.976562 28.75 C 38.496094 32.082031 34.726562 34.777344 33.550781 34.777344 C 33.453125 34.777344 34.089844 33.796875 34.972656 32.570312 C 38.546875 27.917969 38.300781 20.472656 34.382812 16.015625 C 33.402344 14.9375 33.894531 14.9375 36.34375 16.210938 C 37.421875 16.75 40.066406 18.90625 42.21875 20.964844 L 46.140625 24.734375 Z M 41.976562 28.75 "/>
+<path style="fill:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 62.597819 49 C 62.597819 41.487305 56.512695 35.402181 49 35.402181 C 41.487305 35.402181 35.402181 41.487305 35.402181 49 C 35.402181 56.512695 41.487305 62.597819 49 62.597819 C 56.512695 62.597819 62.597819 56.512695 62.597819 49 Z M 62.597819 49 " transform="matrix(0.489796,0,0,0.489796,0,0)"/>
+</g>
+</svg>