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

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
@@ -34,10 +34,12 @@ namespace XP.ImageProcessing.RoiControl.Models
public void UpdateLabel(string distanceText = null)
{
Label.Text = distanceText ?? $"{Distance:F2} px";
Label.Text = (Index > 0 ? $"#{Index} " : "") + (distanceText ?? $"{Distance:F2} px");
Canvas.SetLeft(Label, (P1.X + P2.X) / 2 + 8);
Canvas.SetTop(Label, (P1.Y + P2.Y) / 2 - 18);
Label.Visibility = Visibility.Visible;
}
public int Index { get; set; }
}
}