SVN-Revision: r886
This commit is contained in:
wyf
2025-07-23 09:01:00 +00:00
parent 9b6fbeecc6
commit 4d3d25cf5b
+13 -2
View File
@@ -2,6 +2,7 @@
* CircleButton 2.0 · Red badge with built-in number
* Author : Gong Yuchao (2017-08-16), rev 2025-07-17
***************************************************/
using Lskj.Business;
using System;
using System.ComponentModel;
using System.Diagnostics;
@@ -12,7 +13,7 @@ using System.Windows.Forms;
namespace Lskj.Control
{
[DefaultEvent(nameof(Click))]
public partial class CircleButton : Button
public partial class CircleButton : Button
{
/* ───────── 可调属性 ───────── */
@@ -120,4 +121,14 @@ namespace Lskj.Control
}
/* ───────── 私有助手 ───────── */
private void SetHover(
private void SetHover(bool hover)
{
if (_hover == hover) return;
_hover = hover;
BackgroundImage = hover && ImageHover != null ? ImageHover : _imgNormal;
}
private void SyncSize()
{
Width = Height = _radius * 2;