diff --git a/AntdUIDemo.csproj b/AntdUIDemo.csproj index ef51d44..d03867f 100644 --- a/AntdUIDemo.csproj +++ b/AntdUIDemo.csproj @@ -30,7 +30,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Languages/Localizer_en-US.cs b/Languages/Localizer_en-US.cs index 630f85d..0914fda 100644 --- a/Languages/Localizer_en-US.cs +++ b/Languages/Localizer_en-US.cs @@ -68,6 +68,8 @@ namespace AntdUIDemo.Languages return "Gradient"; case "toggle": return "Toggle"; + case "animate": + return "Animate"; #endregion #region FloatButton diff --git a/MainWindow.Designer.cs b/MainWindow.Designer.cs index 5c53f33..7ca75e0 100644 --- a/MainWindow.Designer.cs +++ b/MainWindow.Designer.cs @@ -63,7 +63,7 @@ this.titlebar.Size = new System.Drawing.Size(1024, 40); this.titlebar.SubText = "Demo"; this.titlebar.TabIndex = 0; - this.titlebar.Text = "AntdUI 1.9.11"; + this.titlebar.Text = "AntdUI 1.9.12"; // // input_search // diff --git a/Program.cs b/Program.cs index d3f91d0..406bef1 100644 --- a/Program.cs +++ b/Program.cs @@ -18,7 +18,7 @@ namespace AntdUIDemo AntdUI.Localization.DefaultLanguage = "zh-CN"; //若文字不清晰,切换其他渲染方式 AntdUI.Config.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAliasGridFit; - AntdUI.Config.SetCorrectionTextRendering("Microsoft YaHei UI"); + AntdUI.Config.TextRenderingHighQuality = true; Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); diff --git a/README-en.md b/README-en.md index 5c1f195..6b90149 100644 --- a/README-en.md +++ b/README-en.md @@ -4,7 +4,7 @@

AntdUI Demo

