Compare commits
3 Commits
540bc3813b
...
c992593be1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c992593be1 | ||
|
|
3f97db7cf1 | ||
|
|
e17bae71c5 |
Binary file not shown.
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 16 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 306 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 218 KiB After Width: | Height: | Size: 632 KiB |
@ -128,25 +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
|
||||
{
|
||||
var newPage = new MusicJumpRope();
|
||||
mainWin?.SwitchPageWithMaskAnimation(newPage, true);
|
||||
}
|
||||
RouterGoNew();
|
||||
}
|
||||
|
||||
//跳转二级页面
|
||||
|
||||
@ -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">
|
||||
<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>
|
||||
</UserControl>
|
||||
|
||||
@ -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<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)
|
||||
{
|
||||
if (humans == null || humans.Count == 0)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user