测量工具标号:各类测量标签显示序号,删除后自动重编号
This commit is contained in:
@@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user