rankList
This commit is contained in:
parent
452ed85339
commit
c55ef57048
@ -13,7 +13,7 @@ namespace Dto
|
|||||||
public class GroupJumpRopeContext
|
public class GroupJumpRopeContext
|
||||||
{
|
{
|
||||||
// 静态字段,保存排名列表
|
// 静态字段,保存排名列表
|
||||||
//public static List<RankItem> RankList { get; set; } = new List<RankItem>();
|
public static List<RankItem> RankList { get; set; } = new List<RankItem>();
|
||||||
public List<(double XNorm, double YNorm)> CirclePositions { get; private set; }
|
public List<(double XNorm, double YNorm)> CirclePositions { get; private set; }
|
||||||
public List<SportUserItem> UserList { get; private set; }
|
public List<SportUserItem> UserList { get; private set; }
|
||||||
public List<string> UserNumberList { get; private set; }
|
public List<string> UserNumberList { get; private set; }
|
||||||
@ -59,6 +59,8 @@ namespace Dto
|
|||||||
})
|
})
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
|
RankList = rankList;
|
||||||
|
|
||||||
return rankList;
|
return rankList;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,7 +31,7 @@ namespace Views.JumpRope
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
Loaded += UserControl_Loaded;
|
Loaded += UserControl_Loaded;
|
||||||
_groupJumpRopeContext = new GroupJumpRopeContext();
|
//_groupJumpRopeContext = new GroupJumpRopeContext();
|
||||||
LoadData();
|
LoadData();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,13 +52,13 @@ namespace Views.JumpRope
|
|||||||
if (leftWaving == 5)
|
if (leftWaving == 5)
|
||||||
{
|
{
|
||||||
//_mainWin.HumanFrameUpdated -= OnHumanFrameUpdated;
|
//_mainWin.HumanFrameUpdated -= OnHumanFrameUpdated;
|
||||||
if(newPage == null)
|
if (newPage == null)
|
||||||
{
|
{
|
||||||
newPage = new Home();
|
newPage = new Home();
|
||||||
_mainWin?.SwitchPageWithMaskAnimation(newPage, true);
|
_mainWin?.SwitchPageWithMaskAnimation(newPage, true);
|
||||||
}
|
}
|
||||||
// 举左手逻辑,例如结束动画或退出
|
// 举左手逻辑,例如结束动画或退出
|
||||||
|
|
||||||
//return;
|
//return;
|
||||||
//_mainWin.WebcamClient.StopExtract();
|
//_mainWin.WebcamClient.StopExtract();
|
||||||
}
|
}
|
||||||
@ -73,19 +73,19 @@ namespace Views.JumpRope
|
|||||||
|
|
||||||
public void LoadData()
|
public void LoadData()
|
||||||
{
|
{
|
||||||
ShowRankingBoard(_groupJumpRopeContext.UpdateRankList());
|
ShowRankingBoard(GroupJumpRopeContext.RankList);
|
||||||
}
|
}
|
||||||
public void ShowRankingBoard(List<RankItem> list)
|
public void ShowRankingBoard(List<RankItem> list)
|
||||||
{
|
{
|
||||||
|
|
||||||
var scoreGrid = FindName("ScoreGrid") as Grid;
|
var scoreGrid = FindName("ScoreGrid") as Grid;
|
||||||
if(list.Count <= 0) return;
|
if (list.Count <= 0) return;
|
||||||
name1.Text = list[0].Name;
|
name1.Text = list[0].Name;
|
||||||
name2.Text = list[1].Name ;
|
name2.Text = list[1].Name;
|
||||||
name3.Text = list[2].Name ;
|
name3.Text = list[2].Name;
|
||||||
number1.Text = list[0].Number.ToString() ;
|
number1.Text = list[0].Number.ToString();
|
||||||
number2.Text = list[1].Number.ToString() ;
|
number2.Text = list[1].Number.ToString();
|
||||||
number3.Text = list[2].Number.ToString() ;
|
number3.Text = list[2].Number.ToString();
|
||||||
foreach (var item in list)
|
foreach (var item in list)
|
||||||
{
|
{
|
||||||
var grid = new Grid
|
var grid = new Grid
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user