From aac936b85af76941452ff44e4de62b3f6a709b84 Mon Sep 17 00:00:00 2001 From: Tom <17379620@qq.com> Date: Tue, 26 Nov 2024 15:17:04 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A6=84=20Beautiful=20AntdUI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- example/Demo/Controls/Button.Designer.cs | 6 - example/Demo/Controls/Checkbox.Designer.cs | 8 - example/Demo/Controls/Drawer.Designer.cs | 4 - example/Demo/Controls/Menu.Designer.cs | 47 --- example/Demo/Controls/Radio.Designer.cs | 8 - example/Demo/Controls/Switch.Designer.cs | 20 +- example/Demo/Controls/Switch.resx | 4 +- example/Demo/Controls/Table.Designer.cs | 137 +++----- example/Demo/Controls/Table.cs | 230 +++++--------- example/Demo/Controls/TableAOT.Designer.cs | 141 +++------ example/Demo/Controls/TableAOT.cs | 295 +++++++++--------- .../Demo/Controls/VirtualPanel.Designer.cs | 1 - example/Demo/Localizer.cs | 4 - example/Demo/Main.Designer.cs | 18 -- example/Demo/Overview.cs | Bin 51096 -> 52910 bytes example/Demo/Setting.Designer.cs | 4 - 16 files changed, 332 insertions(+), 595 deletions(-) diff --git a/example/Demo/Controls/Button.Designer.cs b/example/Demo/Controls/Button.Designer.cs index 97bc2e6b..1b3efe6f 100644 --- a/example/Demo/Controls/Button.Designer.cs +++ b/example/Demo/Controls/Button.Designer.cs @@ -288,7 +288,6 @@ namespace Demo.Controls // // switch6 // - switch6.AutoCheck = true; switch6.Checked = true; switch6.Dock = DockStyle.Right; switch6.Location = new Point(803, 0); @@ -446,7 +445,6 @@ namespace Demo.Controls // // switch5 // - switch5.AutoCheck = true; switch5.Checked = true; switch5.Dock = DockStyle.Right; switch5.Location = new Point(803, 0); @@ -580,7 +578,6 @@ namespace Demo.Controls // // switch4 // - switch4.AutoCheck = true; switch4.Checked = true; switch4.Dock = DockStyle.Right; switch4.Location = new Point(803, 0); @@ -680,7 +677,6 @@ namespace Demo.Controls // // switch3 // - switch3.AutoCheck = true; switch3.Checked = true; switch3.Dock = DockStyle.Right; switch3.Location = new Point(803, 0); @@ -811,7 +807,6 @@ namespace Demo.Controls // // switch2 // - switch2.AutoCheck = true; switch2.Checked = true; switch2.Dock = DockStyle.Right; switch2.Location = new Point(803, 0); @@ -905,7 +900,6 @@ namespace Demo.Controls // // switch1 // - switch1.AutoCheck = true; switch1.Checked = true; switch1.Dock = DockStyle.Right; switch1.Location = new Point(803, 0); diff --git a/example/Demo/Controls/Checkbox.Designer.cs b/example/Demo/Controls/Checkbox.Designer.cs index c9f6a69e..45ba80c7 100644 --- a/example/Demo/Controls/Checkbox.Designer.cs +++ b/example/Demo/Controls/Checkbox.Designer.cs @@ -105,7 +105,6 @@ namespace Demo.Controls // // checkbox8 // - checkbox8.AutoCheck = true; checkbox8.AutoSizeMode = AntdUI.TAutoSize.Width; checkbox8.Checked = true; checkbox8.Dock = DockStyle.Left; @@ -119,7 +118,6 @@ namespace Demo.Controls // // checkbox7 // - checkbox7.AutoCheck = true; checkbox7.AutoSizeMode = AntdUI.TAutoSize.Width; checkbox7.Dock = DockStyle.Left; checkbox7.Fill = Color.FromArgb(150, 0, 0); @@ -131,7 +129,6 @@ namespace Demo.Controls // // checkbox6 // - checkbox6.AutoCheck = true; checkbox6.AutoSizeMode = AntdUI.TAutoSize.Width; checkbox6.Dock = DockStyle.Left; checkbox6.Fill = Color.FromArgb(200, 0, 0); @@ -143,7 +140,6 @@ namespace Demo.Controls // // checkbox5 // - checkbox5.AutoCheck = true; checkbox5.AutoSizeMode = AntdUI.TAutoSize.Width; checkbox5.Dock = DockStyle.Left; checkbox5.Fill = Color.FromArgb(250, 0, 0); @@ -166,7 +162,6 @@ namespace Demo.Controls // // checkbox4 // - checkbox4.AutoCheck = true; checkbox4.AutoSizeMode = AntdUI.TAutoSize.Width; checkbox4.Dock = DockStyle.Left; checkbox4.Enabled = false; @@ -178,7 +173,6 @@ namespace Demo.Controls // // checkbox3 // - checkbox3.AutoCheck = true; checkbox3.AutoSizeMode = AntdUI.TAutoSize.Width; checkbox3.Dock = DockStyle.Left; checkbox3.Location = new Point(300, 0); @@ -189,7 +183,6 @@ namespace Demo.Controls // // checkbox2 // - checkbox2.AutoCheck = true; checkbox2.AutoSizeMode = AntdUI.TAutoSize.Width; checkbox2.Dock = DockStyle.Left; checkbox2.Location = new Point(150, 0); @@ -200,7 +193,6 @@ namespace Demo.Controls // // checkbox1 // - checkbox1.AutoCheck = true; checkbox1.AutoSizeMode = AntdUI.TAutoSize.Width; checkbox1.Dock = DockStyle.Left; checkbox1.Location = new Point(0, 0); diff --git a/example/Demo/Controls/Drawer.Designer.cs b/example/Demo/Controls/Drawer.Designer.cs index 5e1bf741..e19394f3 100644 --- a/example/Demo/Controls/Drawer.Designer.cs +++ b/example/Demo/Controls/Drawer.Designer.cs @@ -114,7 +114,6 @@ namespace Demo.Controls // // radio2 // - radio2.AutoCheck = true; radio2.AutoSizeMode = AntdUI.TAutoSize.Width; radio2.Checked = true; radio2.Dock = DockStyle.Left; @@ -126,7 +125,6 @@ namespace Demo.Controls // // radio4 // - radio4.AutoCheck = true; radio4.AutoSizeMode = AntdUI.TAutoSize.Width; radio4.Dock = DockStyle.Left; radio4.Location = new Point(184, 0); @@ -137,7 +135,6 @@ namespace Demo.Controls // // radio3 // - radio3.AutoCheck = true; radio3.AutoSizeMode = AntdUI.TAutoSize.Width; radio3.Dock = DockStyle.Left; radio3.Location = new Point(76, 0); @@ -148,7 +145,6 @@ namespace Demo.Controls // // radio1 // - radio1.AutoCheck = true; radio1.AutoSizeMode = AntdUI.TAutoSize.Width; radio1.Dock = DockStyle.Left; radio1.Location = new Point(0, 0); diff --git a/example/Demo/Controls/Menu.Designer.cs b/example/Demo/Controls/Menu.Designer.cs index f8ba6e31..b9897ec7 100644 --- a/example/Demo/Controls/Menu.Designer.cs +++ b/example/Demo/Controls/Menu.Designer.cs @@ -144,23 +144,16 @@ namespace Demo.Controls menu1.Font = new Font("Microsoft YaHei UI", 10F); menuItem1.IconSvg = "MailOutlined"; menuItem1.ID = "mail"; - menuItem1.PARENTITEM = null; menuItem1.Select = true; menuItem1.Text = "Navigation One"; menuItem2.IconSvg = "AppstoreOutlined"; menuItem2.ID = "app"; - menuItem2.PARENTITEM = null; menuItem2.Text = "Navigation Two"; menuItem3.IconSvg = "SettingOutlined"; menuItem3.ID = "SubMenu"; - menuItem3.PARENTITEM = null; - menuItem4.PARENTITEM = null; menuItem4.Text = "Option 1"; - menuItem5.PARENTITEM = null; menuItem5.Text = "Option 2"; - menuItem6.PARENTITEM = null; menuItem6.Text = "Option 3"; - menuItem7.PARENTITEM = null; menuItem7.Text = "Option 4"; menuItem3.Sub.Add(menuItem4); menuItem3.Sub.Add(menuItem5); @@ -194,20 +187,13 @@ namespace Demo.Controls // menu2.Dock = DockStyle.Left; menuItem8.IconSvg = "MailOutlined"; - menuItem8.PARENTITEM = null; - menuItem9.PARENTITEM = menuItem8; - menuItem10.PARENTITEM = menuItem9; menuItem10.Select = true; menuItem10.Text = "Option 1"; - menuItem11.PARENTITEM = menuItem9; menuItem11.Text = "Option 2"; menuItem9.Sub.Add(menuItem10); menuItem9.Sub.Add(menuItem11); menuItem9.Text = "Item 1"; - menuItem12.PARENTITEM = menuItem8; - menuItem13.PARENTITEM = menuItem12; menuItem13.Text = "Option 3"; - menuItem14.PARENTITEM = menuItem12; menuItem14.Text = "Option 4"; menuItem12.Sub.Add(menuItem13); menuItem12.Sub.Add(menuItem14); @@ -217,15 +203,9 @@ namespace Demo.Controls menuItem8.Text = "Navigation One"; menuItem15.Expand = false; menuItem15.IconSvg = "AppstoreOutlined"; - menuItem15.PARENTITEM = null; - menuItem16.PARENTITEM = menuItem15; menuItem16.Text = "Option 5"; - menuItem17.PARENTITEM = menuItem15; menuItem17.Text = "Option 6"; - menuItem18.PARENTITEM = menuItem15; - menuItem19.PARENTITEM = menuItem18; menuItem19.Text = "Option 7"; - menuItem20.PARENTITEM = menuItem18; menuItem20.Text = "Option 8"; menuItem18.Sub.Add(menuItem19); menuItem18.Sub.Add(menuItem20); @@ -236,14 +216,9 @@ namespace Demo.Controls menuItem15.Text = "Navigation Two"; menuItem21.Expand = false; menuItem21.IconSvg = "SettingOutlined"; - menuItem21.PARENTITEM = null; - menuItem22.PARENTITEM = menuItem21; menuItem22.Text = "Option 9"; - menuItem23.PARENTITEM = menuItem21; menuItem23.Text = "Option 10"; - menuItem24.PARENTITEM = menuItem21; menuItem24.Text = "Option 11"; - menuItem25.PARENTITEM = menuItem21; menuItem25.Text = "Option 12"; menuItem21.Sub.Add(menuItem22); menuItem21.Sub.Add(menuItem23); @@ -291,7 +266,6 @@ namespace Demo.Controls // // switch4 // - switch4.AutoCheck = true; switch4.CheckedText = "折叠"; switch4.LocalizationCheckedText = "Menu.collapse"; switch4.LocalizationTextUnCheckedText = "Menu.expand"; @@ -306,19 +280,12 @@ namespace Demo.Controls // menu3.Dock = DockStyle.Left; menuItem26.IconSvg = "MailOutlined"; - menuItem26.PARENTITEM = null; - menuItem27.PARENTITEM = menuItem26; - menuItem28.PARENTITEM = menuItem27; menuItem28.Text = "Option 1"; - menuItem29.PARENTITEM = menuItem27; menuItem29.Text = "Option 2"; menuItem27.Sub.Add(menuItem28); menuItem27.Sub.Add(menuItem29); menuItem27.Text = "Item 1"; - menuItem30.PARENTITEM = menuItem26; - menuItem31.PARENTITEM = menuItem30; menuItem31.Text = "Option 3"; - menuItem32.PARENTITEM = menuItem30; menuItem32.Text = "Option 4"; menuItem30.Sub.Add(menuItem31); menuItem30.Sub.Add(menuItem32); @@ -328,15 +295,9 @@ namespace Demo.Controls menuItem26.Text = "Navigation One"; menuItem33.Expand = false; menuItem33.IconSvg = "AppstoreOutlined"; - menuItem33.PARENTITEM = null; - menuItem34.PARENTITEM = menuItem33; menuItem34.Text = "Option 5"; - menuItem35.PARENTITEM = menuItem33; menuItem35.Text = "Option 6"; - menuItem36.PARENTITEM = menuItem33; - menuItem37.PARENTITEM = menuItem36; menuItem37.Text = "Option 7"; - menuItem38.PARENTITEM = menuItem36; menuItem38.Text = "Option 8"; menuItem36.Sub.Add(menuItem37); menuItem36.Sub.Add(menuItem38); @@ -347,14 +308,9 @@ namespace Demo.Controls menuItem33.Text = "Navigation Two"; menuItem39.Expand = false; menuItem39.IconSvg = "SettingOutlined"; - menuItem39.PARENTITEM = null; - menuItem40.PARENTITEM = menuItem39; menuItem40.Text = "Option 9"; - menuItem41.PARENTITEM = menuItem39; menuItem41.Text = "Option 10"; - menuItem42.PARENTITEM = menuItem39; menuItem42.Text = "Option 11"; - menuItem43.PARENTITEM = menuItem39; menuItem43.Text = "Option 12"; menuItem39.Sub.Add(menuItem40); menuItem39.Sub.Add(menuItem41); @@ -372,7 +328,6 @@ namespace Demo.Controls // // switch3 // - switch3.AutoCheck = true; switch3.CheckedText = "Dark"; switch3.Location = new Point(267, 13); switch3.Name = "switch3"; @@ -395,7 +350,6 @@ namespace Demo.Controls // // switch2 // - switch2.AutoCheck = true; switch2.CheckedText = "折叠"; switch2.LocalizationCheckedText = "Menu.collapse"; switch2.LocalizationTextUnCheckedText = "Menu.expand"; @@ -408,7 +362,6 @@ namespace Demo.Controls // // switch1 // - switch1.AutoCheck = true; switch1.CheckedText = "Dark"; switch1.Location = new Point(267, 13); switch1.Name = "switch1"; diff --git a/example/Demo/Controls/Radio.Designer.cs b/example/Demo/Controls/Radio.Designer.cs index fd3ae660..0ea5e3fb 100644 --- a/example/Demo/Controls/Radio.Designer.cs +++ b/example/Demo/Controls/Radio.Designer.cs @@ -105,7 +105,6 @@ namespace Demo.Controls // // radio8 // - radio8.AutoCheck = true; radio8.AutoSizeMode = AntdUI.TAutoSize.Width; radio8.Checked = true; radio8.Dock = DockStyle.Left; @@ -119,7 +118,6 @@ namespace Demo.Controls // // radio7 // - radio7.AutoCheck = true; radio7.AutoSizeMode = AntdUI.TAutoSize.Width; radio7.Dock = DockStyle.Left; radio7.Fill = Color.FromArgb(150, 0, 0); @@ -131,7 +129,6 @@ namespace Demo.Controls // // radio6 // - radio6.AutoCheck = true; radio6.AutoSizeMode = AntdUI.TAutoSize.Width; radio6.Dock = DockStyle.Left; radio6.Fill = Color.FromArgb(200, 0, 0); @@ -143,7 +140,6 @@ namespace Demo.Controls // // radio5 // - radio5.AutoCheck = true; radio5.AutoSizeMode = AntdUI.TAutoSize.Width; radio5.Dock = DockStyle.Left; radio5.Fill = Color.FromArgb(250, 0, 0); @@ -166,7 +162,6 @@ namespace Demo.Controls // // radio4 // - radio4.AutoCheck = true; radio4.AutoSizeMode = AntdUI.TAutoSize.Width; radio4.Dock = DockStyle.Left; radio4.Enabled = false; @@ -178,7 +173,6 @@ namespace Demo.Controls // // radio3 // - radio3.AutoCheck = true; radio3.AutoSizeMode = AntdUI.TAutoSize.Width; radio3.Dock = DockStyle.Left; radio3.Location = new Point(300, 0); @@ -189,7 +183,6 @@ namespace Demo.Controls // // radio2 // - radio2.AutoCheck = true; radio2.AutoSizeMode = AntdUI.TAutoSize.Width; radio2.Dock = DockStyle.Left; radio2.Location = new Point(150, 0); @@ -200,7 +193,6 @@ namespace Demo.Controls // // radio1 // - radio1.AutoCheck = true; radio1.AutoSizeMode = AntdUI.TAutoSize.Width; radio1.Dock = DockStyle.Left; radio1.Location = new Point(0, 0); diff --git a/example/Demo/Controls/Switch.Designer.cs b/example/Demo/Controls/Switch.Designer.cs index 0ddee016..045fe603 100644 --- a/example/Demo/Controls/Switch.Designer.cs +++ b/example/Demo/Controls/Switch.Designer.cs @@ -63,10 +63,10 @@ namespace Demo.Controls // header1 // header1.Description = "开关选择器。"; - header1.LocalizationDescription = "Switch.Description"; - header1.LocalizationText = "Switch.Text"; header1.Dock = DockStyle.Top; header1.Font = new Font("Microsoft YaHei UI", 12F); + header1.LocalizationDescription = "Switch.Description"; + header1.LocalizationText = "Switch.Text"; header1.Location = new Point(0, 0); header1.Name = "header1"; header1.Padding = new Padding(0, 0, 0, 10); @@ -77,7 +77,6 @@ namespace Demo.Controls // // switch8 // - switch8.AutoCheck = true; switch8.Enabled = false; switch8.Location = new Point(323, 167); switch8.Name = "switch8"; @@ -86,7 +85,6 @@ namespace Demo.Controls // // switch4 // - switch4.AutoCheck = true; switch4.CheckedText = "on"; switch4.Location = new Point(109, 167); switch4.Name = "switch4"; @@ -96,7 +94,6 @@ namespace Demo.Controls // // switch7 // - switch7.AutoCheck = true; switch7.Checked = true; switch7.Enabled = false; switch7.Location = new Point(231, 167); @@ -106,7 +103,6 @@ namespace Demo.Controls // // switch2 // - switch2.AutoCheck = true; switch2.Location = new Point(17, 167); switch2.Name = "switch2"; switch2.Size = new Size(60, 38); @@ -114,7 +110,6 @@ namespace Demo.Controls // // switch6 // - switch6.AutoCheck = true; switch6.Enabled = false; switch6.Location = new Point(323, 96); switch6.Name = "switch6"; @@ -123,7 +118,6 @@ namespace Demo.Controls // // switch3 // - switch3.AutoCheck = true; switch3.Checked = true; switch3.CheckedText = "开启"; switch3.Location = new Point(109, 96); @@ -134,7 +128,6 @@ namespace Demo.Controls // // switch5 // - switch5.AutoCheck = true; switch5.Checked = true; switch5.Enabled = false; switch5.Location = new Point(231, 96); @@ -144,7 +137,6 @@ namespace Demo.Controls // // switch1 // - switch1.AutoCheck = true; switch1.Checked = true; switch1.Location = new Point(17, 96); switch1.Name = "switch1"; @@ -154,12 +146,12 @@ namespace Demo.Controls // Switch // Controls.Add(switch8); - Controls.Add(switch4); - Controls.Add(switch7); - Controls.Add(switch2); Controls.Add(switch6); - Controls.Add(switch3); + Controls.Add(switch7); Controls.Add(switch5); + Controls.Add(switch4); + Controls.Add(switch3); + Controls.Add(switch2); Controls.Add(switch1); Controls.Add(header1); Font = new Font("Microsoft YaHei UI", 9F); diff --git a/example/Demo/Controls/Switch.resx b/example/Demo/Controls/Switch.resx index af32865e..8b2ff64a 100644 --- a/example/Demo/Controls/Switch.resx +++ b/example/Demo/Controls/Switch.resx @@ -1,7 +1,7 @@