Compare commits

..

3 Commits

Author SHA1 Message Date
ltx
8c6c30db63 Merge branch 'dev' of http://8.153.108.90:3000/YD/Wpf_AiSportsMicrospace into dev 2025-10-20 14:33:13 +08:00
ltx
abee1f4fbc update:back返回提示 2025-10-20 14:33:03 +08:00
ltx
d08fc4ba55 update:音乐跳绳结算 2025-10-20 14:14:25 +08:00
8 changed files with 116 additions and 36 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 716 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 621 KiB

View File

@ -35,7 +35,7 @@
</Grid> </Grid>
<!--排行榜--> <!--排行榜-->
<Grid x:Name="RankingGrid" Margin="0,0,0,0" Height="1080" Width="1920" Visibility="Hidden"> <Grid x:Name="RankingGrid" Margin="0,0,0,0" Height="1080" Width="1920" Visibility="Visible">
<Image <Image
Source="/Resources/Img/test_img/one_rope/finish_img/finish_bg.png" Source="/Resources/Img/test_img/one_rope/finish_img/finish_bg.png"
HorizontalAlignment="Center" HorizontalAlignment="Center"
@ -76,7 +76,7 @@
Margin="0,168" Margin="0,168"
/> />
<Grid Width="1346" Height="547" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0,331,0,0" x:Name="ScoreGrid"> <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"/> <Border Background="#FEDE50" CornerRadius="0,0,20,20"/>
<Grid HorizontalAlignment="Center" VerticalAlignment="Top" Width="1344" Height="71"> <Grid HorizontalAlignment="Center" VerticalAlignment="Top" Width="1344" Height="71">
<Border Background="#f7f7f7"/> <Border Background="#f7f7f7"/>
@ -138,6 +138,24 @@
<TextBlock x:Name="number2" Text="999" FontSize="24" FontWeight="Bold" Foreground="#fff" HorizontalAlignment="Left" Margin="50,0,0,0" VerticalAlignment="Center" /> <TextBlock x:Name="number2" Text="999" FontSize="24" FontWeight="Bold" Foreground="#fff" HorizontalAlignment="Left" Margin="50,0,0,0" VerticalAlignment="Center" />
</Grid> </Grid>
</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> </Grid>
</UserControl> </UserControl>

View File

