坐标点
This commit is contained in:
parent
694b046e50
commit
417ac5f87d
@ -56,7 +56,7 @@ namespace Wpf_AiSportsMicrospace.Common
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_webcamClient = WebcamClient.CreateRTSP("192.168.3.64", "admin", "yd708090", 554u);
|
_webcamClient = WebcamClient.CreateRTSP("172.17.30.64", "admin", "yd708090", 554u);
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -18,10 +18,10 @@
|
|||||||
/>
|
/>
|
||||||
<Grid Height="1080" Width="1920" x:Name="userBox"/>
|
<Grid Height="1080" Width="1920" x:Name="userBox"/>
|
||||||
|
|
||||||
<Grid Width="220" Height="130" VerticalAlignment="Top" Margin="0,150,0,0" Visibility="Hidden" x:Name="countdownGrid">
|
<Grid Width="220" Height="130" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="00,40,60,0" Visibility="Hidden" x:Name="countdownGrid">
|
||||||
<Border Background="#005fff" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" CornerRadius="30" />
|
<Border Background="#005fff" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" CornerRadius="30" />
|
||||||
<TextBlock x:Name="countdownText"
|
<TextBlock x:Name="countdownText"
|
||||||
Text="35"
|
Text="60"
|
||||||
FontSize="120"
|
FontSize="120"
|
||||||
FontWeight="Bold"
|
FontWeight="Bold"
|
||||||
Foreground="#fff"
|
Foreground="#fff"
|
||||||
|
|||||||
@ -44,14 +44,14 @@ namespace Wpf_AiSportsMicrospace.Views
|
|||||||
private List<SportBase> sports = new();
|
private List<SportBase> sports = new();
|
||||||
private List<TextBlock> circleTexts = new();
|
private List<TextBlock> circleTexts = new();
|
||||||
private List<SportUserItem> userList = new();
|
private List<SportUserItem> userList = new();
|
||||||
private List<string> userNumberList = ["0", "0", "0", "0", "0", "0", "0"];
|
private List<string> userNumberList = ["0", "0", "0", "0", "0", "0"];
|
||||||
private double[] circlePositionsX = { 0.07, 0.21, 0.36, 0.50, 0.64, 0.78, 0.92 };
|
private double[] circlePositionsX = { 0.07, 0.21, 0.36, 0.50, 0.64, 0.78, 0.92 };
|
||||||
private Main _mainWin => Application.Current.MainWindow as Main;
|
private Main _mainWin => Application.Current.MainWindow as Main;
|
||||||
private List<(double XNorm, double YNorm)> circlePositions = new();
|
private List<(double XNorm, double YNorm)> circlePositions = new();
|
||||||
|
|
||||||
private MediaPlayer _mediaPlayer = new MediaPlayer();
|
private MediaPlayer _mediaPlayer = new MediaPlayer();
|
||||||
private bool IsGameStarted = false;
|
private bool IsGameStarted = false;
|
||||||
List<string> _useName = ["四号位", "一号位", "五号位", "二号位", "六号位", "三号位", "七号位",];
|
List<string> _useName = ["一号位", "四号位", "二号位", "五号位", "三号位", "六号位",];
|
||||||
public GroupJumpRope()
|
public GroupJumpRope()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
@ -441,13 +441,13 @@ namespace Wpf_AiSportsMicrospace.Views
|
|||||||
// 每个圆的位置:X 和 Y 都归一化 0~1
|
// 每个圆的位置:X 和 Y 都归一化 0~1
|
||||||
circlePositions = new List<(double XNorm, double YNorm)>
|
circlePositions = new List<(double XNorm, double YNorm)>
|
||||||
{
|
{
|
||||||
(0.07, 0.58),
|
//(0.07, 0.58),
|
||||||
(0.21, 0.88 ),
|
(0.21, 0.88 ),
|
||||||
(0.36, 0.58 ),
|
(0.36, 0.68 ),
|
||||||
(0.50, 0.88),
|
(0.50, 0.88),
|
||||||
(0.64, 0.58 ),
|
(0.64, 0.68 ),
|
||||||
(0.78, 0.88),
|
(0.78, 0.88),
|
||||||
(0.92, 0.58 )
|
(0.92, 0.68 )
|
||||||
};
|
};
|
||||||
|
|
||||||
for (int i = 0; i < circlePositions.Count; i++)
|
for (int i = 0; i < circlePositions.Count; i++)
|
||||||
@ -511,7 +511,8 @@ namespace Wpf_AiSportsMicrospace.Views
|
|||||||
userItem.VerticalAlignment = VerticalAlignment.Top;
|
userItem.VerticalAlignment = VerticalAlignment.Top;
|
||||||
userItem.HorizontalAlignment = HorizontalAlignment.Left;
|
userItem.HorizontalAlignment = HorizontalAlignment.Left;
|
||||||
userItem.ImageState = "1";
|
userItem.ImageState = "1";
|
||||||
userItem.Margin = new Thickness(centerX - (index == 0 ? 80 : index == 6 ? 190 : 135), centerY - 540, 0, 0);
|
//userItem.Margin = new Thickness(centerX - (index == 0 ? 80 : index == 6 ? 190 : 135), centerY - 540, 0, 0);
|
||||||
|
userItem.Margin = new Thickness(centerX - 265, centerY - 500, 0, 0);
|
||||||
userBox.Children.Add(userItem);
|
userBox.Children.Add(userItem);
|
||||||
userList.Add(userItem);
|
userList.Add(userItem);
|
||||||
return userItem; //
|
return userItem; //
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user