* UICheckBox: 值相同时不响应值改变事件

This commit is contained in:
Sunny 2022-04-13 16:19:43 +08:00
parent f3058c2d5d
commit 01ce6f5eaf
2 changed files with 7 additions and 3 deletions

Binary file not shown.

View File

@ -131,9 +131,13 @@ namespace Sunny.UI
get => _checked; get => _checked;
set set
{ {
_checked = value; if (_checked != value)
ValueChanged?.Invoke(this, _checked); {
CheckedChanged?.Invoke(this, new EventArgs()); _checked = value;
ValueChanged?.Invoke(this, _checked);
CheckedChanged?.Invoke(this, new EventArgs());
}
Invalidate(); Invalidate();
} }
} }