Skip to content

Portable Tool for an Ideal Windows Setup

-the animation of the typewriter has been changed, an opacity animation has been added to it

Greedeksa215e96ebd61
diff --git a/.Source/GTweak/GTweak.csproj b/.Source/GTweak/GTweak.csproj
index 599eaf5a..b87a1c75 100644
--- a/.Source/GTweak/GTweak.csproj
+++ b/.Source/GTweak/GTweak.csproj
@@ -261,7 +261,7 @@
<Compile Include="Utilities\Tweaks\WindowsDefender.cs" />
<Compile Include="Utilities\Tweaks\WindowsLicense.cs" />
<Compile Include="Utilities\Tweaks\RecoveryPoint.cs" />
- <Compile Include="Utilities\Helpers\WorkWithText.cs" />
+ <Compile Include="Utilities\Helpers\TypewriterAnimation.cs" />
<Compile Include="Core\ViewModel\PagesViewModel.cs" />
<Compile Include="Windows\ImportWindow.xaml.cs">
<DependentUpon>ImportWindow.xaml</DependentUpon>
diff --git a/.Source/GTweak/Properties/AssemblyInfo.cs b/.Source/GTweak/Properties/AssemblyInfo.cs
index 0abf410b..6664bc59 100644
--- a/.Source/GTweak/Properties/AssemblyInfo.cs
+++ b/.Source/GTweak/Properties/AssemblyInfo.cs
@@ -10,8 +10,8 @@ using System.Windows;
[assembly: AssemblyCopyright("Copyright © Greedeks 2024")]
[assembly: AssemblyTrademark("Greedeks")]
[assembly: AssemblyCulture("")]
-[assembly: AssemblyInformationalVersion("Build: 4.90.6")]
-[assembly: AssemblyFileVersion("4.90.6")]
+[assembly: AssemblyInformationalVersion("Build: 4.90.7")]
+[assembly: AssemblyFileVersion("4.90.7")]
[assembly: ComVisible(false)]
diff --git a/.Source/GTweak/Utilities/Helpers/WorkWithText.cs b/.Source/GTweak/Utilities/Helpers/TypewriterAnimation.cs
similarity index 65%
rename from .Source/GTweak/Utilities/Helpers/WorkWithText.cs
rename to .Source/GTweak/Utilities/Helpers/TypewriterAnimation.cs
index 3892f92d..64cb8015 100644
--- a/.Source/GTweak/Utilities/Helpers/WorkWithText.cs
+++ b/.Source/GTweak/Utilities/Helpers/TypewriterAnimation.cs
@@ -5,9 +5,9 @@ using System.Windows.Media.Animation;
namespace GTweak.Utilities.Helpers
{
- internal readonly struct WorkWithText
+ internal sealed class TypewriterAnimation
{
- internal static void TypeWriteAnimation(string textToAnimate, TextBlock textBlock, TimeSpan timeSpan)
+ internal TypewriterAnimation(string textToAnimate, TextBlock textBlock, TimeSpan timeSpan)
{
if (!(textBlock.FindName(textBlock.Name) is TextBlock)) return;
Storyboard storyBoard = new Storyboard()
@@ -31,10 +31,25 @@ namespace GTweak.Utilities.Helpers
discreteStringKeyFrame.Value = temp;
stringAnimationUsingKeyFrames.KeyFrames.Add(discreteStringKeyFrame);
}
-
+
+ Timeline.SetDesiredFrameRate(stringAnimationUsingKeyFrames, 400);
Storyboard.SetTargetName(stringAnimationUsingKeyFrames, textBlock.Name);
Storyboard.SetTargetProperty(stringAnimationUsingKeyFrames, new PropertyPath(TextBlock.TextProperty));
storyBoard.Children.Add(stringAnimationUsingKeyFrames);
+
+ DoubleAnimation doubleAnim = new DoubleAnimation()
+ {
+ From = 0,
+ To = 1,
+ Duration = new Duration(timeSpan),
+ EasingFunction = new QuadraticEase()
+ };
+
+ Timeline.SetDesiredFrameRate(doubleAnim, 400);
+ Storyboard.SetTargetName(doubleAnim, textBlock.Name);
+ Storyboard.SetTargetProperty(doubleAnim, new PropertyPath(UIElement.OpacityProperty));
+ storyBoard.Children.Add(doubleAnim);
+
textBlock.BeginStoryboard(storyBoard);
storyBoard.Remove(textBlock);
}
diff --git a/.Source/GTweak/View/ApplicationsView.xaml.cs b/.Source/GTweak/View/ApplicationsView.xaml.cs
index 82ccd3f8..63954e58 100644
--- a/.Source/GTweak/View/ApplicationsView.xaml.cs
+++ b/.Source/GTweak/View/ApplicationsView.xaml.cs
@@ -22,7 +22,7 @@ namespace GTweak.View
{
InitializeComponent();
- App.LanguageChanged += delegate { WorkWithText.TypeWriteAnimation((string)FindResource("defaultDescriptionApp"), TextDescription, TimeSpan.FromMilliseconds(0)); };
+ App.LanguageChanged += delegate { new TypewriterAnimation((string)FindResource("defaultDescriptionApp"), TextDescription, TimeSpan.FromMilliseconds(0)); };
DispatcherTimer timer = new DispatcherTimer(new TimeSpan(0, 0, 1), DispatcherPriority.Normal, delegate
{
@@ -131,20 +131,20 @@ namespace GTweak.View
if (TextDescription.Text != (string)FindResource(imageApp.Name + "_applications"))
{
string _descriptionApps = (string)FindResource(imageApp.Name + "_applications");
- WorkWithText.TypeWriteAnimation(_descriptionApps, TextDescription, TimeSpan.FromMilliseconds(250));
+ new TypewriterAnimation(_descriptionApps, TextDescription, TimeSpan.FromMilliseconds(250));
}
}
private void Apps_MouseLeave(object sender, MouseEventArgs e)
{
if (TextDescription.Text != (string)FindResource("defaultDescriptionApp"))
- WorkWithText.TypeWriteAnimation((string)FindResource("defaultDescriptionApp"), TextDescription, TimeSpan.FromMilliseconds(250));
+ new TypewriterAnimation((string)FindResource("defaultDescriptionApp"), TextDescription, TimeSpan.FromMilliseconds(250));
}
private void Page_Loaded(object sender, RoutedEventArgs e)
{
Parallel.Invoke(UpdateViewStateApps);
- WorkWithText.TypeWriteAnimation((string)FindResource("defaultDescriptionApp"), TextDescription, TimeSpan.FromMilliseconds(300));
+ new TypewriterAnimation((string)FindResource("defaultDescriptionApp"), TextDescription, TimeSpan.FromMilliseconds(300));
}
private void UpdateViewStateApps()
diff --git a/.Source/GTweak/View/ConfidentialityView.xaml.cs b/.Source/GTweak/View/ConfidentialityView.xaml.cs
index 4985d8a8..0db5b65d 100644
--- a/.Source/GTweak/View/ConfidentialityView.xaml.cs
+++ b/.Source/GTweak/View/ConfidentialityView.xaml.cs
@@ -16,7 +16,7 @@ namespace GTweak.View
{
InitializeComponent();
- App.LanguageChanged += delegate { WorkWithText.TypeWriteAnimation((string)FindResource("defaultDescription"), TextDescription, TimeSpan.FromMilliseconds(0)); };
+ App.LanguageChanged += delegate { new TypewriterAnimation((string)FindResource("defaultDescription"), TextDescription, TimeSpan.FromMilliseconds(0)); };
}
private void Tweak_MouseEnter(object sender, MouseEventArgs e)
@@ -27,14 +27,14 @@ namespace GTweak.View
{
string _descriptionTweak = (string)FindResource(toggleButton.Name + "_description_confidentiality");
TimeSpan time = _descriptionTweak.Length < 200 ? TimeSpan.FromMilliseconds(400) : TimeSpan.FromMilliseconds(550);
- WorkWithText.TypeWriteAnimation(_descriptionTweak, TextDescription, time);
+ new TypewriterAnimation(_descriptionTweak, TextDescription, time);
}
}
private void Tweak_MouseLeave(object sender, MouseEventArgs e)
{
if (TextDescription.Text != (string)FindResource("defaultDescription"))
- WorkWithText.TypeWriteAnimation((string)FindResource("defaultDescription"), TextDescription, TimeSpan.FromMilliseconds(250));
+ new TypewriterAnimation((string)FindResource("defaultDescription"), TextDescription, TimeSpan.FromMilliseconds(250));
}
private async void TglButton_ChangedState(object sender, EventArgs e)
@@ -56,7 +56,7 @@ namespace GTweak.View
private void Page_Loaded(object sender, RoutedEventArgs e)
{
- WorkWithText.TypeWriteAnimation((string)FindResource("defaultDescription"), TextDescription, TimeSpan.FromMilliseconds(300));
+ new TypewriterAnimation((string)FindResource("defaultDescription"), TextDescription, TimeSpan.FromMilliseconds(300));
Parallel.Invoke(() => new ConfidentialityTweaks().ViewСonfidentiality(this));
}
}
diff --git a/.Source/GTweak/View/InterfaceView.xaml.cs b/.Source/GTweak/View/InterfaceView.xaml.cs
index 97fbd248..38153df8 100644
--- a/.Source/GTweak/View/InterfaceView.xaml.cs
+++ b/.Source/GTweak/View/InterfaceView.xaml.cs
@@ -17,7 +17,7 @@ namespace GTweak.View
{
InitializeComponent();
- App.LanguageChanged += delegate { WorkWithText.TypeWriteAnimation((string)FindResource("defaultDescription"), TextDescription, TimeSpan.FromMilliseconds(0)); };
+ App.LanguageChanged += delegate { new TypewriterAnimation((string)FindResource("defaultDescription"), TextDescription, TimeSpan.FromMilliseconds(0)); };
if (WindowsLicense.statusLicense != 1)
new ViewNotification().Show("", (string)Application.Current.Resources["title1_notification"], (string)Application.Current.Resources["viewlicense_notification"]);
@@ -31,19 +31,19 @@ namespace GTweak.View
{
string _descriptionTweak = (string)FindResource(toggleButton.Name + "_description_interface");
TimeSpan time = _descriptionTweak.Length < 200 ? TimeSpan.FromMilliseconds(400) : TimeSpan.FromMilliseconds(550);
- WorkWithText.TypeWriteAnimation(_descriptionTweak, TextDescription, time);
+ new TypewriterAnimation(_descriptionTweak, TextDescription, time);
if (toggleButton.Name == "TglButton1")
{
TextViewColor.Foreground = new SolidColorBrush(Color.FromArgb(255, 80, 80, 80));
TextViewColor.Visibility = Visibility.Visible;
- WorkWithText.TypeWriteAnimation((string)FindResource("textcolor_interface"), TextViewColor, TimeSpan.FromMilliseconds(350));
+ new TypewriterAnimation((string)FindResource("textcolor_interface"), TextViewColor, TimeSpan.FromMilliseconds(350));
}
else if (toggleButton.Name == "TglButton2")
{
TextViewColor.Foreground = new SolidColorBrush(Color.FromArgb(255, 240, 255, 255));
TextViewColor.Visibility = Visibility.Visible;
- WorkWithText.TypeWriteAnimation((string)FindResource("textcolor_interface"), TextViewColor, TimeSpan.FromMilliseconds(350));
+ new TypewriterAnimation((string)FindResource("textcolor_interface"), TextViewColor, TimeSpan.FromMilliseconds(350));
}
}
@@ -54,7 +54,7 @@ namespace GTweak.View
if (TextViewColor.Visibility==Visibility.Visible)
TextViewColor.Visibility=Visibility.Hidden;
if (TextDescription.Text != (string)FindResource("defaultDescription"))
- WorkWithText.TypeWriteAnimation((string)FindResource("defaultDescription"), TextDescription, TimeSpan.FromMilliseconds(250));
+ new TypewriterAnimation((string)FindResource("defaultDescription"), TextDescription, TimeSpan.FromMilliseconds(250));
}
private async void TglButton_ChangedState(object sender, EventArgs e)
@@ -87,7 +87,7 @@ namespace GTweak.View
private void Page_Loaded(object sender, RoutedEventArgs e)
{
- WorkWithText.TypeWriteAnimation((string)FindResource("defaultDescription"), TextDescription, TimeSpan.FromMilliseconds(300));
+ new TypewriterAnimation((string)FindResource("defaultDescription"), TextDescription, TimeSpan.FromMilliseconds(300));
Parallel.Invoke(() => new InterfaceTweaks().ViewInterface(this));
}
}
diff --git a/.Source/GTweak/View/ServicesView.xaml.cs b/.Source/GTweak/View/ServicesView.xaml.cs
index 3a8d297d..50d03170 100644
--- a/.Source/GTweak/View/ServicesView.xaml.cs
+++ b/.Source/GTweak/View/ServicesView.xaml.cs
@@ -15,7 +15,7 @@ namespace GTweak.View
{
InitializeComponent();
- App.LanguageChanged += delegate { WorkWithText.TypeWriteAnimation((string)FindResource("defaultDescription"), TextDescription, TimeSpan.FromMilliseconds(0)); };
+ App.LanguageChanged += delegate { new TypewriterAnimation((string)FindResource("defaultDescription"), TextDescription, TimeSpan.FromMilliseconds(0)); };
}
private void Tweak_MouseEnter(object sender, MouseEventArgs e)
@@ -26,14 +26,14 @@ namespace GTweak.View
{
string _descriptionTweak = (string)FindResource(toggleButton.Name + "_description_services");
TimeSpan time = _descriptionTweak.Length < 200 ? TimeSpan.FromMilliseconds(400) : TimeSpan.FromMilliseconds(550);
- WorkWithText.TypeWriteAnimation(_descriptionTweak, TextDescription, time);
+ new TypewriterAnimation(_descriptionTweak, TextDescription, time);
}
}
private void Tweak_MouseLeave(object sender, MouseEventArgs e)
{
if (TextDescription.Text != (string)FindResource("defaultDescription"))
- WorkWithText.TypeWriteAnimation((string)FindResource("defaultDescription"), TextDescription, TimeSpan.FromMilliseconds(250));
+ new TypewriterAnimation((string)FindResource("defaultDescription"), TextDescription, TimeSpan.FromMilliseconds(250));
}
private async void TglButton_ChangedState(object sender, EventArgs e)
@@ -49,7 +49,7 @@ namespace GTweak.View
private void Page_Loaded(object sender, System.Windows.RoutedEventArgs e)
{
- WorkWithText.TypeWriteAnimation((string)FindResource("defaultDescription"), TextDescription, TimeSpan.FromMilliseconds(300));
+ new TypewriterAnimation((string)FindResource("defaultDescription"), TextDescription, TimeSpan.FromMilliseconds(300));
Parallel.Invoke(() => new ServicesTweaks().ViewServices(this));
}
}
diff --git a/.Source/GTweak/View/SystemView.xaml.cs b/.Source/GTweak/View/SystemView.xaml.cs
index b94488b1..aa66cf3a 100644
--- a/.Source/GTweak/View/SystemView.xaml.cs
+++ b/.Source/GTweak/View/SystemView.xaml.cs
@@ -16,7 +16,7 @@ namespace GTweak.View
{
InitializeComponent();
- App.LanguageChanged += delegate { WorkWithText.TypeWriteAnimation((string)FindResource("defaultDescription"), TextDescription, TimeSpan.FromMilliseconds(0)); };
+ App.LanguageChanged += delegate { new TypewriterAnimation((string)FindResource("defaultDescription"), TextDescription, TimeSpan.FromMilliseconds(0)); };
}
private void Tweak_MouseEnter(object sender, MouseEventArgs e)
@@ -27,7 +27,7 @@ namespace GTweak.View
{
string _descriptionTweak = (string)FindResource(toggleButton.Name + "_description_system");
TimeSpan time = _descriptionTweak.Length < 200 ? TimeSpan.FromMilliseconds(400) : TimeSpan.FromMilliseconds(550);
- WorkWithText.TypeWriteAnimation(_descriptionTweak, TextDescription, time);
+ new TypewriterAnimation(_descriptionTweak, TextDescription, time);
}
}
@@ -39,14 +39,14 @@ namespace GTweak.View
{
string _descriptionTweak = (string)FindResource(stackPanel.Name + "_description_system");
TimeSpan time = _descriptionTweak.Length < 200 ? TimeSpan.FromMilliseconds(400) : TimeSpan.FromMilliseconds(550);
- WorkWithText.TypeWriteAnimation(_descriptionTweak, TextDescription, time);
+ new TypewriterAnimation(_descriptionTweak, TextDescription, time);
}
}
private void Tweak_MouseLeave(object sender, MouseEventArgs e)
{
if (TextDescription.Text != (string)FindResource("defaultDescription"))
- WorkWithText.TypeWriteAnimation((string)FindResource("defaultDescription"), TextDescription, TimeSpan.FromMilliseconds(250));
+ new TypewriterAnimation((string)FindResource("defaultDescription"), TextDescription, TimeSpan.FromMilliseconds(250));
}
private void Sliders_PreviewMouseUp(object sender, MouseButtonEventArgs e)
@@ -109,7 +109,7 @@ namespace GTweak.View
private void Page_Loaded(object sender, RoutedEventArgs e)
{
- WorkWithText.TypeWriteAnimation((string)FindResource("defaultDescription"), TextDescription, TimeSpan.FromMilliseconds(300));
+ new TypewriterAnimation((string)FindResource("defaultDescription"), TextDescription, TimeSpan.FromMilliseconds(300));
Parallel.Invoke(() => new SystemTweaks().ViewSystem(this));
}
}
diff --git a/.Source/GTweak/Windows/LoadingWindow.xaml.cs b/.Source/GTweak/Windows/LoadingWindow.xaml.cs
index 5137b81f..ce6cda46 100644
--- a/.Source/GTweak/Windows/LoadingWindow.xaml.cs
+++ b/.Source/GTweak/Windows/LoadingWindow.xaml.cs
@@ -31,7 +31,7 @@ namespace GTweak.Windows
backgroundWorker.RunWorkerCompleted += async delegate
{
backgroundWorker.Dispose();
- WorkWithText.TypeWriteAnimation((string)FindResource("text6_load"), TextLoad, TimeSpan.FromMilliseconds(300));
+ new TypewriterAnimation((string)FindResource("text6_load"), TextLoad, TimeSpan.FromMilliseconds(300));
await Task.Delay(310);
this.Close();
new MainWindow().Show();
@@ -64,19 +64,19 @@ namespace GTweak.Windows
switch (e.ProgressPercentage)
{
case 5:
- WorkWithText.TypeWriteAnimation((string)FindResource("text1_load"), TextLoad, TimeSpan.FromMilliseconds(200));
+ new TypewriterAnimation((string)FindResource("text1_load"), TextLoad, TimeSpan.FromMilliseconds(200));
break;
case 30:
- WorkWithText.TypeWriteAnimation((string)FindResource("text2_load"), TextLoad, TimeSpan.FromMilliseconds(200));
+ new TypewriterAnimation((string)FindResource("text2_load"), TextLoad, TimeSpan.FromMilliseconds(200));
break;
case 55:
- WorkWithText.TypeWriteAnimation((string)FindResource("text3_load"), TextLoad, TimeSpan.FromMilliseconds(200));
+ new TypewriterAnimation((string)FindResource("text3_load"), TextLoad, TimeSpan.FromMilliseconds(200));
break;
case 75:
- WorkWithText.TypeWriteAnimation((string)FindResource("text4_load"), TextLoad, TimeSpan.FromMilliseconds(200));
+ new TypewriterAnimation((string)FindResource("text4_load"), TextLoad, TimeSpan.FromMilliseconds(200));
break;
case 95:
- WorkWithText.TypeWriteAnimation((string)FindResource("text5_load"), TextLoad, TimeSpan.FromMilliseconds(200));
+ new TypewriterAnimation((string)FindResource("text5_load"), TextLoad, TimeSpan.FromMilliseconds(200));
break;
}
}