diff --git a/ZongziTEK_Blackboard_Sticker/Helpers/WindowsHelper.cs b/ZongziTEK_Blackboard_Sticker/Helpers/WindowsHelper.cs index 8884c54..5f4435b 100644 --- a/ZongziTEK_Blackboard_Sticker/Helpers/WindowsHelper.cs +++ b/ZongziTEK_Blackboard_Sticker/Helpers/WindowsHelper.cs @@ -1,10 +1,6 @@ using System; -using System.Collections.Generic; using System.Diagnostics; -using System.Linq; using System.Runtime.InteropServices; -using System.Text; -using System.Threading.Tasks; using System.Windows; using System.Windows.Interop; diff --git a/ZongziTEK_Blackboard_Sticker/TimetableNotificationWindow.xaml.cs b/ZongziTEK_Blackboard_Sticker/TimetableNotificationWindow.xaml.cs index 9be9ace..0b32f66 100644 --- a/ZongziTEK_Blackboard_Sticker/TimetableNotificationWindow.xaml.cs +++ b/ZongziTEK_Blackboard_Sticker/TimetableNotificationWindow.xaml.cs @@ -86,7 +86,7 @@ private void Timer_Tick(object sender, EventArgs e) timeLeft = timeToHide - DateTime.Now.TimeOfDay; TextTime.Text = timeLeft.TotalSeconds.ToString("00"); - if (timeLeft.TotalSeconds <= 1) + if (timeLeft.TotalSeconds <= 2) { if (!isTimeHidden) HideTime(); @@ -133,13 +133,13 @@ private async void HideNotification() { isNotificationHidden = true; - DoubleAnimation opacityAnimation = new() + /*DoubleAnimation opacityAnimation = new() { From = 1, To = 0, - Duration = TimeSpan.FromMilliseconds(750), + Duration = TimeSpan.FromMilliseconds(500), EasingFunction = new CubicEase() { EasingMode = EasingMode.EaseIn } - }; + };*/ /*ThicknessAnimation marginAnimation = new() { @@ -153,11 +153,11 @@ private async void HideNotification() { From = 0, To = -Height, - Duration = TimeSpan.FromMilliseconds(750), + Duration = TimeSpan.FromMilliseconds(500), EasingFunction = new CubicEase() { EasingMode = EasingMode.EaseIn } }; - GridNotification.BeginAnimation(OpacityProperty, opacityAnimation); + //GridNotification.BeginAnimation(OpacityProperty, opacityAnimation); //GridNotification.BeginAnimation(MarginProperty, marginAnimation); BeginAnimation(TopProperty, topAnimation);