diff --git a/AntdUIDemo.csproj b/AntdUIDemo.csproj index 80392bd..190dcc4 100644 --- a/AntdUIDemo.csproj +++ b/AntdUIDemo.csproj @@ -13,7 +13,7 @@ Copyright © 2024 czz_y $(Version) $(Version) - 1.6.1 + 1.6.2 czz_y 基于 Winform UI框架 AntdUI 设计的Demo https://gitee.com/mubaiyanghua/antd-uidemo @@ -30,7 +30,7 @@ - + diff --git a/MainWindow.Designer.cs b/MainWindow.Designer.cs index 55db254..de623d0 100644 --- a/MainWindow.Designer.cs +++ b/MainWindow.Designer.cs @@ -30,13 +30,13 @@ { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainWindow)); this.titlebar = new AntdUI.WindowBar(); + this.input_search = new AntdUI.Input(); this.button_color = new AntdUI.Button(); this.buttonSZ = new AntdUI.Button(); this.divider = new AntdUI.Divider(); this.menu = new AntdUI.Menu(); this.panel_content = new AntdUI.StackPanel(); this.label1 = new AntdUI.Label(); - this.input_search = new AntdUI.Input(); this.titlebar.SuspendLayout(); this.panel_content.SuspendLayout(); this.SuspendLayout(); @@ -57,6 +57,18 @@ this.titlebar.TabIndex = 0; this.titlebar.Text = "AntdUI"; // + // input_search + // + this.input_search.AllowClear = true; + this.input_search.Dock = System.Windows.Forms.DockStyle.Right; + this.input_search.Font = new System.Drawing.Font("Microsoft YaHei UI", 10F); + this.input_search.Location = new System.Drawing.Point(596, 0); + this.input_search.Name = "input_search"; + this.input_search.PlaceholderText = "输入关键字搜索..."; + this.input_search.PrefixSvg = "SearchOutlined"; + this.input_search.Size = new System.Drawing.Size(200, 40); + this.input_search.TabIndex = 2; + // // button_color // this.button_color.Dock = System.Windows.Forms.DockStyle.Right; @@ -115,26 +127,15 @@ // // label1 // + this.label1.Dock = System.Windows.Forms.DockStyle.Fill; this.label1.Font = new System.Drawing.Font("Microsoft YaHei UI", 20F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label1.Location = new System.Drawing.Point(3, 3); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(693, 563); + this.label1.Size = new System.Drawing.Size(709, 503); this.label1.TabIndex = 0; this.label1.Text = "欢迎使用 AntdUI Demo"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // - // input_search - // - this.input_search.AllowClear = true; - this.input_search.Dock = System.Windows.Forms.DockStyle.Right; - this.input_search.Font = new System.Drawing.Font("Microsoft YaHei UI", 10F); - this.input_search.Location = new System.Drawing.Point(596, 0); - this.input_search.Name = "input_search"; - this.input_search.PlaceholderText = "输入关键字搜索..."; - this.input_search.PrefixSvg = "SearchOutlined"; - this.input_search.Size = new System.Drawing.Size(200, 40); - this.input_search.TabIndex = 2; - // // MainWindow // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; @@ -146,7 +147,6 @@ this.Controls.Add(this.titlebar); this.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.Mode = AntdUI.TAMode.Auto; this.Name = "MainWindow"; this.Opacity = 0.99D; this.Padding = new System.Windows.Forms.Padding(6, 0, 0, 6); diff --git a/README.md b/README.md index 33f3b0c..be1cbf4 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@

AntdUI Demo

-本项目基于 `Winform .NET Framework 4.8` 开发,是 [AntdUI](https://gitee.com/antdui/AntdUI) 的 Demo 项目,当前版本 `1.6.1` +本项目基于 `Winform .NET Framework 4.8` 开发,是 [AntdUI](https://gitee.com/antdui/AntdUI) 的 Demo 项目,当前版本 `1.6.2` diff --git a/Views/ChatListDemo.cs b/Views/ChatListDemo.cs index f254f2c..1e8c6bc 100644 --- a/Views/ChatListDemo.cs +++ b/Views/ChatListDemo.cs @@ -57,7 +57,7 @@ namespace AntdUIDemo.Views #region 模拟GPT var msg = new AntdUI.Chat.TextChatItem("", Properties.Resources.head, "2.0T 银"); - bool isbut = chatList.AddIsBottom(msg); + bool isbut = chatList.AddToBottom(msg); msg.Loading = true; Thread.Sleep(1200); diff --git a/Views/ModalDemo.cs b/Views/ModalDemo.cs index 88264ce..051602f 100644 --- a/Views/ModalDemo.cs +++ b/Views/ModalDemo.cs @@ -87,13 +87,23 @@ namespace AntdUIDemo.Views OkText = "Search On Google", OnOk = config => { - //执行耗时操作,仅OK按钮支持异步响应 Thread.Sleep(2000); return true; }, OnBtns = button => { + //1.6.2起,自定义按钮支持异步委托 + Thread.Sleep(2000); AntdUI.Message.info(window, button.Text, autoClose: 1); + switch (button.Text) + { + case "Return": + return false; + case "Submit": + return true; + default: + return true; + } } }); }