🦄 Beautiful AntdUI

This commit is contained in:
Tom
2025-05-14 15:26:49 +08:00
parent af22eba92e
commit 5c1619d07d
19 changed files with 814 additions and 225 deletions

View File

@@ -294,7 +294,7 @@ namespace Demo.Controls
//
button3.AutoSizeMode = AntdUI.TAutoSize.Auto;
button3.Badge = " ";
button3.BadgeAlign = AntdUI.TAlignFrom.TL;
button3.BadgeAlign = AntdUI.TAlign.TL;
button3.BadgeBack = Color.Green;
button3.BadgeSize = 0.8F;
button3.BadgeSvg = "CheckSquareFilled";

View File

@@ -191,7 +191,7 @@ namespace Demo.Controls
btng3.BackColor = Color.FromArgb(217, 217, 217);
btng3.BorderWidth = 2F;
btng3.Dock = DockStyle.Left;
btng3.JoinLeft = true;
btng3.JoinMode = AntdUI.TJoinMode.Right;
btng3.Location = new Point(264, 22);
btng3.Margin = new Padding(0);
btng3.Name = "btng3";
@@ -206,8 +206,7 @@ namespace Demo.Controls
btng2.BackColor = Color.FromArgb(217, 217, 217);
btng2.BorderWidth = 2F;
btng2.Dock = DockStyle.Left;
btng2.JoinLeft = true;
btng2.JoinRight = true;
btng2.JoinMode = AntdUI.TJoinMode.LR;
btng2.Location = new Point(143, 22);
btng2.Margin = new Padding(0);
btng2.Name = "btng2";
@@ -222,7 +221,7 @@ namespace Demo.Controls
btng1.BackColor = Color.FromArgb(217, 217, 217);
btng1.BorderWidth = 2F;
btng1.Dock = DockStyle.Left;
btng1.JoinRight = true;
btng1.JoinMode = AntdUI.TJoinMode.Left;
btng1.Location = new Point(22, 22);
btng1.Margin = new Padding(0);
btng1.Name = "btng1";
@@ -247,7 +246,7 @@ namespace Demo.Controls
button41.BackColor = Color.FromArgb(17, 24, 39);
button41.BackHover = Color.FromArgb(17, 24, 39);
button41.Dock = DockStyle.Fill;
button41.JoinLeft = true;
button41.JoinMode = AntdUI.TJoinMode.Right;
button41.Location = new Point(50, 0);
button41.Name = "button41";
button41.Radius = 4;
@@ -264,7 +263,7 @@ namespace Demo.Controls
button40.BackHover = Color.FromArgb(147, 51, 234);
button40.Dock = DockStyle.Left;
button40.IconSvg = "SearchOutlined";
button40.JoinRight = true;
button40.JoinMode = AntdUI.TJoinMode.Left;
button40.Location = new Point(0, 0);
button40.Name = "button40";
button40.Radius = 4;

View File

