From d1c33150293ba14c2124bd6391990b04d27de5e7 Mon Sep 17 00:00:00 2001 From: tanglong <842690096@qq.com> Date: Tue, 12 May 2026 15:14:21 +0800 Subject: [PATCH] =?UTF-8?q?ai=E4=BC=98=E5=8C=964?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MyUserControl/CoverFlowControl.xaml.cs | 2 +- Wpf_AiSportsMicrospace/Views/Home.xaml.cs | 2 +- .../Views/JumpRope/MusicJumpRope.xaml.cs | 2 +- Wpf_AiSportsMicrospace/Views/Main.xaml.cs | 9 ++++++--- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Wpf_AiSportsMicrospace/MyUserControl/CoverFlowControl.xaml.cs b/Wpf_AiSportsMicrospace/MyUserControl/CoverFlowControl.xaml.cs index a75c697..74af0bf 100644 --- a/Wpf_AiSportsMicrospace/MyUserControl/CoverFlowControl.xaml.cs +++ b/Wpf_AiSportsMicrospace/MyUserControl/CoverFlowControl.xaml.cs @@ -23,7 +23,7 @@ namespace Wpf_AiSportsMicrospace.MyUserControl private const double CardWidth = 368; private const double CardHeight = 534; private const double CardGap = 30; // 卡片之间水平间距 - private const double SlideDurationMs = 300; // 动画时长 + private const double SlideDurationMs = 240; // 动画时长 private const double ProgressDurationMs = 2600; public int SelectedIndex diff --git a/Wpf_AiSportsMicrospace/Views/Home.xaml.cs b/Wpf_AiSportsMicrospace/Views/Home.xaml.cs index de37535..ae9fc2a 100644 --- a/Wpf_AiSportsMicrospace/Views/Home.xaml.cs +++ b/Wpf_AiSportsMicrospace/Views/Home.xaml.cs @@ -34,7 +34,7 @@ namespace Wpf_AiSportsMicrospace private WavingAction _lastGestureAction = WavingAction.None; private DateTime _lastMenuSlideTime = DateTime.MinValue; private bool _isNavigating; - private const int MenuSlideCooldownMs = 320; + private const int MenuSlideCooldownMs = 220; public Home() { diff --git a/Wpf_AiSportsMicrospace/Views/JumpRope/MusicJumpRope.xaml.cs b/Wpf_AiSportsMicrospace/Views/JumpRope/MusicJumpRope.xaml.cs index 086951b..6fc7602 100644 --- a/Wpf_AiSportsMicrospace/Views/JumpRope/MusicJumpRope.xaml.cs +++ b/Wpf_AiSportsMicrospace/Views/JumpRope/MusicJumpRope.xaml.cs @@ -231,13 +231,13 @@ namespace Wpf_AiSportsMicrospace.Views.JumpRope if (tipImage != null) tipImage.Visibility = Visibility.Hidden; - _mainWin.ShowCountDownAnimation(); _isCountdownStarted = true; _currentCountdown = start; //countdownText.Text = _currentCountdown.ToString(); //countdownGrid.Visibility = Visibility.Visible; _lastUpdateTime = DateTime.Now; Utils.PlayBackgroundMusic("countdown_3.mp3", false); + _mainWin.ShowCountDownAnimation(); //UpdateCountdown(); diff --git a/Wpf_AiSportsMicrospace/Views/Main.xaml.cs b/Wpf_AiSportsMicrospace/Views/Main.xaml.cs index 326a929..b03c0fd 100644 --- a/Wpf_AiSportsMicrospace/Views/Main.xaml.cs +++ b/Wpf_AiSportsMicrospace/Views/Main.xaml.cs @@ -275,17 +275,20 @@ namespace Wpf_AiSportsMicrospace.Views int num = 1; public void ShowCountDownAnimation() { - ImageBehavior.SetRepeatBehavior(time3, new RepeatBehavior(2)); ImageBehavior.SetRepeatBehavior(time3, new RepeatBehavior(1)); CountTimeGrid.Visibility = Visibility.Visible; time3.Visibility = Visibility.Visible; - ImageBehavior.GetAnimationController(time3).Play(); + var controller = ImageBehavior.GetAnimationController(time3); + controller.GotoFrame(0); + controller.Play(); } private void TimeDown(object? sender, RoutedEventArgs? e) { //MessageBox.Show("播放完啦");// 弹提示框 - ImageBehavior.GetAnimationController(time3).Pause(); + var controller = ImageBehavior.GetAnimationController(time3); + controller.Pause(); + controller.GotoFrame(0); CountTimeGrid.Visibility = Visibility.Hidden; time3.Visibility = Visibility.Hidden; num++;