更新区域编号显示:设置靠右显示并实现动态更新

This commit is contained in:
zqm
2025-11-11 16:26:31 +08:00
parent 2f5bf1b164
commit b9f9c43027
2 changed files with 6 additions and 0 deletions

View File

@@ -213,6 +213,9 @@ namespace JoyD.Windows.CS
this.txtRegionNumber.ToolTipText = "区域编号";
// 确保控件不会被拆分到不同行
this.txtRegionNumber.AutoSize = true;
// 设置文本靠右显示
this.txtRegionNumber.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
this.txtRegionNumber.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// toolStrip
//

View File

@@ -2326,6 +2326,9 @@ namespace JoyD.Windows.CS
_drawnRectangles.Add(regionInfo);
// 添加区域后更新区域编号显示
UpdateButtonsVisibility();
// 检查是否需要完全重建叠加层
bool needFullRebuild = false;