* UIHeaderButton: 增加分组编号

This commit is contained in:
Sunny 2024-01-21 11:24:25 +08:00
parent 9620fb3e82
commit ed559a1a21

View File

@ -27,6 +27,7 @@
* 2023-05-13: V3.3.6 DrawString函数 * 2023-05-13: V3.3.6 DrawString函数
* 2023-05-16: V3.3.6 DrawFontImage函数 * 2023-05-16: V3.3.6 DrawFontImage函数
* 2023-10-26: V3.5.1 SymbolRotate * 2023-10-26: V3.5.1 SymbolRotate
* 2024-01-21: V3.6.3
******************************************************************************/ ******************************************************************************/
using System; using System;
@ -188,7 +189,8 @@ namespace Sunny.UI
List<UIHeaderButton> buttons = Parent.GetControls<UIHeaderButton>(); List<UIHeaderButton> buttons = Parent.GetControls<UIHeaderButton>();
foreach (var button in buttons) foreach (var button in buttons)
{ {
button.Selected = false; if (button.GroupIndex == GroupIndex)
button.Selected = false;
} }
if (ShowSelected) if (ShowSelected)
@ -201,6 +203,10 @@ namespace Sunny.UI
base.OnClick(e); base.OnClick(e);
} }
[DefaultValue(0)]
[Description("分组编号"), Category("SunnyUI")]
public int GroupIndex { get; set; }
[DefaultValue(true)] [DefaultValue(true)]
[Description("显示选中状态"), Category("SunnyUI")] [Description("显示选中状态"), Category("SunnyUI")]
public bool ShowSelected { get; set; } = true; public bool ShowSelected { get; set; } = true;