@@ -50,88 +50,69 @@ namespace Demo.Controls
private void InitializeComponent()
{
input1 = new AntdUI.Input();
input2 = new AntdUI.Input();
input3 = new AntdUI.Input();
input4 = new AntdUI.Input();
input5 = new AntdUI.Input();
input6 = new AntdUI.Input();
header1 = new AntdUI.PageHeader();
panel1 = new System.Windows.Forms.Panel();
panel3 = new System.Windows.Forms.Panel();
label1 = new AntdUI.Label();
tableLayoutPanel1 = new TableLayoutPanel();
ic4 = new AntdUI.Input();
ic3 = new AntdUI.Input();
ic2 = new AntdUI.Input();
ic1 = new AntdUI.Input();
panel5 = new AntdUI.Panel();
input8 = new AntdUI.Input();
input10 = new AntdUI.Input();
button1 = new AntdUI.Button();
panel6 = new System.Windows.Forms.Panel();
input9 = new AntdUI.Input();
input18 = new AntdUI.Input();
button2 = new AntdUI.Button();
panel4 = new AntdUI.Panel();
input7 = new AntdUI.Input();
input19 = new AntdUI.Input();
button3 = new AntdUI.Button();
divider6 = new AntdUI.Divider();
flowLayoutPanel5 = new FlowLayoutPanel();
input13 = new AntdUI.Input();
input14 = new AntdUI.Input();
divider5 = new AntdUI.Divider();
flowLayoutPanel4 = new FlowLayoutPanel();
input11 = new AntdUI.Input();
input12 = new AntdUI.Input();
divider4 = new AntdUI.Divider();
flowLayoutPanel3 = new FlowLayoutPanel();
input9 = new AntdUI.Input();
input17 = new AntdUI.Input();
input15 = new AntdUI.Input();
input16 = new AntdUI.Input();
divider3 = new AntdUI.Divider();
flowLayoutPanel2 = new FlowLayoutPanel();
input5 = new AntdUI.Input();
input6 = new AntdUI.Input();
input7 = new AntdUI.Input();
input8 = new AntdUI.Input();
divider2 = new AntdUI.Divider();
panel2 = new System.Windows.Forms.Panel();
flowLayoutPanel1 = new FlowLayoutPanel();
input2 = new AntdUI.Input();
input3 = new AntdUI.Input();
input4 = new AntdUI.Input();
divider1 = new AntdUI.Divider();
panel1.SuspendLayout();
panel3.SuspendLayout();
tableLayoutPanel1.SuspendLayout();
panel5.SuspendLayout();
panel6.SuspendLayout();
panel4.SuspendLayout();
panel2.SuspendLayout();
flowLayoutPanel5.SuspendLayout();
flowLayoutPanel4.SuspendLayout();
flowLayoutPanel3.SuspendLayout();
flowLayoutPanel2.SuspendLayout();
flowLayoutPanel1.SuspendLayout();
SuspendLayout();
//
// input1
//
input1.Location = new Point(18, 6);
input1.Location = new Point(3, 3);
input1.Name = "input1";
input1.Size = new Size(220, 44);
input1.Size = new Size(260, 44);
input1.TabIndex = 0;
input1.Text = "input1";
//
// input2
//
input2.Location = new Point(18, 54);
input2.Name = "input2";
input2.Size = new Size(220, 44);
input2.TabIndex = 2;
input2.Text = "input1";
//
// input3
//
input3.LocalizationPlaceholderText = "Input.{id}";
input3.Location = new Point(244, 6);
input3.Name = "input3";
input3.PlaceholderText = "请输入账号";
input3.Round = true;
input3.Size = new Size(220, 44);
input3.TabIndex = 1;
//
// input4
//
input4.Location = new Point(244, 54);
input4.Name = "input4";
input4.PasswordChar = '●';
input4.Round = true;
input4.Size = new Size(220, 44);
input4.TabIndex = 3;
input4.Text = "321";
//
// input5
//
input5.Location = new Point(18, 101);
input5.Name = "input5";
input5.PrefixSvg = "PoweroffOutlined";
input5.Radius = 10;
input5.Size = new Size(220, 44);
input5.TabIndex = 4;
input5.Text = "321";
//
// input6
//
input6.BorderWidth = 2F;
input6.Location = new Point(244, 102);
input6.Name = "input6";
input6.Size = new Size(220, 44);
input6.TabIndex = 5;
input6.Text = "input1";
//
// header1
//
@@ -152,8 +133,16 @@ namespace Demo.Controls
//
panel1.AutoScroll = true;
panel1.Controls.Add(panel3);
panel1.Controls.Add(divider6);
panel1.Controls.Add(flowLayoutPanel5);
panel1.Controls.Add(divider5);
panel1.Controls.Add(flowLayoutPanel4);
panel1.Controls.Add(divider4);
panel1.Controls.Add(flowLayoutPanel3);
panel1.Controls.Add(divider3);
panel1.Controls.Add(flowLayoutPanel2);
panel1.Controls.Add(divider2);
panel1.Controls.Add(panel2);
panel1.Controls.Add(flowLayoutPanel1);
panel1.Controls.Add(divider1);
panel1.Dock = DockStyle.Fill;
panel1.Location = new Point(0, 74);
@@ -163,18 +152,97 @@ namespace Demo.Controls
//
// panel3
//
panel3.Controls.Add(label1);
panel3.Controls.Add(tableLayoutPanel1);
panel3.Controls.Add(panel5);
panel3.Controls.Add(panel6);
panel3.Controls.Add(panel4);
panel3.Dock = DockStyle.Top;
panel3.Location = new Point(0, 218);
panel3.Location = new Point(0, 679);
panel3.Name = "panel3";
panel3.Size = new Size(555, 139);
panel3.TabIndex = 1;
panel3.Size = new Size(538, 148);
panel3.TabIndex = 12;
//
// label1
//
label1.AutoSizeMode = AntdUI.TAutoSize.Width;
label1.LocalizationText = "Input.Code";
label1.Location = new Point(262, 71);
label1.Name = "label1";
label1.Size = new Size(105, 23);
label1.TabIndex = 0;
label1.Text = "请输入验证码";
//
// tableLayoutPanel1
//
tableLayoutPanel1.ColumnCount = 4;
tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
tableLayoutPanel1.Controls.Add(ic4, 3, 0);
tableLayoutPanel1.Controls.Add(ic3, 2, 0);
tableLayoutPanel1.Controls.Add(ic2, 1, 0);
tableLayoutPanel1.Controls.Add(ic1, 0, 0);
tableLayoutPanel1.Location = new Point(253, 97);
tableLayoutPanel1.Name = "tableLayoutPanel1";
tableLayoutPanel1.RowCount = 1;
tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F));
tableLayoutPanel1.Size = new Size(232, 44);
tableLayoutPanel1.TabIndex = 3;
//
// ic4
//
ic4.Dock = DockStyle.Fill;
ic4.Location = new Point(180, 0);
ic4.Margin = new Padding(6, 0, 6, 0);
ic4.Name = "ic4";
ic4.Size = new Size(46, 44);
ic4.TabIndex = 4;
ic4.TextAlign = HorizontalAlignment.Center;
ic4.TextChanged += CodeTextChanged;
ic4.KeyPress += CodeKeyPress;
//
// ic3
//
ic3.Dock = DockStyle.Fill;
ic3.Location = new Point(122, 0);
ic3.Margin = new Padding(6, 0, 6, 0);
ic3.Name = "ic3";
ic3.Size = new Size(46, 44);
ic3.TabIndex = 3;
ic3.TextAlign = HorizontalAlignment.Center;
ic3.TextChanged += CodeTextChanged;
ic3.KeyPress += CodeKeyPress;
//
// ic2
//
ic2.Dock = DockStyle.Fill;
ic2.Location = new Point(64, 0);
ic2.Margin = new Padding(6, 0, 6, 0);
ic2.Name = "ic2";
ic2.Size = new Size(46, 44);
ic2.TabIndex = 2;
ic2.TextAlign = HorizontalAlignment.Center;
ic2.TextChanged += CodeTextChanged;
ic2.KeyPress += CodeKeyPress;
//
// ic1
//
ic1.Dock = DockStyle.Fill;
ic1.Location = new Point(6, 0);
ic1.Margin = new Padding(6, 0, 6, 0);
ic1.Name = "ic1";
ic1.Size = new Size(46, 44);
ic1.TabIndex = 1;
ic1.TextAlign = HorizontalAlignment.Center;
ic1.TextChanged += CodeTextChanged;
ic1.KeyPress += CodeKeyPress;
//
// panel5
//
panel5.Controls.Add(input8);
panel5.Controls.Add(input10);
panel5.Controls.Add(button1);
panel5.Location = new Point(253, 16);
panel5.Name = "panel5";
@@ -182,22 +250,22 @@ namespace Demo.Controls
panel5.TabIndex = 1;
panel5.Text = "panel4";
//
// input8
// input10
//
input8.Dock = DockStyle.Fill;
input8.JoinLeft = true;
input8.LocalizationPlaceholderText = "Input.{id}";
input8.Location = new Point(59, 0);
input8.Name = "input8";
input8.PlaceholderText = "输入点什么搜索";
input8.Size = new Size(161, 50);
input8.TabIndex = 0;
input10.Dock = DockStyle.Fill;
input10.JoinMode = AntdUI.TJoinMode.Right;
input10.LocalizationPlaceholderText = "Input.{id}";
input10.Location = new Point(59, 0);
input10.Name = "input10";
input10.PlaceholderText = "输入点什么搜索";
input10.Size = new Size(161, 50);
input10.TabIndex = 0;
//
// button1
//
button1.AutoSizeMode = AntdUI.TAutoSize.Width;
button1.Dock = DockStyle.Left;
button1.JoinRight = true;
button1.JoinMode = AntdUI.TJoinMode.Left;
button1.LocalizationText = "Input.Search";
button1.Location = new Point(0, 0);
button1.Name = "button1";
@@ -209,7 +277,7 @@ namespace Demo.Controls
//
// panel6
//
panel6.Controls.Add(input9);
panel6.Controls.Add(input18);
panel6.Controls.Add(button2);
panel6.Location = new Point(18, 76);
panel6.Name = "panel6";
@@ -217,22 +285,22 @@ namespace Demo.Controls
panel6.TabIndex = 2;
panel6.Text = "panel4";
//
// input9
// input18
//
input9.Dock = DockStyle.Fill;
input9.JoinRight = true;
input9.LocalizationPlaceholderText = "Input.{id}";
input9.Location = new Point(0, 0);
input9.Name = "input9";
input9.PlaceholderText = "输入点什么搜索";
input9.Size = new Size(170, 46);
input9.TabIndex = 0;
input18.Dock = DockStyle.Fill;
input18.JoinMode = AntdUI.TJoinMode.Left;
input18.LocalizationPlaceholderText = "Input.{id}";
input18.Location = new Point(0, 0);
input18.Name = "input18";
input18.PlaceholderText = "输入点什么搜索";
input18.Size = new Size(170, 46);
input18.TabIndex = 0;
//
// button2
//
button2.Dock = DockStyle.Right;
button2.IconSvg = "SearchOutlined";
button2.JoinLeft = true;
button2.JoinMode = AntdUI.TJoinMode.Right;
button2.Location = new Point(170, 0);
button2.Name = "button2";
button2.Size = new Size(50, 46);
@@ -242,7 +310,7 @@ namespace Demo.Controls
//
// panel4
//
panel4.Controls.Add(input7);
panel4.Controls.Add(input19);
panel4.Controls.Add(button3);
panel4.Location = new Point(18, 16);
panel4.Name = "panel4";
@@ -250,22 +318,22 @@ namespace Demo.Controls
panel4.TabIndex = 0;
panel4.Text = "panel4";
//
// input7
// input19
//
input7.Dock = DockStyle.Fill;
input7.JoinRight = true;
input7.LocalizationPlaceholderText = "Input.{id}";
input7.Location = new Point(0, 0);
input7.Name = "input7";
input7.PlaceholderText = "输入点什么搜索";
input7.Size = new Size(161, 50);
input7.TabIndex = 0;
input19.Dock = DockStyle.Fill;
input19.JoinMode = AntdUI.TJoinMode.Left;
input19.LocalizationPlaceholderText = "Input.{id}";
input19.Location = new Point(0, 0);
input19.Name = "input19";
input19.PlaceholderText = "输入点什么搜索";
input19.Size = new Size(161, 50);
input19.TabIndex = 0;
//
// button3
//
button3.AutoSizeMode = AntdUI.TAutoSize.Width;
button3.Dock = DockStyle.Right;
button3.JoinLeft = true;
button3.JoinMode = AntdUI.TJoinMode.Right;
button3.LocalizationText = "Input.Search";
button3.Location = new Point(161, 0);
button3.Name = "button3";
@@ -275,32 +343,287 @@ namespace Demo.Controls
button3.Type = AntdUI.TTypeMini.Primary;
button3.Click += Btn;
//
// divider6
//
divider6.Dock = DockStyle.Top;
divider6.Font = new Font("Microsoft YaHei UI", 10F);
divider6.LocalizationText = "Input.{id}";
divider6.Location = new Point(0, 651);
divider6.Name = "divider6";
divider6.Orientation = AntdUI.TOrientation.Left;
divider6.Size = new Size(538, 28);
divider6.TabIndex = 11;
divider6.TabStop = false;
divider6.Text = "组合";
//
// flowLayoutPanel5
//
flowLayoutPanel5.Controls.Add(input13);
flowLayoutPanel5.Controls.Add(input14);
flowLayoutPanel5.Dock = DockStyle.Top;
flowLayoutPanel5.Location = new Point(0, 592);
flowLayoutPanel5.Name = "flowLayoutPanel5";
flowLayoutPanel5.Size = new Size(538, 59);
flowLayoutPanel5.TabIndex = 10;
//
// input13
//
input13.LocalizationPlaceholderText = "Input.{id}";
input13.Location = new Point(3, 3);
input13.Name = "input13";
input13.PlaceholderText = "请输入密码";
input13.Size = new Size(260, 44);
input13.TabIndex = 1;
input13.UseSystemPasswordChar = true;
//
// input14
//
input14.AllowClear = true;
input14.LocalizationPlaceholderText = "Input.{id}";
input14.Location = new Point(269, 3);
input14.Name = "input14";
input14.PlaceholderText = "清除按钮";
input14.Size = new Size(260, 44);
input14.TabIndex = 0;
input14.UseSystemPasswordChar = true;
//
// divider5
//
divider5.Dock = DockStyle.Top;
divider5.Font = new Font("Microsoft YaHei UI", 10F);
divider5.LocalizationText = "Input.{id}";
divider5.Location = new Point(0, 564);
divider5.Name = "divider5";
divider5.Orientation = AntdUI.TOrientation.Left;
divider5.Size = new Size(538, 28);
divider5.TabIndex = 9;
divider5.TabStop = false;
divider5.Text = "密码框";
//
// flowLayoutPanel4
//
flowLayoutPanel4.Controls.Add(input11);
flowLayoutPanel4.Controls.Add(input12);
flowLayoutPanel4.Dock = DockStyle.Top;
flowLayoutPanel4.Location = new Point(0, 425);
flowLayoutPanel4.Name = "flowLayoutPanel4";
flowLayoutPanel4.Size = new Size(538, 139);
flowLayoutPanel4.TabIndex = 8;
//
// input11
//
input11.Location = new Point(3, 3);
input11.Multiline = true;
input11.Name = "input11";
input11.Size = new Size(260, 130);
input11.TabIndex = 1;
//
// input12
//
input12.AutoScroll = true;
input12.Location = new Point(269, 3);
input12.Multiline = true;
input12.Name = "input12";
input12.Size = new Size(260, 130);
input12.TabIndex = 0;
//
// divider4
//
divider4.Dock = DockStyle.Top;
divider4.Font = new Font("Microsoft YaHei UI", 10F);
divider4.LocalizationText = "Input.{id}";
divider4.Location = new Point(0, 397);
divider4.Name = "divider4";
divider4.Orientation = AntdUI.TOrientation.Left;
divider4.Size = new Size(538, 28);
divider4.TabIndex = 7;
divider4.TabStop = false;
divider4.Text = "多行文本";
//
// flowLayoutPanel3
//
flowLayoutPanel3.Controls.Add(input9);
flowLayoutPanel3.Controls.Add(input17);
flowLayoutPanel3.Controls.Add(input15);
flowLayoutPanel3.Controls.Add(input16);
flowLayoutPanel3.Dock = DockStyle.Top;
flowLayoutPanel3.Location = new Point(0, 294);
flowLayoutPanel3.Name = "flowLayoutPanel3";
flowLayoutPanel3.Size = new Size(538, 103);
flowLayoutPanel3.TabIndex = 6;
//
// input9
//
input9.AllowClear = true;
input9.BackColor = Color.Transparent;
input9.Location = new Point(3, 3);
input9.Name = "input9";
input9.PlaceholderText = "Underlined";
input9.Radius = 0;
input9.Size = new Size(260, 36);
input9.TabIndex = 1;
input9.Variant = AntdUI.TVariant.Underlined;
input9.WaveSize = 0;
//
// input17
//
input17.AllowClear = true;
input17.BackColor = Color.Transparent;
input17.BorderWidth = 0F;
input17.Location = new Point(269, 3);
input17.Name = "input17";
input17.PlaceholderText = "Borderless";
input17.Radius = 0;
input17.Size = new Size(260, 36);
input17.TabIndex = 1;
input17.WaveSize = 0;
//
// input15
//
input15.BackExtend = "-20deg, #e9defa, #fbfcdb";
input15.BorderWidth = 0F;
input15.Location = new Point(3, 45);
input15.Name = "input15";
input15.PlaceholderColorExtend = "120deg, #f093fb, #f5576c";
input15.PlaceholderText = "Filled";
input15.Size = new Size(260, 44);
input15.TabIndex = 2;
//
// input16
//
input16.BackExtend = "120deg, #f093fb, #f5576c";
input16.BorderWidth = 0F;
input16.Location = new Point(269, 45);
input16.Name = "input16";
input16.PlaceholderColorExtend = "#dfe9f3, #ffffff";
input16.PlaceholderText = "Filled";
input16.Size = new Size(260, 44);
input16.TabIndex = 3;
//
// divider3
//
divider3.Dock = DockStyle.Top;
divider3.Font = new Font("Microsoft YaHei UI", 10F);
divider3.LocalizationText = "Input.{id}";
divider3.Location = new Point(0, 266);
divider3.Name = "divider3";
divider3.Orientation = AntdUI.TOrientation.Left;
divider3.Size = new Size(538, 28);
divider3.TabIndex = 5;
divider3.TabStop = false;
divider3.Text = "形态变体";
//
// flowLayoutPanel2
//
flowLayoutPanel2.Controls.Add(input5);
flowLayoutPanel2.Controls.Add(input6);
flowLayoutPanel2.Controls.Add(input7);
flowLayoutPanel2.Controls.Add(input8);
flowLayoutPanel2.Dock = DockStyle.Top;
flowLayoutPanel2.Location = new Point(0, 163);
flowLayoutPanel2.Name = "flowLayoutPanel2";
flowLayoutPanel2.Size = new Size(538, 103);
flowLayoutPanel2.TabIndex = 4;
//
// input5
//
input5.LocalizationPlaceholderText = "Input.{id}";
input5.Location = new Point(3, 3);
input5.Name = "input5";
input5.PlaceholderText = "请输入";
input5.PrefixText = "https://";
input5.Size = new Size(260, 44);
input5.SuffixText = ".com";
input5.TabIndex = 0;
//
// input6
//
input6.Location = new Point(269, 3);
input6.Name = "input6";
input6.PrefixSvg = "SearchOutlined";
input6.Size = new Size(260, 44);
input6.TabIndex = 1;
//
// input7
//
input7.Location = new Point(3, 53);
input7.Name = "input7";
input7.PrefixSvg = "SearchOutlined";
input7.Size = new Size(260, 44);
input7.SuffixFore = Color.FromArgb(252, 136, 72);
input7.SuffixSvg = "TaobaoCircleFilled";
input7.TabIndex = 2;
//
// input8
//
input8.BorderActive = Color.Red;
input8.BorderColor = Color.FromArgb(255, 80, 0);
input8.BorderHover = Color.FromArgb(255, 120, 80);
input8.BorderWidth = 2F;
input8.LocalizationSuffixText = "Input.Tao";
input8.Location = new Point(269, 53);
input8.Name = "input8";
input8.PrefixFore = Color.FromArgb(255, 80, 0);
input8.PrefixSvg = "TaobaoCircleFilled";
input8.Size = new Size(260, 44);
input8.SuffixFore = Color.FromArgb(252, 136, 72);
input8.SuffixText = "淘,我喜欢";
input8.TabIndex = 3;
//
// divider2
//
divider2.Dock = DockStyle.Top;
divider2.Font = new Font("Microsoft YaHei UI", 10F);
divider2.LocalizationText = "Input.{id}";
divider2.Location = new Point(0, 190);
divider2.Location = new Point(0, 135);
divider2.Name = "divider2";
divider2.Orientation = AntdUI.TOrientation.Left;
divider2.Size = new Size(555, 28);
divider2.TabIndex = 1;
divider2.Size = new Size(538, 28);
divider2.TabIndex = 3;
divider2.TabStop = false;
divider2.Text = "组合";
divider2.Text = "前后缀";
//
// panel2
// flowLayoutPanel1
//
panel2.Controls.Add(input6);
panel2.Controls.Add(input5);
panel2.Controls.Add(input4);
panel2.Controls.Add(input2);
panel2.Controls.Add(input3);
panel2.Controls.Add(input1);
panel2.Dock = DockStyle.Top;
panel2.Location = new Point(0, 28);
panel2.Name = "panel2";
panel2.Size = new Size(555, 162);
panel2.TabIndex = 0;
flowLayoutPanel1.Controls.Add(input1);
flowLayoutPanel1.Controls.Add(input2);
flowLayoutPanel1.Controls.Add(input3);
flowLayoutPanel1.Controls.Add(input4);
flowLayoutPanel1.Dock = DockStyle.Top;
flowLayoutPanel1.Location = new Point(0, 28);
flowLayoutPanel1.Name = "flowLayoutPanel1";
flowLayoutPanel1.Size = new Size(538, 107);
flowLayoutPanel1.TabIndex = 2;
//
// input2
//
input2.AllowClear = true;
input2.LocalizationPlaceholderText = "Input.{id}";
input2.Location = new Point(269, 3);
input2.Name = "input2";
input2.PlaceholderText = "清除按钮";
input2.Size = new Size(260, 44);
input2.TabIndex = 1;
//
// input3
//
input3.LocalizationPlaceholderText = "Input.{id}";
input3.Location = new Point(3, 53);
input3.Name = "input3";
input3.PlaceholderText = "圆角边框";
input3.Round = true;
input3.Size = new Size(260, 44);
input3.TabIndex = 2;
//
// input4
//
input4.BorderWidth = 2F;
input4.LocalizationPlaceholderText = "Input.{id}";
input4.Location = new Point(269, 53);
input4.Name = "input4";
input4.PlaceholderText = "加粗边框";
input4.Size = new Size(260, 44);
input4.TabIndex = 3;
//
// divider1
//
@@ -310,7 +633,7 @@ namespace Demo.Controls
divider1.Location = new Point(0, 0);
divider1.Name = "divider1";
divider1.Orientation = AntdUI.TOrientation.Left;
divider1.Size = new Size(555, 28);
divider1.Size = new Size(538, 28);
divider1.TabIndex = 1;
divider1.TabStop = false;
divider1.Text = "常规";
@@ -324,37 +647,67 @@ namespace Demo.Controls
Size = new Size(555, 554);
panel1.ResumeLayout(false);
panel3.ResumeLayout(false);
panel3.PerformLayout();
tableLayoutPanel1.ResumeLayout(false);
panel5.ResumeLayout(false);
panel5.PerformLayout();
panel6.ResumeLayout(false);
panel4.ResumeLayout(false);
panel4.PerformLayout();
panel2.ResumeLayout(false);
flowLayoutPanel5.ResumeLayout(false);
flowLayoutPanel4.ResumeLayout(false);
flowLayoutPanel3.ResumeLayout(false);
flowLayoutPanel2.ResumeLayout(false);
flowLayoutPanel1.ResumeLayout(false);
ResumeLayout(false);
}
#endregion
private AntdUI.Input input1;
private AntdUI.Input input2;
private AntdUI.Input input3;
private AntdUI.Input input4;
private AntdUI.Input input5;
private AntdUI.Input input6;
private AntdUI.PageHeader header1;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel panel2;
private AntdUI.Divider divider1;
private AntdUI.Input input7;
private AntdUI.Input input6;
private AntdUI.Input input5;
private AntdUI.Input input4;
private AntdUI.Input input3;
private AntdUI.Input input2;
private AntdUI.Input input8;
private AntdUI.Input input9;
private AntdUI.Input input12;
private AntdUI.Input input11;
private AntdUI.Input input14;
private AntdUI.Input input13;
private FlowLayoutPanel flowLayoutPanel5;
private FlowLayoutPanel flowLayoutPanel4;
private FlowLayoutPanel flowLayoutPanel3;
private FlowLayoutPanel flowLayoutPanel2;
private FlowLayoutPanel flowLayoutPanel1;
private AntdUI.Divider divider5;
private AntdUI.Divider divider4;
private AntdUI.Divider divider3;
private AntdUI.Divider divider2;
private AntdUI.Input input15;
private AntdUI.Input input16;
private AntdUI.Input input17;
private AntdUI.Divider divider6;
private System.Windows.Forms.Panel panel3;
private AntdUI.Panel panel5;
private AntdUI.Input input8;
private AntdUI.Input input10;
private AntdUI.Button button1;
private System.Windows.Forms.Panel panel6;
private AntdUI.Input input9;
private AntdUI.Input input18;
private AntdUI.Button button2;
private AntdUI.Panel panel4;
private AntdUI.Input input7;
private AntdUI.Input input19;
private AntdUI.Button button3;
private TableLayoutPanel tableLayoutPanel1;
private AntdUI.Input ic4;
private AntdUI.Input ic3;
private AntdUI.Input ic2;
private AntdUI.Input ic1;
private AntdUI. Label label1;
}
}

