From b99a03c9409e241e2d1a966b15b221b45b9f3465 Mon Sep 17 00:00:00 2001 From: tanglong <842690096@qq.com> Date: Tue, 20 Jan 2026 16:38:15 +0800 Subject: [PATCH] d --- .../Views/JumpRope/TrainingRecords.xaml.cs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/Wpf_AiSportsMicrospace/Views/JumpRope/TrainingRecords.xaml.cs b/Wpf_AiSportsMicrospace/Views/JumpRope/TrainingRecords.xaml.cs index 6a02254..0ee2e52 100644 --- a/Wpf_AiSportsMicrospace/Views/JumpRope/TrainingRecords.xaml.cs +++ b/Wpf_AiSportsMicrospace/Views/JumpRope/TrainingRecords.xaml.cs @@ -1,4 +1,5 @@ -using Dto; +using Common; +using Dto; using SportExpand; using System; using System.Collections.Generic; @@ -56,11 +57,20 @@ namespace Views.JumpRope if (rightAnkle == null) return false; - double xNorm = rightAnkle.X / 1920.0; - double yNorm = rightAnkle.Y / 1080.0; + double xNorm = rightAnkle.X / AppSettings.Resolution_X; + double yNorm = rightAnkle.Y / AppSettings.Resolution_Y; - return xNorm >= 0.44 && xNorm <= 0.57 && yNorm >= 0.81; + // 控制点 + double cx = AppSettings.ControlPoint.X; // 已经是归一化 0~1 + double cy = AppSettings.ControlPoint.Y; + + double halfWidth = AppSettings.AreaSize.X; + double halfHeight = AppSettings.AreaSize.Y; + + return xNorm >= (cx - halfWidth) && xNorm <= (cx + halfWidth) && + yNorm >= (cy - halfHeight) && yNorm <= (cy + halfHeight); }); + if (human != null) {