升级 1.6.5,Slider涉及属性变更和大量更新,支持文字显示等

This commit is contained in:
czz_y 2024-09-27 16:03:44 +08:00
parent 37c3597b29
commit 3d76b2f3af
4 changed files with 236 additions and 188 deletions

View File

@ -13,7 +13,7 @@
<Copyright>Copyright © 2024 czz_y</Copyright>
<FileVersion>$(Version)</FileVersion>
<AssemblyVersion>$(Version)</AssemblyVersion>
<Version>1.6.4</Version>
<Version>1.6.5</Version>
<Authors>czz_y</Authors>
<Description>基于 Winform UI框架 AntdUI 设计的Demo</Description>
<PackageProjectUrl>https://gitee.com/mubaiyanghua/antd-uidemo</PackageProjectUrl>
@ -30,7 +30,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="AntdUI" Version="1.6.4" />
<PackageReference Include="AntdUI" Version="1.6.5" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NLog" Version="5.3.3" />
</ItemGroup>

View File

@ -4,7 +4,7 @@
<h1>AntdUI Demo</h1>
本项目基于 `Winform .NET Framework 4.8` 开发,是 [AntdUI](https://gitee.com/antdui/AntdUI) 的 Demo 项目,当前版本 `1.6.4`
本项目基于 `Winform .NET Framework 4.8` 开发,是 [AntdUI](https://gitee.com/antdui/AntdUI) 的 Demo 项目,当前版本 `1.6.5`
</div>

View File

@ -28,31 +28,40 @@
/// </summary>
private void InitializeComponent()
{
AntdUI.SliderMarkItem sliderMarkItem3 = new AntdUI.SliderMarkItem();
AntdUI.SliderMarkItem sliderMarkItem4 = new AntdUI.SliderMarkItem();
AntdUI.SliderMarkItem sliderMarkItem5 = new AntdUI.SliderMarkItem();
AntdUI.SliderMarkItem sliderMarkItem6 = new AntdUI.SliderMarkItem();
AntdUI.SliderMarkItem sliderMarkItem7 = new AntdUI.SliderMarkItem();
AntdUI.SliderMarkItem sliderMarkItem8 = new AntdUI.SliderMarkItem();
AntdUI.SliderMarkItem sliderMarkItem1 = new AntdUI.SliderMarkItem();
AntdUI.SliderMarkItem sliderMarkItem2 = new AntdUI.SliderMarkItem();
this.stackPanel1 = new AntdUI.StackPanel();
this.flowPanel4 = new AntdUI.FlowPanel();
this.slider7 = new AntdUI.Slider();
this.slider6 = new AntdUI.Slider();
this.label6 = new AntdUI.Label();
this.flowPanel3 = new AntdUI.FlowPanel();
this.slider_formmat = new AntdUI.Slider();
this.label5 = new AntdUI.Label();
this.flowPanel2 = new AntdUI.FlowPanel();
this.slider5 = new AntdUI.Slider();
this.slider4 = new AntdUI.Slider();
this.label4 = new AntdUI.Label();
this.flowPanel1 = new AntdUI.FlowPanel();
this.slider3 = new AntdUI.Slider();
this.slider2 = new AntdUI.Slider();
this.slider1 = new AntdUI.Slider();
this.label3 = new AntdUI.Label();
this.divider1 = new AntdUI.Divider();
this.label2 = new AntdUI.Label();
this.label1 = new AntdUI.Label();
this.label3 = new AntdUI.Label();
this.flowPanel1 = new AntdUI.FlowPanel();
this.slider1 = new AntdUI.Slider();
this.slider2 = new AntdUI.Slider();
this.label4 = new AntdUI.Label();
this.flowPanel2 = new AntdUI.FlowPanel();
this.slider4 = new AntdUI.Slider();
this.slider3 = new AntdUI.Slider();
this.slider5 = new AntdUI.Slider();
this.label5 = new AntdUI.Label();
this.flowPanel3 = new AntdUI.FlowPanel();
this.slider_formmat = new AntdUI.Slider();
this.label6 = new AntdUI.Label();
this.flowPanel4 = new AntdUI.FlowPanel();
this.slider6 = new AntdUI.Slider();
this.slider7 = new AntdUI.Slider();
this.slider8 = new AntdUI.Slider();
this.stackPanel1.SuspendLayout();
this.flowPanel1.SuspendLayout();
this.flowPanel2.SuspendLayout();
this.flowPanel3.SuspendLayout();
this.flowPanel4.SuspendLayout();
this.flowPanel3.SuspendLayout();
this.flowPanel2.SuspendLayout();
this.flowPanel1.SuspendLayout();
this.SuspendLayout();
//
// stackPanel1
@ -76,147 +85,54 @@
this.stackPanel1.Text = "stackPanel1";
this.stackPanel1.Vertical = true;
//
// divider1
// flowPanel4
//
this.divider1.Location = new System.Drawing.Point(3, 79);
this.divider1.Name = "divider1";
this.divider1.Size = new System.Drawing.Size(694, 12);
this.divider1.TabIndex = 16;
this.flowPanel4.Controls.Add(this.slider7);
this.flowPanel4.Controls.Add(this.slider6);
this.flowPanel4.Gap = 6;
this.flowPanel4.Location = new System.Drawing.Point(3, 372);
this.flowPanel4.Name = "flowPanel4";
this.flowPanel4.Size = new System.Drawing.Size(694, 167);
this.flowPanel4.TabIndex = 24;
this.flowPanel4.Text = "flowPanel4";
//
// label2
// slider7
//
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 = 15;
this.label2.Text = "滑动型输入器,展示当前值和可选范围。";
this.slider7.Align = AntdUI.TAlignMini.Top;
this.slider7.Location = new System.Drawing.Point(56, 3);
this.slider7.Name = "slider7";
this.slider7.ShowValue = true;
this.slider7.Size = new System.Drawing.Size(41, 161);
this.slider7.TabIndex = 1;
this.slider7.Text = "slider8";
this.slider7.Value = 50;
//
// label1
// slider6
//
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 = 14;
this.label1.Text = "Slider 滑动输入条";
this.slider6.Align = AntdUI.TAlignMini.Bottom;
this.slider6.Location = new System.Drawing.Point(3, 3);
this.slider6.Name = "slider6";
this.slider6.ShowValue = true;
this.slider6.Size = new System.Drawing.Size(41, 161);
this.slider6.TabIndex = 0;
this.slider6.Text = "slider8";
this.slider6.Value = 50;
//
// label3
// label6
//
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 = 17;
this.label3.Text = "基本用法";
//
// flowPanel1
//
this.flowPanel1.Controls.Add(this.slider3);
this.flowPanel1.Controls.Add(this.slider2);
this.flowPanel1.Controls.Add(this.slider1);
this.flowPanel1.Gap = 6;
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 = 18;
this.flowPanel1.Text = "flowPanel1";
//
// slider1
//
this.slider1.Location = new System.Drawing.Point(3, 3);
this.slider1.Name = "slider1";
this.slider1.Size = new System.Drawing.Size(200, 32);
this.slider1.TabIndex = 0;
this.slider1.Text = "slider1";
//
// slider2
//
this.slider2.Fill = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(87)))), ((int)(((byte)(34)))));
this.slider2.FillActive = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(87)))), ((int)(((byte)(34)))));
this.slider2.FillHover = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(133)))), ((int)(((byte)(34)))));
this.slider2.Location = new System.Drawing.Point(215, 3);
this.slider2.Name = "slider2";
this.slider2.ShowValue = true;
this.slider2.Size = new System.Drawing.Size(200, 32);
this.slider2.TabIndex = 1;
this.slider2.Text = "slider2";
this.slider2.Value = 50;
//
// 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 = 19;
this.label4.Text = "固定点";
//
// flowPanel2
//
this.flowPanel2.Controls.Add(this.slider5);
this.flowPanel2.Controls.Add(this.slider4);
this.flowPanel2.Gap = 6;
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 = 20;
this.flowPanel2.Text = "flowPanel2";
//
// slider4
//
this.slider4.Dots = new int[] {
25,
50,
75};
this.slider4.Location = new System.Drawing.Point(3, 3);
this.slider4.Name = "slider4";
this.slider4.ShowValue = true;
this.slider4.Size = new System.Drawing.Size(200, 32);
this.slider4.TabIndex = 0;
this.slider4.Text = "slider4";
this.slider4.Value = 10;
//
// slider3
//
this.slider3.Align = AntdUI.TAlignMini.Right;
this.slider3.Location = new System.Drawing.Point(427, 3);
this.slider3.MaxValue = 10;
this.slider3.Name = "slider3";
this.slider3.ShowValue = true;
this.slider3.Size = new System.Drawing.Size(200, 32);
this.slider3.TabIndex = 2;
this.slider3.Text = "slider3";
this.slider3.Value = 2;
//
// slider5
//
this.slider5.Dots = new int[] {
2,
8};
this.slider5.Location = new System.Drawing.Point(215, 3);
this.slider5.MaxValue = 10;
this.slider5.Name = "slider5";
this.slider5.ShowValue = true;
this.slider5.Size = new System.Drawing.Size(200, 32);
this.slider5.TabIndex = 1;
this.slider5.Text = "slider5";
this.slider5.Value = 5;
//
// 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 = 21;
this.label5.Text = "格式化显示";
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, 342);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(694, 24);
this.label6.TabIndex = 23;
this.label6.Text = "垂直方向";
this.label6.TooltipConfig = null;
//
// flowPanel3
//
this.flowPanel3.Controls.Add(this.slider_formmat);
this.flowPanel3.Gap = 6;
this.flowPanel3.Location = new System.Drawing.Point(3, 275);
this.flowPanel3.Location = new System.Drawing.Point(3, 298);
this.flowPanel3.Name = "flowPanel3";
this.flowPanel3.Size = new System.Drawing.Size(694, 38);
this.flowPanel3.TabIndex = 22;
@ -232,47 +148,178 @@
this.slider_formmat.Text = "slider8";
this.slider_formmat.Value = 50;
//
// label6
// label5
//
this.label6.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label6.Location = new System.Drawing.Point(3, 319);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(694, 24);
this.label6.TabIndex = 23;
this.label6.Text = "垂直方向";
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, 268);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(694, 24);
this.label5.TabIndex = 21;
this.label5.Text = "格式化显示";
this.label5.TooltipConfig = null;
//
// flowPanel4
// flowPanel2
//
this.flowPanel4.Controls.Add(this.slider7);
this.flowPanel4.Controls.Add(this.slider6);
this.flowPanel4.Gap = 6;
this.flowPanel4.Location = new System.Drawing.Point(3, 349);
this.flowPanel4.Name = "flowPanel4";
this.flowPanel4.Size = new System.Drawing.Size(694, 167);
this.flowPanel4.TabIndex = 24;
this.flowPanel4.Text = "flowPanel4";
this.flowPanel2.Controls.Add(this.slider8);
this.flowPanel2.Controls.Add(this.slider5);
this.flowPanel2.Controls.Add(this.slider4);
this.flowPanel2.Gap = 6;
this.flowPanel2.Location = new System.Drawing.Point(3, 201);
this.flowPanel2.Name = "flowPanel2";
this.flowPanel2.Size = new System.Drawing.Size(694, 61);
this.flowPanel2.TabIndex = 20;
this.flowPanel2.Text = "flowPanel2";
//
// slider6
// slider5
//
this.slider6.Align = AntdUI.TAlignMini.Bottom;
this.slider6.Location = new System.Drawing.Point(3, 3);
this.slider6.Name = "slider6";
this.slider6.ShowValue = true;
this.slider6.Size = new System.Drawing.Size(41, 161);
this.slider6.TabIndex = 0;
this.slider6.Text = "slider8";
this.slider6.Value = 50;
this.slider5.Dots = true;
this.slider5.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.slider5.Location = new System.Drawing.Point(215, 3);
sliderMarkItem3.Text = "2℃";
sliderMarkItem3.Value = 2;
sliderMarkItem4.Text = "5℃";
sliderMarkItem4.Value = 5;
sliderMarkItem5.Text = "8℃";
sliderMarkItem5.Value = 8;
this.slider5.Marks.Add(sliderMarkItem3);
this.slider5.Marks.Add(sliderMarkItem4);
this.slider5.Marks.Add(sliderMarkItem5);
this.slider5.MaxValue = 10;
this.slider5.Name = "slider5";
this.slider5.ShowValue = true;
this.slider5.Size = new System.Drawing.Size(200, 55);
this.slider5.TabIndex = 1;
this.slider5.Text = "slider5";
this.slider5.Value = 5;
//
// slider7
// slider4
//
this.slider7.Align = AntdUI.TAlignMini.Top;
this.slider7.Location = new System.Drawing.Point(56, 3);
this.slider7.Name = "slider7";
this.slider7.ShowValue = true;
this.slider7.Size = new System.Drawing.Size(41, 161);
this.slider7.TabIndex = 1;
this.slider7.Text = "slider8";
this.slider7.Value = 50;
this.slider4.Location = new System.Drawing.Point(3, 3);
sliderMarkItem6.Value = 20;
sliderMarkItem7.Value = 50;
sliderMarkItem8.Value = 75;
this.slider4.Marks.Add(sliderMarkItem6);
this.slider4.Marks.Add(sliderMarkItem7);
this.slider4.Marks.Add(sliderMarkItem8);
this.slider4.Name = "slider4";
this.slider4.ShowValue = true;
this.slider4.Size = new System.Drawing.Size(200, 55);
this.slider4.TabIndex = 0;
this.slider4.Text = "slider4";
this.slider4.Value = 10;
//
// 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 = 19;
this.label4.Text = "固定点";
this.label4.TooltipConfig = null;
//
// flowPanel1
//
this.flowPanel1.Controls.Add(this.slider3);
this.flowPanel1.Controls.Add(this.slider2);
this.flowPanel1.Controls.Add(this.slider1);
this.flowPanel1.Gap = 6;
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 = 18;
this.flowPanel1.Text = "flowPanel1";
//
// slider3
//
this.slider3.Align = AntdUI.TAlignMini.Right;
this.slider3.Location = new System.Drawing.Point(427, 3);
this.slider3.MaxValue = 10;
this.slider3.Name = "slider3";
this.slider3.ShowValue = true;
this.slider3.Size = new System.Drawing.Size(200, 32);
this.slider3.TabIndex = 2;
this.slider3.Text = "slider3";
this.slider3.Value = 2;
//
// slider2
//
this.slider2.Fill = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(87)))), ((int)(((byte)(34)))));
this.slider2.FillActive = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(87)))), ((int)(((byte)(34)))));
this.slider2.FillHover = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(133)))), ((int)(((byte)(34)))));
this.slider2.Location = new System.Drawing.Point(215, 3);
this.slider2.Name = "slider2";
this.slider2.ShowValue = true;
this.slider2.Size = new System.Drawing.Size(200, 32);
this.slider2.TabIndex = 1;
this.slider2.Text = "slider2";
this.slider2.Value = 50;
//
// slider1
//
this.slider1.Location = new System.Drawing.Point(3, 3);
this.slider1.Name = "slider1";
this.slider1.Size = new System.Drawing.Size(200, 32);
this.slider1.TabIndex = 0;
this.slider1.Text = "slider1";
//
// 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 = 17;
this.label3.Text = "基本用法";
this.label3.TooltipConfig = null;
//
// divider1
//
this.divider1.Location = new System.Drawing.Point(3, 79);
this.divider1.Name = "divider1";
this.divider1.Size = new System.Drawing.Size(694, 12);
this.divider1.TabIndex = 16;
//
// 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 = 15;
this.label2.Text = "滑动型输入器,展示当前值和可选范围。";
this.label2.TooltipConfig = null;
//
// label1
//
this.label1.Font = new System.Drawing.Font("Microsoft YaHei UI", 26.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.Location = new System.Drawing.Point(3, 3);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(694, 40);
this.label1.TabIndex = 14;
this.label1.Text = "Slider 滑动输入条";
this.label1.TooltipConfig = null;
//
// slider8
//
this.slider8.DotSize = 15;
this.slider8.DotSizeActive = 20;
this.slider8.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F);
this.slider8.Location = new System.Drawing.Point(427, 3);
sliderMarkItem1.Fore = System.Drawing.Color.Orange;
sliderMarkItem1.Text = "上海";
sliderMarkItem1.Value = 2;
sliderMarkItem2.Text = "北京";
sliderMarkItem2.Value = 8;
this.slider8.Marks.Add(sliderMarkItem1);
this.slider8.Marks.Add(sliderMarkItem2);
this.slider8.MaxValue = 10;
this.slider8.Name = "slider8";
this.slider8.ShowValue = true;
this.slider8.Size = new System.Drawing.Size(200, 55);
this.slider8.TabIndex = 2;
this.slider8.Text = "slider8";
this.slider8.Value = 5;
//
// SliderDemo
//
@ -281,10 +328,10 @@
this.Name = "SliderDemo";
this.Size = new System.Drawing.Size(700, 519);
this.stackPanel1.ResumeLayout(false);
this.flowPanel1.ResumeLayout(false);
this.flowPanel2.ResumeLayout(false);
this.flowPanel3.ResumeLayout(false);
this.flowPanel4.ResumeLayout(false);
this.flowPanel3.ResumeLayout(false);
this.flowPanel2.ResumeLayout(false);
this.flowPanel1.ResumeLayout(false);
this.ResumeLayout(false);
}
@ -311,5 +358,6 @@
private AntdUI.FlowPanel flowPanel4;
private AntdUI.Slider slider6;
private AntdUI.Slider slider7;
private AntdUI.Slider slider8;
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 265 KiB

After

Width:  |  Height:  |  Size: 463 KiB