Skip to content

Portable Tool for an Ideal Windows Setup

-performance animation -correction import

Greedeks9090fbb9a91d
diff --git a/.Source/GTweak/Windows/ImportWindow.xaml.cs b/.Source/GTweak/Windows/ImportWindow.xaml.cs
index 1ed4b1d7..bed22a2f 100644
--- a/.Source/GTweak/Windows/ImportWindow.xaml.cs
+++ b/.Source/GTweak/Windows/ImportWindow.xaml.cs
@@ -34,12 +34,12 @@ namespace GTweak.Windows
{
if (_valueProgress == 100)
{
- if(restartNeed>0)
+ if (restartNeed>0)
new ViewNotification().Show("restart");
else if (restartNeed == 0 && logoutNeed > 0)
new ViewNotification().Show("logout");
App.UpdateImport();
- this.Close();
+ Close();
}
}
@@ -90,11 +90,11 @@ namespace GTweak.Windows
case 10:
case 11:
case 12:
- case 25:
case 26:
+ case 27:
logoutNeed++;
break;
- case 21:
+ case 22:
restartNeed++;
break;
}
@@ -111,9 +111,10 @@ namespace GTweak.Windows
{
await Task.Delay(700);
Parallel.Invoke(() => ServicesTweaks.UseServices("TglButton" + number, Convert.ToBoolean(value)));
- restartNeed++;
}
}
+
+ restartNeed++;
}
if (i == 80)
diff --git a/.Source/GTweak/Windows/NotificationWindow.xaml b/.Source/GTweak/Windows/NotificationWindow.xaml
index b626a1a2..b55cfa14 100644
--- a/.Source/GTweak/Windows/NotificationWindow.xaml
+++ b/.Source/GTweak/Windows/NotificationWindow.xaml
@@ -11,7 +11,7 @@
ShowInTaskbar="False" IsTabStop="False"
SnapsToDevicePixels="True" UseLayoutRounding="True"
AllowsTransparency="True" WindowStartupLocation="Manual" ResizeMode="CanMinimize"
- Topmost="True" Closing="Window_Closing" Loaded="Window_Loaded" ContentRendered="Window_ContentRendered">
+ Topmost="True" Closing="Window_Closing" Loaded="Window_Loaded">
<Border Background="{StaticResource Color_Background}" BorderThickness="1" CornerRadius="7" Opacity="0.98">
<Border.BorderBrush>
diff --git a/.Source/GTweak/Windows/NotificationWindow.xaml.cs b/.Source/GTweak/Windows/NotificationWindow.xaml.cs
index 592ee28b..55b15bbb 100644
--- a/.Source/GTweak/Windows/NotificationWindow.xaml.cs
+++ b/.Source/GTweak/Windows/NotificationWindow.xaml.cs
@@ -63,21 +63,15 @@ namespace GTweak.Windows
}
}
- private void Window_ContentRendered(object sender, EventArgs e)
+ private void Window_Loaded(object sender, RoutedEventArgs e)
{
- Parallel.Invoke(() =>
+ if (Settings.IsSoundNotification)
{
- if (Settings.IsSoundNotification)
- {
- _mediaPlayer.Open(new Uri(Settings.PathSound));
- _mediaPlayer.Volume = Settings.VolumeNotification / 100.0f;
- _mediaPlayer.Play();
- }
- });
- }
+ _mediaPlayer.Open(new Uri(Settings.PathSound));
+ _mediaPlayer.Volume = Settings.VolumeNotification / 100.0f;
+ _mediaPlayer.Play();
+ }
- private void Window_Loaded(object sender, RoutedEventArgs e)
- {
switch (ActionChoice)
{
case "logout":
@@ -103,12 +97,14 @@ namespace GTweak.Windows
EasingDoubleKeyFrame fromFrame = new EasingDoubleKeyFrame(primaryMonitorArea.Right)
{
- KeyTime = KeyTime.FromTimeSpan(TimeSpan.FromMilliseconds(0))
+ KeyTime = KeyTime.FromTimeSpan(TimeSpan.FromMilliseconds(0)),
+ EasingFunction = new QuadraticEase()
};
EasingDoubleKeyFrame toFrame = new EasingDoubleKeyFrame(primaryMonitorArea.Right - Width - 10)
{
- KeyTime = KeyTime.FromTimeSpan(TimeSpan.FromMilliseconds(120))
+ KeyTime = KeyTime.FromTimeSpan(TimeSpan.FromMilliseconds(200)),
+ EasingFunction = new QuadraticEase()
};
doubleAnimKeyFrames.KeyFrames.Add(fromFrame);
@@ -119,6 +115,7 @@ namespace GTweak.Windows
From = 0,
To = 1,
SpeedRatio = 3,
+ EasingFunction = new QuadraticEase(),
Duration = TimeSpan.FromSeconds(0.8)
};
diff --git a/.Source/GTweak/Windows/WaitingWindow.xaml.cs b/.Source/GTweak/Windows/WaitingWindow.xaml.cs
index f98ac683..73d89fa1 100644
--- a/.Source/GTweak/Windows/WaitingWindow.xaml.cs
+++ b/.Source/GTweak/Windows/WaitingWindow.xaml.cs
@@ -46,6 +46,7 @@ namespace GTweak.Windows
From = 0,
To = 0.5,
SpeedRatio = 2,
+ EasingFunction = new QuadraticEase(),
Duration = TimeSpan.FromSeconds(0.35)
};
Timeline.SetDesiredFrameRate(doubleAnim, 400);