View File

@@ -32,13 +32,48 @@ namespace Demo.Controls
private void Btn(object sender, EventArgs e)
{
AntdUI.Button btn = (AntdUI.Button)sender;
btn.Loading = true;
AntdUI.ITask.Run(() =>
if (sender is AntdUI.Button btn)
{
System.Threading.Thread.Sleep(2000);
btn.Loading = false;
});
btn.Loading = true;
AntdUI.ITask.Run(() =>
{
System.Threading.Thread.Sleep(2000);
btn.Loading = false;
});
}
}
private void CodeTextChanged(object sender, EventArgs e)
{
if (sender is AntdUI.Input input)
{
if (!string.IsNullOrWhiteSpace(input.Text))
{
var find = tableLayoutPanel1.Controls.Find("ic" + (input.TabIndex + 1), false);
if (find.Length == 1 && find[0] is AntdUI.Input input_next)
{
input_next.Text = "";
input_next.Focus();
}
}
else
{
}
}
}
private void CodeKeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == 8 && sender is AntdUI.Input input && input.Text.Length == 0)
{
//Back
var find = tableLayoutPanel1.Controls.Find("ic" + (input.TabIndex - 1), false);
if (find.Length == 1 && find[0] is AntdUI.Input input_next)
{
input_next.Text = "";
input_next.Focus();
}
}
}
}
}

