升级1.6.2,Modal自定义按钮支持异步回调
ChatList的AddIsBottom方法名修改为AddToBottom
This commit is contained in:
parent
dff516c1e4
commit
be234dadf6
@ -13,7 +13,7 @@
|
|||||||
<Copyright>Copyright © 2024 czz_y</Copyright>
|
<Copyright>Copyright © 2024 czz_y</Copyright>
|
||||||
<FileVersion>$(Version)</FileVersion>
|
<FileVersion>$(Version)</FileVersion>
|
||||||
<AssemblyVersion>$(Version)</AssemblyVersion>
|
<AssemblyVersion>$(Version)</AssemblyVersion>
|
||||||
<Version>1.6.1</Version>
|
<Version>1.6.2</Version>
|
||||||
<Authors>czz_y</Authors>
|
<Authors>czz_y</Authors>
|
||||||
<Description>基于 Winform UI框架 AntdUI 设计的Demo</Description>
|
<Description>基于 Winform UI框架 AntdUI 设计的Demo</Description>
|
||||||
<PackageProjectUrl>https://gitee.com/mubaiyanghua/antd-uidemo</PackageProjectUrl>
|
<PackageProjectUrl>https://gitee.com/mubaiyanghua/antd-uidemo</PackageProjectUrl>
|
||||||
@ -30,7 +30,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="AntdUI" Version="1.6.1" />
|
<PackageReference Include="AntdUI" Version="1.6.3" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
<PackageReference Include="NLog" Version="5.3.3" />
|
<PackageReference Include="NLog" Version="5.3.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
30
MainWindow.Designer.cs
generated
30
MainWindow.Designer.cs
generated
@ -30,13 +30,13 @@
|
|||||||
{
|
{
|
||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainWindow));
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainWindow));
|
||||||
this.titlebar = new AntdUI.WindowBar();
|
this.titlebar = new AntdUI.WindowBar();
|
||||||
|
this.input_search = new AntdUI.Input();
|
||||||
this.button_color = new AntdUI.Button();
|
this.button_color = new AntdUI.Button();
|
||||||
this.buttonSZ = new AntdUI.Button();
|
this.buttonSZ = new AntdUI.Button();
|
||||||
this.divider = new AntdUI.Divider();
|
this.divider = new AntdUI.Divider();
|
||||||
this.menu = new AntdUI.Menu();
|
this.menu = new AntdUI.Menu();
|
||||||
this.panel_content = new AntdUI.StackPanel();
|
this.panel_content = new AntdUI.StackPanel();
|
||||||
this.label1 = new AntdUI.Label();
|
this.label1 = new AntdUI.Label();
|
||||||
this.input_search = new AntdUI.Input();
|
|
||||||
this.titlebar.SuspendLayout();
|
this.titlebar.SuspendLayout();
|
||||||
this.panel_content.SuspendLayout();
|
this.panel_content.SuspendLayout();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
@ -57,6 +57,18 @@
|
|||||||
this.titlebar.TabIndex = 0;
|
this.titlebar.TabIndex = 0;
|
||||||
this.titlebar.Text = "AntdUI";
|
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
|
// button_color
|
||||||
//
|
//
|
||||||
this.button_color.Dock = System.Windows.Forms.DockStyle.Right;
|
this.button_color.Dock = System.Windows.Forms.DockStyle.Right;
|
||||||
@ -115,26 +127,15 @@
|
|||||||
//
|
//
|
||||||
// label1
|
// 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.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.Location = new System.Drawing.Point(3, 3);
|
||||||
this.label1.Name = "label1";
|
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.TabIndex = 0;
|
||||||
this.label1.Text = "欢迎使用 AntdUI Demo";
|
this.label1.Text = "欢迎使用 AntdUI Demo";
|
||||||
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
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
|
// MainWindow
|
||||||
//
|
//
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||||
@ -146,7 +147,6 @@
|
|||||||
this.Controls.Add(this.titlebar);
|
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.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.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||||
this.Mode = AntdUI.TAMode.Auto;
|
|
||||||
this.Name = "MainWindow";
|
this.Name = "MainWindow";
|
||||||
this.Opacity = 0.99D;
|
this.Opacity = 0.99D;
|
||||||
this.Padding = new System.Windows.Forms.Padding(6, 0, 0, 6);
|
this.Padding = new System.Windows.Forms.Padding(6, 0, 0, 6);
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<h1>AntdUI Demo</h1>
|
<h1>AntdUI Demo</h1>
|
||||||
|
|
||||||
本项目基于 `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`
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -57,7 +57,7 @@ namespace AntdUIDemo.Views
|
|||||||
#region 模拟GPT
|
#region 模拟GPT
|
||||||
|
|
||||||
var msg = new AntdUI.Chat.TextChatItem("", Properties.Resources.head, "2.0T 银");
|
var msg = new AntdUI.Chat.TextChatItem("", Properties.Resources.head, "2.0T 银");
|
||||||
bool isbut = chatList.AddIsBottom(msg);
|
bool isbut = chatList.AddToBottom(msg);
|
||||||
msg.Loading = true;
|
msg.Loading = true;
|
||||||
Thread.Sleep(1200);
|
Thread.Sleep(1200);
|
||||||
|
|
||||||
|
|||||||
@ -87,13 +87,23 @@ namespace AntdUIDemo.Views
|
|||||||
OkText = "Search On Google",
|
OkText = "Search On Google",
|
||||||
OnOk = config =>
|
OnOk = config =>
|
||||||
{
|
{
|
||||||
//执行耗时操作,仅OK按钮支持异步响应
|
|
||||||
Thread.Sleep(2000);
|
Thread.Sleep(2000);
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
OnBtns = button =>
|
OnBtns = button =>
|
||||||
{
|
{
|
||||||
|
//1.6.2起,自定义按钮支持异步委托
|
||||||
|
Thread.Sleep(2000);
|
||||||
AntdUI.Message.info(window, button.Text, autoClose: 1);
|
AntdUI.Message.info(window, button.Text, autoClose: 1);
|
||||||
|
switch (button.Text)
|
||||||
|
{
|
||||||
|
case "Return":
|
||||||
|
return false;
|
||||||
|
case "Submit":
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user