From f52a92f7b58f8bcf7d33d4252ef8ce15f4e5d47f Mon Sep 17 00:00:00 2001
From: Tom <17379620@qq.com>
Date: Mon, 3 Mar 2025 21:36:29 +0800
Subject: [PATCH] =?UTF-8?q?=F0=9F=92=8E=20Splitter=20=E5=88=86=E9=9A=94?=
=?UTF-8?q?=E9=9D=A2=E6=9D=BF=E5=A2=9E=E5=8A=A0=E6=8A=98=E5=8F=A0=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD=E3=80=81Select=20=E6=96=B0=E5=A2=9E=E5=B1=9E=E6=80=A7?=
=?UTF-8?q?=20CloseIcon=EF=BC=8C=E4=BA=8B=E4=BB=B6=20ClosedItem?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/AntdUI/AntdUI.csproj | 2 +-
src/AntdUI/Controls/IControl.cs | 5 +
src/AntdUI/Controls/Select.cs | 109 ++--
src/AntdUI/Controls/Splitter.cs | 561 +++++++++---------
.../LayeredWindow/LayeredFormSelectDown.cs | 118 +++-
.../LayeredFormSelectMultiple.cs | 17 +-
6 files changed, 455 insertions(+), 357 deletions(-)
diff --git a/src/AntdUI/AntdUI.csproj b/src/AntdUI/AntdUI.csproj
index 76c9600f..63d11b1b 100644
--- a/src/AntdUI/AntdUI.csproj
+++ b/src/AntdUI/AntdUI.csproj
@@ -13,7 +13,7 @@
Winform UI library use Ant Design 5.0
$(Version)
$(Version)
- 1.9.0
+ 1.9.1
👚 基于 Ant Design 设计语言的 Winform 界面库
false
9.0
diff --git a/src/AntdUI/Controls/IControl.cs b/src/AntdUI/Controls/IControl.cs
index 247cfac4..8d52f468 100644
--- a/src/AntdUI/Controls/IControl.cs
+++ b/src/AntdUI/Controls/IControl.cs
@@ -313,6 +313,10 @@ namespace AntdUI
flag = false;
SetCursor(Cursors.VSplit);
break;
+ case CursorType.HSplit:
+ flag = false;
+ SetCursor(Cursors.HSplit);
+ break;
case CursorType.Default:
default:
SetCursor(DefaultCursor);
@@ -632,6 +636,7 @@ namespace AntdUI
No,
SizeAll,
VSplit,
+ HSplit,
}
public interface BadgeConfig
diff --git a/src/AntdUI/Controls/Select.cs b/src/AntdUI/Controls/Select.cs
index c5a76a4b..01a16d5d 100644
--- a/src/AntdUI/Controls/Select.cs
+++ b/src/AntdUI/Controls/Select.cs
@@ -104,6 +104,12 @@ namespace AntdUI
[Description("点击切换下拉"), Category("行为"), DefaultValue(true)]
public bool ClickSwitchDropdown { get; set; } = true;
+ ///
+ /// 是否显示关闭图标
+ ///
+ [Description("是否显示关闭图标"), Category("行为"), DefaultValue(false)]
+ public bool CloseIcon { get; set; }
+
#region 数据
BaseCollection? items;
@@ -283,6 +289,14 @@ namespace AntdUI
subForm = null;
}
+ internal bool DropDownClose(object value)
+ {
+ if (ClosedItem == null) return false;
+ if (value is SelectItem it) ClosedItem(this, new ObjectNEventArgs(it.Tag));
+ else ClosedItem(this, new ObjectNEventArgs(value));
+ return true;
+ }
+
#endregion
///
@@ -303,6 +317,12 @@ namespace AntdUI
[Description("SelectedValue 属性值更改时发生"), Category("行为")]
public event ObjectNEventHandler? SelectedValueChanged = null;
+ ///
+ /// 关闭某项 时发生
+ ///
+ [Description("关闭某项 时发生"), Category("行为")]
+ public event ObjectNEventHandler? ClosedItem = null;
+
public delegate IList