tijiao
This commit is contained in:
parent
c61c3c8a98
commit
6e508d3185
@ -38,7 +38,7 @@ namespace Common
|
||||
if (groupData != null)
|
||||
{
|
||||
ControlPoint = groupData.ControlPoint;
|
||||
AreaSize = groupData.AreaSize?? new Point { X = 150, Y = 75 };
|
||||
AreaSize = groupData.AreaSize?? new Point { X = 150, Y = 100 };
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -181,8 +181,6 @@ namespace Wpf_AiSportsMicrospace.Common
|
||||
return (int)WavingAction.Raising;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 验证左手动作(目前只有举手)
|
||||
/// </summary>
|
||||
|
||||
@ -20,7 +20,7 @@ namespace Dto
|
||||
public List<SportBase> Sports { get; private set; }
|
||||
public List<string> UseNameList { get; private set; } = new()
|
||||
{
|
||||
"游客-A", "游客-B", "游客-C", "游客-D", "游客-E", "游客-F"
|
||||
"游客-A", "游客-B", "游客-C", "游客-D", "游客-E", "游客-F", "游客-G", "游客-H", "游客-J", "游客-K"
|
||||
};
|
||||
public GroupJumpRopeContext()
|
||||
{
|
||||
|
||||
@ -32,8 +32,8 @@ namespace Wpf_AiSportsMicrospace.Views
|
||||
private Ellipse _draggedEllipse;
|
||||
private double _dragStartY;
|
||||
private double _originalY;
|
||||
private double _dragStartX;
|
||||
private double _originalX;
|
||||
private double _dragStartX;
|
||||
private double _originalX;
|
||||
|
||||
/// <summary>
|
||||
/// 点位数据列表
|
||||
@ -122,7 +122,7 @@ namespace Wpf_AiSportsMicrospace.Views
|
||||
var app = (App)Application.Current;
|
||||
using var scope = App.AppHost.Services.CreateScope();
|
||||
var db = scope.ServiceProvider.GetRequiredService<AppDbContext>();
|
||||
|
||||
|
||||
// 获取场地宽度配置
|
||||
var baseConfig = await db.BasicConfig.FirstOrDefaultAsync(x => x.Code == AppSettings.Code);
|
||||
if (baseConfig == null)
|
||||
@ -242,7 +242,7 @@ namespace Wpf_AiSportsMicrospace.Views
|
||||
if (child is Ellipse || child is Border || child is Line)
|
||||
{
|
||||
var element = child as FrameworkElement;
|
||||
if (element?.Name != "ConnectionLine" &&
|
||||
if (element?.Name != "ConnectionLine" &&
|
||||
element?.Name != "PointsContainer" &&
|
||||
element?.Name != "CoordinateDisplay")
|
||||
{
|
||||
@ -285,8 +285,8 @@ namespace Wpf_AiSportsMicrospace.Views
|
||||
|
||||
if (xProp != null && yProp != null)
|
||||
{
|
||||
point.X = (double)(xProp.GetValue(dbPoint) ?? 0) ;
|
||||
point.Y = (double)(yProp.GetValue(dbPoint) ?? 0) ;
|
||||
point.X = (double)(xProp.GetValue(dbPoint) ?? 0);
|
||||
point.Y = (double)(yProp.GetValue(dbPoint) ?? 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -679,7 +679,7 @@ namespace Wpf_AiSportsMicrospace.Views
|
||||
_originalX = point.X;
|
||||
_originalY = point.Y;
|
||||
}
|
||||
|
||||
|
||||
|
||||
_draggedEllipse.CaptureMouse();
|
||||
|
||||
@ -841,14 +841,14 @@ namespace Wpf_AiSportsMicrospace.Views
|
||||
/// </summary>
|
||||
private void UpdateLabelPosition(JumpRopePoint point)
|
||||
{
|
||||
|
||||
var labelBorder = MainCanvas.Children.OfType<Border>().FirstOrDefault(e => e.Name == $"label{point.Id}");
|
||||
|
||||
if (labelBorder != null)
|
||||
{
|
||||
Canvas.SetLeft(labelBorder, point.X - PointRadiusX);
|
||||
Canvas.SetTop(labelBorder, point.Y - PointRadiusY);
|
||||
}
|
||||
var labelBorder = MainCanvas.Children.OfType<Border>().FirstOrDefault(e => e.Name == $"label{point.Id}");
|
||||
|
||||
if (labelBorder != null)
|
||||
{
|
||||
Canvas.SetLeft(labelBorder, point.X - PointRadiusX);
|
||||
Canvas.SetTop(labelBorder, point.Y - PointRadiusY);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1101,9 +1101,11 @@ namespace Wpf_AiSportsMicrospace.Views
|
||||
if (pointProperty != null)
|
||||
{
|
||||
// 创建 Point 实例并保存
|
||||
var pointInstance = Activator.CreateInstance(pointType, point.X , point.Y );
|
||||
var pointNew = new AiSportsMicrospaceDB.Entities.Point {
|
||||
X =point.X ,Y= point.Y
|
||||
var pointInstance = Activator.CreateInstance(pointType, point.X, point.Y);
|
||||
var pointNew = new AiSportsMicrospaceDB.Entities.Point
|
||||
{
|
||||
X = point.X,
|
||||
Y = point.Y
|
||||
};
|
||||
pointProperty.SetValue(pointsData, pointNew);
|
||||
}
|
||||
@ -1115,8 +1117,8 @@ namespace Wpf_AiSportsMicrospace.Views
|
||||
var controlPoint = typeof(GroupPoints).GetProperty("ControlPoint");
|
||||
var controlPointNew = new AiSportsMicrospaceDB.Entities.Point
|
||||
{
|
||||
X = _points[_keyPointIndex].X ,
|
||||
Y = _points[_keyPointIndex].Y
|
||||
X = _points[_keyPointIndex - 1].X,
|
||||
Y = _points[_keyPointIndex - 1].Y
|
||||
};
|
||||
if (keyPointProperty != null)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user