diff --git a/Wpf_AiSportsMicrospace/Resources/Img/play_img/music_rope/title.png b/Wpf_AiSportsMicrospace/Resources/Img/play_img/music_rope/title.png
index 8406c46..0d2b6df 100644
Binary files a/Wpf_AiSportsMicrospace/Resources/Img/play_img/music_rope/title.png and b/Wpf_AiSportsMicrospace/Resources/Img/play_img/music_rope/title.png differ
diff --git a/Wpf_AiSportsMicrospace/Resources/Img/play_img/play_music.png b/Wpf_AiSportsMicrospace/Resources/Img/play_img/play_music.png
index 06e7f32..937689e 100644
Binary files a/Wpf_AiSportsMicrospace/Resources/Img/play_img/play_music.png and b/Wpf_AiSportsMicrospace/Resources/Img/play_img/play_music.png differ
diff --git a/Wpf_AiSportsMicrospace/Resources/Img/play_img/play_vs.png b/Wpf_AiSportsMicrospace/Resources/Img/play_img/play_vs.png
index 1e00175..28163ab 100644
Binary files a/Wpf_AiSportsMicrospace/Resources/Img/play_img/play_vs.png and b/Wpf_AiSportsMicrospace/Resources/Img/play_img/play_vs.png differ
diff --git a/Wpf_AiSportsMicrospace/Views/Home.xaml.cs b/Wpf_AiSportsMicrospace/Views/Home.xaml.cs
index fc43f5b..edf08f7 100644
--- a/Wpf_AiSportsMicrospace/Views/Home.xaml.cs
+++ b/Wpf_AiSportsMicrospace/Views/Home.xaml.cs
@@ -128,30 +128,7 @@ namespace Wpf_AiSportsMicrospace
//测试点击
private void GoNew(object sender, MouseButtonEventArgs e)
{
- // 跳转逻辑(如导航到新页面并传递参数)
- //例如:RaiseEvent、调用外部委托、或使用导航框架
- var mainWin = Application.Current.MainWindow as Main;
- //var newPage = new CenterHome
- //{
- // NowSelect = coverFlow.SelectedIndex == 0 ? "test" : "play"
- //};
-
- //mainWin?.SwitchPage(newPage, true);
- if (coverFlow.SelectedIndex == 0)
- {
- var newPage = new GroupJumpRope();
- mainWin?.SwitchPageWithMaskAnimation(newPage, true);
- }
- else if (coverFlow.SelectedIndex == 1)
- {
- var newPage = new MusicJumpRope();
- mainWin?.SwitchPageWithMaskAnimation(newPage, true);
- }
- else
- {
- var newPage = new TrainingRecords();
- mainWin?.SwitchPageWithMaskAnimation(newPage, true);
- }
+ RouterGoNew();
}
//跳转二级页面
diff --git a/Wpf_AiSportsMicrospace/Views/JumpRope/TrainingRecords.xaml b/Wpf_AiSportsMicrospace/Views/JumpRope/TrainingRecords.xaml
index 2291f0b..e87b0ff 100644
--- a/Wpf_AiSportsMicrospace/Views/JumpRope/TrainingRecords.xaml
+++ b/Wpf_AiSportsMicrospace/Views/JumpRope/TrainingRecords.xaml
@@ -5,8 +5,131 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Views.JumpRope"
mc:Ignorable="d"
+ xmlns:gif="http://wpfanimatedgif.codeplex.com"
Height="1080" Width="1920" Loaded="UserControl_Loaded">
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Wpf_AiSportsMicrospace/Views/JumpRope/TrainingRecords.xaml.cs b/Wpf_AiSportsMicrospace/Views/JumpRope/TrainingRecords.xaml.cs
index 1337af0..5266c73 100644
--- a/Wpf_AiSportsMicrospace/Views/JumpRope/TrainingRecords.xaml.cs
+++ b/Wpf_AiSportsMicrospace/Views/JumpRope/TrainingRecords.xaml.cs
@@ -1,4 +1,5 @@
-using System;
+using Dto;
+using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
@@ -24,10 +25,12 @@ namespace Views.JumpRope
public partial class TrainingRecords : UserControl
{
private Main _mainWin => Application.Current.MainWindow as Main;
+ private GroupJumpRopeContext _groupJumpRopeContext;
public TrainingRecords()
{
InitializeComponent();
Loaded += UserControl_Loaded;
+ LoadData();
}
private void UserControl_Loaded(object sender, RoutedEventArgs e)
@@ -61,6 +64,77 @@ namespace Views.JumpRope
}
+ public void LoadData()
+ {
+ _groupJumpRopeContext = new GroupJumpRopeContext();
+ ShowRankingBoard(_groupJumpRopeContext.UpdateRankList());
+ }
+ public void ShowRankingBoard(List list)
+ {
+
+ var scoreGrid = FindName("ScoreGrid") as Grid;
+ if(list.Count <= 0) return;
+ name1.Text = list[0].Name;
+ name2.Text = list[1].Name ;
+ name3.Text = list[2].Name ;
+ number1.Text = list[0].Number.ToString() ;
+ number2.Text = list[1].Number.ToString() ;
+ number3.Text = list[2].Number.ToString() ;
+ foreach (var item in list)
+ {
+ var grid = new Grid
+ {
+ Width = 1344,
+ Height = 71,
+ HorizontalAlignment = HorizontalAlignment.Center,
+ VerticalAlignment = VerticalAlignment.Top,
+ Margin = new Thickness(0, 69 * item.Rank, 0, 0)
+ };
+ var border = new Border
+ {
+ Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#fff"))
+ };
+ grid.Children.Add(border);
+ var rankText = new TextBlock
+ {
+ Text = item.Rank.ToString(),
+ FontSize = 24,
+ FontWeight = FontWeights.Bold,
+ Foreground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#999999")),
+ HorizontalAlignment = HorizontalAlignment.Left,
+ VerticalAlignment = VerticalAlignment.Center,
+ TextAlignment = TextAlignment.Center,
+ Width = 200
+ };
+ grid.Children.Add(rankText);
+
+ var positionText = new TextBlock
+ {
+ Text = item.Name,
+ FontSize = 24,
+ FontWeight = FontWeights.Bold,
+ Foreground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#999999")),
+ HorizontalAlignment = HorizontalAlignment.Center,
+ VerticalAlignment = VerticalAlignment.Center
+ };
+ grid.Children.Add(positionText);
+
+ var scoreText = new TextBlock
+ {
+ Text = item.Number.ToString(),
+ FontSize = 24,
+ FontWeight = FontWeights.Bold,
+ Foreground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#999999")),
+ HorizontalAlignment = HorizontalAlignment.Right,
+ VerticalAlignment = VerticalAlignment.Center,
+ TextAlignment = TextAlignment.Center,
+ Width = 200
+ };
+ grid.Children.Add(scoreText);
+ ScoreGrid.Children.Add(grid);
+ }
+ }
+
public int DetectLeftHandRaise(List humans)
{
if (humans == null || humans.Count == 0)