diff --git a/MainWindow.cs b/MainWindow.cs index 80ec2dd..83bcda7 100644 --- a/MainWindow.cs +++ b/MainWindow.cs @@ -184,6 +184,9 @@ namespace AntdUIDemo case "Input": control = new InputDemo(); break; + case "InputNumber": + control = new InputNumberDemo(); + break; } if (control != null) { diff --git a/README.md b/README.md index c4eb947..49bd2c3 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ ``` 1. git clone 或者直接下载本项目 -2. 若电脑分辨率不是 1920×1080(1080P) 或者缩放不是 100% +2. 若电脑屏幕分辨率不是 1920×1080(1080P) 或者缩放不是 100% 使用 Visual Studio 在 100% 缩放模式下(使用 devenv /noScale 命令启动 Visual Studio)打开项目, 或者在项目窗口选择使用 100% 缩放比例重新启动 Visual Studio @@ -16,7 +16,7 @@ ``` ## ⚠️ 注意事项 - 电脑屏幕分辨率低于 1920×1080(1080P) 请使用大于等于 1080P 分辨率的屏幕开发 -- 电脑屏幕分辨率大于 1080P 或者缩放不是 100% 的,可选择以下任一方式运行项目 +- 电脑屏幕分辨率大于 1080P 或者缩放不是 100% 的,可选择以下 **任一方式** 运行项目 1. 按照上述 **快速开始** 的第二条打开项目,详细原因见 [解决 Visual Studio 中 Windows 窗体设计器的 HDPI/缩放问题](https://learn.microsoft.com/zh-cn/visualstudio/designers/disable-dpi-awareness?view=vs-2022) ,如下所示 ![vsstart](assets/screenshots/vsstart.png) 2. 直接打开项目,在窗口页面提示点击 **使用 100% 缩放比例重新启动 Visual Studio**,如下所示 diff --git a/Views/InputDemo.Designer.cs b/Views/InputDemo.Designer.cs index 01f43bd..2f71ff5 100644 --- a/Views/InputDemo.Designer.cs +++ b/Views/InputDemo.Designer.cs @@ -30,30 +30,14 @@ { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(InputDemo)); this.stackPanel1 = new AntdUI.StackPanel(); - this.flowPanel5 = new AntdUI.FlowPanel(); - this.input6 = new AntdUI.Input(); - this.input5 = new AntdUI.Input(); - this.label6 = new AntdUI.Label(); - this.flowPanel4 = new AntdUI.FlowPanel(); - this.input3 = new AntdUI.Input(); - this.label5 = new AntdUI.Label(); - this.flowPanel2 = new AntdUI.FlowPanel(); - this.input2 = new AntdUI.Input(); - this.input4 = new AntdUI.Input(); - this.label4 = new AntdUI.Label(); - this.flowPanel1 = new AntdUI.FlowPanel(); - this.input1 = new AntdUI.Input(); - this.label3 = new AntdUI.Label(); - this.divider1 = new AntdUI.Divider(); - this.label2 = new AntdUI.Label(); - this.label1 = new AntdUI.Label(); - this.label8 = new AntdUI.Label(); - this.flowPanel6 = new AntdUI.FlowPanel(); - this.input13 = new AntdUI.Input(); - this.input11 = new AntdUI.Input(); - this.input8 = new AntdUI.Input(); - this.input7 = new AntdUI.Input(); - this.input14 = new AntdUI.Input(); + this.flowPanel8 = new AntdUI.FlowPanel(); + this.input_status = new AntdUI.Input(); + this.input15 = new AntdUI.Input(); + this.input12 = new AntdUI.Input(); + this.label10 = new AntdUI.Label(); + this.flowPanel7 = new AntdUI.FlowPanel(); + this.input16 = new AntdUI.Input(); + this.label9 = new AntdUI.Label(); this.flowPanel3 = new AntdUI.FlowPanel(); this.panel1 = new AntdUI.Panel(); this.button_loading = new AntdUI.Button(); @@ -62,26 +46,42 @@ this.input9 = new AntdUI.Input(); this.button1 = new AntdUI.Button(); this.label7 = new AntdUI.Label(); - this.label9 = new AntdUI.Label(); - this.flowPanel7 = new AntdUI.FlowPanel(); - this.input16 = new AntdUI.Input(); + this.flowPanel6 = new AntdUI.FlowPanel(); + this.input11 = new AntdUI.Input(); + this.input13 = new AntdUI.Input(); + this.label8 = new AntdUI.Label(); + this.flowPanel5 = new AntdUI.FlowPanel(); + this.input6 = new AntdUI.Input(); + this.input5 = new AntdUI.Input(); + this.label6 = new AntdUI.Label(); + this.flowPanel4 = new AntdUI.FlowPanel(); + this.input14 = new AntdUI.Input(); + this.input3 = new AntdUI.Input(); + this.label5 = new AntdUI.Label(); + this.flowPanel2 = new AntdUI.FlowPanel(); + this.input2 = new AntdUI.Input(); + this.input4 = new AntdUI.Input(); + this.label4 = new AntdUI.Label(); + this.flowPanel1 = new AntdUI.FlowPanel(); + this.input7 = new AntdUI.Input(); + this.input8 = new AntdUI.Input(); + this.input1 = new AntdUI.Input(); + this.label3 = new AntdUI.Label(); + this.divider1 = new AntdUI.Divider(); + this.label2 = new AntdUI.Label(); + this.label1 = new AntdUI.Label(); this.tooltipComponent1 = new AntdUI.TooltipComponent(); - this.label10 = new AntdUI.Label(); - this.flowPanel8 = new AntdUI.FlowPanel(); - this.input12 = new AntdUI.Input(); - this.input15 = new AntdUI.Input(); - this.input_status = new AntdUI.Input(); this.stackPanel1.SuspendLayout(); + this.flowPanel8.SuspendLayout(); + this.flowPanel7.SuspendLayout(); + this.flowPanel3.SuspendLayout(); + this.panel1.SuspendLayout(); + this.panel3.SuspendLayout(); + this.flowPanel6.SuspendLayout(); this.flowPanel5.SuspendLayout(); this.flowPanel4.SuspendLayout(); this.flowPanel2.SuspendLayout(); this.flowPanel1.SuspendLayout(); - this.flowPanel6.SuspendLayout(); - this.flowPanel3.SuspendLayout(); - this.panel1.SuspendLayout(); - this.panel3.SuspendLayout(); - this.flowPanel7.SuspendLayout(); - this.flowPanel8.SuspendLayout(); this.SuspendLayout(); // // stackPanel1 @@ -113,261 +113,90 @@ this.stackPanel1.Text = "stackPanel1"; this.stackPanel1.Vertical = true; // - // flowPanel5 + // flowPanel8 // - this.flowPanel5.Controls.Add(this.input6); - this.flowPanel5.Controls.Add(this.input5); - this.flowPanel5.Location = new System.Drawing.Point(3, 387); - this.flowPanel5.Name = "flowPanel5"; - this.flowPanel5.Size = new System.Drawing.Size(694, 38); - this.flowPanel5.TabIndex = 16; - this.flowPanel5.Text = "flowPanel5"; + this.flowPanel8.Controls.Add(this.input_status); + this.flowPanel8.Controls.Add(this.input15); + this.flowPanel8.Controls.Add(this.input12); + this.flowPanel8.Location = new System.Drawing.Point(3, 683); + this.flowPanel8.Name = "flowPanel8"; + this.flowPanel8.Size = new System.Drawing.Size(694, 38); + this.flowPanel8.TabIndex = 26; + this.flowPanel8.Text = "flowPanel8"; // - // input6 + // input_status // - this.input6.Badge = ""; - this.input6.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.input6.Location = new System.Drawing.Point(209, 3); - this.input6.Name = "input6"; - this.input6.PasswordChar = '#'; - this.input6.PlaceholderText = "密码不可复制"; - this.input6.Size = new System.Drawing.Size(200, 32); - this.input6.TabIndex = 1; - this.input6.UseSystemPasswordChar = true; - this.input6.WaveSize = 0; + this.input_status.Badge = ""; + this.input_status.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.input_status.Location = new System.Drawing.Point(415, 3); + this.input_status.Name = "input_status"; + this.input_status.PlaceholderText = "输入英文字母,否则异常"; + this.input_status.Size = new System.Drawing.Size(200, 32); + this.input_status.TabIndex = 4; + this.input_status.WaveSize = 0; // - // input5 + // input15 // - this.input5.Badge = ""; - this.input5.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.input5.Location = new System.Drawing.Point(3, 3); - this.input5.Name = "input5"; - this.input5.PasswordChar = '*'; - this.input5.PasswordCopy = true; - this.input5.PlaceholderText = "输入密码"; - this.input5.Size = new System.Drawing.Size(200, 32); - this.input5.TabIndex = 0; - this.input5.WaveSize = 0; + this.input15.Badge = ""; + this.input15.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.input15.Location = new System.Drawing.Point(209, 3); + this.input15.Name = "input15"; + this.input15.PlaceholderText = "Warn"; + this.input15.Size = new System.Drawing.Size(200, 32); + this.input15.Status = AntdUI.TType.Warn; + this.input15.TabIndex = 3; + this.input15.WaveSize = 0; // - // label6 + // input12 // - 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, 357); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(694, 24); - this.label6.TabIndex = 15; - this.label6.Text = "密码框"; + this.input12.Badge = ""; + this.input12.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.input12.Location = new System.Drawing.Point(3, 3); + this.input12.Name = "input12"; + this.input12.PlaceholderText = "Success"; + this.input12.Size = new System.Drawing.Size(200, 32); + this.input12.Status = AntdUI.TType.Success; + this.input12.TabIndex = 1; + this.input12.WaveSize = 0; // - // flowPanel4 + // label10 // - this.flowPanel4.Controls.Add(this.input14); - this.flowPanel4.Controls.Add(this.input3); - this.flowPanel4.Location = new System.Drawing.Point(3, 275); - this.flowPanel4.Name = "flowPanel4"; - this.flowPanel4.Size = new System.Drawing.Size(694, 76); - this.flowPanel4.TabIndex = 14; - this.flowPanel4.Text = "flowPanel4"; + this.label10.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label10.Location = new System.Drawing.Point(3, 653); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(694, 24); + this.label10.TabIndex = 25; + this.label10.Text = "状态"; // - // input3 + // flowPanel7 // - this.input3.Badge = ""; - this.input3.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.input3.Location = new System.Drawing.Point(3, 3); - this.input3.Multiline = true; - this.input3.Name = "input3"; - this.input3.Size = new System.Drawing.Size(200, 70); - this.input3.TabIndex = 1; - this.input3.WaveSize = 0; + this.flowPanel7.Controls.Add(this.input16); + this.flowPanel7.Location = new System.Drawing.Point(3, 609); + this.flowPanel7.Name = "flowPanel7"; + this.flowPanel7.Size = new System.Drawing.Size(694, 38); + this.flowPanel7.TabIndex = 24; + this.flowPanel7.Text = "flowPanel7"; // - // label5 + // input16 // - 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 = 13; - this.label5.Text = "多行文本"; + this.input16.Badge = ""; + this.input16.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.input16.Location = new System.Drawing.Point(3, 3); + this.input16.Name = "input16"; + this.input16.PlaceholderText = "输入内容提示"; + this.input16.Size = new System.Drawing.Size(200, 32); + this.input16.TabIndex = 0; + this.tooltipComponent1.SetTip(this.input16, "随便输点什么"); + this.input16.WaveSize = 0; // - // flowPanel2 + // label9 // - this.flowPanel2.Controls.Add(this.input2); - this.flowPanel2.Controls.Add(this.input4); - this.flowPanel2.Location = new System.Drawing.Point(3, 201); - this.flowPanel2.Name = "flowPanel2"; - this.flowPanel2.Size = new System.Drawing.Size(694, 38); - this.flowPanel2.TabIndex = 11; - this.flowPanel2.Text = "flowPanel2"; - // - // input2 - // - this.input2.Badge = ""; - this.input2.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.input2.Location = new System.Drawing.Point(209, 3); - this.input2.Name = "input2"; - this.input2.PlaceholderText = "前后置图标"; - this.input2.PrefixSvg = resources.GetString("input2.PrefixSvg"); - this.input2.Size = new System.Drawing.Size(200, 32); - this.input2.SuffixSvg = resources.GetString("input2.SuffixSvg"); - this.input2.TabIndex = 6; - this.input2.WaveSize = 0; - // - // input4 - // - this.input4.Badge = ""; - this.input4.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.input4.Location = new System.Drawing.Point(3, 3); - this.input4.Name = "input4"; - this.input4.PlaceholderText = "前后置文本"; - this.input4.PrefixSvg = ""; - this.input4.PrefixText = "https://"; - this.input4.Size = new System.Drawing.Size(200, 32); - this.input4.SuffixText = ".com"; - this.input4.TabIndex = 4; - this.input4.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 = 10; - this.label4.Text = "前置/后置标签"; - // - // flowPanel1 - // - this.flowPanel1.Controls.Add(this.input7); - this.flowPanel1.Controls.Add(this.input8); - this.flowPanel1.Controls.Add(this.input1); - 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 = 9; - this.flowPanel1.Text = "flowPanel1"; - // - // input1 - // - this.input1.Badge = ""; - this.input1.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.input1.Location = new System.Drawing.Point(3, 3); - this.input1.Name = "input1"; - this.input1.Size = new System.Drawing.Size(200, 32); - this.input1.TabIndex = 0; - this.input1.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 = 8; - 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 = 7; - // - // 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 = 6; - 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 = 5; - this.label1.Text = "Input 输入框"; - // - // label8 - // - this.label8.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label8.Location = new System.Drawing.Point(3, 431); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(694, 24); - this.label8.TabIndex = 19; - this.label8.Text = "边框显示"; - // - // flowPanel6 - // - this.flowPanel6.Controls.Add(this.input11); - this.flowPanel6.Controls.Add(this.input13); - this.flowPanel6.Location = new System.Drawing.Point(3, 461); - this.flowPanel6.Name = "flowPanel6"; - this.flowPanel6.Size = new System.Drawing.Size(694, 38); - this.flowPanel6.TabIndex = 20; - this.flowPanel6.Text = "flowPanel6"; - // - // input13 - // - this.input13.Badge = ""; - this.input13.BorderWidth = 0F; - this.input13.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.input13.Location = new System.Drawing.Point(3, 3); - this.input13.Name = "input13"; - this.input13.PlaceholderText = "无边框"; - this.input13.Size = new System.Drawing.Size(200, 32); - this.input13.TabIndex = 0; - this.input13.WaveSize = 0; - // - // input11 - // - this.input11.Badge = ""; - this.input11.BorderWidth = 2F; - this.input11.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.input11.Location = new System.Drawing.Point(209, 3); - this.input11.Name = "input11"; - this.input11.PlaceholderText = "有边框"; - this.input11.Size = new System.Drawing.Size(200, 32); - this.input11.TabIndex = 1; - this.input11.WaveSize = 0; - // - // input8 - // - this.input8.AllowClear = true; - this.input8.Badge = ""; - this.input8.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.input8.Location = new System.Drawing.Point(209, 3); - this.input8.Name = "input8"; - this.input8.PlaceholderText = "清除按钮"; - this.input8.Size = new System.Drawing.Size(200, 32); - this.input8.TabIndex = 2; - this.input8.WaveSize = 0; - // - // input7 - // - this.input7.Badge = ""; - this.input7.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.input7.Location = new System.Drawing.Point(415, 3); - this.input7.Name = "input7"; - this.input7.PlaceholderText = "圆形"; - this.input7.Round = true; - this.input7.Size = new System.Drawing.Size(200, 32); - this.input7.TabIndex = 3; - this.input7.WaveSize = 0; - // - // input14 - // - this.input14.AutoScroll = true; - this.input14.Badge = ""; - this.input14.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.input14.Location = new System.Drawing.Point(209, 3); - this.input14.Multiline = true; - this.input14.Name = "input14"; - this.input14.PlaceholderText = "超出高度自动显示滚动条"; - this.input14.Size = new System.Drawing.Size(200, 70); - this.input14.TabIndex = 2; - this.input14.WaveSize = 0; + this.label9.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label9.Location = new System.Drawing.Point(3, 579); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(694, 24); + this.label9.TabIndex = 23; + this.label9.Text = "提示组合"; // // flowPanel3 // @@ -472,96 +301,267 @@ this.label7.TabIndex = 21; this.label7.Text = "按钮组合"; // - // label9 + // flowPanel6 // - this.label9.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label9.Location = new System.Drawing.Point(3, 579); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(694, 24); - this.label9.TabIndex = 23; - this.label9.Text = "提示组合"; + this.flowPanel6.Controls.Add(this.input11); + this.flowPanel6.Controls.Add(this.input13); + this.flowPanel6.Location = new System.Drawing.Point(3, 461); + this.flowPanel6.Name = "flowPanel6"; + this.flowPanel6.Size = new System.Drawing.Size(694, 38); + this.flowPanel6.TabIndex = 20; + this.flowPanel6.Text = "flowPanel6"; // - // flowPanel7 + // input11 // - this.flowPanel7.Controls.Add(this.input16); - this.flowPanel7.Location = new System.Drawing.Point(3, 609); - this.flowPanel7.Name = "flowPanel7"; - this.flowPanel7.Size = new System.Drawing.Size(694, 38); - this.flowPanel7.TabIndex = 24; - this.flowPanel7.Text = "flowPanel7"; + this.input11.Badge = ""; + this.input11.BorderWidth = 2F; + this.input11.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.input11.Location = new System.Drawing.Point(209, 3); + this.input11.Name = "input11"; + this.input11.PlaceholderText = "有边框"; + this.input11.Size = new System.Drawing.Size(200, 32); + this.input11.TabIndex = 1; + this.input11.WaveSize = 0; // - // input16 + // input13 // - this.input16.Badge = ""; - this.input16.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.input16.Location = new System.Drawing.Point(3, 3); - this.input16.Name = "input16"; - this.input16.PlaceholderText = "输入内容提示"; - this.input16.Size = new System.Drawing.Size(200, 32); - this.input16.TabIndex = 0; - this.tooltipComponent1.SetTip(this.input16, "随便输点什么"); - this.input16.WaveSize = 0; + this.input13.Badge = ""; + this.input13.BorderWidth = 0F; + this.input13.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.input13.Location = new System.Drawing.Point(3, 3); + this.input13.Name = "input13"; + this.input13.PlaceholderText = "无边框"; + this.input13.Size = new System.Drawing.Size(200, 32); + this.input13.TabIndex = 0; + this.input13.WaveSize = 0; + // + // label8 + // + this.label8.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label8.Location = new System.Drawing.Point(3, 431); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(694, 24); + this.label8.TabIndex = 19; + this.label8.Text = "边框显示"; + // + // flowPanel5 + // + this.flowPanel5.Controls.Add(this.input6); + this.flowPanel5.Controls.Add(this.input5); + this.flowPanel5.Location = new System.Drawing.Point(3, 387); + this.flowPanel5.Name = "flowPanel5"; + this.flowPanel5.Size = new System.Drawing.Size(694, 38); + this.flowPanel5.TabIndex = 16; + this.flowPanel5.Text = "flowPanel5"; + // + // input6 + // + this.input6.Badge = ""; + this.input6.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.input6.Location = new System.Drawing.Point(209, 3); + this.input6.Name = "input6"; + this.input6.PasswordChar = '#'; + this.input6.PlaceholderText = "密码不可复制"; + this.input6.Size = new System.Drawing.Size(200, 32); + this.input6.TabIndex = 1; + this.input6.UseSystemPasswordChar = true; + this.input6.WaveSize = 0; + // + // input5 + // + this.input5.Badge = ""; + this.input5.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.input5.Location = new System.Drawing.Point(3, 3); + this.input5.Name = "input5"; + this.input5.PasswordChar = '*'; + this.input5.PasswordCopy = true; + this.input5.PlaceholderText = "输入密码"; + this.input5.Size = new System.Drawing.Size(200, 32); + this.input5.TabIndex = 0; + this.input5.WaveSize = 0; + // + // 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, 357); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(694, 24); + this.label6.TabIndex = 15; + this.label6.Text = "密码框"; + // + // flowPanel4 + // + this.flowPanel4.Controls.Add(this.input14); + this.flowPanel4.Controls.Add(this.input3); + this.flowPanel4.Location = new System.Drawing.Point(3, 275); + this.flowPanel4.Name = "flowPanel4"; + this.flowPanel4.Size = new System.Drawing.Size(694, 76); + this.flowPanel4.TabIndex = 14; + this.flowPanel4.Text = "flowPanel4"; + // + // input14 + // + this.input14.AutoScroll = true; + this.input14.Badge = ""; + this.input14.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.input14.Location = new System.Drawing.Point(209, 3); + this.input14.Multiline = true; + this.input14.Name = "input14"; + this.input14.PlaceholderText = "超出高度自动显示滚动条"; + this.input14.Size = new System.Drawing.Size(200, 70); + this.input14.TabIndex = 2; + this.input14.WaveSize = 0; + // + // input3 + // + this.input3.Badge = ""; + this.input3.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.input3.Location = new System.Drawing.Point(3, 3); + this.input3.Multiline = true; + this.input3.Name = "input3"; + this.input3.Size = new System.Drawing.Size(200, 70); + this.input3.TabIndex = 1; + this.input3.WaveSize = 0; + // + // label5 + // + 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 = 13; + this.label5.Text = "多行文本"; + // + // flowPanel2 + // + this.flowPanel2.Controls.Add(this.input2); + this.flowPanel2.Controls.Add(this.input4); + this.flowPanel2.Location = new System.Drawing.Point(3, 201); + this.flowPanel2.Name = "flowPanel2"; + this.flowPanel2.Size = new System.Drawing.Size(694, 38); + this.flowPanel2.TabIndex = 11; + this.flowPanel2.Text = "flowPanel2"; + // + // input2 + // + this.input2.Badge = ""; + this.input2.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.input2.Location = new System.Drawing.Point(209, 3); + this.input2.Name = "input2"; + this.input2.PlaceholderText = "图标"; + this.input2.PrefixSvg = resources.GetString("input2.PrefixSvg"); + this.input2.Size = new System.Drawing.Size(200, 32); + this.input2.SuffixSvg = resources.GetString("input2.SuffixSvg"); + this.input2.TabIndex = 6; + this.input2.WaveSize = 0; + // + // input4 + // + this.input4.Badge = ""; + this.input4.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.input4.Location = new System.Drawing.Point(3, 3); + this.input4.Name = "input4"; + this.input4.PlaceholderText = "文本"; + this.input4.PrefixSvg = ""; + this.input4.PrefixText = "https://"; + this.input4.Size = new System.Drawing.Size(200, 32); + this.input4.SuffixText = ".com"; + this.input4.TabIndex = 4; + this.input4.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 = 10; + this.label4.Text = "前置/后置标签"; + // + // flowPanel1 + // + this.flowPanel1.Controls.Add(this.input7); + this.flowPanel1.Controls.Add(this.input8); + this.flowPanel1.Controls.Add(this.input1); + 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 = 9; + this.flowPanel1.Text = "flowPanel1"; + // + // input7 + // + this.input7.Badge = ""; + this.input7.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.input7.Location = new System.Drawing.Point(415, 3); + this.input7.Name = "input7"; + this.input7.PlaceholderText = "圆形"; + this.input7.Round = true; + this.input7.Size = new System.Drawing.Size(200, 32); + this.input7.TabIndex = 3; + this.input7.WaveSize = 0; + // + // input8 + // + this.input8.AllowClear = true; + this.input8.Badge = ""; + this.input8.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.input8.Location = new System.Drawing.Point(209, 3); + this.input8.Name = "input8"; + this.input8.PlaceholderText = "清除按钮"; + this.input8.Size = new System.Drawing.Size(200, 32); + this.input8.TabIndex = 2; + this.input8.WaveSize = 0; + // + // input1 + // + this.input1.Badge = ""; + this.input1.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.input1.Location = new System.Drawing.Point(3, 3); + this.input1.Name = "input1"; + this.input1.Size = new System.Drawing.Size(200, 32); + this.input1.TabIndex = 0; + this.input1.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 = 8; + 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 = 7; + // + // 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 = 6; + 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 = 5; + this.label1.Text = "Input 输入框"; // // tooltipComponent1 // this.tooltipComponent1.ArrowAlign = AntdUI.TAlign.TL; this.tooltipComponent1.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); // - // label10 - // - this.label10.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label10.Location = new System.Drawing.Point(3, 653); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(694, 24); - this.label10.TabIndex = 25; - this.label10.Text = "状态"; - // - // flowPanel8 - // - this.flowPanel8.Controls.Add(this.input_status); - this.flowPanel8.Controls.Add(this.input15); - this.flowPanel8.Controls.Add(this.input12); - this.flowPanel8.Location = new System.Drawing.Point(3, 683); - this.flowPanel8.Name = "flowPanel8"; - this.flowPanel8.Size = new System.Drawing.Size(694, 38); - this.flowPanel8.TabIndex = 26; - this.flowPanel8.Text = "flowPanel8"; - // - // input12 - // - this.input12.Badge = ""; - this.input12.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.input12.Location = new System.Drawing.Point(3, 3); - this.input12.Name = "input12"; - this.input12.PlaceholderText = "Success"; - this.input12.Size = new System.Drawing.Size(200, 32); - this.input12.Status = AntdUI.TType.Success; - this.input12.TabIndex = 1; - this.input12.WaveSize = 0; - // - // input15 - // - this.input15.Badge = ""; - this.input15.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.input15.Location = new System.Drawing.Point(209, 3); - this.input15.Name = "input15"; - this.input15.PlaceholderText = "Warn"; - this.input15.Size = new System.Drawing.Size(200, 32); - this.input15.Status = AntdUI.TType.Warn; - this.input15.TabIndex = 3; - this.input15.WaveSize = 0; - // - // input_status - // - this.input_status.Badge = ""; - this.input_status.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.input_status.Location = new System.Drawing.Point(415, 3); - this.input_status.Name = "input_status"; - this.input_status.PlaceholderText = "输入英文字母,否则异常"; - this.input_status.Size = new System.Drawing.Size(200, 32); - this.input_status.TabIndex = 4; - this.input_status.WaveSize = 0; - // // InputDemo // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; @@ -569,16 +569,16 @@ this.Name = "InputDemo"; this.Size = new System.Drawing.Size(700, 768); this.stackPanel1.ResumeLayout(false); + this.flowPanel8.ResumeLayout(false); + this.flowPanel7.ResumeLayout(false); + this.flowPanel3.ResumeLayout(false); + this.panel1.ResumeLayout(false); + this.panel3.ResumeLayout(false); + this.flowPanel6.ResumeLayout(false); this.flowPanel5.ResumeLayout(false); this.flowPanel4.ResumeLayout(false); this.flowPanel2.ResumeLayout(false); this.flowPanel1.ResumeLayout(false); - this.flowPanel6.ResumeLayout(false); - this.flowPanel3.ResumeLayout(false); - this.panel1.ResumeLayout(false); - this.panel3.ResumeLayout(false); - this.flowPanel7.ResumeLayout(false); - this.flowPanel8.ResumeLayout(false); this.ResumeLayout(false); } diff --git a/Views/InputDemo.resx b/Views/InputDemo.resx index 871bfc5..8841efe 100644 --- a/Views/InputDemo.resx +++ b/Views/InputDemo.resx @@ -117,12 +117,9 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - <svg viewBox="64 64 896 896" focusable="false" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"></path></svg> - - - <svg viewBox="64 64 896 896" focusable="false" data-icon="poweroff" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M705.6 124.9a8 8 0 00-11.6 7.2v64.2c0 5.5 2.9 10.6 7.5 13.6a352.2 352.2 0 0162.2 49.8c32.7 32.8 58.4 70.9 76.3 113.3a355 355 0 0127.9 138.7c0 48.1-9.4 94.8-27.9 138.7a355.92 355.92 0 01-76.3 113.3 353.06 353.06 0 01-113.2 76.4c-43.8 18.6-90.5 28-138.5 28s-94.7-9.4-138.5-28a353.06 353.06 0 01-113.2-76.4A355.92 355.92 0 01184 650.4a355 355 0 01-27.9-138.7c0-48.1 9.4-94.8 27.9-138.7 17.9-42.4 43.6-80.5 76.3-113.3 19-19 39.8-35.6 62.2-49.8 4.7-2.9 7.5-8.1 7.5-13.6V132c0-6-6.3-9.8-11.6-7.2C178.5 195.2 82 339.3 80 506.3 77.2 745.1 272.5 943.5 511.2 944c239 .5 432.8-193.3 432.8-432.4 0-169.2-97-315.7-238.4-386.7zM480 560h64c4.4 0 8-3.6 8-8V88c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z"></path></svg> - + + 17, 17 + <svg viewBox="64 64 896 896" focusable="false" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"></path></svg> @@ -135,10 +132,10 @@ <svg viewBox="64 64 896 896" focusable="false" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"></path></svg> - - 17, 17 - - - 17, 17 - + + <svg viewBox="64 64 896 896" focusable="false" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"></path></svg> + + + <svg viewBox="64 64 896 896" focusable="false" data-icon="poweroff" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M705.6 124.9a8 8 0 00-11.6 7.2v64.2c0 5.5 2.9 10.6 7.5 13.6a352.2 352.2 0 0162.2 49.8c32.7 32.8 58.4 70.9 76.3 113.3a355 355 0 0127.9 138.7c0 48.1-9.4 94.8-27.9 138.7a355.92 355.92 0 01-76.3 113.3 353.06 353.06 0 01-113.2 76.4c-43.8 18.6-90.5 28-138.5 28s-94.7-9.4-138.5-28a353.06 353.06 0 01-113.2-76.4A355.92 355.92 0 01184 650.4a355 355 0 01-27.9-138.7c0-48.1 9.4-94.8 27.9-138.7 17.9-42.4 43.6-80.5 76.3-113.3 19-19 39.8-35.6 62.2-49.8 4.7-2.9 7.5-8.1 7.5-13.6V132c0-6-6.3-9.8-11.6-7.2C178.5 195.2 82 339.3 80 506.3 77.2 745.1 272.5 943.5 511.2 944c239 .5 432.8-193.3 432.8-432.4 0-169.2-97-315.7-238.4-386.7zM480 560h64c4.4 0 8-3.6 8-8V88c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z"></path></svg> + \ No newline at end of file diff --git a/Views/InputNumberDemo.Designer.cs b/Views/InputNumberDemo.Designer.cs new file mode 100644 index 0000000..e34fb34 --- /dev/null +++ b/Views/InputNumberDemo.Designer.cs @@ -0,0 +1,314 @@ +namespace AntdUIDemo.Views +{ + partial class InputNumberDemo + { + /// + /// 必需的设计器变量。 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 清理所有正在使用的资源。 + /// + /// 如果应释放托管资源,为 true;否则为 false。 + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region 组件设计器生成的代码 + + /// + /// 设计器支持所需的方法 - 不要修改 + /// 使用代码编辑器修改此方法的内容。 + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(InputNumberDemo)); + this.stackPanel1 = new AntdUI.StackPanel(); + this.divider1 = new AntdUI.Divider(); + this.label2 = new AntdUI.Label(); + this.label1 = new AntdUI.Label(); + this.flowPanel1 = new AntdUI.FlowPanel(); + this.label3 = new AntdUI.Label(); + this.inputNumber1 = new AntdUI.InputNumber(); + this.label4 = new AntdUI.Label(); + this.flowPanel2 = new AntdUI.FlowPanel(); + this.inputNumber2 = new AntdUI.InputNumber(); + this.inputNumber3 = new AntdUI.InputNumber(); + this.inputNumber4 = new AntdUI.InputNumber(); + this.inputNumber5 = new AntdUI.InputNumber(); + this.label5 = new AntdUI.Label(); + this.flowPanel3 = new AntdUI.FlowPanel(); + this.inputNumber8 = new AntdUI.InputNumber(); + this.stackPanel1.SuspendLayout(); + this.flowPanel1.SuspendLayout(); + this.flowPanel2.SuspendLayout(); + this.flowPanel3.SuspendLayout(); + this.SuspendLayout(); + // + // stackPanel1 + // + this.stackPanel1.Controls.Add(this.flowPanel3); + this.stackPanel1.Controls.Add(this.label5); + this.stackPanel1.Controls.Add(this.flowPanel2); + this.stackPanel1.Controls.Add(this.label4); + this.stackPanel1.Controls.Add(this.flowPanel1); + this.stackPanel1.Controls.Add(this.label3); + this.stackPanel1.Controls.Add(this.divider1); + this.stackPanel1.Controls.Add(this.label2); + this.stackPanel1.Controls.Add(this.label1); + 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, 471); + this.stackPanel1.TabIndex = 0; + this.stackPanel1.Text = "stackPanel1"; + this.stackPanel1.Vertical = true; + // + // 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 = 10; + // + // 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 = 9; + 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 = 8; + this.label1.Text = "InputNumber 数字输入框"; + // + // flowPanel1 + // + this.flowPanel1.Controls.Add(this.inputNumber5); + this.flowPanel1.Controls.Add(this.inputNumber4); + this.flowPanel1.Controls.Add(this.inputNumber1); + 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 = 12; + this.flowPanel1.Text = "flowPanel1"; + // + // 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 = 11; + this.label3.Text = "基本类型"; + // + // inputNumber1 + // + this.inputNumber1.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + this.inputNumber1.Location = new System.Drawing.Point(3, 3); + this.inputNumber1.Maximum = new decimal(new int[] { + 10, + 0, + 0, + 0}); + this.inputNumber1.Minimum = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.inputNumber1.Name = "inputNumber1"; + this.inputNumber1.Size = new System.Drawing.Size(200, 32); + this.inputNumber1.TabIndex = 0; + this.inputNumber1.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 = 13; + this.label4.Text = "前置/后置标签"; + // + // flowPanel2 + // + this.flowPanel2.Controls.Add(this.inputNumber3); + this.flowPanel2.Controls.Add(this.inputNumber2); + this.flowPanel2.Location = new System.Drawing.Point(3, 201); + this.flowPanel2.Name = "flowPanel2"; + this.flowPanel2.Size = new System.Drawing.Size(694, 38); + this.flowPanel2.TabIndex = 14; + this.flowPanel2.Text = "flowPanel2"; + // + // inputNumber2 + // + this.inputNumber2.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + this.inputNumber2.Location = new System.Drawing.Point(3, 3); + this.inputNumber2.Maximum = new decimal(new int[] { + 100, + 0, + 0, + 0}); + this.inputNumber2.Minimum = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.inputNumber2.Name = "inputNumber2"; + this.inputNumber2.PlaceholderText = "文本"; + this.inputNumber2.PrefixText = "+"; + this.inputNumber2.Size = new System.Drawing.Size(200, 32); + this.inputNumber2.SuffixText = "$"; + this.inputNumber2.TabIndex = 0; + this.inputNumber2.Text = "0"; + this.inputNumber2.WaveSize = 0; + // + // inputNumber3 + // + this.inputNumber3.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + this.inputNumber3.Location = new System.Drawing.Point(209, 3); + this.inputNumber3.Name = "inputNumber3"; + this.inputNumber3.PlaceholderText = "图标"; + this.inputNumber3.PrefixSvg = resources.GetString("inputNumber3.PrefixSvg"); + this.inputNumber3.Size = new System.Drawing.Size(200, 32); + this.inputNumber3.SuffixSvg = resources.GetString("inputNumber3.SuffixSvg"); + this.inputNumber3.TabIndex = 1; + this.inputNumber3.Text = "0"; + this.inputNumber3.WaveSize = 0; + // + // inputNumber4 + // + this.inputNumber4.DecimalPlaces = 1; + this.inputNumber4.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + this.inputNumber4.Increment = new decimal(new int[] { + 1, + 0, + 0, + 65536}); + this.inputNumber4.Location = new System.Drawing.Point(209, 3); + this.inputNumber4.Minimum = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.inputNumber4.Name = "inputNumber4"; + this.inputNumber4.PlaceholderText = "小数位数"; + this.inputNumber4.Size = new System.Drawing.Size(200, 32); + this.inputNumber4.TabIndex = 1; + this.inputNumber4.Text = "0.0"; + this.inputNumber4.ThousandsSeparator = true; + this.inputNumber4.WaveSize = 0; + // + // inputNumber5 + // + this.inputNumber5.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + this.inputNumber5.Increment = new decimal(new int[] { + 1000, + 0, + 0, + 0}); + this.inputNumber5.Location = new System.Drawing.Point(415, 3); + this.inputNumber5.Maximum = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + this.inputNumber5.Minimum = new decimal(new int[] { + 1000, + 0, + 0, + 0}); + this.inputNumber5.Name = "inputNumber5"; + this.inputNumber5.PlaceholderText = "千分位"; + this.inputNumber5.Size = new System.Drawing.Size(200, 32); + this.inputNumber5.TabIndex = 2; + this.inputNumber5.Text = "1,000"; + this.inputNumber5.ThousandsSeparator = true; + this.inputNumber5.Value = new decimal(new int[] { + 1000, + 0, + 0, + 0}); + this.inputNumber5.WaveSize = 0; + // + // label5 + // + 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 = 15; + this.label5.Text = "十六进制显示"; + // + // flowPanel3 + // + this.flowPanel3.Controls.Add(this.inputNumber8); + 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 = 16; + this.flowPanel3.Text = "flowPanel3"; + // + // inputNumber8 + // + this.inputNumber8.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + this.inputNumber8.Hexadecimal = true; + this.inputNumber8.Location = new System.Drawing.Point(3, 3); + this.inputNumber8.Minimum = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.inputNumber8.Name = "inputNumber8"; + this.inputNumber8.Size = new System.Drawing.Size(200, 32); + this.inputNumber8.TabIndex = 0; + this.inputNumber8.Text = "0"; + this.inputNumber8.WaveSize = 0; + // + // InputNumberDemo + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; + this.Controls.Add(this.stackPanel1); + this.Name = "InputNumberDemo"; + this.Size = new System.Drawing.Size(700, 471); + this.stackPanel1.ResumeLayout(false); + this.flowPanel1.ResumeLayout(false); + this.flowPanel2.ResumeLayout(false); + this.flowPanel3.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private AntdUI.StackPanel stackPanel1; + private AntdUI.Divider divider1; + private AntdUI.Label label2; + private AntdUI.Label label1; + private AntdUI.FlowPanel flowPanel1; + private AntdUI.Label label3; + private AntdUI.InputNumber inputNumber1; + private AntdUI.FlowPanel flowPanel2; + private AntdUI.InputNumber inputNumber2; + private AntdUI.Label label4; + private AntdUI.InputNumber inputNumber3; + private AntdUI.InputNumber inputNumber4; + private AntdUI.InputNumber inputNumber5; + private AntdUI.Label label5; + private AntdUI.FlowPanel flowPanel3; + private AntdUI.InputNumber inputNumber8; + } +} diff --git a/Views/InputNumberDemo.cs b/Views/InputNumberDemo.cs new file mode 100644 index 0000000..5e3fa56 --- /dev/null +++ b/Views/InputNumberDemo.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace AntdUIDemo.Views +{ + public partial class InputNumberDemo : UserControl + { + public InputNumberDemo() + { + InitializeComponent(); + } + } +} diff --git a/Views/InputNumberDemo.resx b/Views/InputNumberDemo.resx new file mode 100644 index 0000000..1ada09f --- /dev/null +++ b/Views/InputNumberDemo.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + <svg viewBox="64 64 896 896" focusable="false" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"></path></svg> + + + <svg viewBox="64 64 896 896" focusable="false" data-icon="poweroff" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M705.6 124.9a8 8 0 00-11.6 7.2v64.2c0 5.5 2.9 10.6 7.5 13.6a352.2 352.2 0 0162.2 49.8c32.7 32.8 58.4 70.9 76.3 113.3a355 355 0 0127.9 138.7c0 48.1-9.4 94.8-27.9 138.7a355.92 355.92 0 01-76.3 113.3 353.06 353.06 0 01-113.2 76.4c-43.8 18.6-90.5 28-138.5 28s-94.7-9.4-138.5-28a353.06 353.06 0 01-113.2-76.4A355.92 355.92 0 01184 650.4a355 355 0 01-27.9-138.7c0-48.1 9.4-94.8 27.9-138.7 17.9-42.4 43.6-80.5 76.3-113.3 19-19 39.8-35.6 62.2-49.8 4.7-2.9 7.5-8.1 7.5-13.6V132c0-6-6.3-9.8-11.6-7.2C178.5 195.2 82 339.3 80 506.3 77.2 745.1 272.5 943.5 511.2 944c239 .5 432.8-193.3 432.8-432.4 0-169.2-97-315.7-238.4-386.7zM480 560h64c4.4 0 8-3.6 8-8V88c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z"></path></svg> + + \ No newline at end of file