-This project is developed based on `Winform .NET Framework 4.8`, and is a demo project of [AntdUI](https://gitee.com/antdui/AntdUI), the current version is `1.9.11` +This project is developed based on `Winform .NET Framework 4.8`, and is a demo project of [AntdUI](https://gitee.com/antdui/AntdUI), the current version is `1.9.12` diff --git a/README.md b/README.md index b04d947..87d87ac 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.9.11` +本项目基于 `Winform .NET Framework 4.8` 开发,是 [AntdUI](https://gitee.com/antdui/AntdUI) 的 Demo 项目,当前版本 `1.9.12` diff --git a/Views/ButtonDemo.Designer.cs b/Views/ButtonDemo.Designer.cs index c8a2af7..1274530 100644 --- a/Views/ButtonDemo.Designer.cs +++ b/Views/ButtonDemo.Designer.cs @@ -105,6 +105,9 @@ this.button2 = new AntdUI.Button(); this.button1 = new AntdUI.Button(); this.label3 = new AntdUI.Label(); + this.label1 = new AntdUI.Label(); + this.flowPanel11 = new AntdUI.FlowPanel(); + this.button_animate = new AntdUI.Button(); this.stackPanel1.SuspendLayout(); this.flowPanel8.SuspendLayout(); this.flowPanel7.SuspendLayout(); @@ -118,6 +121,7 @@ this.flowPanel10.SuspendLayout(); this.flowPanel9.SuspendLayout(); this.flowPanel1.SuspendLayout(); + this.flowPanel11.SuspendLayout(); this.SuspendLayout(); // // header1 @@ -139,6 +143,8 @@ // stackPanel1 // this.stackPanel1.AutoScroll = true; + this.stackPanel1.Controls.Add(this.flowPanel11); + this.stackPanel1.Controls.Add(this.label1); this.stackPanel1.Controls.Add(this.flowPanel8); this.stackPanel1.Controls.Add(this.label10); this.stackPanel1.Controls.Add(this.flowPanel7); @@ -162,7 +168,7 @@ this.stackPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.stackPanel1.Location = new System.Drawing.Point(0, 74); this.stackPanel1.Name = "stackPanel1"; - this.stackPanel1.Size = new System.Drawing.Size(750, 840); + this.stackPanel1.Size = new System.Drawing.Size(750, 907); this.stackPanel1.TabIndex = 1; this.stackPanel1.Text = "stackPanel1"; this.stackPanel1.Vertical = true; @@ -1064,12 +1070,40 @@ this.label3.TabIndex = 5; this.label3.Text = "按钮类型"; // + // label1 + // + this.label1.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label1.LocalizationText = "animate"; + this.label1.Location = new System.Drawing.Point(3, 791); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(744, 24); + this.label1.TabIndex = 53; + this.label1.Text = "动画按钮"; + // + // flowPanel11 + // + this.flowPanel11.Controls.Add(this.button_animate); + this.flowPanel11.Location = new System.Drawing.Point(3, 821); + this.flowPanel11.Name = "flowPanel11"; + this.flowPanel11.Size = new System.Drawing.Size(744, 44); + this.flowPanel11.TabIndex = 54; + this.flowPanel11.Text = "flowPanel11"; + // + // button_animate + // + this.button_animate.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button_animate.Location = new System.Drawing.Point(3, 3); + this.button_animate.Name = "button_animate"; + this.button_animate.Size = new System.Drawing.Size(80, 38); + this.button_animate.TabIndex = 1; + this.button_animate.Type = AntdUI.TTypeMini.Primary; + // // ButtonDemo // this.Controls.Add(this.stackPanel1); this.Controls.Add(this.header1); this.Name = "ButtonDemo"; - this.Size = new System.Drawing.Size(750, 914); + this.Size = new System.Drawing.Size(750, 981); this.stackPanel1.ResumeLayout(false); this.flowPanel8.ResumeLayout(false); this.flowPanel7.ResumeLayout(false); @@ -1083,6 +1117,7 @@ this.flowPanel10.ResumeLayout(false); this.flowPanel9.ResumeLayout(false); this.flowPanel1.ResumeLayout(false); + this.flowPanel11.ResumeLayout(false); this.ResumeLayout(false); } @@ -1165,5 +1200,8 @@ private AntdUI.Button button49; private AntdUI.Button button48; private AntdUI.Button button_toggle3; + private AntdUI.Label label1; + private AntdUI.FlowPanel flowPanel11; + private AntdUI.Button button_animate; } } diff --git a/Views/ButtonDemo.cs b/Views/ButtonDemo.cs index 3701b3b..82d73f0 100644 --- a/Views/ButtonDemo.cs +++ b/Views/ButtonDemo.cs @@ -24,6 +24,20 @@ namespace AntdUIDemo.Views button_toggle.Click += Button_toggle_Click; button_toggle2.Click += Button_toggle_Click; button_toggle3.Click += Button_toggle_Click; + button_animate.Click += Button_animate_Click; + } + + private void Button_animate_Click(object sender, EventArgs e) + { + if (button_animate.AnimationBlinkState) + { + button_animate.StopAnimationBlink(); + } + else + { + button_animate.AnimationBlinkTransition(500,10, AntdUI.AnimationType.Ease, Color.FromArgb(255, 0, 0), Color.FromArgb(0, 255, 0), Color.FromArgb(0, 0, 255)); + } + } private void Button_toggle_Click(object sender, EventArgs e) diff --git a/Views/SubView/Wellcome.cs b/Views/SubView/Wellcome.cs index 3921b47..71f632d 100644 --- a/Views/SubView/Wellcome.cs +++ b/Views/SubView/Wellcome.cs @@ -24,7 +24,7 @@ namespace AntdUIDemo.Views.SubView { config.Text = "LOADING..."; //耗时代码,处理数据 - Thread.Sleep(2000); + Thread.Sleep(1000); }, () => { //结束时执行的代码 diff --git a/Views/TableDemo.Designer.cs b/Views/TableDemo.Designer.cs index e4f0989..aadb9b5 100644 --- a/Views/TableDemo.Designer.cs +++ b/Views/TableDemo.Designer.cs @@ -79,7 +79,7 @@ // table_base // this.table_base.AutoSizeColumnsMode = AntdUI.ColumnsMode.Fill; - this.table_base.Dock = System.Windows.Forms.DockStyle.Top; + this.table_base.Dock = System.Windows.Forms.DockStyle.Fill; this.table_base.EmptyHeader = true; this.table_base.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.table_base.Gap = 8; @@ -87,7 +87,7 @@ this.table_base.MultipleRows = true; this.table_base.Name = "table_base"; this.table_base.ShowTip = false; - this.table_base.Size = new System.Drawing.Size(744, 417); + this.table_base.Size = new System.Drawing.Size(744, 459); this.table_base.TabIndex = 30; this.table_base.Text = "table1"; // diff --git a/Views/TableDemo.cs b/Views/TableDemo.cs index bd1a4c7..060a720 100644 --- a/Views/TableDemo.cs +++ b/Views/TableDemo.cs @@ -28,6 +28,11 @@ namespace AntdUIDemo.Views private void InitTableColumns() { table_base.Columns = new ColumnCollection() { + new Column("","序号"){ + Width = "50", + Render = (value,record,rowindex)=>{return (rowindex+1); }, + Fixed = true,//冻结列 + }, new ColumnCheck("Selected"){Fixed = true}, new Column("Name", "姓名", ColumnAlign.Center) { @@ -58,10 +63,7 @@ namespace AntdUIDemo.Views }, new Column("CellProgress", "进度条",ColumnAlign.Center), new Column("CellDivider", "分割线",ColumnAlign.Center), - new Column("CellLinks", "链接", ColumnAlign.Center) - { - Fixed = true,//冻结列 - }, + new Column("CellLinks", "链接", ColumnAlign.Center), }; //设置多表头 @@ -87,6 +89,20 @@ namespace AntdUIDemo.Views table_base.CellClick += Table_base_CellClick; table_base.CellButtonClick += Table_base_CellButtonClick; + table_base.CellPaint += Table_base_CellPaint; + } + + private void Table_base_CellPaint(object sender, TablePaintEventArgs e) + { + if (e.Index == 4 && e.RowIndex == 2) + { + e.g.Fill(Color.FromArgb(80, 0, 255, 0), e.Rect); + } + else if (e.Index == 4 && e.RowIndex == 6) + { + int size = (int)(14 * AntdUI.Config.Dpi); + e.g.FillPolygon(Brushes.Red, new Point[] { new Point(e.Rect.X, e.Rect.Y), new Point(e.Rect.X + size, e.Rect.Y), new Point(e.Rect.X, e.Rect.Y + size) }); + } } private void Checkbox_rowstyle_CheckedChanged(object sender, BoolEventArgs e) diff --git a/assets/screenshots/Table.png b/assets/screenshots/Table.png index 87477b0..34d60e4 100644 Binary files a/assets/screenshots/Table.png and b/assets/screenshots/Table.png differ