提交当前本机整理版本

This commit is contained in:
cyf
2026-07-02 10:11:39 +00:00
parent c10a5d64c7
commit aacefa24f8
822 changed files with 196665 additions and 14263 deletions
+29 -1
View File
@@ -119,4 +119,32 @@ namespace Lskj.Main.Control
if (ClientRectangle.Contains(PointToClient(System.Windows.Forms.Control.MousePosition))) return;
_isHover = false;
//BackColor = _normalBack;
btn_icon.BackgroundImage = _imgDefault;
this.BackgroundImage = null;
Invalidate();
Update();
}
private void BindHover(System.Windows.Forms.Control ctl)
{
ctl.MouseEnter += HoverEnter;
ctl.MouseLeave += HoverLeave;
}
/* ===== 角标定位 ===== */
protected override void OnResize(EventArgs e)
{ base.OnResize(e); RepositionBadge(); }
private void RepositionBadge()
{
if (!badgeDot.Visible) return;
const int SAFE = 2; // 距离边缘 2px
//badgeDot.Location = new Point(
// Math.Min(btn_icon.Right - badgeDot.Width / 2, Width - badgeDot.Width - SAFE),
// Math.Max(btn_icon.Top - badgeDot.Height / 2, SAFE));
/* 数字已 Dock/Size 居中,无需再调位置,但保证层级 */
badgeDot.BringToFront();
badgeNum.BringToFront();
}
}
}