Compare commits
1 Commits
dev
...
Branch_5d8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8862bb27b3 |
@ -18,7 +18,8 @@ namespace AiSportsMicrospaceDB.DBContext
|
|||||||
|
|
||||||
public DbSet<BasicConfig> BasicConfig { get; set; }
|
public DbSet<BasicConfig> BasicConfig { get; set; }
|
||||||
|
|
||||||
public DbSet<SixGroupPoints> SixGroupPoints { get; set; }
|
//public DbSet<SixGroupPoints> SixGroupPoints { get; set; }
|
||||||
|
public DbSet<GroupPoints> GroupPoints { get; set; }
|
||||||
public DbSet<JumpLongPoints> JumpLongPoints { get; set; }
|
public DbSet<JumpLongPoints> JumpLongPoints { get; set; }
|
||||||
public DbSet<AppVersion> AppVersion { get; set; }
|
public DbSet<AppVersion> AppVersion { get; set; }
|
||||||
public DbSet<DeviceAssocSchool> DeviceAssocSchool { get; set; }
|
public DbSet<DeviceAssocSchool> DeviceAssocSchool { get; set; }
|
||||||
|
|||||||
44
AiSportsMicrospaceDB/Entities/GroupPoints.cs
Normal file
44
AiSportsMicrospaceDB/Entities/GroupPoints.cs
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace AiSportsMicrospaceDB.Entities
|
||||||
|
{
|
||||||
|
|
||||||
|
[Table("GroupPoints")]
|
||||||
|
public class GroupPoints {
|
||||||
|
[Key]
|
||||||
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||||
|
[Display(Description = "主键Id")]
|
||||||
|
[Comment("Id")]
|
||||||
|
public int? Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///设备编号
|
||||||
|
/// </summary>
|
||||||
|
[Display(Name = "设备编号")]
|
||||||
|
[Comment("设备编号")]
|
||||||
|
[Column(TypeName = "nvarchar(100)")]
|
||||||
|
public string Code { get; set; }
|
||||||
|
|
||||||
|
public Point Point1 { get; set; }
|
||||||
|
public Point Point2 { get; set; }
|
||||||
|
public Point Point3 { get; set; }
|
||||||
|
public Point Point4 { get; set; }
|
||||||
|
public Point? Point5 { get; set; }
|
||||||
|
public Point? Point6 { get; set; }
|
||||||
|
public Point? Point7 { get; set; }
|
||||||
|
public Point? Point8 { get; set; }
|
||||||
|
public Point? Point9 { get; set; }
|
||||||
|
public Point? Point10 { get; set; }
|
||||||
|
public Point? ControlPoint { get; set; }
|
||||||
|
public Point? AreaSize { get; set; }
|
||||||
|
public int? KeyPointIndex { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -4,12 +4,13 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration>Release</Configuration>
|
<Configuration>Release</Configuration>
|
||||||
<Platform>Any CPU</Platform>
|
<Platform>Any CPU</Platform>
|
||||||
<PublishDir>C:\Users\tangl\Desktop\exe</PublishDir>
|
<PublishDir>C:\Users\19304\Desktop\作品</PublishDir>
|
||||||
<PublishProtocol>FileSystem</PublishProtocol>
|
<PublishProtocol>FileSystem</PublishProtocol>
|
||||||
<_TargetId>Folder</_TargetId>
|
<_TargetId>Folder</_TargetId>
|
||||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||||
<SelfContained>false</SelfContained>
|
<SelfContained>false</SelfContained>
|
||||||
<PublishSingleFile>false</PublishSingleFile>
|
<PublishSingleFile>false</PublishSingleFile>
|
||||||
<PublishReadyToRun>false</PublishReadyToRun>
|
<PublishReadyToRun>false</PublishReadyToRun>
|
||||||
|
<TargetFramework>net8.0-windows</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@ -82,14 +82,18 @@ namespace Wpf_AiSportsMicrospace.Views
|
|||||||
var app = (App)Application.Current;
|
var app = (App)Application.Current;
|
||||||
using var scope = App.AppHost.Services.CreateScope();
|
using var scope = App.AppHost.Services.CreateScope();
|
||||||
var db = scope.ServiceProvider.GetRequiredService<AppDbContext>();
|
var db = scope.ServiceProvider.GetRequiredService<AppDbContext>();
|
||||||
var cfg = await db.SixGroupPoints.FirstOrDefaultAsync(x => x.Code == AppSettings.Code);
|
//var cfg = await db.SixGroupPoints.FirstOrDefaultAsync(x => x.Code == AppSettings.Code);
|
||||||
|
var cfg = await db.GroupPoints.FirstOrDefaultAsync(x => x.Code == AppSettings.Code);
|
||||||
//var pointlist = JsonSerializer.Deserialize<List<(double, double)>>(cfg!.PointsJson);
|
//var pointlist = JsonSerializer.Deserialize<List<(double, double)>>(cfg!.PointsJson);
|
||||||
|
if(cfg != null)
|
||||||
List<(double XNorm, double YNorm)> pointlist =
|
{
|
||||||
|
List<(double XNorm, double YNorm)> pointlist =
|
||||||
[(cfg.Point1.X, cfg.Point1.Y),(cfg.Point2.X, cfg.Point2.Y),
|
[(cfg.Point1.X, cfg.Point1.Y),(cfg.Point2.X, cfg.Point2.Y),
|
||||||
(cfg.Point3.X, cfg.Point3.Y), (cfg.Point4.X, cfg.Point4.Y),
|
(cfg.Point3.X, cfg.Point3.Y), (cfg.Point4.X, cfg.Point4.Y),
|
||||||
(cfg.Point5.X, cfg.Point5.Y),(cfg.Point6.X, cfg.Point6.Y)];
|
(cfg.Point5.X, cfg.Point5.Y),(cfg.Point6.X, cfg.Point6.Y)];
|
||||||
_groupJumpRopeContext.CirclePositions = pointlist;
|
_groupJumpRopeContext.CirclePositions = pointlist;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
DrawCirclesWithText();
|
DrawCirclesWithText();
|
||||||
|
|
||||||
@ -457,7 +461,14 @@ namespace Wpf_AiSportsMicrospace.Views
|
|||||||
|
|
||||||
for (int i = 0; i < _groupJumpRopeContext.CirclePositions.Count; i++)
|
for (int i = 0; i < _groupJumpRopeContext.CirclePositions.Count; i++)
|
||||||
{
|
{
|
||||||
var pos = _groupJumpRopeContext.CirclePositions[i];
|
List<(double XNorm, double YNorm)> llist = [(0.21, 0.88),
|
||||||
|
(0.36, 0.58),
|
||||||
|
(0.50, 0.88),
|
||||||
|
(0.64, 0.58),
|
||||||
|
(0.78, 0.88),
|
||||||
|
(0.92, 0.58)];
|
||||||
|
var pos = llist[i];
|
||||||
|
|
||||||
double x = pos.XNorm * imgWidth;
|
double x = pos.XNorm * imgWidth;
|
||||||
double y = pos.YNorm * imgHeight;
|
double y = pos.YNorm * imgHeight;
|
||||||
|
|
||||||
|
|||||||
@ -89,7 +89,7 @@ namespace Wpf_AiSportsMicrospace.Views.JumpRope
|
|||||||
var app = (App)Application.Current;
|
var app = (App)Application.Current;
|
||||||
using var scope = App.AppHost.Services.CreateScope();
|
using var scope = App.AppHost.Services.CreateScope();
|
||||||
var db = scope.ServiceProvider.GetRequiredService<AppDbContext>();
|
var db = scope.ServiceProvider.GetRequiredService<AppDbContext>();
|
||||||
var cfg = await db.SixGroupPoints.FirstOrDefaultAsync(x => x.Code == AppSettings.Code);
|
var cfg = await db.GroupPoints.FirstOrDefaultAsync(x => x.Code == AppSettings.Code);
|
||||||
//var pointlist = JsonSerializer.Deserialize<List<(double, double)>>(cfg!.PointsJson);
|
//var pointlist = JsonSerializer.Deserialize<List<(double, double)>>(cfg!.PointsJson);
|
||||||
|
|
||||||
List<(double XNorm, double YNorm)> pointlist = [(cfg.Point3.X, cfg.Point3.Y), (cfg.Point5.X, cfg.Point5.Y)];
|
List<(double XNorm, double YNorm)> pointlist = [(cfg.Point3.X, cfg.Point3.Y), (cfg.Point5.X, cfg.Point5.Y)];
|
||||||
|
|||||||
@ -67,7 +67,7 @@ namespace Views.JumpingJack
|
|||||||
var app = (App)Application.Current;
|
var app = (App)Application.Current;
|
||||||
using var scope = App.AppHost.Services.CreateScope();
|
using var scope = App.AppHost.Services.CreateScope();
|
||||||
var db = scope.ServiceProvider.GetRequiredService<AppDbContext>();
|
var db = scope.ServiceProvider.GetRequiredService<AppDbContext>();
|
||||||
var cfg = await db.SixGroupPoints.FirstOrDefaultAsync(x => x.Code == AppSettings.Code);
|
var cfg = await db.GroupPoints.FirstOrDefaultAsync(x => x.Code == AppSettings.Code);
|
||||||
//var pointlist = JsonSerializer.Deserialize<List<(double, double)>>(cfg!.PointsJson);
|
//var pointlist = JsonSerializer.Deserialize<List<(double, double)>>(cfg!.PointsJson);
|
||||||
|
|
||||||
List<(double XNorm, double YNorm)> pointlist =
|
List<(double XNorm, double YNorm)> pointlist =
|
||||||
|
|||||||
@ -60,7 +60,7 @@ namespace Views.SquatFu
|
|||||||
var app = (App)Application.Current;
|
var app = (App)Application.Current;
|
||||||
using var scope = App.AppHost.Services.CreateScope();
|
using var scope = App.AppHost.Services.CreateScope();
|
||||||
var db = scope.ServiceProvider.GetRequiredService<AppDbContext>();
|
var db = scope.ServiceProvider.GetRequiredService<AppDbContext>();
|
||||||
var cfg = await db.SixGroupPoints.FirstOrDefaultAsync(x => x.Code == AppSettings.Code);
|
var cfg = await db.GroupPoints.FirstOrDefaultAsync(x => x.Code == AppSettings.Code);
|
||||||
//var pointlist = JsonSerializer.Deserialize<List<(double, double)>>(cfg!.PointsJson);
|
//var pointlist = JsonSerializer.Deserialize<List<(double, double)>>(cfg!.PointsJson);
|
||||||
|
|
||||||
List<(double XNorm, double YNorm)> pointlist =
|
List<(double XNorm, double YNorm)> pointlist =
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<UseWPF>true</UseWPF>
|
<UseWPF>true</UseWPF>
|
||||||
|
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user