测量工具标号:各类测量标签显示序号,删除后自动重编号

This commit is contained in:
李伟
2026-04-24 16:32:21 +08:00
parent 5900907236
commit b593805f11
5 changed files with 44 additions and 5 deletions
@@ -58,6 +58,7 @@ namespace XP.ImageProcessing.RoiControl.Models
public double E4Angle { get; set; }
public double THTLimit { get; set; } = 75.0;
public int Index { get; set; }
public double FillRate
{
@@ -100,7 +101,7 @@ namespace XP.ImageProcessing.RoiControl.Models
double rate = FillRate;
string cls = Classification;
Label.Text = $"Fill: {rate:F1}% | THTLimit: {THTLimit:F1}% | {cls}";
Label.Text = (Index > 0 ? $"#{Index} " : "") + $"Fill: {rate:F1}% | THTLimit: {THTLimit:F1}% | {cls}";
Label.Foreground = cls == "PASS" ? Brushes.Lime : Brushes.Red;
double labelX = Math.Max(Math.Max(E1.X, E2.X), Math.Max(E3.X, E4.X)) + 15;
double labelY = (E1.Y + E2.Y) / 2;