View File

@@ -36,13 +36,13 @@ namespace Demo.Controls
{
if (e.Value)
{
menu2.Theme = AntdUI.TAMode.Dark;
menu2.ColorScheme = AntdUI.TAMode.Dark;
if (AntdUI.Config.IsDark) menu2.BackColor = BackColor;
else menu2.BackColor = Color.FromArgb(0, 21, 41);
}
else
{
menu2.Theme = AntdUI.TAMode.Light;
menu2.ColorScheme = AntdUI.TAMode.Light;
if (AntdUI.Config.IsDark) menu2.BackColor = Color.White;
else menu2.BackColor = BackColor;
}
@@ -53,13 +53,13 @@ namespace Demo.Controls
{
if (e.Value)
{
menu3.Theme = AntdUI.TAMode.Dark;
menu3.ColorScheme = AntdUI.TAMode.Dark;
if (AntdUI.Config.IsDark) menu3.BackColor = BackColor;
else menu3.BackColor = Color.FromArgb(0, 21, 41);
}
else
{
menu3.Theme = AntdUI.TAMode.Light;
menu3.ColorScheme = AntdUI.TAMode.Light;
if (AntdUI.Config.IsDark) menu3.BackColor = Color.White;
else menu3.BackColor = BackColor;
}

View File

@@ -180,7 +180,7 @@ namespace Demo.Controls
select7.AllowClear = true;
select7.Dock = DockStyle.Fill;
select7.Items.AddRange(new object[] { "Lucy", "Tom", "AduSkin", "WangLi", "HUAWEI", "XIAOMI" });
select7.JoinRight = true;
select7.JoinMode = AntdUI.TJoinMode.Left;
select7.LocalizationPlaceholderText = "Select.{id}";
select7.Location = new Point(0, 0);
select7.Name = "select7";
@@ -192,7 +192,7 @@ namespace Demo.Controls
//
button1.Dock = DockStyle.Right;
button1.IconSvg = "SearchOutlined";
button1.JoinLeft = true;
button1.JoinMode = AntdUI.TJoinMode.Right;
button1.Location = new Point(170, 0);
button1.Name = "button1";
button1.Size = new Size(50, 46);
@@ -214,7 +214,7 @@ namespace Demo.Controls
select6.AllowClear = true;
select6.Dock = DockStyle.Fill;
select6.Items.AddRange(new object[] { "Lucy", "Tom", "AduSkin", "WangLi", "HUAWEI", "XIAOMI" });
select6.JoinRight = true;
select6.JoinMode = AntdUI.TJoinMode.Left;
select6.LocalizationPlaceholderText = "Select.{id}";
select6.Location = new Point(0, 0);
select6.Name = "select6";
@@ -226,7 +226,7 @@ namespace Demo.Controls
//
button4.Dock = DockStyle.Right;
button4.IconSvg = "SearchOutlined";
button4.JoinLeft = true;
button4.JoinMode = AntdUI.TJoinMode.Right;
button4.Location = new Point(170, 0);
button4.Name = "button4";
button4.Size = new Size(50, 46);

View File

@@ -265,12 +265,33 @@ namespace Demo
case "Input.divider1":
return "Basic";
case "Input.divider2":
return "Pre / Post tab";
case "Input.divider3":
return "Variant";
case "Input.divider4":
return "Multiline";
case "Input.divider5":
return "Password";
case "Input.divider6":
return "Combination";
case "Input.Code":
return "Please enter verification code";
case "Input.Tao":
return "Tao, I like it";
case "Input.input2":
case "Input.input14":
return "Clear button";
case "Input.input3":
return "Enter your username";
case "Input.input7":
case "Input.input8":
case "Input.input9":
return "Round";
case "Input.input4":
return "Bold border";
case "Input.input5":
return "Please input something";
case "Input.input13":
return "Enter your password";
case "Input.input10":
case "Input.input18":
case "Input.input19":
return "input search text";
//InputNumber ----------------------------