Skip to content

Commit

Permalink
调整上下课通知动画速度
Browse files Browse the repository at this point in the history
  • Loading branch information
STBBRD committed Nov 10, 2024
1 parent 48d9366 commit 3cd6c4b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ZongziTEK_Blackboard_Sticker/TimetableNotificationWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 <= 2)
if (timeLeft.TotalSeconds <= 1)
{
if (!isTimeHidden)
HideTime();
Expand All @@ -104,7 +104,7 @@ private void ShowNotification()
{
From = 0,
To = 1,
Duration = TimeSpan.FromMilliseconds(750),
Duration = TimeSpan.FromMilliseconds(500),
EasingFunction = new CubicEase() { EasingMode = EasingMode.EaseOut }
};

Expand All @@ -120,7 +120,7 @@ private void ShowNotification()
{
From = -Height,
To = 0,
Duration = TimeSpan.FromMilliseconds(750),
Duration = TimeSpan.FromMilliseconds(500),
EasingFunction = new CubicEase() { EasingMode = EasingMode.EaseOut }
};

Expand Down Expand Up @@ -153,15 +153,15 @@ private async void HideNotification()
{
From = 0,
To = -Height,
Duration = TimeSpan.FromMilliseconds(500),
Duration = TimeSpan.FromMilliseconds(250),
EasingFunction = new CubicEase() { EasingMode = EasingMode.EaseIn }
};

//GridNotification.BeginAnimation(OpacityProperty, opacityAnimation);
//GridNotification.BeginAnimation(MarginProperty, marginAnimation);
BeginAnimation(TopProperty, topAnimation);

await Task.Delay(750);
await Task.Delay(500);
Close();
}

Expand Down

0 comments on commit 3cd6c4b

Please sign in to comment.