Portable Tool for an Ideal Windows Setup
C# activatorbloatware-removalcsharpdebloatdebloaterdisable-servicesmonitoring-systemportableprivacy-toolsregistry-tweakssystem-tuningsystem-utilitytelemetrytweakerwindows-10windows-11windows-debloatwindows-defenderwindows-optimizationwindows-tweaks
-fixed blur animation
Greedeks04973dd7f394
diff --git a/.Source/GTweak/View/InformationSystemView.xaml b/.Source/GTweak/View/InformationSystemView.xamlindex 3f30af52..d5b76dad 100644--- a/.Source/GTweak/View/InformationSystemView.xaml+++ b/.Source/GTweak/View/InformationSystemView.xaml@@ -187,7 +187,7 @@<BlurEffect Radius="{Binding SetBlurValue}"/></TextBlock.Effect></TextBlock>- <ToggleButton x:Name="BtnHiddenIP" Width="20" Height="20" Margin="10,0,0,0" Style="{StaticResource TglButtonIP}" IsChecked="{Binding StateButton}" Visibility="{Binding SetVisibility}" PreviewMouseLeftButtonDown="BtnHiddenIP_PreviewMouseLeftButtonDown"/>+ <ToggleButton x:Name="BtnHiddenIP" Width="20" Height="20" Margin="10,0,0,0" Style="{StaticResource TglButtonIP}" IsChecked="{Binding StateButton}" Visibility="{Binding SetVisibility}" PreviewMouseLeftButtonDown="BtnHiddenIP_PreviewMouseLeftButtonDown" Unchecked="BtnHiddenIP_Unchecked" Checked="BtnHiddenIP_Checked"/></StackPanel></StackPanel></Grid>diff --git a/.Source/GTweak/View/InformationSystemView.xaml.cs b/.Source/GTweak/View/InformationSystemView.xaml.csindex 078e8456..f7d42172 100644--- a/.Source/GTweak/View/InformationSystemView.xaml.cs+++ b/.Source/GTweak/View/InformationSystemView.xaml.cs@@ -1,4 +1,5 @@-using GTweak.Core.ViewModel;+using GTweak.Assets.UserControl;+using GTweak.Core.ViewModel;using GTweak.Utilities;using GTweak.Utilities.Tweaks;using System;@@ -58,7 +59,7 @@ namespace GTweak.View{Thread _thread = new Thread(() => { new SystemData.MonitoringSystem().CountProcess.ToString(); }){ IsBackground = true };- Application.Current.Dispatcher.Invoke(ProgressBarAnim);+ Application.Current.Dispatcher.Invoke(AnimationProgressBars);if (BtnHiddenIP.IsChecked.Value & BtnHiddenIP.Visibility == Visibility.Hidden){@@ -82,6 +83,34 @@ namespace GTweak.Viewtimer.Start();}+ #region Animations+ private void AnimationProgressBars()+ {+ Parallel.Invoke(() =>+ {+ DoubleAnimation doubleAnim = new DoubleAnimation()+ {+ From = CPULoad.Value,+ To = SystemData.MonitoringSystem.CpuUsage,+ EasingFunction = new PowerEase(),+ Duration = TimeSpan.FromSeconds(0.2)+ };+ Timeline.SetDesiredFrameRate(doubleAnim, 400);+ CPULoad.BeginAnimation(ProgressBar.ValueProperty, doubleAnim);+++ doubleAnim = new DoubleAnimation()+ {+ From = RAMLoad.Value,+ To = new SystemData.MonitoringSystem().RamUsage,+ EasingFunction = new PowerEase(),+ Duration = TimeSpan.FromSeconds(0.2)+ };+ Timeline.SetDesiredFrameRate(doubleAnim, 400);+ RAMLoad.BeginAnimation(ProgressBar.ValueProperty, doubleAnim);+ });+ }+private void AnimationPopup(){PopupCopy.IsOpen = true;@@ -110,10 +139,8 @@ namespace GTweak.ViewPopupCopy.BeginAnimation(Popup.VerticalOffsetProperty, doubleAnim);}- private void BtnHiddenIP_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)+ private void AnimationBlurIP(){- Parallel.Invoke(() => { Settings.ChangingParameters(!BtnHiddenIP.IsChecked.Value, "HiddenIP"); });-DoubleAnimation doubleAnim = new DoubleAnimation(){From = BtnHiddenIP.IsChecked.Value ? 20 : 0,@@ -124,6 +151,11 @@ namespace GTweak.ViewTimeline.SetDesiredFrameRate(doubleAnim, 400);IpAddress.Effect.BeginAnimation(BlurEffect.RadiusProperty, doubleAnim);}+ #endregion++ private void BtnHiddenIP_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e) => Parallel.Invoke(delegate { Settings.ChangingParameters(!BtnHiddenIP.IsChecked.Value, "HiddenIP"); });+ private void BtnHiddenIP_Unchecked(object sender, RoutedEventArgs e) => AnimationBlurIP();+ private void BtnHiddenIP_Checked(object sender, RoutedEventArgs e) => AnimationBlurIP();private void TextComputerData_PreviewMouseDown(object sender, MouseButtonEventArgs e){@@ -146,33 +178,6 @@ namespace GTweak.View}}- private void ProgressBarAnim()- {- Parallel.Invoke(() =>- {- DoubleAnimation doubleAnim = new DoubleAnimation()- {- From = CPULoad.Value,- To = SystemData.MonitoringSystem.CpuUsage,- EasingFunction = new PowerEase(),- Duration = TimeSpan.FromSeconds(0.2)- };- Timeline.SetDesiredFrameRate(doubleAnim, 400);- CPULoad.BeginAnimation(ProgressBar.ValueProperty, doubleAnim);--- doubleAnim = new DoubleAnimation()- {- From = RAMLoad.Value,- To = new SystemData.MonitoringSystem().RamUsage,- EasingFunction = new PowerEase(),- Duration = TimeSpan.FromSeconds(0.2)- };- Timeline.SetDesiredFrameRate(doubleAnim, 400);- RAMLoad.BeginAnimation(ProgressBar.ValueProperty, doubleAnim);- });- }-private void Page_Unloaded(object sender, RoutedEventArgs e) => timer.Stop();private void Page_Loaded(object sender, RoutedEventArgs e)