From bc5abc691fd7e8f879a39d4d477e377c2559dfed Mon Sep 17 00:00:00 2001 From: STBBRD <62409850+STBBRD@users.noreply.github.com> Date: Sat, 2 Nov 2024 21:49:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=8A=E4=B8=8B=E8=AF=BE?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E5=8A=A8=E7=94=BB=E6=8E=89=E5=B8=A7=E6=83=85?= =?UTF-8?q?=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Helpers/WindowsHelper.cs | 4 ---- .../TimetableNotificationWindow.xaml.cs | 12 ++++++------ 2 files changed, 6 insertions(+), 10 deletions(-) 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);