@ -83,37 +83,44 @@
<Grid Height="1080" Width="1920" x:Name="userBox"> <Grid Height="1080" Width="1920" x:Name="userBox">
</Grid> </Grid>
<!--人物--> <!--排行榜-->
<!--<Grid> <Grid x:Name="RankingGrid" Margin="0,0,0,0" Height="1080" Width="1920" Visibility="Hidden">
<Image x:Name="left1" Visibility="Visible" Source="/Resources/Img/play_img/music_rope/jump_u.png" HorizontalAlignment="Left" VerticalAlignment="Top" Width="420" Margin="226,345,0,0" /> <Border Background="#1e1e1e" Opacity="0.8"></Border>
<Image x:Name="left3" Visibility="Hidden" Source="/Resources/Img/play_img/music_rope/out_u.png" HorizontalAlignment="Left" VerticalAlignment="Top" Width="420" Margin="226,345,0,0" />
<Image x:Name="lose1" Visibility="Visible" Source="/Resources/Img/play_img/music_rope/lose.png" HorizontalAlignment="Left" VerticalAlignment="Center" Width="861" Height="662" Margin="982,0,0,0"/>
<Image x:Name="lose2" Visibility="Visible" Source="/Resources/Img/play_img/music_rope/lose.png" HorizontalAlignment="Left" VerticalAlignment="Center" Width="861" Height="662" Margin="982,0,0,0"/>
<Image x:Name="lose3" Visibility="Visible" Source="/Resources/Img/play_img/music_rope/lose.png" HorizontalAlignment="Left" VerticalAlignment="Center" Width="861" Height="662" Margin="982,0,0,0"/>
<Image x:Name="win1" Source="/Resources/Img/play_img/music_rope/win.png" HorizontalAlignment="Left" VerticalAlignment="Top" Width="861" Margin="60,-123,0,0"/>
<Image x:Name="win2" Source="/Resources/Img/play_img/music_rope/win.png" HorizontalAlignment="Left" VerticalAlignment="Top" Width="861" Margin="60,-123,0,0"/>
<Image x:Name="win3" Visibility="Hidden" Source="/Resources/Img/play_img/music_rope/win.png" HorizontalAlignment="Left" VerticalAlignment="Top" Width="861" Margin="982,-123,0,0"/>
<Image x:Name="win4" Visibility="Hidden" Source="/Resources/Img/play_img/music_rope/win.png" HorizontalAlignment="Left" VerticalAlignment="Top" Width="861" Margin="982,-123,0,0"/>
<TextBlock x:Name="text1" Text="WIN" FontSize="100" FontWeight="UltraBold" FontStyle="Italic" Foreground="#fdcb50" Margin="206,433,0,0" TextAlignment="Center" HorizontalAlignment="Left" Width="230" />
<TextBlock x:Name="text2" Text="LOSE" FontSize="100" FontWeight="UltraBold" FontStyle="Italic" Foreground="#7987a2" Margin="1114,427,0,0" TextAlignment="Center" HorizontalAlignment="Left" Width="254" />
<TextBlock x:Name="score3" Text="1000" FontSize="100" FontWeight="UltraBold" FontStyle="Italic" Foreground="#fff" Margin="206,558,0,0" TextAlignment="Center" HorizontalAlignment="Left" Width="246" />
<TextBlock x:Name="score4" Text="1000" FontSize="100" FontWeight="UltraBold" FontStyle="Italic" Foreground="#fff" Margin="0,540,552,0" TextAlignment="Center" HorizontalAlignment="Right" Width="250" />
<Image Source="/Resources/Img/play_img/music_rope/back.png" HorizontalAlignment="Left" VerticalAlignment="Top" Width="860" Margin="552,125,0,0" />
<Grid Margin="0,0,0,60" VerticalAlignment="Bottom" Height="182" Width="340" >
<Image <Image
gif:ImageBehavior.AnimatedSource="/Resources/Img/play_img/music_rope/jump_u.gif" 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.RepeatBehavior="Forever"
gif:ImageBehavior.AnimateInDesignMode="True" gif:ImageBehavior.AnimateInDesignMode="True"
HorizontalAlignment="Left" HorizontalAlignment="Left"
VerticalAlignment="Top" VerticalAlignment="Top"
Width="420" Margin="-20,10,30,20"
Margin="226,345,0,0"
x:Name="left2"
Visibility="Hidden"
/> />
</Grid> </Grid>
</Grid>
<Grid>
<Image x:Name="right1" Visibility="Visible" Source="/Resources/Img/play_img/music_rope/jump_u.png" HorizontalAlignment="Right" VerticalAlignment="Top" Width="420" Margin="0,345,226,0" />
<Image x:Name="right3" Visibility="Hidden" Source="/Resources/Img/play_img/music_rope/out_u.png" HorizontalAlignment="Right" VerticalAlignment="Top" Width="420" Margin="0,345,226,0" />
<Image
gif:ImageBehavior.AnimatedSource="/Resources/Img/play_img/music_rope/jump_u.gif"
gif:ImageBehavior.RepeatBehavior="Forever"
gif:ImageBehavior.AnimateInDesignMode="True"
HorizontalAlignment="Right"
VerticalAlignment="Top"
Width="420"
Margin="0,345,226,0"
x:Name="right2"
Visibility="Hidden"
/>
</Grid>-->
</Grid> </Grid>
</UserControl> </UserControl>

View File

@ -308,12 +308,55 @@ namespace Wpf_AiSportsMicrospace.Views.JumpRope
{ {
_mainWin.HumanFrameUpdated += OnHumanFrameUpdated; _mainWin.HumanFrameUpdated += OnHumanFrameUpdated;
_mainWin.WebcamClient.StartExtract(); _mainWin.WebcamClient.StartExtract();
showRank();
// 更新 UI排行榜或分数板 // 更新 UI排行榜或分数板
// ShowRankingBoard(rankList); // ShowRankingBoard(rankList);
}); });
} }
public void showRank()
{
double left = _musicJumpRopeContext.UserBeatSyncList[0];
double right = _musicJumpRopeContext.UserBeatSyncList[1];
score3.Text = (left * 10).ToString();
score4.Text = (right * 10).ToString();
if (left < right)
{
lose1.Margin = new Thickness(60, 0, 0, 0);
lose2.Margin = new Thickness(60, 0, 0, 0);
lose3.Margin = new Thickness(60, 0, 0, 0);
win1.Margin = new Thickness(60, -123, 0, 0);
win2.Margin = new Thickness(60, -123, 0, 0);
text1.Text = "LOSE";
text2.Text = "WIN";
text1.Foreground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#7987a2"));
text2.Foreground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#fdcb50"));
}
else if (right == left) {
text2.Text = "WIN";
text2.Foreground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#fdcb50"));
lose1.Visibility = Visibility.Hidden;
lose2.Visibility = Visibility.Hidden;
lose3.Visibility = Visibility.Hidden;
win3.Visibility = Visibility.Visible;
win4.Visibility = Visibility.Visible;
}
showElement("RankingGrid");
}
public void showElement(string name, int time = 600)
{
var Element = FindName(name) as FrameworkElement;
if (Element == null) return;
Element.Visibility = Visibility.Visible;
var fadeIn = new DoubleAnimation(0, 1, TimeSpan.FromMilliseconds(time));
Element.BeginAnimation(UIElement.OpacityProperty, fadeIn);
}
private DateTime? _raiseStartTime; private DateTime? _raiseStartTime;
private bool _firstHandTriggered; private bool _firstHandTriggered;
private int _lastCountdownSecond = 3; private int _lastCountdownSecond = 3;

