diff --git a/AntdUIDemo.csproj b/AntdUIDemo.csproj index fcd1fbc..b3ae29f 100644 --- a/AntdUIDemo.csproj +++ b/AntdUIDemo.csproj @@ -13,9 +13,9 @@ Copyright © 2024 czz_y $(Version) $(Version) - 1.6.10 + 1.6.11 czz_y - 基于 Winform UI框架 AntdUI 设计的 Demo + 基于 Winform UI 框架 AntdUI 设计的 Demo https://gitee.com/mubaiyanghua/antd-uidemo logo.png README.md @@ -30,7 +30,7 @@ - + diff --git a/README.md b/README.md index 04edbfb..245c31b 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.10` +本项目基于 `Winform .NET Framework 4.8` 开发,是 [AntdUI](https://gitee.com/antdui/AntdUI) 的 Demo 项目,当前版本 `1.6.11` diff --git a/Views/MessageDemo.Designer.cs b/Views/MessageDemo.Designer.cs index d3472c0..43382a3 100644 --- a/Views/MessageDemo.Designer.cs +++ b/Views/MessageDemo.Designer.cs @@ -29,6 +29,14 @@ private void InitializeComponent() { this.stackPanel1 = new AntdUI.StackPanel(); + this.flowPanel3 = new AntdUI.FlowPanel(); + this.button_BL = new AntdUI.Button(); + this.button_Bottom = new AntdUI.Button(); + this.button_BR = new AntdUI.Button(); + this.button_TR = new AntdUI.Button(); + this.button_Top = new AntdUI.Button(); + this.button_TL = new AntdUI.Button(); + this.label5 = new AntdUI.Label(); this.flowPanel1 = new AntdUI.FlowPanel(); this.button_i = new AntdUI.Button(); this.button_w = new AntdUI.Button(); @@ -44,22 +52,20 @@ this.divider1 = new AntdUI.Divider(); this.label2 = new AntdUI.Label(); this.label1 = new AntdUI.Label(); - this.flowPanel3 = new AntdUI.FlowPanel(); - this.button_BL = new AntdUI.Button(); - this.button_Bottom = new AntdUI.Button(); - this.button_BR = new AntdUI.Button(); - this.button_TR = new AntdUI.Button(); - this.button_Top = new AntdUI.Button(); - this.button_TL = new AntdUI.Button(); - this.label5 = new AntdUI.Label(); + this.label6 = new AntdUI.Label(); + this.flowPanel4 = new AntdUI.FlowPanel(); + this.button_clickclose = new AntdUI.Button(); this.stackPanel1.SuspendLayout(); + this.flowPanel3.SuspendLayout(); this.flowPanel1.SuspendLayout(); this.flowPanel2.SuspendLayout(); - this.flowPanel3.SuspendLayout(); + this.flowPanel4.SuspendLayout(); this.SuspendLayout(); // // stackPanel1 // + this.stackPanel1.Controls.Add(this.flowPanel4); + this.stackPanel1.Controls.Add(this.label6); this.stackPanel1.Controls.Add(this.flowPanel3); this.stackPanel1.Controls.Add(this.label5); this.stackPanel1.Controls.Add(this.flowPanel1); @@ -72,179 +78,11 @@ this.stackPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.stackPanel1.Location = new System.Drawing.Point(0, 0); this.stackPanel1.Name = "stackPanel1"; - this.stackPanel1.Size = new System.Drawing.Size(700, 360); + this.stackPanel1.Size = new System.Drawing.Size(700, 411); this.stackPanel1.TabIndex = 0; this.stackPanel1.Text = "stackPanel1"; this.stackPanel1.Vertical = true; // - // flowPanel1 - // - this.flowPanel1.Controls.Add(this.button_i); - this.flowPanel1.Controls.Add(this.button_w); - this.flowPanel1.Controls.Add(this.button_e); - this.flowPanel1.Controls.Add(this.button_s); - this.flowPanel1.Location = new System.Drawing.Point(3, 201); - this.flowPanel1.Name = "flowPanel1"; - this.flowPanel1.Size = new System.Drawing.Size(694, 38); - this.flowPanel1.TabIndex = 42; - this.flowPanel1.Text = "flowPanel1"; - // - // button_i - // - this.button_i.BorderWidth = 2F; - this.button_i.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button_i.Ghost = true; - this.button_i.Location = new System.Drawing.Point(261, 3); - this.button_i.Name = "button_i"; - this.button_i.Size = new System.Drawing.Size(80, 32); - this.button_i.TabIndex = 5; - this.button_i.Text = "Info"; - this.button_i.Type = AntdUI.TTypeMini.Info; - this.button_i.WaveSize = 0; - // - // button_w - // - this.button_w.BorderWidth = 2F; - this.button_w.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button_w.Ghost = true; - this.button_w.Location = new System.Drawing.Point(175, 3); - this.button_w.Name = "button_w"; - this.button_w.Size = new System.Drawing.Size(80, 32); - this.button_w.TabIndex = 4; - this.button_w.Text = "Warn"; - this.button_w.Type = AntdUI.TTypeMini.Warn; - this.button_w.WaveSize = 0; - // - // button_e - // - this.button_e.BorderWidth = 2F; - this.button_e.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button_e.Ghost = true; - this.button_e.Location = new System.Drawing.Point(89, 3); - this.button_e.Name = "button_e"; - this.button_e.Size = new System.Drawing.Size(80, 32); - this.button_e.TabIndex = 3; - this.button_e.Text = "Error"; - this.button_e.Type = AntdUI.TTypeMini.Error; - this.button_e.WaveSize = 0; - // - // button_s - // - this.button_s.BorderWidth = 2F; - this.button_s.Cursor = System.Windows.Forms.Cursors.Default; - this.button_s.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button_s.Ghost = true; - this.button_s.Location = new System.Drawing.Point(3, 3); - this.button_s.Name = "button_s"; - this.button_s.Size = new System.Drawing.Size(80, 32); - this.button_s.TabIndex = 2; - this.button_s.Text = "Success"; - this.button_s.Type = AntdUI.TTypeMini.Success; - this.button_s.WaveSize = 0; - // - // label4 - // - this.label4.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(3, 171); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(694, 24); - this.label4.TabIndex = 41; - this.label4.Text = "延时用法"; - this.label4.TooltipConfig = null; - // - // flowPanel2 - // - this.flowPanel2.Controls.Add(this.button_info); - this.flowPanel2.Controls.Add(this.button_warn); - this.flowPanel2.Controls.Add(this.button_error); - this.flowPanel2.Controls.Add(this.button_sucess); - this.flowPanel2.Location = new System.Drawing.Point(3, 127); - this.flowPanel2.Name = "flowPanel2"; - this.flowPanel2.Size = new System.Drawing.Size(694, 38); - this.flowPanel2.TabIndex = 40; - this.flowPanel2.Text = "flowPanel2"; - // - // button_info - // - this.button_info.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button_info.Location = new System.Drawing.Point(261, 3); - this.button_info.Name = "button_info"; - this.button_info.Size = new System.Drawing.Size(80, 32); - this.button_info.TabIndex = 5; - this.button_info.Text = "Info"; - this.button_info.Type = AntdUI.TTypeMini.Info; - this.button_info.WaveSize = 0; - // - // button_warn - // - this.button_warn.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button_warn.Location = new System.Drawing.Point(175, 3); - this.button_warn.Name = "button_warn"; - this.button_warn.Size = new System.Drawing.Size(80, 32); - this.button_warn.TabIndex = 4; - this.button_warn.Text = "Warn"; - this.button_warn.Type = AntdUI.TTypeMini.Warn; - this.button_warn.WaveSize = 0; - // - // button_error - // - this.button_error.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button_error.Location = new System.Drawing.Point(89, 3); - this.button_error.Name = "button_error"; - this.button_error.Size = new System.Drawing.Size(80, 32); - this.button_error.TabIndex = 3; - this.button_error.Text = "Error"; - this.button_error.Type = AntdUI.TTypeMini.Error; - this.button_error.WaveSize = 0; - // - // button_sucess - // - this.button_sucess.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button_sucess.Location = new System.Drawing.Point(3, 3); - this.button_sucess.Name = "button_sucess"; - this.button_sucess.Size = new System.Drawing.Size(80, 32); - this.button_sucess.TabIndex = 2; - this.button_sucess.Text = "Success"; - this.button_sucess.Type = AntdUI.TTypeMini.Success; - this.button_sucess.WaveSize = 0; - // - // label3 - // - this.label3.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(3, 97); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(694, 24); - this.label3.TabIndex = 25; - this.label3.Text = "基本用法"; - this.label3.TooltipConfig = null; - // - // divider1 - // - this.divider1.Location = new System.Drawing.Point(3, 79); - this.divider1.Name = "divider1"; - this.divider1.Size = new System.Drawing.Size(694, 12); - this.divider1.TabIndex = 24; - // - // label2 - // - this.label2.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(3, 49); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(694, 24); - this.label2.TabIndex = 23; - this.label2.Text = "全局展示操作反馈信息。"; - this.label2.TooltipConfig = null; - // - // label1 - // - this.label1.Font = new System.Drawing.Font("Microsoft YaHei UI", 26.25F, 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(694, 40); - this.label1.TabIndex = 22; - this.label1.Text = "Message 全局提示"; - this.label1.TooltipConfig = null; - // // flowPanel3 // this.flowPanel3.Controls.Add(this.button_BL); @@ -333,18 +171,211 @@ this.label5.Size = new System.Drawing.Size(694, 24); this.label5.TabIndex = 46; this.label5.Text = "弹出位置"; - this.label5.TooltipConfig = null; + // + // flowPanel1 + // + this.flowPanel1.Controls.Add(this.button_i); + this.flowPanel1.Controls.Add(this.button_w); + this.flowPanel1.Controls.Add(this.button_e); + this.flowPanel1.Controls.Add(this.button_s); + this.flowPanel1.Location = new System.Drawing.Point(3, 201); + this.flowPanel1.Name = "flowPanel1"; + this.flowPanel1.Size = new System.Drawing.Size(694, 38); + this.flowPanel1.TabIndex = 42; + this.flowPanel1.Text = "flowPanel1"; + // + // button_i + // + this.button_i.BorderWidth = 2F; + this.button_i.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button_i.Ghost = true; + this.button_i.Location = new System.Drawing.Point(261, 3); + this.button_i.Name = "button_i"; + this.button_i.Size = new System.Drawing.Size(80, 32); + this.button_i.TabIndex = 5; + this.button_i.Text = "Info"; + this.button_i.Type = AntdUI.TTypeMini.Info; + this.button_i.WaveSize = 0; + // + // button_w + // + this.button_w.BorderWidth = 2F; + this.button_w.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button_w.Ghost = true; + this.button_w.Location = new System.Drawing.Point(175, 3); + this.button_w.Name = "button_w"; + this.button_w.Size = new System.Drawing.Size(80, 32); + this.button_w.TabIndex = 4; + this.button_w.Text = "Warn"; + this.button_w.Type = AntdUI.TTypeMini.Warn; + this.button_w.WaveSize = 0; + // + // button_e + // + this.button_e.BorderWidth = 2F; + this.button_e.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button_e.Ghost = true; + this.button_e.Location = new System.Drawing.Point(89, 3); + this.button_e.Name = "button_e"; + this.button_e.Size = new System.Drawing.Size(80, 32); + this.button_e.TabIndex = 3; + this.button_e.Text = "Error"; + this.button_e.Type = AntdUI.TTypeMini.Error; + this.button_e.WaveSize = 0; + // + // button_s + // + this.button_s.BorderWidth = 2F; + this.button_s.Cursor = System.Windows.Forms.Cursors.Default; + this.button_s.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button_s.Ghost = true; + this.button_s.Location = new System.Drawing.Point(3, 3); + this.button_s.Name = "button_s"; + this.button_s.Size = new System.Drawing.Size(80, 32); + this.button_s.TabIndex = 2; + this.button_s.Text = "Success"; + this.button_s.Type = AntdUI.TTypeMini.Success; + this.button_s.WaveSize = 0; + // + // label4 + // + this.label4.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label4.Location = new System.Drawing.Point(3, 171); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(694, 24); + this.label4.TabIndex = 41; + this.label4.Text = "延时用法"; + // + // flowPanel2 + // + this.flowPanel2.Controls.Add(this.button_info); + this.flowPanel2.Controls.Add(this.button_warn); + this.flowPanel2.Controls.Add(this.button_error); + this.flowPanel2.Controls.Add(this.button_sucess); + this.flowPanel2.Location = new System.Drawing.Point(3, 127); + this.flowPanel2.Name = "flowPanel2"; + this.flowPanel2.Size = new System.Drawing.Size(694, 38); + this.flowPanel2.TabIndex = 40; + this.flowPanel2.Text = "flowPanel2"; + // + // button_info + // + this.button_info.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button_info.Location = new System.Drawing.Point(261, 3); + this.button_info.Name = "button_info"; + this.button_info.Size = new System.Drawing.Size(80, 32); + this.button_info.TabIndex = 5; + this.button_info.Text = "Info"; + this.button_info.Type = AntdUI.TTypeMini.Info; + this.button_info.WaveSize = 0; + // + // button_warn + // + this.button_warn.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button_warn.Location = new System.Drawing.Point(175, 3); + this.button_warn.Name = "button_warn"; + this.button_warn.Size = new System.Drawing.Size(80, 32); + this.button_warn.TabIndex = 4; + this.button_warn.Text = "Warn"; + this.button_warn.Type = AntdUI.TTypeMini.Warn; + this.button_warn.WaveSize = 0; + // + // button_error + // + this.button_error.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button_error.Location = new System.Drawing.Point(89, 3); + this.button_error.Name = "button_error"; + this.button_error.Size = new System.Drawing.Size(80, 32); + this.button_error.TabIndex = 3; + this.button_error.Text = "Error"; + this.button_error.Type = AntdUI.TTypeMini.Error; + this.button_error.WaveSize = 0; + // + // button_sucess + // + this.button_sucess.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button_sucess.Location = new System.Drawing.Point(3, 3); + this.button_sucess.Name = "button_sucess"; + this.button_sucess.Size = new System.Drawing.Size(80, 32); + this.button_sucess.TabIndex = 2; + this.button_sucess.Text = "Success"; + this.button_sucess.Type = AntdUI.TTypeMini.Success; + this.button_sucess.WaveSize = 0; + // + // label3 + // + this.label3.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label3.Location = new System.Drawing.Point(3, 97); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(694, 24); + this.label3.TabIndex = 25; + this.label3.Text = "基本用法"; + // + // divider1 + // + this.divider1.Location = new System.Drawing.Point(3, 79); + this.divider1.Name = "divider1"; + this.divider1.Size = new System.Drawing.Size(694, 12); + this.divider1.TabIndex = 24; + // + // label2 + // + this.label2.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label2.Location = new System.Drawing.Point(3, 49); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(694, 24); + this.label2.TabIndex = 23; + this.label2.Text = "全局展示操作反馈信息。"; + // + // label1 + // + this.label1.Font = new System.Drawing.Font("Microsoft YaHei UI", 26.25F, 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(694, 40); + this.label1.TabIndex = 22; + this.label1.Text = "Message 全局提示"; + // + // label6 + // + this.label6.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label6.Location = new System.Drawing.Point(3, 319); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(694, 24); + this.label6.TabIndex = 48; + this.label6.Text = "关闭"; + // + // flowPanel4 + // + this.flowPanel4.Controls.Add(this.button_clickclose); + this.flowPanel4.Location = new System.Drawing.Point(3, 349); + this.flowPanel4.Name = "flowPanel4"; + this.flowPanel4.Size = new System.Drawing.Size(694, 38); + this.flowPanel4.TabIndex = 49; + this.flowPanel4.Text = "flowPanel4"; + // + // button_clickclose + // + this.button_clickclose.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button_clickclose.Location = new System.Drawing.Point(3, 3); + this.button_clickclose.Name = "button_clickclose"; + this.button_clickclose.Size = new System.Drawing.Size(80, 32); + this.button_clickclose.TabIndex = 6; + this.button_clickclose.Text = "点击无法关闭"; + this.button_clickclose.Type = AntdUI.TTypeMini.Info; + this.button_clickclose.WaveSize = 0; // // MessageDemo // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; this.Controls.Add(this.stackPanel1); this.Name = "MessageDemo"; - this.Size = new System.Drawing.Size(700, 360); + this.Size = new System.Drawing.Size(700, 411); this.stackPanel1.ResumeLayout(false); + this.flowPanel3.ResumeLayout(false); this.flowPanel1.ResumeLayout(false); this.flowPanel2.ResumeLayout(false); - this.flowPanel3.ResumeLayout(false); + this.flowPanel4.ResumeLayout(false); this.ResumeLayout(false); } @@ -375,5 +406,8 @@ private AntdUI.Button button_Top; private AntdUI.Button button_TL; private AntdUI.Label label5; + private AntdUI.FlowPanel flowPanel4; + private AntdUI.Button button_clickclose; + private AntdUI.Label label6; } } diff --git a/Views/MessageDemo.cs b/Views/MessageDemo.cs index 25b110c..1d3c101 100644 --- a/Views/MessageDemo.cs +++ b/Views/MessageDemo.cs @@ -34,6 +34,16 @@ namespace AntdUIDemo.Views button_TL.Click += Button_Align_Click; button_Top.Click += Button_Align_Click; button_TR.Click += Button_Align_Click; + + button_clickclose.Click += Button_clickclose_Click; + } + + private void Button_clickclose_Click(object sender, EventArgs e) + { + AntdUI.Message.open(new AntdUI.Message.Config(window, "Hello AntdUI Demo!", TType.Info) + { + ClickClose = false + }); } private void Button_Align_Click(object sender, EventArgs e) diff --git a/Views/NotificationDemo.Designer.cs b/Views/NotificationDemo.Designer.cs index d114d6e..1bfbaab 100644 --- a/Views/NotificationDemo.Designer.cs +++ b/Views/NotificationDemo.Designer.cs @@ -29,14 +29,12 @@ private void InitializeComponent() { this.stackPanel1 = new AntdUI.StackPanel(); - this.divider1 = new AntdUI.Divider(); - this.label2 = new AntdUI.Label(); - this.label1 = new AntdUI.Label(); - this.label4 = new AntdUI.Label(); - this.flowPanel1 = new AntdUI.FlowPanel(); - this.button_warn = new AntdUI.Button(); - this.button_error = new AntdUI.Button(); - this.button_success = new AntdUI.Button(); + this.flowPanel4 = new AntdUI.FlowPanel(); + this.button_link = new AntdUI.Button(); + this.label6 = new AntdUI.Label(); + this.flowPanel3 = new AntdUI.FlowPanel(); + this.button_close = new AntdUI.Button(); + this.label5 = new AntdUI.Label(); this.flowPanel2 = new AntdUI.FlowPanel(); this.button_BL = new AntdUI.Button(); this.button_Bottom = new AntdUI.Button(); @@ -45,18 +43,21 @@ this.button_Top = new AntdUI.Button(); this.button_TL = new AntdUI.Button(); this.label3 = new AntdUI.Label(); - this.label5 = new AntdUI.Label(); - this.flowPanel3 = new AntdUI.FlowPanel(); + this.flowPanel1 = new AntdUI.FlowPanel(); this.button_info = new AntdUI.Button(); - this.button_close = new AntdUI.Button(); - this.label6 = new AntdUI.Label(); - this.flowPanel4 = new AntdUI.FlowPanel(); - this.button_link = new AntdUI.Button(); + this.button_warn = new AntdUI.Button(); + this.button_error = new AntdUI.Button(); + this.button_success = new AntdUI.Button(); + this.label4 = new AntdUI.Label(); + this.divider1 = new AntdUI.Divider(); + this.label2 = new AntdUI.Label(); + this.label1 = new AntdUI.Label(); + this.button_clickclose = new AntdUI.Button(); this.stackPanel1.SuspendLayout(); - this.flowPanel1.SuspendLayout(); - this.flowPanel2.SuspendLayout(); - this.flowPanel3.SuspendLayout(); this.flowPanel4.SuspendLayout(); + this.flowPanel3.SuspendLayout(); + this.flowPanel2.SuspendLayout(); + this.flowPanel1.SuspendLayout(); this.SuspendLayout(); // // stackPanel1 @@ -80,84 +81,64 @@ this.stackPanel1.Text = "stackPanel1"; this.stackPanel1.Vertical = true; // - // divider1 + // flowPanel4 // - this.divider1.Location = new System.Drawing.Point(3, 79); - this.divider1.Name = "divider1"; - this.divider1.Size = new System.Drawing.Size(694, 12); - this.divider1.TabIndex = 28; + this.flowPanel4.Controls.Add(this.button_link); + this.flowPanel4.Location = new System.Drawing.Point(3, 349); + this.flowPanel4.Name = "flowPanel4"; + this.flowPanel4.Size = new System.Drawing.Size(694, 38); + this.flowPanel4.TabIndex = 49; + this.flowPanel4.Text = "flowPanel4"; // - // label2 + // button_link // - this.label2.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(3, 49); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(694, 24); - this.label2.TabIndex = 27; - this.label2.Text = "全局展示通知提醒信息。"; + this.button_link.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button_link.Location = new System.Drawing.Point(3, 3); + this.button_link.Name = "button_link"; + this.button_link.Size = new System.Drawing.Size(80, 32); + this.button_link.TabIndex = 6; + this.button_link.Text = "Link"; + this.button_link.Type = AntdUI.TTypeMini.Info; + this.button_link.WaveSize = 0; // - // label1 + // label6 // - this.label1.Font = new System.Drawing.Font("Microsoft YaHei UI", 26.25F, 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(694, 40); - this.label1.TabIndex = 26; - this.label1.Text = "Notification 通知提醒框"; + this.label6.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label6.Location = new System.Drawing.Point(3, 319); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(694, 24); + this.label6.TabIndex = 48; + this.label6.Text = "超链接"; // - // label4 + // flowPanel3 // - this.label4.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(3, 97); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(694, 24); - this.label4.TabIndex = 42; - this.label4.Text = "基本用法"; + this.flowPanel3.Controls.Add(this.button_clickclose); + this.flowPanel3.Controls.Add(this.button_close); + this.flowPanel3.Location = new System.Drawing.Point(3, 275); + this.flowPanel3.Name = "flowPanel3"; + this.flowPanel3.Size = new System.Drawing.Size(694, 38); + this.flowPanel3.TabIndex = 47; + this.flowPanel3.Text = "flowPanel3"; // - // flowPanel1 + // button_close // - this.flowPanel1.Controls.Add(this.button_info); - this.flowPanel1.Controls.Add(this.button_warn); - this.flowPanel1.Controls.Add(this.button_error); - this.flowPanel1.Controls.Add(this.button_success); - this.flowPanel1.Location = new System.Drawing.Point(3, 127); - this.flowPanel1.Name = "flowPanel1"; - this.flowPanel1.Size = new System.Drawing.Size(694, 38); - this.flowPanel1.TabIndex = 43; - this.flowPanel1.Text = "flowPanel1"; + this.button_close.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button_close.Location = new System.Drawing.Point(3, 3); + this.button_close.Name = "button_close"; + this.button_close.Size = new System.Drawing.Size(80, 32); + this.button_close.TabIndex = 6; + this.button_close.Text = "无关闭图标"; + this.button_close.Type = AntdUI.TTypeMini.Info; + this.button_close.WaveSize = 0; // - // button_warn + // label5 // - this.button_warn.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button_warn.Location = new System.Drawing.Point(175, 3); - this.button_warn.Name = "button_warn"; - this.button_warn.Size = new System.Drawing.Size(80, 32); - this.button_warn.TabIndex = 4; - this.button_warn.Text = "Warn"; - this.button_warn.Type = AntdUI.TTypeMini.Warn; - this.button_warn.WaveSize = 0; - // - // button_error - // - this.button_error.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button_error.Location = new System.Drawing.Point(89, 3); - this.button_error.Name = "button_error"; - this.button_error.Size = new System.Drawing.Size(80, 32); - this.button_error.TabIndex = 3; - this.button_error.Text = "Error"; - this.button_error.Type = AntdUI.TTypeMini.Error; - this.button_error.WaveSize = 0; - // - // button_success - // - this.button_success.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button_success.Location = new System.Drawing.Point(3, 3); - this.button_success.Name = "button_success"; - this.button_success.Size = new System.Drawing.Size(80, 32); - this.button_success.TabIndex = 2; - this.button_success.Text = "Success"; - this.button_success.Type = AntdUI.TTypeMini.Success; - this.button_success.WaveSize = 0; + this.label5.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label5.Location = new System.Drawing.Point(3, 245); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(694, 24); + this.label5.TabIndex = 46; + this.label5.Text = "关闭"; // // flowPanel2 // @@ -248,23 +229,17 @@ this.label3.TabIndex = 44; this.label3.Text = "弹出位置"; // - // label5 + // flowPanel1 // - this.label5.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label5.Location = new System.Drawing.Point(3, 245); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(694, 24); - this.label5.TabIndex = 46; - this.label5.Text = "取消关闭图标"; - // - // flowPanel3 - // - this.flowPanel3.Controls.Add(this.button_close); - this.flowPanel3.Location = new System.Drawing.Point(3, 275); - this.flowPanel3.Name = "flowPanel3"; - this.flowPanel3.Size = new System.Drawing.Size(694, 38); - this.flowPanel3.TabIndex = 47; - this.flowPanel3.Text = "flowPanel3"; + this.flowPanel1.Controls.Add(this.button_info); + this.flowPanel1.Controls.Add(this.button_warn); + this.flowPanel1.Controls.Add(this.button_error); + this.flowPanel1.Controls.Add(this.button_success); + this.flowPanel1.Location = new System.Drawing.Point(3, 127); + this.flowPanel1.Name = "flowPanel1"; + this.flowPanel1.Size = new System.Drawing.Size(694, 38); + this.flowPanel1.TabIndex = 43; + this.flowPanel1.Text = "flowPanel1"; // // button_info // @@ -277,45 +252,83 @@ this.button_info.Type = AntdUI.TTypeMini.Info; this.button_info.WaveSize = 0; // - // button_close + // button_warn // - this.button_close.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button_close.Location = new System.Drawing.Point(3, 3); - this.button_close.Name = "button_close"; - this.button_close.Size = new System.Drawing.Size(80, 32); - this.button_close.TabIndex = 6; - this.button_close.Text = "Icon"; - this.button_close.Type = AntdUI.TTypeMini.Info; - this.button_close.WaveSize = 0; + this.button_warn.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button_warn.Location = new System.Drawing.Point(175, 3); + this.button_warn.Name = "button_warn"; + this.button_warn.Size = new System.Drawing.Size(80, 32); + this.button_warn.TabIndex = 4; + this.button_warn.Text = "Warn"; + this.button_warn.Type = AntdUI.TTypeMini.Warn; + this.button_warn.WaveSize = 0; // - // label6 + // button_error // - this.label6.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label6.Location = new System.Drawing.Point(3, 319); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(694, 24); - this.label6.TabIndex = 48; - this.label6.Text = "超链接"; + this.button_error.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button_error.Location = new System.Drawing.Point(89, 3); + this.button_error.Name = "button_error"; + this.button_error.Size = new System.Drawing.Size(80, 32); + this.button_error.TabIndex = 3; + this.button_error.Text = "Error"; + this.button_error.Type = AntdUI.TTypeMini.Error; + this.button_error.WaveSize = 0; // - // flowPanel4 + // button_success // - this.flowPanel4.Controls.Add(this.button_link); - this.flowPanel4.Location = new System.Drawing.Point(3, 349); - this.flowPanel4.Name = "flowPanel4"; - this.flowPanel4.Size = new System.Drawing.Size(694, 38); - this.flowPanel4.TabIndex = 49; - this.flowPanel4.Text = "flowPanel4"; + this.button_success.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button_success.Location = new System.Drawing.Point(3, 3); + this.button_success.Name = "button_success"; + this.button_success.Size = new System.Drawing.Size(80, 32); + this.button_success.TabIndex = 2; + this.button_success.Text = "Success"; + this.button_success.Type = AntdUI.TTypeMini.Success; + this.button_success.WaveSize = 0; // - // button_link + // label4 // - this.button_link.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button_link.Location = new System.Drawing.Point(3, 3); - this.button_link.Name = "button_link"; - this.button_link.Size = new System.Drawing.Size(80, 32); - this.button_link.TabIndex = 6; - this.button_link.Text = "Link"; - this.button_link.Type = AntdUI.TTypeMini.Info; - this.button_link.WaveSize = 0; + this.label4.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label4.Location = new System.Drawing.Point(3, 97); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(694, 24); + this.label4.TabIndex = 42; + this.label4.Text = "基本用法"; + // + // divider1 + // + this.divider1.Location = new System.Drawing.Point(3, 79); + this.divider1.Name = "divider1"; + this.divider1.Size = new System.Drawing.Size(694, 12); + this.divider1.TabIndex = 28; + // + // label2 + // + this.label2.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label2.Location = new System.Drawing.Point(3, 49); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(694, 24); + this.label2.TabIndex = 27; + this.label2.Text = "全局展示通知提醒信息。"; + // + // label1 + // + this.label1.Font = new System.Drawing.Font("Microsoft YaHei UI", 26.25F, 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(694, 40); + this.label1.TabIndex = 26; + this.label1.Text = "Notification 通知提醒框"; + // + // button_clickclose + // + this.button_clickclose.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button_clickclose.Location = new System.Drawing.Point(89, 3); + this.button_clickclose.Name = "button_clickclose"; + this.button_clickclose.Size = new System.Drawing.Size(80, 32); + this.button_clickclose.TabIndex = 7; + this.button_clickclose.Text = "点击无法关闭"; + this.button_clickclose.Type = AntdUI.TTypeMini.Info; + this.button_clickclose.WaveSize = 0; // // NotificationDemo // @@ -324,10 +337,10 @@ this.Name = "NotificationDemo"; this.Size = new System.Drawing.Size(700, 505); this.stackPanel1.ResumeLayout(false); - this.flowPanel1.ResumeLayout(false); - this.flowPanel2.ResumeLayout(false); - this.flowPanel3.ResumeLayout(false); this.flowPanel4.ResumeLayout(false); + this.flowPanel3.ResumeLayout(false); + this.flowPanel2.ResumeLayout(false); + this.flowPanel1.ResumeLayout(false); this.ResumeLayout(false); } @@ -358,5 +371,6 @@ private AntdUI.Label label6; private AntdUI.FlowPanel flowPanel4; private AntdUI.Button button_link; + private AntdUI.Button button_clickclose; } } diff --git a/Views/NotificationDemo.cs b/Views/NotificationDemo.cs index 4cba171..60af2b9 100644 --- a/Views/NotificationDemo.cs +++ b/Views/NotificationDemo.cs @@ -30,20 +30,31 @@ namespace AntdUIDemo.Views button_warn.Click += Button_warn_Click; button_close.Click += Button_close_Click; + button_clickclose.Click += Button_clickclose_Click; button_link.Click += Button_link_Click; } + private void Button_clickclose_Click(object sender, EventArgs e) + { + Notification.open(new Notification.Config(window, "Notification", "This is the content of the notification. This is the content of the notification. This is the content of the notification.", TType.Info, TAlignFrom.TR) + { + ClickClose = false, + CloseIcon = false + }); + } + private void Button_link_Click(object sender, EventArgs e) { AntdUI.Notification.open(new AntdUI.Notification.Config(window, "Notification Title", "This is the content of the notification. This is the content of the notification. This is the content of the notification.", TType.Info, TAlignFrom.TR) { Padding = new Size(24, 20), CloseIcon = false, - Link = new Notification.ConfigLink("Link to...", new Action(() => + Link = new Notification.ConfigLink("Link to...", () => { AntdUI.Message.info(window, "Welcome!"); - })) + return true; + }) }); } diff --git a/assets/screenshots/Message.png b/assets/screenshots/Message.png index 9de619f..d03f4be 100644 Binary files a/assets/screenshots/Message.png and b/assets/screenshots/Message.png differ diff --git a/assets/screenshots/Notification.png b/assets/screenshots/Notification.png index 093afbf..996d522 100644 Binary files a/assets/screenshots/Notification.png and b/assets/screenshots/Notification.png differ