diff --git a/Wpf_AiSportsMicrospace/Views/JumpRope/MusicJumpRope.xaml.cs b/Wpf_AiSportsMicrospace/Views/JumpRope/MusicJumpRope.xaml.cs index 812de67..6ad2b1f 100644 --- a/Wpf_AiSportsMicrospace/Views/JumpRope/MusicJumpRope.xaml.cs +++ b/Wpf_AiSportsMicrospace/Views/JumpRope/MusicJumpRope.xaml.cs @@ -59,30 +59,30 @@ namespace Wpf_AiSportsMicrospace.Views.JumpRope private async void UserControl_Loaded(object sender, RoutedEventArgs e) { - Random _rand = new Random(); - // 初始化进度 - PkBar.LeftProgress = 0.5; // 左右各占50% - await Task.Delay(500); + //Random _rand = new Random(); + //// 初始化进度 + //PkBar.LeftProgress = 0.5; // 左右各占50% + //await Task.Delay(500); - for (int i = 0; i < 20; i++) - { - await Task.Delay(300); + //for (int i = 0; i < 500; i++) + //{ + // await Task.Delay(300); - // 随机生成一个变化值 0~0.1 - double delta = _rand.NextDouble() * 0.1; + // // 随机生成一个变化值 0~0.1 + // double delta = _rand.NextDouble() * 0.1; - // 随机决定左增加还是右增加 - if (_rand.Next(0, 2) == 0) - { - // 左增加 → 右减少 - PkBar.LeftProgress = Math.Min(1, PkBar.LeftProgress + delta); - } - else - { - // 右增加 → 左减少 - PkBar.RightProgress = Math.Min(1, PkBar.RightProgress + delta); - } - } + // // 随机决定左增加还是右增加 + // if (_rand.Next(0, 2) == 0) + // { + // // 左增加 → 右减少 + // PkBar.LeftProgress = Math.Min(1, PkBar.LeftProgress + delta); + // } + // else + // { + // // 右增加 → 左减少 + // PkBar.RightProgress = Math.Min(1, PkBar.RightProgress + delta); + // } + //} DrawCirclesWithText(); // 播放音乐