View File

@ -43,6 +43,7 @@
<None Remove="Resources\Img\gif\bottom_animation_image.png" /> <None Remove="Resources\Img\gif\bottom_animation_image.png" />
<None Remove="Resources\Img\gif\time_3.gif" /> <None Remove="Resources\Img\gif\time_3.gif" />
<None Remove="Resources\Img\gif\top_animation_image.png" /> <None Remove="Resources\Img\gif\top_animation_image.png" />
<None Remove="Resources\Img\play_img\music_rope\back.png" />
<None Remove="Resources\Img\play_img\music_rope\bg_mic.gif" /> <None Remove="Resources\Img\play_img\music_rope\bg_mic.gif" />
<None Remove="Resources\Img\play_img\music_rope\great-p.png" /> <None Remove="Resources\Img\play_img\music_rope\great-p.png" />
<None Remove="Resources\Img\play_img\music_rope\great.png" /> <None Remove="Resources\Img\play_img\music_rope\great.png" />
@ -50,12 +51,14 @@
<None Remove="Resources\Img\play_img\music_rope\head_m.png" /> <None Remove="Resources\Img\play_img\music_rope\head_m.png" />
<None Remove="Resources\Img\play_img\music_rope\jump_u.gif" /> <None Remove="Resources\Img\play_img\music_rope\jump_u.gif" />
<None Remove="Resources\Img\play_img\music_rope\jump_u.png" /> <None Remove="Resources\Img\play_img\music_rope\jump_u.png" />
<None Remove="Resources\Img\play_img\music_rope\lose.png" />
<None Remove="Resources\Img\play_img\music_rope\miss.png" /> <None Remove="Resources\Img\play_img\music_rope\miss.png" />
<None Remove="Resources\Img\play_img\music_rope\out_u.png" /> <None Remove="Resources\Img\play_img\music_rope\out_u.png" />
<None Remove="Resources\Img\play_img\music_rope\play_bg.jpg" /> <None Remove="Resources\Img\play_img\music_rope\play_bg.jpg" />
<None Remove="Resources\Img\play_img\music_rope\point.png" /> <None Remove="Resources\Img\play_img\music_rope\point.png" />
<None Remove="Resources\Img\play_img\music_rope\title.png" /> <None Remove="Resources\Img\play_img\music_rope\title.png" />
<None Remove="Resources\Img\play_img\music_rope\vs.png" /> <None Remove="Resources\Img\play_img\music_rope\vs.png" />
<None Remove="Resources\Img\play_img\music_rope\win.png" />
<None Remove="Resources\Img\play_img\play_home_bg.png" /> <None Remove="Resources\Img\play_img\play_home_bg.png" />
<None Remove="Resources\Img\play_img\play_home_title.png" /> <None Remove="Resources\Img\play_img\play_home_title.png" />
<None Remove="Resources\Img\play_img\play_jump.png" /> <None Remove="Resources\Img\play_img\play_jump.png" />
@ -94,6 +97,9 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Resource Include="Resources\Img\play_img\music_rope\back.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\Img\play_img\music_rope\bg_mic.gif"> <Resource Include="Resources\Img\play_img\music_rope\bg_mic.gif">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource> </Resource>
@ -115,6 +121,9 @@
<Resource Include="Resources\Img\play_img\music_rope\jump_u.png"> <Resource Include="Resources\Img\play_img\music_rope\jump_u.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource> </Resource>
<Resource Include="Resources\Img\play_img\music_rope\lose.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\Img\play_img\music_rope\miss.png"> <Resource Include="Resources\Img\play_img\music_rope\miss.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource> </Resource>
@ -276,6 +285,9 @@
<Resource Include="Resources\Img\play_img\music_rope\vs.png"> <Resource Include="Resources\Img\play_img\music_rope\vs.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource> </Resource>
<Resource Include="Resources\Img\play_img\music_rope\win.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="Resources\Img\play_img\play_home_bg.png"> <Resource Include="Resources\Img\play_img\play_home_bg.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource> </Resource>