Compare commits
No commits in common. "c992593be144d0aa8b110be2912ae491bd6bad0f" and "540bc3813b6af9df19f61671b9a2a0cf40c39e77" have entirely different histories.
c992593be1
...
540bc3813b
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 13 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 306 KiB After Width: | Height: | Size: 120 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 632 KiB After Width: | Height: | Size: 218 KiB |
@ -128,7 +128,25 @@ namespace Wpf_AiSportsMicrospace
|
|||||||
//测试点击
|
//测试点击
|
||||||
private void GoNew(object sender, MouseButtonEventArgs e)
|
private void GoNew(object sender, MouseButtonEventArgs e)
|
||||||
{
|
{
|
||||||
RouterGoNew();
|
// 跳转逻辑(如导航到新页面并传递参数)
|
||||||
|
//例如: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
|
||||||
|
{
|
||||||
|
var newPage = new MusicJumpRope();
|
||||||
|
mainWin?.SwitchPageWithMaskAnimation(newPage, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//跳转二级页面
|
//跳转二级页面
|
||||||
|
|||||||
@ -5,131 +5,8 @@
|
|||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:local="clr-namespace:Views.JumpRope"
|
xmlns:local="clr-namespace:Views.JumpRope"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
xmlns:gif="http://wpfanimatedgif.codeplex.com"
|
|
||||||
Height="1080" Width="1920" Loaded="UserControl_Loaded">
|
Height="1080" Width="1920" Loaded="UserControl_Loaded">
|
||||||
<Grid>
|
<Grid>
|
||||||
<!--排行榜-->
|
|
||||||
<Grid x:Name="RankingGrid" Margin="0,0,0,0" Height="1080" Width="1920" Visibility="Visible">
|
|
||||||
<Image
|
|
||||||
Source="/Resources/Img/test_img/one_rope/finish_img/finish_bg.png"
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
VerticalAlignment="Top"
|
|
||||||
Width="1920"
|
|
||||||
Height="1080"
|
|
||||||
/>
|
|
||||||
<Image
|
|
||||||
Source="/Resources/Img/test_img/one_rope/finish_img/1.png"
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
VerticalAlignment="Top"
|
|
||||||
Width="120"
|
|
||||||
Height="92"
|
|
||||||
Margin="0,85"
|
|
||||||
/>
|
|
||||||
<Image
|
|
||||||
Source="/Resources/Img/test_img/one_rope/finish_img/2.png"
|
|
||||||
HorizontalAlignment="Left"
|
|
||||||
VerticalAlignment="Top"
|
|
||||||
Width="120"
|
|
||||||
Height="92"
|
|
||||||
Margin="451,134,0,0"
|
|
||||||
/>
|
|
||||||
<Image
|
|
||||||
Source="/Resources/Img/test_img/one_rope/finish_img/3.png"
|
|
||||||
HorizontalAlignment="Right"
|
|
||||||
VerticalAlignment="Top"
|
|
||||||
Width="120"
|
|
||||||
Height="92"
|
|
||||||
Margin="0,149,451,0"
|
|
||||||
/>
|
|
||||||
<Image
|
|
||||||
Source="/Resources/Img/test_img/one_rope/finish_img/top.png"
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
VerticalAlignment="Top"
|
|
||||||
Width="1346"
|
|
||||||
Height="163"
|
|
||||||
Margin="0,168"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<Grid Width="1346" Height="520" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0,331,0,0" x:Name="ScoreGrid">
|
|
||||||
<Border Background="#FEDE50" CornerRadius="0,0,20,20"/>
|
|
||||||
<Grid HorizontalAlignment="Center" VerticalAlignment="Top" Width="1344" Height="71">
|
|
||||||
<Border Background="#f7f7f7"/>
|
|
||||||
<TextBlock Text="排名" FontSize="24" FontWeight="Bold" Foreground="#999999" Margin="150 , 0" HorizontalAlignment="Left" VerticalAlignment="Center" TextAlignment="Center" Width="200"/>
|
|
||||||
<TextBlock Text="位置" FontSize="24" FontWeight="Bold" Foreground="#999999" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
||||||
<TextBlock Text="成绩" FontSize="24" FontWeight="Bold" Foreground="#999999" Margin="0 ,0,150, 0" HorizontalAlignment="Right" VerticalAlignment="Center" TextAlignment="Center" Width="200"/>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<!--<Grid HorizontalAlignment="Center" Margin="0,57" VerticalAlignment="Top" Width="1344" Height="71">
|
|
||||||
<Border Background="#fff"/>
|
|
||||||
<TextBlock Text="1" FontSize="24" FontWeight="Bold" Foreground="#999999" Margin="150 , 0" HorizontalAlignment="Left" VerticalAlignment="Center" TextAlignment="Center" Width="200"/>
|
|
||||||
<TextBlock Text="一号位" FontSize="24" FontWeight="Bold" Foreground="#999999" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
||||||
<TextBlock Text="100" FontSize="24" FontWeight="Bold" Foreground="#999999" Margin="0 ,0,150, 0" HorizontalAlignment="Right" VerticalAlignment="Center" TextAlignment="Center" Width="200"/>
|
|
||||||
</Grid>-->
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
<Grid Width="368" Height="100" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0,200,0,0">
|
|
||||||
<TextBlock x:Name="name1" Text="??" FontSize="32" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
|
||||||
<Grid HorizontalAlignment="Right">
|
|
||||||
<Border Background="#e54229" CornerRadius="20" Width="110" Height="40"/>
|
|
||||||
<Image
|
|
||||||
Source="/Resources/Img/test_img/one_rope/finish_img/star.png"
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Width="22"
|
|
||||||
Height="30"
|
|
||||||
Margin="0,0,50,2"
|
|
||||||
/>
|
|
||||||
<TextBlock x:Name="number1" Text="999" FontSize="24" FontWeight="Bold" Foreground="#fff" HorizontalAlignment="Left" Margin="50,0,0,0" VerticalAlignment="Center" />
|
|
||||||
</Grid>
|
|
||||||
</Grid>
|
|
||||||
<Grid Width="369" Height="100" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="1225,231,0,0">
|
|
||||||
<TextBlock x:Name="name3" Text="??" FontSize="32" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
|
||||||
<Grid HorizontalAlignment="Right">
|
|
||||||
<Border Background="#e54229" CornerRadius="20" Width="110" Height="40"/>
|
|
||||||
<Image
|
|
||||||
Source="/Resources/Img/test_img/one_rope/finish_img/star.png"
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Width="22"
|
|
||||||
Height="30"
|
|
||||||
Margin="0,0,50,2"
|
|
||||||
/>
|
|
||||||
<TextBlock x:Name="number3" Text="999" FontSize="24" FontWeight="Bold" Foreground="#fff" HorizontalAlignment="Left" Margin="50,0,0,0" VerticalAlignment="Center" />
|
|
||||||
</Grid>
|
|
||||||
</Grid>
|
|
||||||
<Grid Width="368" Height="100" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="310,226,0,0">
|
|
||||||
<TextBlock x:Name="name2" Text="??" FontSize="32" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
|
||||||
<Grid HorizontalAlignment="Right">
|
|
||||||
<Border Background="#e54229" CornerRadius="20" Width="110" Height="40"/>
|
|
||||||
<Image
|
|
||||||
Source="/Resources/Img/test_img/one_rope/finish_img/star.png"
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Width="22"
|
|
||||||
Height="30"
|
|
||||||
Margin="0,0,50,2"
|
|
||||||
/>
|
|
||||||
<TextBlock x:Name="number2" Text="999" FontSize="24" FontWeight="Bold" Foreground="#fff" HorizontalAlignment="Left" Margin="50,0,0,0" VerticalAlignment="Center" />
|
|
||||||
</Grid>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<Grid Margin="0,0,0,50" VerticalAlignment="Bottom" Height="182" Width="340" >
|
|
||||||
<Image
|
|
||||||
Source="/Resources/Img/Album/change_left.png"
|
|
||||||
HorizontalAlignment="Left"
|
|
||||||
VerticalAlignment="Top"
|
|
||||||
Width="330"
|
|
||||||
Margin="0,103,0,0"
|
|
||||||
/>
|
|
||||||
<Image
|
|
||||||
gif:ImageBehavior.AnimatedSource="/Resources/Img/Album/3.gif"
|
|
||||||
gif:ImageBehavior.RepeatBehavior="Forever"
|
|
||||||
gif:ImageBehavior.AnimateInDesignMode="True"
|
|
||||||
HorizontalAlignment="Left"
|
|
||||||
VerticalAlignment="Top"
|
|
||||||
Margin="-20,10,30,20"
|
|
||||||
/>
|
|
||||||
</Grid>
|
|
||||||
</Grid>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
using Dto;
|
using System;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
@ -25,12 +24,10 @@ namespace Views.JumpRope
|
|||||||
public partial class TrainingRecords : UserControl
|
public partial class TrainingRecords : UserControl
|
||||||
{
|
{
|
||||||
private Main _mainWin => Application.Current.MainWindow as Main;
|
private Main _mainWin => Application.Current.MainWindow as Main;
|
||||||
private GroupJumpRopeContext _groupJumpRopeContext;
|
|
||||||
public TrainingRecords()
|
public TrainingRecords()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
Loaded += UserControl_Loaded;
|
Loaded += UserControl_Loaded;
|
||||||
LoadData();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UserControl_Loaded(object sender, RoutedEventArgs e)
|
private void UserControl_Loaded(object sender, RoutedEventArgs e)
|
||||||
@ -64,77 +61,6 @@ namespace Views.JumpRope
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LoadData()
|
|
||||||
{
|
|
||||||
_groupJumpRopeContext = new GroupJumpRopeContext();
|
|
||||||
ShowRankingBoard(_groupJumpRopeContext.UpdateRankList());
|
|
||||||
}
|
|
||||||
public void ShowRankingBoard(List<RankItem> 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<Human> humans)
|
public int DetectLeftHandRaise(List<Human> humans)
|
||||||
{
|
{
|
||||||
if (humans == null || humans.Count == 0)
|
if (humans == null || humans.Count == 0)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user