diff --git a/MainWindow.cs b/MainWindow.cs
index 62ef71c..2441188 100644
--- a/MainWindow.cs
+++ b/MainWindow.cs
@@ -67,6 +67,9 @@ namespace AntdUIDemo
case "Panel":
control = new PanelDemo();
break;
+ case "StackPanel":
+ control = new StackPanelDemo(this);
+ break;
}
if (control != null)
{
diff --git a/README.md b/README.md
index b386913..a6173fe 100644
--- a/README.md
+++ b/README.md
@@ -24,4 +24,6 @@
### GridPanel

### Panel
-
\ No newline at end of file
+
+### StackPanel
+
\ No newline at end of file
diff --git a/Views/ButtonDemo.Designer.cs b/Views/ButtonDemo.Designer.cs
index af68ad3..e52f73a 100644
--- a/Views/ButtonDemo.Designer.cs
+++ b/Views/ButtonDemo.Designer.cs
@@ -118,7 +118,7 @@
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(724, 629);
+ this.stackPanel1.Size = new System.Drawing.Size(700, 629);
this.stackPanel1.TabIndex = 1;
this.stackPanel1.Text = "stackPanel1";
this.stackPanel1.Vertical = true;
@@ -128,7 +128,7 @@
this.flowPanel7.Controls.Add(this.button39);
this.flowPanel7.Location = new System.Drawing.Point(3, 571);
this.flowPanel7.Name = "flowPanel7";
- this.flowPanel7.Size = new System.Drawing.Size(718, 38);
+ this.flowPanel7.Size = new System.Drawing.Size(694, 38);
this.flowPanel7.TabIndex = 18;
this.flowPanel7.Text = "flowPanel7";
//
@@ -150,7 +150,7 @@
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, 541);
this.label9.Name = "label9";
- this.label9.Size = new System.Drawing.Size(718, 24);
+ this.label9.Size = new System.Drawing.Size(694, 24);
this.label9.TabIndex = 17;
this.label9.Text = "渐变按钮";
//
@@ -160,7 +160,7 @@
this.flowPanel6.Controls.Add(this.panel2);
this.flowPanel6.Location = new System.Drawing.Point(3, 497);
this.flowPanel6.Name = "flowPanel6";
- this.flowPanel6.Size = new System.Drawing.Size(718, 38);
+ this.flowPanel6.Size = new System.Drawing.Size(694, 38);
this.flowPanel6.TabIndex = 16;
this.flowPanel6.Text = "flowPanel6";
//
@@ -258,7 +258,7 @@
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, 467);
this.label8.Name = "label8";
- this.label8.Size = new System.Drawing.Size(718, 24);
+ this.label8.Size = new System.Drawing.Size(694, 24);
this.label8.TabIndex = 15;
this.label8.Text = "组合按钮";
//
@@ -271,7 +271,7 @@
this.flowPanel5.Controls.Add(this.button29);
this.flowPanel5.Location = new System.Drawing.Point(3, 423);
this.flowPanel5.Name = "flowPanel5";
- this.flowPanel5.Size = new System.Drawing.Size(718, 38);
+ this.flowPanel5.Size = new System.Drawing.Size(694, 38);
this.flowPanel5.TabIndex = 14;
this.flowPanel5.Text = "flowPanel5";
//
@@ -348,7 +348,7 @@
this.label7.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label7.Location = new System.Drawing.Point(3, 393);
this.label7.Name = "label7";
- this.label7.Size = new System.Drawing.Size(718, 24);
+ this.label7.Size = new System.Drawing.Size(694, 24);
this.label7.TabIndex = 13;
this.label7.Text = "分割按钮";
//
@@ -362,7 +362,7 @@
this.flowPanel4.Controls.Add(this.button24);
this.flowPanel4.Location = new System.Drawing.Point(3, 349);
this.flowPanel4.Name = "flowPanel4";
- this.flowPanel4.Size = new System.Drawing.Size(718, 38);
+ this.flowPanel4.Size = new System.Drawing.Size(694, 38);
this.flowPanel4.TabIndex = 12;
this.flowPanel4.Text = "flowPanel4";
//
@@ -447,7 +447,7 @@
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(718, 24);
+ this.label6.Size = new System.Drawing.Size(694, 24);
this.label6.TabIndex = 11;
this.label6.Text = "图标按钮";
//
@@ -461,7 +461,7 @@
this.flowPanel3.Controls.Add(this.button18);
this.flowPanel3.Location = new System.Drawing.Point(3, 275);
this.flowPanel3.Name = "flowPanel3";
- this.flowPanel3.Size = new System.Drawing.Size(718, 38);
+ this.flowPanel3.Size = new System.Drawing.Size(694, 38);
this.flowPanel3.TabIndex = 10;
this.flowPanel3.Text = "flowPanel3";
//
@@ -547,7 +547,7 @@
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(718, 24);
+ this.label5.Size = new System.Drawing.Size(694, 24);
this.label5.TabIndex = 9;
this.label5.Text = "文本按钮(带边框)";
//
@@ -561,7 +561,7 @@
this.flowPanel2.Controls.Add(this.button12);
this.flowPanel2.Location = new System.Drawing.Point(3, 201);
this.flowPanel2.Name = "flowPanel2";
- this.flowPanel2.Size = new System.Drawing.Size(718, 38);
+ this.flowPanel2.Size = new System.Drawing.Size(694, 38);
this.flowPanel2.TabIndex = 8;
this.flowPanel2.Text = "flowPanel2";
//
@@ -641,7 +641,7 @@
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(718, 24);
+ this.label4.Size = new System.Drawing.Size(694, 24);
this.label4.TabIndex = 7;
this.label4.Text = "文本按钮";
//
@@ -655,7 +655,7 @@
this.flowPanel1.Controls.Add(this.button1);
this.flowPanel1.Location = new System.Drawing.Point(3, 127);
this.flowPanel1.Name = "flowPanel1";
- this.flowPanel1.Size = new System.Drawing.Size(718, 38);
+ this.flowPanel1.Size = new System.Drawing.Size(694, 38);
this.flowPanel1.TabIndex = 6;
this.flowPanel1.Text = "flowPanel1";
//
@@ -729,7 +729,7 @@
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(718, 24);
+ this.label3.Size = new System.Drawing.Size(694, 24);
this.label3.TabIndex = 5;
this.label3.Text = "按钮类型";
//
@@ -737,7 +737,7 @@
//
this.divider1.Location = new System.Drawing.Point(3, 79);
this.divider1.Name = "divider1";
- this.divider1.Size = new System.Drawing.Size(718, 12);
+ this.divider1.Size = new System.Drawing.Size(694, 12);
this.divider1.TabIndex = 4;
//
// label2
@@ -745,7 +745,7 @@
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(718, 24);
+ this.label2.Size = new System.Drawing.Size(694, 24);
this.label2.TabIndex = 1;
this.label2.Text = "按钮用于开始一个即时操作。";
//
@@ -754,7 +754,7 @@
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(718, 40);
+ this.label1.Size = new System.Drawing.Size(694, 40);
this.label1.TabIndex = 0;
this.label1.Text = "Button 按钮";
//
@@ -762,8 +762,7 @@
//
this.Controls.Add(this.stackPanel1);
this.Name = "ButtonDemo";
- this.Size = new System.Drawing.Size(724, 629);
- this.Load += new System.EventHandler(this.ButtonDemo_Load);
+ this.Size = new System.Drawing.Size(700, 629);
this.stackPanel1.ResumeLayout(false);
this.flowPanel7.ResumeLayout(false);
this.flowPanel6.ResumeLayout(false);
diff --git a/Views/ButtonDemo.cs b/Views/ButtonDemo.cs
index 91ec215..49326f2 100644
--- a/Views/ButtonDemo.cs
+++ b/Views/ButtonDemo.cs
@@ -11,10 +11,6 @@ namespace AntdUIDemo.Views
public ButtonDemo()
{
InitializeComponent();
- }
-
- private void ButtonDemo_Load(object sender, EventArgs e)
- {
// 遍历窗体中的所有控件并绑定 tooltip
BindButtonWithToolTip(this);
}
diff --git a/Views/FloatButtonDemo.Designer.cs b/Views/FloatButtonDemo.Designer.cs
index d6cf987..5145fd5 100644
--- a/Views/FloatButtonDemo.Designer.cs
+++ b/Views/FloatButtonDemo.Designer.cs
@@ -63,6 +63,7 @@
this.buttonCZ = new AntdUI.Button();
this.buttonClose = new AntdUI.Button();
this.buttonOpen = new AntdUI.Button();
+ this.divider1 = new AntdUI.Divider();
this.label3 = new AntdUI.Label();
this.label2 = new AntdUI.Label();
this.label1 = new AntdUI.Label();
@@ -83,13 +84,14 @@
this.stackPanel1.Controls.Add(this.stackPanel3);
this.stackPanel1.Controls.Add(this.label4);
this.stackPanel1.Controls.Add(this.stackPanel2);
+ this.stackPanel1.Controls.Add(this.divider1);
this.stackPanel1.Controls.Add(this.label3);
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(710, 372);
+ this.stackPanel1.Size = new System.Drawing.Size(700, 434);
this.stackPanel1.TabIndex = 0;
this.stackPanel1.Text = "stackPanel1";
this.stackPanel1.Vertical = true;
@@ -102,10 +104,10 @@
this.stackPanel6.Controls.Add(this.label15);
this.stackPanel6.Controls.Add(this.input_badge);
this.stackPanel6.Controls.Add(this.label17);
- this.stackPanel6.Location = new System.Drawing.Point(3, 327);
+ this.stackPanel6.Location = new System.Drawing.Point(3, 345);
this.stackPanel6.Name = "stackPanel6";
- this.stackPanel6.Size = new System.Drawing.Size(704, 32);
- this.stackPanel6.TabIndex = 12;
+ this.stackPanel6.Size = new System.Drawing.Size(694, 32);
+ this.stackPanel6.TabIndex = 20;
this.stackPanel6.Text = "stackPanel6";
//
// colorPicker
@@ -176,10 +178,10 @@
this.stackPanel5.Controls.Add(this.label13);
this.stackPanel5.Controls.Add(this.select_shape);
this.stackPanel5.Controls.Add(this.label14);
- this.stackPanel5.Location = new System.Drawing.Point(3, 289);
+ this.stackPanel5.Location = new System.Drawing.Point(3, 307);
this.stackPanel5.Name = "stackPanel5";
- this.stackPanel5.Size = new System.Drawing.Size(704, 32);
- this.stackPanel5.TabIndex = 11;
+ this.stackPanel5.Size = new System.Drawing.Size(694, 32);
+ this.stackPanel5.TabIndex = 19;
this.stackPanel5.Text = "stackPanel5";
//
// input_radius
@@ -246,10 +248,10 @@
// label11
//
this.label11.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F);
- this.label11.Location = new System.Drawing.Point(3, 259);
+ this.label11.Location = new System.Drawing.Point(3, 277);
this.label11.Name = "label11";
- this.label11.Size = new System.Drawing.Size(704, 24);
- this.label11.TabIndex = 10;
+ this.label11.Size = new System.Drawing.Size(694, 24);
+ this.label11.TabIndex = 18;
this.label11.Text = "按钮配置";
//
// stackPanel4
@@ -260,10 +262,10 @@
this.stackPanel4.Controls.Add(this.label7);
this.stackPanel4.Controls.Add(this.input_size);
this.stackPanel4.Controls.Add(this.label9);
- this.stackPanel4.Location = new System.Drawing.Point(3, 221);
+ this.stackPanel4.Location = new System.Drawing.Point(3, 239);
this.stackPanel4.Name = "stackPanel4";
- this.stackPanel4.Size = new System.Drawing.Size(704, 32);
- this.stackPanel4.TabIndex = 9;
+ this.stackPanel4.Size = new System.Drawing.Size(694, 32);
+ this.stackPanel4.TabIndex = 17;
this.stackPanel4.Text = "stackPanel4";
//
// input_my
@@ -343,10 +345,10 @@
this.stackPanel3.Controls.Add(this.label6);
this.stackPanel3.Controls.Add(this.select_align);
this.stackPanel3.Controls.Add(this.label10);
- this.stackPanel3.Location = new System.Drawing.Point(3, 183);
+ this.stackPanel3.Location = new System.Drawing.Point(3, 201);
this.stackPanel3.Name = "stackPanel3";
- this.stackPanel3.Size = new System.Drawing.Size(704, 32);
- this.stackPanel3.TabIndex = 8;
+ this.stackPanel3.Size = new System.Drawing.Size(694, 32);
+ this.stackPanel3.TabIndex = 16;
this.stackPanel3.Text = "stackPanel3";
//
// select_vertical
@@ -420,10 +422,10 @@
// label4
//
this.label4.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F);
- this.label4.Location = new System.Drawing.Point(3, 153);
+ this.label4.Location = new System.Drawing.Point(3, 171);
this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(704, 24);
- this.label4.TabIndex = 6;
+ this.label4.Size = new System.Drawing.Size(694, 24);
+ this.label4.TabIndex = 15;
this.label4.Text = "控件配置";
//
// stackPanel2
@@ -431,10 +433,10 @@
this.stackPanel2.Controls.Add(this.buttonCZ);
this.stackPanel2.Controls.Add(this.buttonClose);
this.stackPanel2.Controls.Add(this.buttonOpen);
- this.stackPanel2.Location = new System.Drawing.Point(3, 109);
+ this.stackPanel2.Location = new System.Drawing.Point(3, 127);
this.stackPanel2.Name = "stackPanel2";
- this.stackPanel2.Size = new System.Drawing.Size(704, 38);
- this.stackPanel2.TabIndex = 5;
+ this.stackPanel2.Size = new System.Drawing.Size(694, 38);
+ this.stackPanel2.TabIndex = 14;
this.stackPanel2.Text = "stackPanel2";
//
// buttonCZ
@@ -447,7 +449,6 @@
this.buttonCZ.Text = "重 置";
this.buttonCZ.Type = AntdUI.TTypeMini.Warn;
this.buttonCZ.WaveSize = 0;
- this.buttonCZ.Click += new System.EventHandler(this.buttonCZ_Click);
//
// buttonClose
//
@@ -459,7 +460,6 @@
this.buttonClose.Text = "关 闭";
this.buttonClose.Type = AntdUI.TTypeMini.Error;
this.buttonClose.WaveSize = 0;
- this.buttonClose.Click += new System.EventHandler(this.buttonClose_Click);
//
// buttonOpen
//
@@ -471,14 +471,20 @@
this.buttonOpen.Text = "开 启";
this.buttonOpen.Type = AntdUI.TTypeMini.Primary;
this.buttonOpen.WaveSize = 0;
- this.buttonOpen.Click += new System.EventHandler(this.buttonOpen_Click);
+ //
+ // divider1
+ //
+ this.divider1.Location = new System.Drawing.Point(3, 109);
+ this.divider1.Name = "divider1";
+ this.divider1.Size = new System.Drawing.Size(694, 12);
+ this.divider1.TabIndex = 13;
//
// label3
//
this.label3.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F);
this.label3.Location = new System.Drawing.Point(3, 79);
this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(704, 24);
+ this.label3.Size = new System.Drawing.Size(694, 24);
this.label3.TabIndex = 4;
this.label3.Text = "FloatButton没有工具箱控件,使用代码方式调用。";
//
@@ -487,7 +493,7 @@
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(704, 24);
+ this.label2.Size = new System.Drawing.Size(694, 24);
this.label2.TabIndex = 3;
this.label2.Text = "悬浮于页面上方的按钮。";
//
@@ -496,16 +502,17 @@
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(704, 40);
+ this.label1.Size = new System.Drawing.Size(694, 40);
this.label1.TabIndex = 2;
- this.label1.Text = "FloatButton 按钮";
+ this.label1.Text = "FloatButton 悬浮按钮";
//
// FloatButtonDemo
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
this.Controls.Add(this.stackPanel1);
this.Name = "FloatButtonDemo";
- this.Size = new System.Drawing.Size(710, 372);
+ this.Size = new System.Drawing.Size(700, 434);
+ this.Load += new System.EventHandler(this.FloatButtonDemo_Load);
this.stackPanel1.ResumeLayout(false);
this.stackPanel6.ResumeLayout(false);
this.stackPanel5.ResumeLayout(false);
@@ -522,9 +529,20 @@
private AntdUI.Label label1;
private AntdUI.Label label2;
private AntdUI.Label label3;
- private AntdUI.StackPanel stackPanel2;
- private AntdUI.Button buttonOpen;
- private AntdUI.Button buttonClose;
+ private AntdUI.StackPanel stackPanel6;
+ private AntdUI.ColorPicker colorPicker;
+ private AntdUI.Label label16;
+ private AntdUI.InputNumber input_badgesize;
+ private AntdUI.Label label15;
+ private AntdUI.Input input_badge;
+ private AntdUI.Label label17;
+ private AntdUI.StackPanel stackPanel5;
+ private AntdUI.InputNumber input_radius;
+ private AntdUI.Label label12;
+ private AntdUI.Select select_type;
+ private AntdUI.Label label13;
+ private AntdUI.Select select_shape;
+ private AntdUI.Label label14;
private AntdUI.Label label11;
private AntdUI.StackPanel stackPanel4;
private AntdUI.InputNumber input_my;
@@ -541,20 +559,10 @@
private AntdUI.Select select_align;
private AntdUI.Label label10;
private AntdUI.Label label4;
- private AntdUI.StackPanel stackPanel5;
- private AntdUI.InputNumber input_radius;
- private AntdUI.Label label12;
- private AntdUI.Select select_type;
- private AntdUI.Label label13;
- private AntdUI.Select select_shape;
- private AntdUI.Label label14;
- private AntdUI.StackPanel stackPanel6;
- private AntdUI.Label label17;
- private AntdUI.InputNumber input_badgesize;
- private AntdUI.Label label15;
- private AntdUI.Input input_badge;
- private AntdUI.ColorPicker colorPicker;
- private AntdUI.Label label16;
+ private AntdUI.StackPanel stackPanel2;
private AntdUI.Button buttonCZ;
+ private AntdUI.Button buttonClose;
+ private AntdUI.Button buttonOpen;
+ private AntdUI.Divider divider1;
}
}
diff --git a/Views/FloatButtonDemo.cs b/Views/FloatButtonDemo.cs
index 60795d4..43e14ce 100644
--- a/Views/FloatButtonDemo.cs
+++ b/Views/FloatButtonDemo.cs
@@ -16,9 +16,22 @@ namespace AntdUIDemo.Views
//初始化下拉框
InitSelectItems();
//设置默认值
- SetDefaultSelectItem();
+ InitData();
+ // 绑定按钮事件
+ BindButtonClick();
+ }
+
+ private void FloatButtonDemo_Load(object sender, EventArgs e)
+ {
// 加载浮动按钮
- LoadBaseFloatButton();
+ LoadFloatButton();
+ }
+
+ private void BindButtonClick()
+ {
+ buttonOpen.Click += buttonOpen_Click;
+ buttonClose.Click += buttonClose_Click;
+ buttonCZ.Click += buttonCZ_Click;
}
// 初始化下拉框
@@ -45,7 +58,7 @@ namespace AntdUIDemo.Views
}
// 设置默认值
- private void SetDefaultSelectItem()
+ private void InitData()
{
select_align.SelectedIndex = 7;
select_shape.SelectedIndex = 0;
@@ -63,7 +76,7 @@ namespace AntdUIDemo.Views
}
// 加载浮动按钮
- private void LoadBaseFloatButton()
+ private void LoadFloatButton()
{
if (floatButtonForm == null || floatButtonForm.IsDisposed)
{
@@ -145,16 +158,16 @@ namespace AntdUIDemo.Views
// 重置
private void buttonCZ_Click(object sender, EventArgs e)
{
- SetDefaultSelectItem();
+ InitData();
CloseFloatButtonForm();
- LoadBaseFloatButton();
+ LoadFloatButton();
}
// 设置
private void buttonOpen_Click(object sender, EventArgs e)
{
CloseFloatButtonForm();
- LoadBaseFloatButton();
+ LoadFloatButton();
}
// 关闭
diff --git a/Views/FlowPanelDemo.Designer.cs b/Views/FlowPanelDemo.Designer.cs
index 14aced2..788d9c6 100644
--- a/Views/FlowPanelDemo.Designer.cs
+++ b/Views/FlowPanelDemo.Designer.cs
@@ -31,24 +31,11 @@
this.stackPanel1 = new AntdUI.StackPanel();
this.stackPanel2 = new AntdUI.StackPanel();
this.flowPanel = new AntdUI.FlowPanel();
- this.button14 = new AntdUI.Button();
- this.button13 = new AntdUI.Button();
- this.button12 = new AntdUI.Button();
- this.button11 = new AntdUI.Button();
- this.button10 = new AntdUI.Button();
- this.button9 = new AntdUI.Button();
- this.button8 = new AntdUI.Button();
- this.button7 = new AntdUI.Button();
- this.button6 = new AntdUI.Button();
- this.button5 = new AntdUI.Button();
- this.button4 = new AntdUI.Button();
- this.button3 = new AntdUI.Button();
- this.button1 = new AntdUI.Button();
- this.button2 = new AntdUI.Button();
this.stackPanel3 = new AntdUI.StackPanel();
- this.buttonCZ = new AntdUI.Button();
this.buttonDEL = new AntdUI.Button();
this.buttonADD = new AntdUI.Button();
+ this.buttonCZ = new AntdUI.Button();
+ this.buttonSZ = new AntdUI.Button();
this.stackPanel6 = new AntdUI.StackPanel();
this.select_autoscroll = new AntdUI.Select();
this.label4 = new AntdUI.Label();
@@ -63,7 +50,6 @@
this.label1 = new AntdUI.Label();
this.stackPanel1.SuspendLayout();
this.stackPanel2.SuspendLayout();
- this.flowPanel.SuspendLayout();
this.stackPanel3.SuspendLayout();
this.stackPanel6.SuspendLayout();
this.stackPanel5.SuspendLayout();
@@ -79,7 +65,7 @@
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(707, 496);
+ this.stackPanel1.Size = new System.Drawing.Size(700, 496);
this.stackPanel1.TabIndex = 1;
this.stackPanel1.Text = "stackPanel1";
this.stackPanel1.Vertical = true;
@@ -90,7 +76,7 @@
this.stackPanel2.Controls.Add(this.stackPanel3);
this.stackPanel2.Location = new System.Drawing.Point(3, 97);
this.stackPanel2.Name = "stackPanel2";
- this.stackPanel2.Size = new System.Drawing.Size(701, 281);
+ this.stackPanel2.Size = new System.Drawing.Size(694, 279);
this.stackPanel2.TabIndex = 7;
this.stackPanel2.Text = "stackPanel2";
//
@@ -98,229 +84,70 @@
//
this.flowPanel.BackColor = System.Drawing.Color.White;
this.flowPanel.Badge = "";
- this.flowPanel.Controls.Add(this.button14);
- this.flowPanel.Controls.Add(this.button13);
- this.flowPanel.Controls.Add(this.button12);
- this.flowPanel.Controls.Add(this.button11);
- this.flowPanel.Controls.Add(this.button10);
- this.flowPanel.Controls.Add(this.button9);
- this.flowPanel.Controls.Add(this.button8);
- this.flowPanel.Controls.Add(this.button7);
- this.flowPanel.Controls.Add(this.button6);
- this.flowPanel.Controls.Add(this.button5);
- this.flowPanel.Controls.Add(this.button4);
- this.flowPanel.Controls.Add(this.button3);
- this.flowPanel.Controls.Add(this.button1);
- this.flowPanel.Controls.Add(this.button2);
this.flowPanel.Location = new System.Drawing.Point(289, 3);
this.flowPanel.Name = "flowPanel";
- this.flowPanel.Size = new System.Drawing.Size(396, 275);
+ this.flowPanel.Size = new System.Drawing.Size(400, 273);
this.flowPanel.TabIndex = 1;
//
- // button14
- //
- this.button14.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.button14.Location = new System.Drawing.Point(105, 147);
- this.button14.Name = "button14";
- this.button14.Size = new System.Drawing.Size(90, 42);
- this.button14.TabIndex = 15;
- this.button14.Text = "Button";
- this.button14.Type = AntdUI.TTypeMini.Primary;
- this.button14.WaveSize = 0;
- //
- // button13
- //
- this.button13.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.button13.Location = new System.Drawing.Point(9, 147);
- this.button13.Name = "button13";
- this.button13.Size = new System.Drawing.Size(90, 42);
- this.button13.TabIndex = 14;
- this.button13.Text = "Button";
- this.button13.Type = AntdUI.TTypeMini.Primary;
- this.button13.WaveSize = 0;
- //
- // button12
- //
- this.button12.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.button12.Location = new System.Drawing.Point(297, 99);
- this.button12.Name = "button12";
- this.button12.Size = new System.Drawing.Size(90, 42);
- this.button12.TabIndex = 13;
- this.button12.Text = "Button";
- this.button12.Type = AntdUI.TTypeMini.Primary;
- this.button12.WaveSize = 0;
- //
- // button11
- //
- this.button11.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.button11.Location = new System.Drawing.Point(201, 99);
- this.button11.Name = "button11";
- this.button11.Size = new System.Drawing.Size(90, 42);
- this.button11.TabIndex = 12;
- this.button11.Text = "Button";
- this.button11.Type = AntdUI.TTypeMini.Primary;
- this.button11.WaveSize = 0;
- //
- // button10
- //
- this.button10.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.button10.Location = new System.Drawing.Point(105, 99);
- this.button10.Name = "button10";
- this.button10.Size = new System.Drawing.Size(90, 42);
- this.button10.TabIndex = 11;
- this.button10.Text = "Button";
- this.button10.Type = AntdUI.TTypeMini.Primary;
- this.button10.WaveSize = 0;
- //
- // button9
- //
- this.button9.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.button9.Location = new System.Drawing.Point(9, 99);
- this.button9.Name = "button9";
- this.button9.Size = new System.Drawing.Size(90, 42);
- this.button9.TabIndex = 10;
- this.button9.Text = "Button";
- this.button9.Type = AntdUI.TTypeMini.Primary;
- this.button9.WaveSize = 0;
- //
- // button8
- //
- this.button8.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.button8.Location = new System.Drawing.Point(297, 51);
- this.button8.Name = "button8";
- this.button8.Size = new System.Drawing.Size(90, 42);
- this.button8.TabIndex = 9;
- this.button8.Text = "Button";
- this.button8.Type = AntdUI.TTypeMini.Primary;
- this.button8.WaveSize = 0;
- //
- // button7
- //
- this.button7.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.button7.Location = new System.Drawing.Point(201, 51);
- this.button7.Name = "button7";
- this.button7.Size = new System.Drawing.Size(90, 42);
- this.button7.TabIndex = 8;
- this.button7.Text = "Button";
- this.button7.Type = AntdUI.TTypeMini.Primary;
- this.button7.WaveSize = 0;
- //
- // button6
- //
- this.button6.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.button6.Location = new System.Drawing.Point(105, 51);
- this.button6.Name = "button6";
- this.button6.Size = new System.Drawing.Size(90, 42);
- this.button6.TabIndex = 7;
- this.button6.Text = "Button";
- this.button6.Type = AntdUI.TTypeMini.Primary;
- this.button6.WaveSize = 0;
- //
- // button5
- //
- this.button5.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.button5.Location = new System.Drawing.Point(9, 51);
- this.button5.Name = "button5";
- this.button5.Size = new System.Drawing.Size(90, 42);
- this.button5.TabIndex = 6;
- this.button5.Text = "Button";
- this.button5.Type = AntdUI.TTypeMini.Primary;
- this.button5.WaveSize = 0;
- //
- // button4
- //
- this.button4.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.button4.Location = new System.Drawing.Point(297, 3);
- this.button4.Name = "button4";
- this.button4.Size = new System.Drawing.Size(90, 42);
- this.button4.TabIndex = 5;
- this.button4.Text = "Button";
- this.button4.Type = AntdUI.TTypeMini.Primary;
- this.button4.WaveSize = 0;
- //
- // button3
- //
- this.button3.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.button3.Location = new System.Drawing.Point(201, 3);
- this.button3.Name = "button3";
- this.button3.Size = new System.Drawing.Size(90, 42);
- this.button3.TabIndex = 4;
- this.button3.Text = "Button";
- this.button3.Type = AntdUI.TTypeMini.Primary;
- this.button3.WaveSize = 0;
- //
- // button1
- //
- this.button1.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.button1.Location = new System.Drawing.Point(105, 3);
- this.button1.Name = "button1";
- this.button1.Size = new System.Drawing.Size(90, 42);
- this.button1.TabIndex = 3;
- this.button1.Text = "Button";
- this.button1.Type = AntdUI.TTypeMini.Primary;
- this.button1.WaveSize = 0;
- //
- // button2
- //
- this.button2.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.button2.Location = new System.Drawing.Point(9, 3);
- this.button2.Name = "button2";
- this.button2.Size = new System.Drawing.Size(90, 42);
- this.button2.TabIndex = 2;
- this.button2.Text = "Button";
- this.button2.Type = AntdUI.TTypeMini.Primary;
- this.button2.WaveSize = 0;
- //
// stackPanel3
//
- this.stackPanel3.Controls.Add(this.buttonCZ);
this.stackPanel3.Controls.Add(this.buttonDEL);
this.stackPanel3.Controls.Add(this.buttonADD);
+ this.stackPanel3.Controls.Add(this.buttonCZ);
+ this.stackPanel3.Controls.Add(this.buttonSZ);
this.stackPanel3.Controls.Add(this.stackPanel6);
this.stackPanel3.Controls.Add(this.stackPanel5);
this.stackPanel3.Controls.Add(this.stackPanel4);
this.stackPanel3.Location = new System.Drawing.Point(3, 3);
this.stackPanel3.Name = "stackPanel3";
- this.stackPanel3.Size = new System.Drawing.Size(280, 275);
+ this.stackPanel3.Size = new System.Drawing.Size(280, 273);
this.stackPanel3.TabIndex = 0;
this.stackPanel3.Text = "stackPanel3";
this.stackPanel3.Vertical = true;
//
- // buttonCZ
- //
- this.buttonCZ.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.buttonCZ.Location = new System.Drawing.Point(3, 193);
- this.buttonCZ.Name = "buttonCZ";
- this.buttonCZ.Size = new System.Drawing.Size(274, 32);
- this.buttonCZ.TabIndex = 15;
- this.buttonCZ.Text = "重 置";
- this.buttonCZ.Type = AntdUI.TTypeMini.Warn;
- this.buttonCZ.WaveSize = 0;
- this.buttonCZ.Click += new System.EventHandler(this.buttonCZ_Click);
- //
// buttonDEL
//
this.buttonDEL.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.buttonDEL.Location = new System.Drawing.Point(3, 155);
+ this.buttonDEL.Location = new System.Drawing.Point(3, 231);
this.buttonDEL.Name = "buttonDEL";
this.buttonDEL.Size = new System.Drawing.Size(274, 32);
- this.buttonDEL.TabIndex = 14;
- this.buttonDEL.Text = "删除按钮";
+ this.buttonDEL.TabIndex = 36;
+ this.buttonDEL.Text = "删除 Button";
this.buttonDEL.Type = AntdUI.TTypeMini.Error;
this.buttonDEL.WaveSize = 0;
- this.buttonDEL.Click += new System.EventHandler(this.buttonDEL_Click);
//
// buttonADD
//
this.buttonADD.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.buttonADD.Location = new System.Drawing.Point(3, 117);
+ this.buttonADD.Location = new System.Drawing.Point(3, 193);
this.buttonADD.Name = "buttonADD";
this.buttonADD.Size = new System.Drawing.Size(274, 32);
- this.buttonADD.TabIndex = 13;
- this.buttonADD.Text = "添加按钮";
- this.buttonADD.Type = AntdUI.TTypeMini.Primary;
+ this.buttonADD.TabIndex = 35;
+ this.buttonADD.Text = "添加 Button";
+ this.buttonADD.Type = AntdUI.TTypeMini.Info;
this.buttonADD.WaveSize = 0;
- this.buttonADD.Click += new System.EventHandler(this.buttonADD_Click);
+ //
+ // buttonCZ
+ //
+ this.buttonCZ.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.buttonCZ.Location = new System.Drawing.Point(3, 155);
+ this.buttonCZ.Name = "buttonCZ";
+ this.buttonCZ.Size = new System.Drawing.Size(274, 32);
+ this.buttonCZ.TabIndex = 34;
+ this.buttonCZ.Text = "重 置";
+ this.buttonCZ.Type = AntdUI.TTypeMini.Warn;
+ this.buttonCZ.WaveSize = 0;
+ //
+ // buttonSZ
+ //
+ this.buttonSZ.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.buttonSZ.Location = new System.Drawing.Point(3, 117);
+ this.buttonSZ.Name = "buttonSZ";
+ this.buttonSZ.Size = new System.Drawing.Size(274, 32);
+ this.buttonSZ.TabIndex = 33;
+ this.buttonSZ.Text = "设 置";
+ this.buttonSZ.Type = AntdUI.TTypeMini.Primary;
+ this.buttonSZ.WaveSize = 0;
//
// stackPanel6
//
@@ -343,11 +170,10 @@
this.select_autoscroll.Name = "select_autoscroll";
this.select_autoscroll.SelectedIndex = 1;
this.select_autoscroll.SelectedValue = "False";
- this.select_autoscroll.Size = new System.Drawing.Size(105, 26);
+ this.select_autoscroll.Size = new System.Drawing.Size(175, 26);
this.select_autoscroll.TabIndex = 11;
this.select_autoscroll.Text = "False";
this.select_autoscroll.WaveSize = 1;
- this.select_autoscroll.SelectedIndexChanged += new AntdUI.IntEventHandler(this.select_autoscroll_SelectedIndexChanged);
//
// label4
//
@@ -373,11 +199,10 @@
this.input_gap.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F);
this.input_gap.Location = new System.Drawing.Point(97, 3);
this.input_gap.Name = "input_gap";
- this.input_gap.Size = new System.Drawing.Size(105, 26);
+ this.input_gap.Size = new System.Drawing.Size(175, 26);
this.input_gap.TabIndex = 5;
this.input_gap.Text = "0";
this.input_gap.WaveSize = 1;
- this.input_gap.ValueChanged += new AntdUI.DecimalEventHandler(this.input_gap_ValueChanged);
//
// label3
//
@@ -404,10 +229,9 @@
this.select_align.List = true;
this.select_align.Location = new System.Drawing.Point(97, 3);
this.select_align.Name = "select_align";
- this.select_align.Size = new System.Drawing.Size(105, 26);
+ this.select_align.Size = new System.Drawing.Size(175, 26);
this.select_align.TabIndex = 11;
this.select_align.WaveSize = 1;
- this.select_align.SelectedIndexChanged += new AntdUI.IntEventHandler(this.select_align_SelectedIndexChanged);
//
// label10
//
@@ -422,7 +246,7 @@
//
this.divider1.Location = new System.Drawing.Point(3, 79);
this.divider1.Name = "divider1";
- this.divider1.Size = new System.Drawing.Size(701, 12);
+ this.divider1.Size = new System.Drawing.Size(694, 12);
this.divider1.TabIndex = 6;
//
// label2
@@ -430,7 +254,7 @@
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(701, 24);
+ this.label2.Size = new System.Drawing.Size(694, 24);
this.label2.TabIndex = 5;
this.label2.Text = "用于对齐的弹性布局容器。";
//
@@ -439,7 +263,7 @@
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(701, 40);
+ this.label1.Size = new System.Drawing.Size(694, 40);
this.label1.TabIndex = 4;
this.label1.Text = "FlowPanel 流动布局";
//
@@ -448,10 +272,10 @@
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
this.Controls.Add(this.stackPanel1);
this.Name = "FlowPanelDemo";
- this.Size = new System.Drawing.Size(707, 496);
+ this.Size = new System.Drawing.Size(700, 496);
+ this.Load += new System.EventHandler(this.FlowPanelDemo_Load);
this.stackPanel1.ResumeLayout(false);
this.stackPanel2.ResumeLayout(false);
- this.flowPanel.ResumeLayout(false);
this.stackPanel3.ResumeLayout(false);
this.stackPanel6.ResumeLayout(false);
this.stackPanel5.ResumeLayout(false);
@@ -469,15 +293,6 @@
private AntdUI.StackPanel stackPanel2;
private AntdUI.FlowPanel flowPanel;
private AntdUI.StackPanel stackPanel3;
- private AntdUI.Button button9;
- private AntdUI.Button button8;
- private AntdUI.Button button7;
- private AntdUI.Button button6;
- private AntdUI.Button button5;
- private AntdUI.Button button4;
- private AntdUI.Button button3;
- private AntdUI.Button button1;
- private AntdUI.Button button2;
private AntdUI.StackPanel stackPanel4;
private AntdUI.Label label10;
private AntdUI.Select select_align;
@@ -487,13 +302,9 @@
private AntdUI.StackPanel stackPanel6;
private AntdUI.Select select_autoscroll;
private AntdUI.Label label4;
- private AntdUI.Button button14;
- private AntdUI.Button button13;
- private AntdUI.Button button12;
- private AntdUI.Button button11;
- private AntdUI.Button button10;
+ private AntdUI.Button buttonCZ;
+ private AntdUI.Button buttonSZ;
private AntdUI.Button buttonDEL;
private AntdUI.Button buttonADD;
- private AntdUI.Button buttonCZ;
}
}
diff --git a/Views/FlowPanelDemo.cs b/Views/FlowPanelDemo.cs
index 3d1413d..6615502 100644
--- a/Views/FlowPanelDemo.cs
+++ b/Views/FlowPanelDemo.cs
@@ -7,15 +7,68 @@ namespace AntdUIDemo.Views
{
public partial class FlowPanelDemo : UserControl
{
- private AntdUI.Window form;
+ private Window form;
public FlowPanelDemo(Window _form)
{
form = _form;
InitializeComponent();
//初始化下拉框
InitSelectItems();
+ //设置默认值
+ InitData();
+ // 绑定按钮事件
+ BindButtonClick();
}
+ private void FlowPanelDemo_Load(object sender, EventArgs e)
+ {
+ //初始化FlowPanel
+ LoadFlowPanel();
+ }
+
+ //初始化panel
+ private void LoadFlowPanel()
+ {
+ flowPanel.Align = (TAlignFlow)select_align.SelectedValue;
+ flowPanel.Gap = (int)input_gap.Value;
+ flowPanel.AutoScroll = select_autoscroll.SelectedIndex == 0;
+
+ flowPanel.Controls.Clear();
+ for (int i = 0; i < 14; i++)
+ {
+ var control = new AntdUI.Button()
+ {
+ Text = "Button",
+ Type = TTypeMini.Primary,
+ WaveSize = 0,
+ Font = new Font("Microsoft YaHei UI", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(134))),
+ Size = new Size(90, 42),
+
+ };
+ // 通过主窗口设置DPI控制添加控件保持缩放比例
+ form.AutoDpi(control);
+ flowPanel.Controls.Add(control);
+ }
+ }
+
+ // 设置默认值
+ private void InitData()
+ {
+ select_align.SelectedIndex = 0;
+ input_gap.Value = 0;
+ select_autoscroll.SelectedIndex = 1;
+ }
+
+ // 绑定按钮事件
+ private void BindButtonClick()
+ {
+ buttonSZ.Click += buttonSZ_Click;
+ buttonCZ.Click += buttonCZ_Click;
+ buttonADD.Click += buttonADD_Click;
+ buttonDEL.Click += buttonDEL_Click;
+ }
+
+ // 初始化下拉框
private void InitSelectItems()
{
//初始化方向
@@ -24,25 +77,6 @@ namespace AntdUIDemo.Views
{
select_align.Items.Add(align);
}
- select_align.SelectedIndex = 0;
- }
-
- // 选择对齐方式
- private void select_align_SelectedIndexChanged(object sender, int value)
- {
- flowPanel.Align = (TAlignFlow)select_align.SelectedValue;
- }
-
- // 输入间隔
- private void input_gap_ValueChanged(object sender, decimal value)
- {
- flowPanel.Invoke((MethodInvoker)(() => flowPanel.Gap = (int)value));
- }
-
- // 是否添加滚动
- private void select_autoscroll_SelectedIndexChanged(object sender, int value)
- {
- flowPanel.AutoScroll = select_autoscroll.SelectedIndex == 0;
}
// 添加按钮
@@ -71,28 +105,20 @@ namespace AntdUIDemo.Views
}
}
+ // 设置
+ private void buttonSZ_Click(object sender, EventArgs e)
+ {
+ flowPanel.Align = (TAlignFlow)select_align.SelectedValue;
+ flowPanel.Gap = (int)input_gap.Value;
+ flowPanel.AutoScroll = select_autoscroll.SelectedIndex == 0;
+ }
+
// 重置
private void buttonCZ_Click(object sender, EventArgs e)
{
- select_align.SelectedIndex = 0;
- input_gap.Value = 0;
- select_autoscroll.SelectedIndex = 1;
- flowPanel.Controls.Clear();
- for (int i = 0; i < 14; i++)
- {
- var control = new AntdUI.Button()
- {
- Text = "Button",
- Type = TTypeMini.Primary,
- WaveSize = 0,
- Font = new Font("Microsoft YaHei UI", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(134))),
- Size = new Size(90, 42),
-
- };
- form.AutoDpi(control);
- flowPanel.Controls.Add(control);
- }
-
+ InitData();
+ LoadFlowPanel();
}
+
}
}
diff --git a/Views/GridPanelDemo.Designer.cs b/Views/GridPanelDemo.Designer.cs
index b1a7857..48b3746 100644
--- a/Views/GridPanelDemo.Designer.cs
+++ b/Views/GridPanelDemo.Designer.cs
@@ -31,13 +31,9 @@
this.stackPanel1 = new AntdUI.StackPanel();
this.stackPanel2 = new AntdUI.StackPanel();
this.gridPanel = new AntdUI.GridPanel();
- this.button5 = new AntdUI.Button();
- this.button4 = new AntdUI.Button();
- this.button3 = new AntdUI.Button();
- this.button2 = new AntdUI.Button();
this.stackPanel3 = new AntdUI.StackPanel();
this.buttonCZ = new AntdUI.Button();
- this.buttonSPAN = new AntdUI.Button();
+ this.buttonSZ = new AntdUI.Button();
this.stackPanel4 = new AntdUI.StackPanel();
this.input_gap = new AntdUI.InputNumber();
this.label4 = new AntdUI.Label();
@@ -49,7 +45,6 @@
this.label1 = new AntdUI.Label();
this.stackPanel1.SuspendLayout();
this.stackPanel2.SuspendLayout();
- this.gridPanel.SuspendLayout();
this.stackPanel3.SuspendLayout();
this.stackPanel4.SuspendLayout();
this.stackPanel5.SuspendLayout();
@@ -64,7 +59,7 @@
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(683, 475);
+ this.stackPanel1.Size = new System.Drawing.Size(700, 475);
this.stackPanel1.TabIndex = 0;
this.stackPanel1.Text = "stackPanel1";
this.stackPanel1.Vertical = true;
@@ -75,71 +70,23 @@
this.stackPanel2.Controls.Add(this.stackPanel3);
this.stackPanel2.Location = new System.Drawing.Point(3, 97);
this.stackPanel2.Name = "stackPanel2";
- this.stackPanel2.Size = new System.Drawing.Size(677, 299);
+ this.stackPanel2.Size = new System.Drawing.Size(694, 299);
this.stackPanel2.TabIndex = 9;
this.stackPanel2.Text = "stackPanel2";
//
// gridPanel
//
this.gridPanel.BackColor = System.Drawing.Color.White;
- this.gridPanel.Controls.Add(this.button5);
- this.gridPanel.Controls.Add(this.button4);
- this.gridPanel.Controls.Add(this.button3);
- this.gridPanel.Controls.Add(this.button2);
this.gridPanel.Location = new System.Drawing.Point(289, 3);
this.gridPanel.Name = "gridPanel";
- this.gridPanel.Size = new System.Drawing.Size(384, 293);
+ this.gridPanel.Size = new System.Drawing.Size(400, 293);
this.gridPanel.TabIndex = 1;
this.gridPanel.Text = "gridPanel1";
//
- // button5
- //
- this.button5.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.button5.Location = new System.Drawing.Point(195, 149);
- this.button5.Name = "button5";
- this.button5.Size = new System.Drawing.Size(186, 140);
- this.button5.TabIndex = 6;
- this.button5.Text = "Button";
- this.button5.Type = AntdUI.TTypeMini.Primary;
- this.button5.WaveSize = 0;
- //
- // button4
- //
- this.button4.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.button4.Location = new System.Drawing.Point(3, 149);
- this.button4.Name = "button4";
- this.button4.Size = new System.Drawing.Size(186, 140);
- this.button4.TabIndex = 5;
- this.button4.Text = "Button";
- this.button4.Type = AntdUI.TTypeMini.Primary;
- this.button4.WaveSize = 0;
- //
- // button3
- //
- this.button3.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.button3.Location = new System.Drawing.Point(195, 3);
- this.button3.Name = "button3";
- this.button3.Size = new System.Drawing.Size(186, 140);
- this.button3.TabIndex = 4;
- this.button3.Text = "Button";
- this.button3.Type = AntdUI.TTypeMini.Primary;
- this.button3.WaveSize = 0;
- //
- // button2
- //
- this.button2.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.button2.Location = new System.Drawing.Point(3, 3);
- this.button2.Name = "button2";
- this.button2.Size = new System.Drawing.Size(186, 140);
- this.button2.TabIndex = 3;
- this.button2.Text = "Button";
- this.button2.Type = AntdUI.TTypeMini.Primary;
- this.button2.WaveSize = 0;
- //
// stackPanel3
//
this.stackPanel3.Controls.Add(this.buttonCZ);
- this.stackPanel3.Controls.Add(this.buttonSPAN);
+ this.stackPanel3.Controls.Add(this.buttonSZ);
this.stackPanel3.Controls.Add(this.stackPanel4);
this.stackPanel3.Controls.Add(this.stackPanel5);
this.stackPanel3.Location = new System.Drawing.Point(3, 3);
@@ -152,32 +99,30 @@
// buttonCZ
//
this.buttonCZ.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.buttonCZ.Location = new System.Drawing.Point(3, 206);
+ this.buttonCZ.Location = new System.Drawing.Point(3, 136);
this.buttonCZ.Name = "buttonCZ";
this.buttonCZ.Size = new System.Drawing.Size(274, 32);
this.buttonCZ.TabIndex = 20;
this.buttonCZ.Text = "重 置";
this.buttonCZ.Type = AntdUI.TTypeMini.Warn;
this.buttonCZ.WaveSize = 0;
- this.buttonCZ.Click += new System.EventHandler(this.buttonCZ_Click);
//
- // buttonSPAN
+ // buttonSZ
//
- this.buttonSPAN.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.buttonSPAN.Location = new System.Drawing.Point(3, 168);
- this.buttonSPAN.Name = "buttonSPAN";
- this.buttonSPAN.Size = new System.Drawing.Size(274, 32);
- this.buttonSPAN.TabIndex = 19;
- this.buttonSPAN.Text = "设 置";
- this.buttonSPAN.Type = AntdUI.TTypeMini.Primary;
- this.buttonSPAN.WaveSize = 0;
- this.buttonSPAN.Click += new System.EventHandler(this.buttonSPAN_Click);
+ this.buttonSZ.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.buttonSZ.Location = new System.Drawing.Point(3, 98);
+ this.buttonSZ.Name = "buttonSZ";
+ this.buttonSZ.Size = new System.Drawing.Size(274, 32);
+ this.buttonSZ.TabIndex = 19;
+ this.buttonSZ.Text = "设 置";
+ this.buttonSZ.Type = AntdUI.TTypeMini.Primary;
+ this.buttonSZ.WaveSize = 0;
//
// stackPanel4
//
this.stackPanel4.Controls.Add(this.input_gap);
this.stackPanel4.Controls.Add(this.label4);
- this.stackPanel4.Location = new System.Drawing.Point(3, 130);
+ this.stackPanel4.Location = new System.Drawing.Point(3, 60);
this.stackPanel4.Name = "stackPanel4";
this.stackPanel4.Size = new System.Drawing.Size(274, 32);
this.stackPanel4.TabIndex = 18;
@@ -208,7 +153,7 @@
this.stackPanel5.Controls.Add(this.label3);
this.stackPanel5.Location = new System.Drawing.Point(3, 3);
this.stackPanel5.Name = "stackPanel5";
- this.stackPanel5.Size = new System.Drawing.Size(274, 121);
+ this.stackPanel5.Size = new System.Drawing.Size(274, 51);
this.stackPanel5.TabIndex = 15;
this.stackPanel5.Text = "stackPanel5";
//
@@ -218,7 +163,8 @@
this.input_span.Location = new System.Drawing.Point(97, 3);
this.input_span.Multiline = true;
this.input_span.Name = "input_span";
- this.input_span.Size = new System.Drawing.Size(175, 115);
+ this.input_span.PlaceholderText = "分号隔开为行,空格隔开为列(可设置固定值或百分号)";
+ this.input_span.Size = new System.Drawing.Size(175, 45);
this.input_span.TabIndex = 5;
this.input_span.Text = "50% 50%;50% 50%";
this.input_span.WaveSize = 0;
@@ -228,7 +174,7 @@
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, 3);
this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(88, 115);
+ this.label3.Size = new System.Drawing.Size(88, 45);
this.label3.TabIndex = 4;
this.label3.Text = "Span";
//
@@ -236,7 +182,7 @@
//
this.divider1.Location = new System.Drawing.Point(3, 79);
this.divider1.Name = "divider1";
- this.divider1.Size = new System.Drawing.Size(677, 12);
+ this.divider1.Size = new System.Drawing.Size(694, 12);
this.divider1.TabIndex = 8;
//
// label2
@@ -244,7 +190,7 @@
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(677, 24);
+ this.label2.Size = new System.Drawing.Size(694, 24);
this.label2.TabIndex = 7;
this.label2.Text = "精准划分区域的网格布局容器。";
//
@@ -253,7 +199,7 @@
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(677, 40);
+ this.label1.Size = new System.Drawing.Size(694, 40);
this.label1.TabIndex = 6;
this.label1.Text = "GridPanel 网格布局";
//
@@ -261,10 +207,10 @@
//
this.Controls.Add(this.stackPanel1);
this.Name = "GridPanelDemo";
- this.Size = new System.Drawing.Size(683, 475);
+ this.Size = new System.Drawing.Size(700, 475);
+ this.Load += new System.EventHandler(this.GridPanelDemo_Load);
this.stackPanel1.ResumeLayout(false);
this.stackPanel2.ResumeLayout(false);
- this.gridPanel.ResumeLayout(false);
this.stackPanel3.ResumeLayout(false);
this.stackPanel4.ResumeLayout(false);
this.stackPanel5.ResumeLayout(false);
@@ -284,14 +230,10 @@
private AntdUI.Input input_span;
private AntdUI.Label label3;
private AntdUI.GridPanel gridPanel;
- private AntdUI.Button buttonCZ;
- private AntdUI.Button buttonSPAN;
+ private AntdUI.Button buttonSZ;
private AntdUI.StackPanel stackPanel4;
private AntdUI.InputNumber input_gap;
private AntdUI.Label label4;
- private AntdUI.Button button5;
- private AntdUI.Button button4;
- private AntdUI.Button button3;
- private AntdUI.Button button2;
+ private AntdUI.Button buttonCZ;
}
}
diff --git a/Views/GridPanelDemo.cs b/Views/GridPanelDemo.cs
index afd3252..fb679a7 100644
--- a/Views/GridPanelDemo.cs
+++ b/Views/GridPanelDemo.cs
@@ -10,9 +10,30 @@ namespace AntdUIDemo.Views
public GridPanelDemo()
{
InitializeComponent();
+ //设置默认值
+ InitData();
+ // 绑定按钮事件
+ BindButtonClick();
}
- private void buttonSPAN_Click(object sender, EventArgs e)
+ private void GridPanelDemo_Load(object sender, EventArgs e)
+ {
+ LoadGridPanel(input_span.Text, input_gap.Value);
+ }
+
+ private void InitData()
+ {
+ input_gap.Value = 0;
+ input_span.Text = "50% 50%;50% 50%";
+ }
+
+ private void BindButtonClick()
+ {
+ buttonSZ.Click += buttonSZ_Click;
+ buttonCZ.Click += buttonCZ_Click;
+ }
+
+ private void buttonSZ_Click(object sender, EventArgs e)
{
LoadGridPanel(input_span.Text, input_gap.Value);
}
@@ -37,10 +58,9 @@ namespace AntdUIDemo.Views
private void buttonCZ_Click(object sender, EventArgs e)
{
- input_gap.Value = 0;
- var span = "50% 50%;50% 50%";
- input_span.Text = span;
- LoadGridPanel(span, 0);
+ InitData();
+ LoadGridPanel(input_span.Text, 0);
}
+
}
}
diff --git a/Views/PanelDemo.Designer.cs b/Views/PanelDemo.Designer.cs
index 5da4e81..131db50 100644
--- a/Views/PanelDemo.Designer.cs
+++ b/Views/PanelDemo.Designer.cs
@@ -29,311 +29,97 @@
private void InitializeComponent()
{
this.stackPanel1 = new AntdUI.StackPanel();
- this.label2 = new AntdUI.Label();
- this.label1 = new AntdUI.Label();
this.stackPanel2 = new AntdUI.StackPanel();
- this.stackPanel3 = new AntdUI.StackPanel();
- this.stackPanel4 = new AntdUI.StackPanel();
- this.select_arrowalign = new AntdUI.Select();
- this.label10 = new AntdUI.Label();
- this.stackPanel5 = new AntdUI.StackPanel();
- this.input_arrowsize = new AntdUI.InputNumber();
- this.label3 = new AntdUI.Label();
- this.stackPanel6 = new AntdUI.StackPanel();
- this.input_radius = new AntdUI.InputNumber();
- this.label4 = new AntdUI.Label();
- this.stackPanel7 = new AntdUI.StackPanel();
- this.input_shadow = new AntdUI.InputNumber();
- this.label5 = new AntdUI.Label();
- this.stackPanel8 = new AntdUI.StackPanel();
- this.select_shadowalign = new AntdUI.Select();
- this.label6 = new AntdUI.Label();
- this.stackPanel9 = new AntdUI.StackPanel();
- this.label7 = new AntdUI.Label();
- this.colorPicker = new AntdUI.ColorPicker();
this.stackPanel15 = new AntdUI.StackPanel();
- this.stackPanel10 = new AntdUI.StackPanel();
- this.input_shadowX = new AntdUI.InputNumber();
- this.label8 = new AntdUI.Label();
- this.stackPanel11 = new AntdUI.StackPanel();
- this.input_shadowY = new AntdUI.InputNumber();
- this.label9 = new AntdUI.Label();
- this.stackPanel12 = new AntdUI.StackPanel();
- this.input_shadowO = new AntdUI.InputNumber();
- this.label11 = new AntdUI.Label();
- this.stackPanel14 = new AntdUI.StackPanel();
- this.select_shadowOA = new AntdUI.Select();
- this.label13 = new AntdUI.Label();
+ this.panel = new AntdUI.Panel();
+ this.buttonCZ = new AntdUI.Button();
+ this.buttonSZ = new AntdUI.Button();
this.stackPanel13 = new AntdUI.StackPanel();
this.input_shadowOH = new AntdUI.InputNumber();
this.label12 = new AntdUI.Label();
- this.buttonCZ = new AntdUI.Button();
- this.buttonSZ = new AntdUI.Button();
- this.panel = new AntdUI.Panel();
+ this.stackPanel14 = new AntdUI.StackPanel();
+ this.select_shadowOA = new AntdUI.Select();
+ this.label13 = new AntdUI.Label();
+ this.stackPanel3 = new AntdUI.StackPanel();
+ this.stackPanel12 = new AntdUI.StackPanel();
+ this.input_shadowO = new AntdUI.InputNumber();
+ this.label11 = new AntdUI.Label();
+ this.stackPanel11 = new AntdUI.StackPanel();
+ this.input_shadowY = new AntdUI.InputNumber();
+ this.label9 = new AntdUI.Label();
+ this.stackPanel10 = new AntdUI.StackPanel();
+ this.input_shadowX = new AntdUI.InputNumber();
+ this.label8 = new AntdUI.Label();
+ this.stackPanel9 = new AntdUI.StackPanel();
+ this.colorPicker_shadow = new AntdUI.ColorPicker();
+ this.label7 = new AntdUI.Label();
+ this.stackPanel8 = new AntdUI.StackPanel();
+ this.select_shadowalign = new AntdUI.Select();
+ this.label6 = new AntdUI.Label();
+ this.stackPanel7 = new AntdUI.StackPanel();
+ this.input_shadow = new AntdUI.InputNumber();
+ this.label5 = new AntdUI.Label();
+ this.stackPanel17 = new AntdUI.StackPanel();
+ this.input_borderwidth = new AntdUI.InputNumber();
+ this.label15 = new AntdUI.Label();
+ this.stackPanel16 = new AntdUI.StackPanel();
+ this.colorPicker_border = new AntdUI.ColorPicker();
+ this.label14 = new AntdUI.Label();
+ this.stackPanel6 = new AntdUI.StackPanel();
+ this.input_radius = new AntdUI.InputNumber();
+ this.label4 = new AntdUI.Label();
+ this.stackPanel5 = new AntdUI.StackPanel();
+ this.input_arrowsize = new AntdUI.InputNumber();
+ this.label3 = new AntdUI.Label();
+ this.stackPanel4 = new AntdUI.StackPanel();
+ this.select_arrowalign = new AntdUI.Select();
+ this.label10 = new AntdUI.Label();
+ this.divider1 = new AntdUI.Divider();
+ this.label2 = new AntdUI.Label();
+ this.label1 = new AntdUI.Label();
this.stackPanel1.SuspendLayout();
this.stackPanel2.SuspendLayout();
- this.stackPanel3.SuspendLayout();
- this.stackPanel4.SuspendLayout();
- this.stackPanel5.SuspendLayout();
- this.stackPanel6.SuspendLayout();
- this.stackPanel7.SuspendLayout();
- this.stackPanel8.SuspendLayout();
- this.stackPanel9.SuspendLayout();
this.stackPanel15.SuspendLayout();
- this.stackPanel10.SuspendLayout();
- this.stackPanel11.SuspendLayout();
- this.stackPanel12.SuspendLayout();
- this.stackPanel14.SuspendLayout();
this.stackPanel13.SuspendLayout();
+ this.stackPanel14.SuspendLayout();
+ this.stackPanel3.SuspendLayout();
+ this.stackPanel12.SuspendLayout();
+ this.stackPanel11.SuspendLayout();
+ this.stackPanel10.SuspendLayout();
+ this.stackPanel9.SuspendLayout();
+ this.stackPanel8.SuspendLayout();
+ this.stackPanel7.SuspendLayout();
+ this.stackPanel17.SuspendLayout();
+ this.stackPanel16.SuspendLayout();
+ this.stackPanel6.SuspendLayout();
+ this.stackPanel5.SuspendLayout();
+ this.stackPanel4.SuspendLayout();
this.SuspendLayout();
//
// stackPanel1
//
this.stackPanel1.Controls.Add(this.stackPanel2);
+ 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(679, 435);
+ this.stackPanel1.Size = new System.Drawing.Size(700, 569);
this.stackPanel1.TabIndex = 0;
this.stackPanel1.Text = "stackPanel1";
this.stackPanel1.Vertical = true;
//
- // 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(673, 24);
- this.label2.TabIndex = 7;
- 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(673, 40);
- this.label1.TabIndex = 6;
- this.label1.Text = "Panel 面板";
- //
// stackPanel2
//
this.stackPanel2.Controls.Add(this.stackPanel15);
this.stackPanel2.Controls.Add(this.stackPanel3);
- this.stackPanel2.Location = new System.Drawing.Point(3, 79);
+ this.stackPanel2.Location = new System.Drawing.Point(3, 97);
this.stackPanel2.Name = "stackPanel2";
- this.stackPanel2.Size = new System.Drawing.Size(673, 353);
- this.stackPanel2.TabIndex = 8;
+ this.stackPanel2.Size = new System.Drawing.Size(694, 437);
+ this.stackPanel2.TabIndex = 9;
this.stackPanel2.Text = "stackPanel2";
//
- // stackPanel3
- //
- this.stackPanel3.Controls.Add(this.stackPanel12);
- this.stackPanel3.Controls.Add(this.stackPanel11);
- this.stackPanel3.Controls.Add(this.stackPanel10);
- this.stackPanel3.Controls.Add(this.stackPanel9);
- this.stackPanel3.Controls.Add(this.stackPanel8);
- this.stackPanel3.Controls.Add(this.stackPanel7);
- this.stackPanel3.Controls.Add(this.stackPanel6);
- this.stackPanel3.Controls.Add(this.stackPanel5);
- this.stackPanel3.Controls.Add(this.stackPanel4);
- this.stackPanel3.Location = new System.Drawing.Point(3, 3);
- this.stackPanel3.Name = "stackPanel3";
- this.stackPanel3.Size = new System.Drawing.Size(280, 347);
- this.stackPanel3.TabIndex = 0;
- this.stackPanel3.Text = "stackPanel3";
- this.stackPanel3.Vertical = true;
- //
- // stackPanel4
- //
- this.stackPanel4.Controls.Add(this.select_arrowalign);
- this.stackPanel4.Controls.Add(this.label10);
- this.stackPanel4.Location = new System.Drawing.Point(3, 3);
- this.stackPanel4.Name = "stackPanel4";
- this.stackPanel4.Size = new System.Drawing.Size(274, 32);
- this.stackPanel4.TabIndex = 10;
- this.stackPanel4.Text = "stackPanel4";
- //
- // select_arrowalign
- //
- this.select_arrowalign.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.select_arrowalign.List = true;
- this.select_arrowalign.Location = new System.Drawing.Point(139, 3);
- this.select_arrowalign.Name = "select_arrowalign";
- this.select_arrowalign.Size = new System.Drawing.Size(120, 26);
- this.select_arrowalign.TabIndex = 11;
- this.select_arrowalign.WaveSize = 1;
- //
- // 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, 3);
- this.label10.Name = "label10";
- this.label10.Size = new System.Drawing.Size(130, 26);
- this.label10.TabIndex = 4;
- this.label10.Text = "ArrowAlign";
- //
- // stackPanel5
- //
- this.stackPanel5.Controls.Add(this.input_arrowsize);
- this.stackPanel5.Controls.Add(this.label3);
- this.stackPanel5.Location = new System.Drawing.Point(3, 41);
- this.stackPanel5.Name = "stackPanel5";
- this.stackPanel5.Size = new System.Drawing.Size(274, 32);
- this.stackPanel5.TabIndex = 11;
- this.stackPanel5.Text = "stackPanel5";
- //
- // input_arrowsize
- //
- this.input_arrowsize.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F);
- this.input_arrowsize.Location = new System.Drawing.Point(139, 3);
- this.input_arrowsize.Name = "input_arrowsize";
- this.input_arrowsize.Size = new System.Drawing.Size(120, 26);
- this.input_arrowsize.TabIndex = 5;
- this.input_arrowsize.Text = "8";
- this.input_arrowsize.Value = new decimal(new int[] {
- 8,
- 0,
- 0,
- 0});
- this.input_arrowsize.WaveSize = 1;
- //
- // 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, 3);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(130, 26);
- this.label3.TabIndex = 4;
- this.label3.Text = "ArrowSize";
- //
- // stackPanel6
- //
- this.stackPanel6.Controls.Add(this.input_radius);
- this.stackPanel6.Controls.Add(this.label4);
- this.stackPanel6.Location = new System.Drawing.Point(3, 79);
- this.stackPanel6.Name = "stackPanel6";
- this.stackPanel6.Size = new System.Drawing.Size(274, 32);
- this.stackPanel6.TabIndex = 12;
- this.stackPanel6.Text = "stackPanel6";
- //
- // input_radius
- //
- this.input_radius.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F);
- this.input_radius.Location = new System.Drawing.Point(139, 3);
- this.input_radius.Name = "input_radius";
- this.input_radius.Size = new System.Drawing.Size(120, 26);
- this.input_radius.TabIndex = 5;
- this.input_radius.Text = "6";
- this.input_radius.Value = new decimal(new int[] {
- 6,
- 0,
- 0,
- 0});
- this.input_radius.WaveSize = 1;
- //
- // 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, 3);
- this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(130, 26);
- this.label4.TabIndex = 4;
- this.label4.Text = "Radius";
- //
- // stackPanel7
- //
- this.stackPanel7.Controls.Add(this.input_shadow);
- this.stackPanel7.Controls.Add(this.label5);
- this.stackPanel7.Location = new System.Drawing.Point(3, 117);
- this.stackPanel7.Name = "stackPanel7";
- this.stackPanel7.Size = new System.Drawing.Size(274, 32);
- this.stackPanel7.TabIndex = 13;
- this.stackPanel7.Text = "stackPanel7";
- //
- // input_shadow
- //
- this.input_shadow.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F);
- this.input_shadow.Location = new System.Drawing.Point(139, 3);
- this.input_shadow.Name = "input_shadow";
- this.input_shadow.Size = new System.Drawing.Size(120, 26);
- this.input_shadow.TabIndex = 5;
- this.input_shadow.Text = "12";
- this.input_shadow.Value = new decimal(new int[] {
- 12,
- 0,
- 0,
- 0});
- this.input_shadow.WaveSize = 1;
- //
- // 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, 3);
- this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(130, 26);
- this.label5.TabIndex = 4;
- this.label5.Text = "Shadow";
- //
- // stackPanel8
- //
- this.stackPanel8.Controls.Add(this.select_shadowalign);
- this.stackPanel8.Controls.Add(this.label6);
- this.stackPanel8.Location = new System.Drawing.Point(3, 155);
- this.stackPanel8.Name = "stackPanel8";
- this.stackPanel8.Size = new System.Drawing.Size(274, 32);
- this.stackPanel8.TabIndex = 14;
- this.stackPanel8.Text = "stackPanel8";
- //
- // select_shadowalign
- //
- this.select_shadowalign.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.select_shadowalign.List = true;
- this.select_shadowalign.Location = new System.Drawing.Point(139, 3);
- this.select_shadowalign.Name = "select_shadowalign";
- this.select_shadowalign.Size = new System.Drawing.Size(120, 26);
- this.select_shadowalign.TabIndex = 11;
- this.select_shadowalign.WaveSize = 1;
- //
- // 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, 3);
- this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(130, 26);
- this.label6.TabIndex = 4;
- this.label6.Text = "ShadowAlign";
- //
- // stackPanel9
- //
- this.stackPanel9.Controls.Add(this.colorPicker);
- this.stackPanel9.Controls.Add(this.label7);
- this.stackPanel9.Location = new System.Drawing.Point(3, 193);
- this.stackPanel9.Name = "stackPanel9";
- this.stackPanel9.Size = new System.Drawing.Size(274, 32);
- this.stackPanel9.TabIndex = 15;
- this.stackPanel9.Text = "stackPanel9";
- //
- // label7
- //
- this.label7.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.label7.Location = new System.Drawing.Point(3, 3);
- this.label7.Name = "label7";
- this.label7.Size = new System.Drawing.Size(130, 26);
- this.label7.TabIndex = 4;
- this.label7.Text = "ShadowColor";
- //
- // colorPicker
- //
- this.colorPicker.Location = new System.Drawing.Point(139, 3);
- this.colorPicker.Name = "colorPicker";
- this.colorPicker.Size = new System.Drawing.Size(120, 26);
- this.colorPicker.TabIndex = 5;
- this.colorPicker.Text = "colorPicker1";
- this.colorPicker.WaveSize = 0;
- //
// stackPanel15
//
this.stackPanel15.Controls.Add(this.panel);
@@ -343,148 +129,43 @@
this.stackPanel15.Controls.Add(this.stackPanel14);
this.stackPanel15.Location = new System.Drawing.Point(289, 3);
this.stackPanel15.Name = "stackPanel15";
- this.stackPanel15.Size = new System.Drawing.Size(366, 347);
+ this.stackPanel15.Size = new System.Drawing.Size(366, 431);
this.stackPanel15.TabIndex = 1;
this.stackPanel15.Text = "stackPanel15";
this.stackPanel15.Vertical = true;
//
- // stackPanel10
+ // panel
//
- this.stackPanel10.Controls.Add(this.input_shadowX);
- this.stackPanel10.Controls.Add(this.label8);
- this.stackPanel10.Location = new System.Drawing.Point(3, 231);
- this.stackPanel10.Name = "stackPanel10";
- this.stackPanel10.Size = new System.Drawing.Size(274, 32);
- this.stackPanel10.TabIndex = 24;
- this.stackPanel10.Text = "stackPanel10";
+ this.panel.BackColor = System.Drawing.SystemColors.Control;
+ this.panel.Location = new System.Drawing.Point(3, 155);
+ this.panel.Name = "panel";
+ this.panel.Shadow = 12;
+ this.panel.ShadowOpacityAnimation = true;
+ this.panel.Size = new System.Drawing.Size(360, 260);
+ this.panel.TabIndex = 35;
+ this.panel.Text = "panel1";
//
- // input_shadowX
+ // buttonCZ
//
- this.input_shadowX.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F);
- this.input_shadowX.Location = new System.Drawing.Point(139, 3);
- this.input_shadowX.Name = "input_shadowX";
- this.input_shadowX.Size = new System.Drawing.Size(120, 26);
- this.input_shadowX.TabIndex = 5;
- this.input_shadowX.Text = "0";
- this.input_shadowX.WaveSize = 1;
+ this.buttonCZ.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.buttonCZ.Location = new System.Drawing.Point(3, 117);
+ this.buttonCZ.Name = "buttonCZ";
+ this.buttonCZ.Size = new System.Drawing.Size(360, 32);
+ this.buttonCZ.TabIndex = 33;
+ this.buttonCZ.Text = "重 置";
+ this.buttonCZ.Type = AntdUI.TTypeMini.Warn;
+ this.buttonCZ.WaveSize = 0;
//
- // label8
+ // buttonSZ
//
- 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, 3);
- this.label8.Name = "label8";
- this.label8.Size = new System.Drawing.Size(130, 26);
- this.label8.TabIndex = 4;
- this.label8.Text = "ShadowOffsetX";
- //
- // stackPanel11
- //
- this.stackPanel11.Controls.Add(this.input_shadowY);
- this.stackPanel11.Controls.Add(this.label9);
- this.stackPanel11.Location = new System.Drawing.Point(3, 269);
- this.stackPanel11.Name = "stackPanel11";
- this.stackPanel11.Size = new System.Drawing.Size(274, 32);
- this.stackPanel11.TabIndex = 25;
- this.stackPanel11.Text = "stackPanel11";
- //
- // input_shadowY
- //
- this.input_shadowY.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F);
- this.input_shadowY.Location = new System.Drawing.Point(139, 3);
- this.input_shadowY.Name = "input_shadowY";
- this.input_shadowY.Size = new System.Drawing.Size(120, 26);
- this.input_shadowY.TabIndex = 5;
- this.input_shadowY.Text = "0";
- this.input_shadowY.WaveSize = 1;
- //
- // label9
- //
- 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, 3);
- this.label9.Name = "label9";
- this.label9.Size = new System.Drawing.Size(130, 26);
- this.label9.TabIndex = 4;
- this.label9.Text = "ShadowOffsetY";
- //
- // stackPanel12
- //
- this.stackPanel12.Controls.Add(this.input_shadowO);
- this.stackPanel12.Controls.Add(this.label11);
- this.stackPanel12.Location = new System.Drawing.Point(3, 307);
- this.stackPanel12.Name = "stackPanel12";
- this.stackPanel12.Size = new System.Drawing.Size(274, 32);
- this.stackPanel12.TabIndex = 26;
- this.stackPanel12.Text = "stackPanel12";
- //
- // input_shadowO
- //
- this.input_shadowO.DecimalPlaces = 2;
- this.input_shadowO.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F);
- this.input_shadowO.Increment = new decimal(new int[] {
- 1,
- 0,
- 0,
- 65536});
- this.input_shadowO.Location = new System.Drawing.Point(139, 3);
- this.input_shadowO.Maximum = new decimal(new int[] {
- 1,
- 0,
- 0,
- 0});
- this.input_shadowO.Name = "input_shadowO";
- this.input_shadowO.Size = new System.Drawing.Size(120, 26);
- this.input_shadowO.TabIndex = 5;
- this.input_shadowO.Text = "0.20";
- this.input_shadowO.Value = new decimal(new int[] {
- 2,
- 0,
- 0,
- 65536});
- this.input_shadowO.WaveSize = 1;
- //
- // label11
- //
- this.label11.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.label11.Location = new System.Drawing.Point(3, 3);
- this.label11.Name = "label11";
- this.label11.Size = new System.Drawing.Size(130, 26);
- this.label11.TabIndex = 4;
- this.label11.Text = "ShadowOpacity";
- //
- // stackPanel14
- //
- this.stackPanel14.Controls.Add(this.select_shadowOA);
- this.stackPanel14.Controls.Add(this.label13);
- this.stackPanel14.Location = new System.Drawing.Point(3, 3);
- this.stackPanel14.Name = "stackPanel14";
- this.stackPanel14.Size = new System.Drawing.Size(360, 32);
- this.stackPanel14.TabIndex = 29;
- this.stackPanel14.Text = "stackPanel14";
- //
- // select_shadowOA
- //
- this.select_shadowOA.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.select_shadowOA.Items.AddRange(new object[] {
- "True",
- "False"});
- this.select_shadowOA.List = true;
- this.select_shadowOA.Location = new System.Drawing.Point(229, 3);
- this.select_shadowOA.Name = "select_shadowOA";
- this.select_shadowOA.SelectedIndex = 0;
- this.select_shadowOA.SelectedValue = "True";
- this.select_shadowOA.Size = new System.Drawing.Size(132, 26);
- this.select_shadowOA.TabIndex = 11;
- this.select_shadowOA.Text = "True";
- this.select_shadowOA.WaveSize = 1;
- //
- // label13
- //
- this.label13.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.label13.Location = new System.Drawing.Point(3, 3);
- this.label13.Name = "label13";
- this.label13.Size = new System.Drawing.Size(220, 26);
- this.label13.TabIndex = 4;
- this.label13.Text = "ShadowOpacityAnimation";
+ this.buttonSZ.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.buttonSZ.Location = new System.Drawing.Point(3, 79);
+ this.buttonSZ.Name = "buttonSZ";
+ this.buttonSZ.Size = new System.Drawing.Size(360, 32);
+ this.buttonSZ.TabIndex = 32;
+ this.buttonSZ.Text = "设 置";
+ this.buttonSZ.Type = AntdUI.TTypeMini.Primary;
+ this.buttonSZ.WaveSize = 0;
//
// stackPanel13
//
@@ -531,61 +212,460 @@
this.label12.TabIndex = 4;
this.label12.Text = "ShadowOpacityHover";
//
- // buttonCZ
+ // stackPanel14
//
- this.buttonCZ.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.buttonCZ.Location = new System.Drawing.Point(3, 117);
- this.buttonCZ.Name = "buttonCZ";
- this.buttonCZ.Size = new System.Drawing.Size(360, 32);
- this.buttonCZ.TabIndex = 33;
- this.buttonCZ.Text = "重 置";
- this.buttonCZ.Type = AntdUI.TTypeMini.Warn;
- this.buttonCZ.WaveSize = 0;
- this.buttonCZ.Click += new System.EventHandler(this.buttonCZ_Click);
+ this.stackPanel14.Controls.Add(this.select_shadowOA);
+ this.stackPanel14.Controls.Add(this.label13);
+ this.stackPanel14.Location = new System.Drawing.Point(3, 3);
+ this.stackPanel14.Name = "stackPanel14";
+ this.stackPanel14.Size = new System.Drawing.Size(360, 32);
+ this.stackPanel14.TabIndex = 29;
+ this.stackPanel14.Text = "stackPanel14";
//
- // buttonSZ
+ // select_shadowOA
//
- this.buttonSZ.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.buttonSZ.Location = new System.Drawing.Point(3, 79);
- this.buttonSZ.Name = "buttonSZ";
- this.buttonSZ.Size = new System.Drawing.Size(360, 32);
- this.buttonSZ.TabIndex = 32;
- this.buttonSZ.Text = "设 置";
- this.buttonSZ.Type = AntdUI.TTypeMini.Primary;
- this.buttonSZ.WaveSize = 0;
- this.buttonSZ.Click += new System.EventHandler(this.buttonSZ_Click);
+ this.select_shadowOA.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.select_shadowOA.Items.AddRange(new object[] {
+ "True",
+ "False"});
+ this.select_shadowOA.List = true;
+ this.select_shadowOA.Location = new System.Drawing.Point(229, 3);
+ this.select_shadowOA.Name = "select_shadowOA";
+ this.select_shadowOA.SelectedIndex = 0;
+ this.select_shadowOA.SelectedValue = "True";
+ this.select_shadowOA.Size = new System.Drawing.Size(132, 26);
+ this.select_shadowOA.TabIndex = 11;
+ this.select_shadowOA.Text = "True";
+ this.select_shadowOA.WaveSize = 1;
//
- // panel
+ // label13
//
- this.panel.BackColor = System.Drawing.SystemColors.Control;
- this.panel.Location = new System.Drawing.Point(3, 155);
- this.panel.Name = "panel";
- this.panel.Shadow = 12;
- this.panel.ShadowOpacityAnimation = true;
- this.panel.Size = new System.Drawing.Size(360, 181);
- this.panel.TabIndex = 35;
- this.panel.Text = "panel1";
+ this.label13.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.label13.Location = new System.Drawing.Point(3, 3);
+ this.label13.Name = "label13";
+ this.label13.Size = new System.Drawing.Size(220, 26);
+ this.label13.TabIndex = 4;
+ this.label13.Text = "ShadowOpacityAnimation";
+ //
+ // stackPanel3
+ //
+ this.stackPanel3.Controls.Add(this.stackPanel12);
+ this.stackPanel3.Controls.Add(this.stackPanel11);
+ this.stackPanel3.Controls.Add(this.stackPanel10);
+ this.stackPanel3.Controls.Add(this.stackPanel9);
+ this.stackPanel3.Controls.Add(this.stackPanel8);
+ this.stackPanel3.Controls.Add(this.stackPanel7);
+ this.stackPanel3.Controls.Add(this.stackPanel17);
+ this.stackPanel3.Controls.Add(this.stackPanel16);
+ this.stackPanel3.Controls.Add(this.stackPanel6);
+ this.stackPanel3.Controls.Add(this.stackPanel5);
+ this.stackPanel3.Controls.Add(this.stackPanel4);
+ this.stackPanel3.Location = new System.Drawing.Point(3, 3);
+ this.stackPanel3.Name = "stackPanel3";
+ this.stackPanel3.Size = new System.Drawing.Size(280, 431);
+ this.stackPanel3.TabIndex = 0;
+ this.stackPanel3.Text = "stackPanel3";
+ this.stackPanel3.Vertical = true;
+ //
+ // stackPanel12
+ //
+ this.stackPanel12.Controls.Add(this.input_shadowO);
+ this.stackPanel12.Controls.Add(this.label11);
+ this.stackPanel12.Location = new System.Drawing.Point(3, 383);
+ this.stackPanel12.Name = "stackPanel12";
+ this.stackPanel12.Size = new System.Drawing.Size(274, 32);
+ this.stackPanel12.TabIndex = 34;
+ this.stackPanel12.Text = "stackPanel12";
+ //
+ // input_shadowO
+ //
+ this.input_shadowO.DecimalPlaces = 2;
+ this.input_shadowO.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F);
+ this.input_shadowO.Increment = new decimal(new int[] {
+ 1,
+ 0,
+ 0,
+ 65536});
+ this.input_shadowO.Location = new System.Drawing.Point(139, 3);
+ this.input_shadowO.Maximum = new decimal(new int[] {
+ 1,
+ 0,
+ 0,
+ 0});
+ this.input_shadowO.Name = "input_shadowO";
+ this.input_shadowO.Size = new System.Drawing.Size(120, 26);
+ this.input_shadowO.TabIndex = 5;
+ this.input_shadowO.Text = "0.20";
+ this.input_shadowO.Value = new decimal(new int[] {
+ 2,
+ 0,
+ 0,
+ 65536});
+ this.input_shadowO.WaveSize = 1;
+ //
+ // label11
+ //
+ this.label11.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.label11.Location = new System.Drawing.Point(3, 3);
+ this.label11.Name = "label11";
+ this.label11.Size = new System.Drawing.Size(130, 26);
+ this.label11.TabIndex = 4;
+ this.label11.Text = "ShadowOpacity";
+ //
+ // stackPanel11
+ //
+ this.stackPanel11.Controls.Add(this.input_shadowY);
+ this.stackPanel11.Controls.Add(this.label9);
+ this.stackPanel11.Location = new System.Drawing.Point(3, 345);
+ this.stackPanel11.Name = "stackPanel11";
+ this.stackPanel11.Size = new System.Drawing.Size(274, 32);
+ this.stackPanel11.TabIndex = 33;
+ this.stackPanel11.Text = "stackPanel11";
+ //
+ // input_shadowY
+ //
+ this.input_shadowY.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F);
+ this.input_shadowY.Location = new System.Drawing.Point(139, 3);
+ this.input_shadowY.Name = "input_shadowY";
+ this.input_shadowY.Size = new System.Drawing.Size(120, 26);
+ this.input_shadowY.TabIndex = 5;
+ this.input_shadowY.Text = "0";
+ this.input_shadowY.WaveSize = 1;
+ //
+ // label9
+ //
+ 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, 3);
+ this.label9.Name = "label9";
+ this.label9.Size = new System.Drawing.Size(130, 26);
+ this.label9.TabIndex = 4;
+ this.label9.Text = "ShadowOffsetY";
+ //
+ // stackPanel10
+ //
+ this.stackPanel10.Controls.Add(this.input_shadowX);
+ this.stackPanel10.Controls.Add(this.label8);
+ this.stackPanel10.Location = new System.Drawing.Point(3, 307);
+ this.stackPanel10.Name = "stackPanel10";
+ this.stackPanel10.Size = new System.Drawing.Size(274, 32);
+ this.stackPanel10.TabIndex = 32;
+ this.stackPanel10.Text = "stackPanel10";
+ //
+ // input_shadowX
+ //
+ this.input_shadowX.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F);
+ this.input_shadowX.Location = new System.Drawing.Point(139, 3);
+ this.input_shadowX.Name = "input_shadowX";
+ this.input_shadowX.Size = new System.Drawing.Size(120, 26);
+ this.input_shadowX.TabIndex = 5;
+ this.input_shadowX.Text = "0";
+ this.input_shadowX.WaveSize = 1;
+ //
+ // 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, 3);
+ this.label8.Name = "label8";
+ this.label8.Size = new System.Drawing.Size(130, 26);
+ this.label8.TabIndex = 4;
+ this.label8.Text = "ShadowOffsetX";
+ //
+ // stackPanel9
+ //
+ this.stackPanel9.Controls.Add(this.colorPicker_shadow);
+ this.stackPanel9.Controls.Add(this.label7);
+ this.stackPanel9.Location = new System.Drawing.Point(3, 269);
+ this.stackPanel9.Name = "stackPanel9";
+ this.stackPanel9.Size = new System.Drawing.Size(274, 32);
+ this.stackPanel9.TabIndex = 31;
+ this.stackPanel9.Text = "stackPanel9";
+ //
+ // colorPicker_shadow
+ //
+ this.colorPicker_shadow.Location = new System.Drawing.Point(139, 3);
+ this.colorPicker_shadow.Name = "colorPicker_shadow";
+ this.colorPicker_shadow.Size = new System.Drawing.Size(120, 26);
+ this.colorPicker_shadow.TabIndex = 5;
+ this.colorPicker_shadow.Text = "colorPicker1";
+ this.colorPicker_shadow.Value = System.Drawing.Color.FromArgb(((int)(((byte)(22)))), ((int)(((byte)(119)))), ((int)(((byte)(255)))));
+ this.colorPicker_shadow.WaveSize = 0;
+ //
+ // label7
+ //
+ this.label7.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.label7.Location = new System.Drawing.Point(3, 3);
+ this.label7.Name = "label7";
+ this.label7.Size = new System.Drawing.Size(130, 26);
+ this.label7.TabIndex = 4;
+ this.label7.Text = "ShadowColor";
+ //
+ // stackPanel8
+ //
+ this.stackPanel8.Controls.Add(this.select_shadowalign);
+ this.stackPanel8.Controls.Add(this.label6);
+ this.stackPanel8.Location = new System.Drawing.Point(3, 231);
+ this.stackPanel8.Name = "stackPanel8";
+ this.stackPanel8.Size = new System.Drawing.Size(274, 32);
+ this.stackPanel8.TabIndex = 30;
+ this.stackPanel8.Text = "stackPanel8";
+ //
+ // select_shadowalign
+ //
+ this.select_shadowalign.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.select_shadowalign.List = true;
+ this.select_shadowalign.Location = new System.Drawing.Point(139, 3);
+ this.select_shadowalign.Name = "select_shadowalign";
+ this.select_shadowalign.Size = new System.Drawing.Size(120, 26);
+ this.select_shadowalign.TabIndex = 11;
+ this.select_shadowalign.WaveSize = 1;
+ //
+ // 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, 3);
+ this.label6.Name = "label6";
+ this.label6.Size = new System.Drawing.Size(130, 26);
+ this.label6.TabIndex = 4;
+ this.label6.Text = "ShadowAlign";
+ //
+ // stackPanel7
+ //
+ this.stackPanel7.Controls.Add(this.input_shadow);
+ this.stackPanel7.Controls.Add(this.label5);
+ this.stackPanel7.Location = new System.Drawing.Point(3, 193);
+ this.stackPanel7.Name = "stackPanel7";
+ this.stackPanel7.Size = new System.Drawing.Size(274, 32);
+ this.stackPanel7.TabIndex = 29;
+ this.stackPanel7.Text = "stackPanel7";
+ //
+ // input_shadow
+ //
+ this.input_shadow.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F);
+ this.input_shadow.Location = new System.Drawing.Point(139, 3);
+ this.input_shadow.Name = "input_shadow";
+ this.input_shadow.Size = new System.Drawing.Size(120, 26);
+ this.input_shadow.TabIndex = 5;
+ this.input_shadow.Text = "12";
+ this.input_shadow.Value = new decimal(new int[] {
+ 12,
+ 0,
+ 0,
+ 0});
+ this.input_shadow.WaveSize = 1;
+ //
+ // 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, 3);
+ this.label5.Name = "label5";
+ this.label5.Size = new System.Drawing.Size(130, 26);
+ this.label5.TabIndex = 4;
+ this.label5.Text = "Shadow";
+ //
+ // stackPanel17
+ //
+ this.stackPanel17.Controls.Add(this.input_borderwidth);
+ this.stackPanel17.Controls.Add(this.label15);
+ this.stackPanel17.Location = new System.Drawing.Point(3, 155);
+ this.stackPanel17.Name = "stackPanel17";
+ this.stackPanel17.Size = new System.Drawing.Size(274, 32);
+ this.stackPanel17.TabIndex = 28;
+ this.stackPanel17.Text = "stackPanel17";
+ //
+ // input_borderwidth
+ //
+ this.input_borderwidth.DecimalPlaces = 2;
+ this.input_borderwidth.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F);
+ this.input_borderwidth.Location = new System.Drawing.Point(139, 3);
+ this.input_borderwidth.Name = "input_borderwidth";
+ this.input_borderwidth.Size = new System.Drawing.Size(120, 26);
+ this.input_borderwidth.TabIndex = 5;
+ this.input_borderwidth.Text = "0.00";
+ this.input_borderwidth.WaveSize = 1;
+ //
+ // label15
+ //
+ this.label15.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.label15.Location = new System.Drawing.Point(3, 3);
+ this.label15.Name = "label15";
+ this.label15.Size = new System.Drawing.Size(130, 26);
+ this.label15.TabIndex = 4;
+ this.label15.Text = "BorderWidth";
+ //
+ // stackPanel16
+ //
+ this.stackPanel16.Controls.Add(this.colorPicker_border);
+ this.stackPanel16.Controls.Add(this.label14);
+ this.stackPanel16.Location = new System.Drawing.Point(3, 117);
+ this.stackPanel16.Name = "stackPanel16";
+ this.stackPanel16.Size = new System.Drawing.Size(274, 32);
+ this.stackPanel16.TabIndex = 27;
+ this.stackPanel16.Text = "stackPanel16";
+ //
+ // colorPicker_border
+ //
+ this.colorPicker_border.Location = new System.Drawing.Point(139, 3);
+ this.colorPicker_border.Name = "colorPicker_border";
+ this.colorPicker_border.Size = new System.Drawing.Size(120, 26);
+ this.colorPicker_border.TabIndex = 5;
+ this.colorPicker_border.Text = "colorPicker1";
+ this.colorPicker_border.Value = System.Drawing.Color.FromArgb(((int)(((byte)(22)))), ((int)(((byte)(119)))), ((int)(((byte)(255)))));
+ this.colorPicker_border.WaveSize = 0;
+ //
+ // label14
+ //
+ this.label14.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.label14.Location = new System.Drawing.Point(3, 3);
+ this.label14.Name = "label14";
+ this.label14.Size = new System.Drawing.Size(130, 26);
+ this.label14.TabIndex = 4;
+ this.label14.Text = "BorderColor";
+ //
+ // stackPanel6
+ //
+ this.stackPanel6.Controls.Add(this.input_radius);
+ this.stackPanel6.Controls.Add(this.label4);
+ this.stackPanel6.Location = new System.Drawing.Point(3, 79);
+ this.stackPanel6.Name = "stackPanel6";
+ this.stackPanel6.Size = new System.Drawing.Size(274, 32);
+ this.stackPanel6.TabIndex = 12;
+ this.stackPanel6.Text = "stackPanel6";
+ //
+ // input_radius
+ //
+ this.input_radius.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F);
+ this.input_radius.Location = new System.Drawing.Point(139, 3);
+ this.input_radius.Name = "input_radius";
+ this.input_radius.Size = new System.Drawing.Size(120, 26);
+ this.input_radius.TabIndex = 5;
+ this.input_radius.Text = "6";
+ this.input_radius.Value = new decimal(new int[] {
+ 6,
+ 0,
+ 0,
+ 0});
+ this.input_radius.WaveSize = 1;
+ //
+ // 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, 3);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(130, 26);
+ this.label4.TabIndex = 4;
+ this.label4.Text = "Radius";
+ //
+ // stackPanel5
+ //
+ this.stackPanel5.Controls.Add(this.input_arrowsize);
+ this.stackPanel5.Controls.Add(this.label3);
+ this.stackPanel5.Location = new System.Drawing.Point(3, 41);
+ this.stackPanel5.Name = "stackPanel5";
+ this.stackPanel5.Size = new System.Drawing.Size(274, 32);
+ this.stackPanel5.TabIndex = 11;
+ this.stackPanel5.Text = "stackPanel5";
+ //
+ // input_arrowsize
+ //
+ this.input_arrowsize.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F);
+ this.input_arrowsize.Location = new System.Drawing.Point(139, 3);
+ this.input_arrowsize.Name = "input_arrowsize";
+ this.input_arrowsize.Size = new System.Drawing.Size(120, 26);
+ this.input_arrowsize.TabIndex = 5;
+ this.input_arrowsize.Text = "8";
+ this.input_arrowsize.Value = new decimal(new int[] {
+ 8,
+ 0,
+ 0,
+ 0});
+ this.input_arrowsize.WaveSize = 1;
+ //
+ // 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, 3);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(130, 26);
+ this.label3.TabIndex = 4;
+ this.label3.Text = "ArrowSize";
+ //
+ // stackPanel4
+ //
+ this.stackPanel4.Controls.Add(this.select_arrowalign);
+ this.stackPanel4.Controls.Add(this.label10);
+ this.stackPanel4.Location = new System.Drawing.Point(3, 3);
+ this.stackPanel4.Name = "stackPanel4";
+ this.stackPanel4.Size = new System.Drawing.Size(274, 32);
+ this.stackPanel4.TabIndex = 10;
+ this.stackPanel4.Text = "stackPanel4";
+ //
+ // select_arrowalign
+ //
+ this.select_arrowalign.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.select_arrowalign.List = true;
+ this.select_arrowalign.Location = new System.Drawing.Point(139, 3);
+ this.select_arrowalign.Name = "select_arrowalign";
+ this.select_arrowalign.Size = new System.Drawing.Size(120, 26);
+ this.select_arrowalign.TabIndex = 11;
+ this.select_arrowalign.WaveSize = 1;
+ //
+ // 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, 3);
+ this.label10.Name = "label10";
+ this.label10.Size = new System.Drawing.Size(130, 26);
+ this.label10.TabIndex = 4;
+ this.label10.Text = "ArrowAlign";
+ //
+ // 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 = 8;
+ //
+ // 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 = 7;
+ 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 = 6;
+ this.label1.Text = "Panel 面板";
//
// PanelDemo
//
this.Controls.Add(this.stackPanel1);
this.Name = "PanelDemo";
- this.Size = new System.Drawing.Size(679, 435);
+ this.Size = new System.Drawing.Size(700, 569);
+ this.Load += new System.EventHandler(this.PanelDemo_Load);
this.stackPanel1.ResumeLayout(false);
this.stackPanel2.ResumeLayout(false);
- this.stackPanel3.ResumeLayout(false);
- this.stackPanel4.ResumeLayout(false);
- this.stackPanel5.ResumeLayout(false);
- this.stackPanel6.ResumeLayout(false);
- this.stackPanel7.ResumeLayout(false);
- this.stackPanel8.ResumeLayout(false);
- this.stackPanel9.ResumeLayout(false);
this.stackPanel15.ResumeLayout(false);
- this.stackPanel10.ResumeLayout(false);
- this.stackPanel11.ResumeLayout(false);
- this.stackPanel12.ResumeLayout(false);
- this.stackPanel14.ResumeLayout(false);
this.stackPanel13.ResumeLayout(false);
+ this.stackPanel14.ResumeLayout(false);
+ this.stackPanel3.ResumeLayout(false);
+ this.stackPanel12.ResumeLayout(false);
+ this.stackPanel11.ResumeLayout(false);
+ this.stackPanel10.ResumeLayout(false);
+ this.stackPanel9.ResumeLayout(false);
+ this.stackPanel8.ResumeLayout(false);
+ this.stackPanel7.ResumeLayout(false);
+ this.stackPanel17.ResumeLayout(false);
+ this.stackPanel16.ResumeLayout(false);
+ this.stackPanel6.ResumeLayout(false);
+ this.stackPanel5.ResumeLayout(false);
+ this.stackPanel4.ResumeLayout(false);
this.ResumeLayout(false);
}
@@ -595,27 +675,10 @@
private AntdUI.StackPanel stackPanel1;
private AntdUI.Label label2;
private AntdUI.Label label1;
+ private AntdUI.Divider divider1;
private AntdUI.StackPanel stackPanel2;
- private AntdUI.StackPanel stackPanel3;
- private AntdUI.StackPanel stackPanel4;
- private AntdUI.Select select_arrowalign;
- private AntdUI.Label label10;
- private AntdUI.StackPanel stackPanel6;
- private AntdUI.InputNumber input_radius;
- private AntdUI.Label label4;
- private AntdUI.StackPanel stackPanel5;
- private AntdUI.InputNumber input_arrowsize;
- private AntdUI.Label label3;
- private AntdUI.StackPanel stackPanel7;
- private AntdUI.InputNumber input_shadow;
- private AntdUI.Label label5;
- private AntdUI.StackPanel stackPanel8;
- private AntdUI.Select select_shadowalign;
- private AntdUI.Label label6;
- private AntdUI.StackPanel stackPanel9;
- private AntdUI.ColorPicker colorPicker;
- private AntdUI.Label label7;
private AntdUI.StackPanel stackPanel15;
+ private AntdUI.Panel panel;
private AntdUI.Button buttonCZ;
private AntdUI.Button buttonSZ;
private AntdUI.StackPanel stackPanel13;
@@ -624,6 +687,22 @@
private AntdUI.StackPanel stackPanel14;
private AntdUI.Select select_shadowOA;
private AntdUI.Label label13;
+ private AntdUI.StackPanel stackPanel3;
+ private AntdUI.StackPanel stackPanel17;
+ private AntdUI.InputNumber input_borderwidth;
+ private AntdUI.Label label15;
+ private AntdUI.StackPanel stackPanel16;
+ private AntdUI.ColorPicker colorPicker_border;
+ private AntdUI.Label label14;
+ private AntdUI.StackPanel stackPanel6;
+ private AntdUI.InputNumber input_radius;
+ private AntdUI.Label label4;
+ private AntdUI.StackPanel stackPanel5;
+ private AntdUI.InputNumber input_arrowsize;
+ private AntdUI.Label label3;
+ private AntdUI.StackPanel stackPanel4;
+ private AntdUI.Select select_arrowalign;
+ private AntdUI.Label label10;
private AntdUI.StackPanel stackPanel12;
private AntdUI.InputNumber input_shadowO;
private AntdUI.Label label11;
@@ -633,6 +712,14 @@
private AntdUI.StackPanel stackPanel10;
private AntdUI.InputNumber input_shadowX;
private AntdUI.Label label8;
- private AntdUI.Panel panel;
+ private AntdUI.StackPanel stackPanel9;
+ private AntdUI.ColorPicker colorPicker_shadow;
+ private AntdUI.Label label7;
+ private AntdUI.StackPanel stackPanel8;
+ private AntdUI.Select select_shadowalign;
+ private AntdUI.Label label6;
+ private AntdUI.StackPanel stackPanel7;
+ private AntdUI.InputNumber input_shadow;
+ private AntdUI.Label label5;
}
}
diff --git a/Views/PanelDemo.cs b/Views/PanelDemo.cs
index ce31ff5..25512ce 100644
--- a/Views/PanelDemo.cs
+++ b/Views/PanelDemo.cs
@@ -13,6 +13,19 @@ namespace AntdUIDemo.Views
InitSelectItems();
// 设置默认值
InitData();
+ // 绑定按钮事件
+ BindButtonClick();
+ }
+
+ private void BindButtonClick()
+ {
+ buttonSZ.Click += buttonSZ_Click;
+ buttonCZ.Click += buttonCZ_Click;
+ }
+
+ private void PanelDemo_Load(object sender, EventArgs e)
+ {
+ LoadPanel();
}
private void InitSelectItems()
@@ -35,6 +48,7 @@ namespace AntdUIDemo.Views
private void buttonCZ_Click(object sender, EventArgs e)
{
InitData();
+ LoadPanel();
}
// 设置默认值
@@ -46,13 +60,13 @@ namespace AntdUIDemo.Views
input_arrowsize.Value = 8;
input_radius.Value = 6;
input_shadow.Value = 12;
- colorPicker.Value = Style.Db.TextBase;
+ colorPicker_shadow.Value = Style.Db.TextBase;
+ colorPicker_border.Value = Style.Db.BorderColor;
+ input_borderwidth.Value = 0;
input_shadowX.Value = 0;
input_shadowY.Value = 0;
input_shadowO.Value = (decimal)0.2;
input_shadowOH.Value = (decimal)0.3;
-
- LoadPanel();
}
// 设置
@@ -64,16 +78,21 @@ namespace AntdUIDemo.Views
private void LoadPanel()
{
panel.ArrowAlign = (TAlign)select_arrowalign.SelectedValue;
+ // TODO: 1.5.2版本 ArrowSize存在bug无法赋值更新,暂时使用panel.Invalidate();强制刷新,待更新后移除
panel.ArrowSize = (int)input_arrowsize.Value;
panel.Radius = (int)input_radius.Value;
+ panel.BorderWidth = (float)input_borderwidth.Value;
+ panel.BorderColor = colorPicker_border.Value;
panel.Shadow = (int)input_shadow.Value;
panel.ShadowAlign = (TAlignMini)select_shadowalign.SelectedValue;
- panel.ShadowColor = colorPicker.Value;
+ panel.ShadowColor = colorPicker_shadow.Value;
panel.ShadowOffsetX = (int)input_shadowX.Value;
panel.ShadowOffsetY = (int)input_shadowY.Value;
panel.ShadowOpacity = (float)input_shadowO.Value;
panel.ShadowOpacityAnimation = select_shadowOA.SelectedIndex == 0;
panel.ShadowOpacityHover = (float)input_shadowOH.Value;
+ panel.Invalidate();
}
+
}
}
diff --git a/Views/StackPanelDemo.Designer.cs b/Views/StackPanelDemo.Designer.cs
new file mode 100644
index 0000000..82e9d81
--- /dev/null
+++ b/Views/StackPanelDemo.Designer.cs
@@ -0,0 +1,355 @@
+namespace AntdUIDemo.Views
+{
+ partial class StackPanelDemo
+ {
+ ///
+ /// 必需的设计器变量。
+ ///
+ 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()
+ {
+ this.stackPanel1 = new AntdUI.StackPanel();
+ this.label2 = new AntdUI.Label();
+ this.label1 = new AntdUI.Label();
+ this.divider1 = new AntdUI.Divider();
+ this.stackPanel2 = new AntdUI.StackPanel();
+ this.stackPanel3 = new AntdUI.StackPanel();
+ this.stackPanel = new AntdUI.StackPanel();
+ this.stackPanel6 = new AntdUI.StackPanel();
+ this.select_autoscroll = new AntdUI.Select();
+ this.label4 = new AntdUI.Label();
+ this.stackPanel5 = new AntdUI.StackPanel();
+ this.input_gap = new AntdUI.InputNumber();
+ this.label3 = new AntdUI.Label();
+ this.stackPanel7 = new AntdUI.StackPanel();
+ this.label5 = new AntdUI.Label();
+ this.stackPanel8 = new AntdUI.StackPanel();
+ this.select_vertical = new AntdUI.Select();
+ this.label6 = new AntdUI.Label();
+ this.buttonCZ = new AntdUI.Button();
+ this.buttonSZ = new AntdUI.Button();
+ this.buttonDEL = new AntdUI.Button();
+ this.buttonADD = new AntdUI.Button();
+ this.input_itemsize = new AntdUI.Input();
+ this.stackPanel1.SuspendLayout();
+ this.stackPanel2.SuspendLayout();
+ this.stackPanel3.SuspendLayout();
+ this.stackPanel6.SuspendLayout();
+ this.stackPanel5.SuspendLayout();
+ this.stackPanel7.SuspendLayout();
+ this.stackPanel8.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // stackPanel1
+ //
+ this.stackPanel1.Controls.Add(this.stackPanel2);
+ 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, 531);
+ this.stackPanel1.TabIndex = 0;
+ this.stackPanel1.Text = "stackPanel1";
+ this.stackPanel1.Vertical = true;
+ //
+ // 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 = "StackPanel 堆叠布局";
+ //
+ // 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;
+ //
+ // stackPanel2
+ //
+ this.stackPanel2.Controls.Add(this.stackPanel);
+ this.stackPanel2.Controls.Add(this.stackPanel3);
+ this.stackPanel2.Location = new System.Drawing.Point(3, 97);
+ this.stackPanel2.Name = "stackPanel2";
+ this.stackPanel2.Size = new System.Drawing.Size(694, 406);
+ this.stackPanel2.TabIndex = 11;
+ this.stackPanel2.Text = "stackPanel2";
+ //
+ // stackPanel3
+ //
+ this.stackPanel3.Controls.Add(this.buttonDEL);
+ this.stackPanel3.Controls.Add(this.buttonADD);
+ this.stackPanel3.Controls.Add(this.buttonCZ);
+ this.stackPanel3.Controls.Add(this.buttonSZ);
+ this.stackPanel3.Controls.Add(this.stackPanel8);
+ this.stackPanel3.Controls.Add(this.stackPanel7);
+ this.stackPanel3.Controls.Add(this.stackPanel5);
+ this.stackPanel3.Controls.Add(this.stackPanel6);
+ this.stackPanel3.Location = new System.Drawing.Point(3, 3);
+ this.stackPanel3.Name = "stackPanel3";
+ this.stackPanel3.Size = new System.Drawing.Size(280, 400);
+ this.stackPanel3.TabIndex = 0;
+ this.stackPanel3.Text = "stackPanel3";
+ this.stackPanel3.Vertical = true;
+ //
+ // stackPanel
+ //
+ this.stackPanel.BackColor = System.Drawing.Color.White;
+ this.stackPanel.ItemSize = "";
+ this.stackPanel.Location = new System.Drawing.Point(289, 3);
+ this.stackPanel.Name = "stackPanel";
+ this.stackPanel.Size = new System.Drawing.Size(400, 400);
+ this.stackPanel.TabIndex = 1;
+ this.stackPanel.Vertical = true;
+ //
+ // stackPanel6
+ //
+ this.stackPanel6.Controls.Add(this.select_autoscroll);
+ this.stackPanel6.Controls.Add(this.label4);
+ this.stackPanel6.Location = new System.Drawing.Point(3, 3);
+ this.stackPanel6.Name = "stackPanel6";
+ this.stackPanel6.Size = new System.Drawing.Size(274, 32);
+ this.stackPanel6.TabIndex = 12;
+ this.stackPanel6.Text = "stackPanel6";
+ //
+ // select_autoscroll
+ //
+ this.select_autoscroll.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.select_autoscroll.Items.AddRange(new object[] {
+ "True",
+ "False"});
+ this.select_autoscroll.List = true;
+ this.select_autoscroll.Location = new System.Drawing.Point(97, 3);
+ this.select_autoscroll.Name = "select_autoscroll";
+ this.select_autoscroll.SelectedIndex = 1;
+ this.select_autoscroll.SelectedValue = "False";
+ this.select_autoscroll.Size = new System.Drawing.Size(175, 26);
+ this.select_autoscroll.TabIndex = 11;
+ this.select_autoscroll.Text = "False";
+ this.select_autoscroll.WaveSize = 1;
+ //
+ // 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, 3);
+ this.label4.Name = "label4";
+ this.label4.Size = new System.Drawing.Size(88, 26);
+ this.label4.TabIndex = 4;
+ this.label4.Text = "AutoScroll";
+ //
+ // stackPanel5
+ //
+ this.stackPanel5.Controls.Add(this.input_gap);
+ this.stackPanel5.Controls.Add(this.label3);
+ this.stackPanel5.Location = new System.Drawing.Point(3, 41);
+ this.stackPanel5.Name = "stackPanel5";
+ this.stackPanel5.Size = new System.Drawing.Size(274, 32);
+ this.stackPanel5.TabIndex = 19;
+ this.stackPanel5.Text = "stackPanel5";
+ //
+ // input_gap
+ //
+ this.input_gap.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F);
+ this.input_gap.Location = new System.Drawing.Point(97, 3);
+ this.input_gap.Name = "input_gap";
+ this.input_gap.Size = new System.Drawing.Size(175, 26);
+ this.input_gap.TabIndex = 5;
+ this.input_gap.Text = "0";
+ this.input_gap.WaveSize = 1;
+ //
+ // 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, 3);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(88, 26);
+ this.label3.TabIndex = 4;
+ this.label3.Text = "Gap";
+ //
+ // stackPanel7
+ //
+ this.stackPanel7.Controls.Add(this.input_itemsize);
+ this.stackPanel7.Controls.Add(this.label5);
+ this.stackPanel7.Location = new System.Drawing.Point(3, 79);
+ this.stackPanel7.Name = "stackPanel7";
+ this.stackPanel7.Size = new System.Drawing.Size(274, 32);
+ this.stackPanel7.TabIndex = 20;
+ this.stackPanel7.Text = "stackPanel7";
+ //
+ // 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, 3);
+ this.label5.Name = "label5";
+ this.label5.Size = new System.Drawing.Size(88, 26);
+ this.label5.TabIndex = 4;
+ this.label5.Text = "ItemSize";
+ //
+ // stackPanel8
+ //
+ this.stackPanel8.Controls.Add(this.select_vertical);
+ this.stackPanel8.Controls.Add(this.label6);
+ this.stackPanel8.Location = new System.Drawing.Point(3, 117);
+ this.stackPanel8.Name = "stackPanel8";
+ this.stackPanel8.Size = new System.Drawing.Size(274, 32);
+ this.stackPanel8.TabIndex = 21;
+ this.stackPanel8.Text = "stackPanel8";
+ //
+ // select_vertical
+ //
+ this.select_vertical.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.select_vertical.Items.AddRange(new object[] {
+ "True",
+ "False"});
+ this.select_vertical.List = true;
+ this.select_vertical.Location = new System.Drawing.Point(97, 3);
+ this.select_vertical.Name = "select_vertical";
+ this.select_vertical.SelectedIndex = 0;
+ this.select_vertical.SelectedValue = "True";
+ this.select_vertical.Size = new System.Drawing.Size(175, 26);
+ this.select_vertical.TabIndex = 11;
+ this.select_vertical.Text = "True";
+ this.select_vertical.WaveSize = 1;
+ //
+ // 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, 3);
+ this.label6.Name = "label6";
+ this.label6.Size = new System.Drawing.Size(88, 26);
+ this.label6.TabIndex = 4;
+ this.label6.Text = "Vertical";
+ //
+ // buttonCZ
+ //
+ this.buttonCZ.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.buttonCZ.Location = new System.Drawing.Point(3, 193);
+ this.buttonCZ.Name = "buttonCZ";
+ this.buttonCZ.Size = new System.Drawing.Size(274, 32);
+ this.buttonCZ.TabIndex = 35;
+ this.buttonCZ.Text = "重 置";
+ this.buttonCZ.Type = AntdUI.TTypeMini.Warn;
+ this.buttonCZ.WaveSize = 0;
+ //
+ // buttonSZ
+ //
+ this.buttonSZ.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.buttonSZ.Location = new System.Drawing.Point(3, 155);
+ this.buttonSZ.Name = "buttonSZ";
+ this.buttonSZ.Size = new System.Drawing.Size(274, 32);
+ this.buttonSZ.TabIndex = 34;
+ this.buttonSZ.Text = "设 置";
+ this.buttonSZ.Type = AntdUI.TTypeMini.Primary;
+ this.buttonSZ.WaveSize = 0;
+ //
+ // buttonDEL
+ //
+ this.buttonDEL.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.buttonDEL.Location = new System.Drawing.Point(3, 269);
+ this.buttonDEL.Name = "buttonDEL";
+ this.buttonDEL.Size = new System.Drawing.Size(274, 32);
+ this.buttonDEL.TabIndex = 38;
+ this.buttonDEL.Text = "删除 Button";
+ this.buttonDEL.Type = AntdUI.TTypeMini.Error;
+ this.buttonDEL.WaveSize = 0;
+ //
+ // buttonADD
+ //
+ this.buttonADD.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.buttonADD.Location = new System.Drawing.Point(3, 231);
+ this.buttonADD.Name = "buttonADD";
+ this.buttonADD.Size = new System.Drawing.Size(274, 32);
+ this.buttonADD.TabIndex = 37;
+ this.buttonADD.Text = "添加 Button";
+ this.buttonADD.Type = AntdUI.TTypeMini.Info;
+ this.buttonADD.WaveSize = 0;
+ //
+ // input_itemsize
+ //
+ this.input_itemsize.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+ this.input_itemsize.Location = new System.Drawing.Point(97, 3);
+ this.input_itemsize.Name = "input_itemsize";
+ this.input_itemsize.PlaceholderText = "数值或百分比";
+ this.input_itemsize.Size = new System.Drawing.Size(174, 26);
+ this.input_itemsize.TabIndex = 5;
+ this.input_itemsize.WaveSize = 0;
+ //
+ // StackPanelDemo
+ //
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
+ this.Controls.Add(this.stackPanel1);
+ this.Name = "StackPanelDemo";
+ this.Size = new System.Drawing.Size(700, 531);
+ this.Load += new System.EventHandler(this.StackPanelDemo_Load);
+ this.stackPanel1.ResumeLayout(false);
+ this.stackPanel2.ResumeLayout(false);
+ this.stackPanel3.ResumeLayout(false);
+ this.stackPanel6.ResumeLayout(false);
+ this.stackPanel5.ResumeLayout(false);
+ this.stackPanel7.ResumeLayout(false);
+ this.stackPanel8.ResumeLayout(false);
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private AntdUI.StackPanel stackPanel1;
+ private AntdUI.Label label2;
+ private AntdUI.Label label1;
+ private AntdUI.Divider divider1;
+ private AntdUI.StackPanel stackPanel2;
+ private AntdUI.StackPanel stackPanel;
+ private AntdUI.StackPanel stackPanel3;
+ private AntdUI.StackPanel stackPanel6;
+ private AntdUI.Select select_autoscroll;
+ private AntdUI.Label label4;
+ private AntdUI.StackPanel stackPanel5;
+ private AntdUI.InputNumber input_gap;
+ private AntdUI.Label label3;
+ private AntdUI.StackPanel stackPanel8;
+ private AntdUI.Select select_vertical;
+ private AntdUI.Label label6;
+ private AntdUI.StackPanel stackPanel7;
+ private AntdUI.Label label5;
+ private AntdUI.Button buttonCZ;
+ private AntdUI.Button buttonSZ;
+ private AntdUI.Button buttonDEL;
+ private AntdUI.Button buttonADD;
+ private AntdUI.Input input_itemsize;
+ }
+}
diff --git a/Views/StackPanelDemo.cs b/Views/StackPanelDemo.cs
new file mode 100644
index 0000000..9d00d8e
--- /dev/null
+++ b/Views/StackPanelDemo.cs
@@ -0,0 +1,106 @@
+using AntdUI;
+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 StackPanelDemo : UserControl
+ {
+ private Window form;
+ public StackPanelDemo(Window _form)
+ {
+ form = _form;
+ InitializeComponent();
+ //设置默认值
+ InitData();
+ // 绑定按钮事件
+ BindButtonClick();
+ }
+
+ private void StackPanelDemo_Load(object sender, EventArgs e)
+ {
+ LoadStackPanel();
+ }
+
+ private void LoadStackPanel()
+ {
+ stackPanel.AutoScroll = select_autoscroll.SelectedIndex == 0;
+ stackPanel.Gap = (int)input_gap.Value;
+ stackPanel.ItemSize = input_itemsize.Text;
+ stackPanel.Vertical = select_vertical.SelectedIndex == 0;
+
+ stackPanel.Controls.Clear();
+ for (int i= 0; i < 3; i++){
+ var control = new AntdUI.Button()
+ {
+ Text = $"Button{i}",
+ Type = TTypeMini.Primary,
+ WaveSize = 0,
+ Font = new Font("Microsoft YaHei UI", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(134))),
+ };
+ form.AutoDpi(control);
+ stackPanel.Controls.Add(control);
+ }
+ }
+
+ private void BindButtonClick()
+ {
+ buttonSZ.Click += ButtonSZ_Click;
+ buttonCZ.Click += ButtonCZ_Click;
+ buttonADD.Click += ButtonADD_Click;
+ buttonDEL.Click += ButtonDEL_Click;
+ }
+
+ private void ButtonDEL_Click(object sender, EventArgs e)
+ {
+ if (stackPanel.Controls.Count > 0)
+ {
+ // 删除最后一个控件
+ stackPanel.Controls.RemoveAt(stackPanel.Controls.Count - 1);
+ }
+ }
+
+ private void ButtonADD_Click(object sender, EventArgs e)
+ {
+ var control = new AntdUI.Button()
+ {
+ Text = $"Button{stackPanel.Controls.Count}",
+ Type = TTypeMini.Primary,
+ WaveSize = 0,
+ Font = new Font("Microsoft YaHei UI", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(134))),
+ };
+ form.AutoDpi(control);
+ stackPanel.Controls.Add(control);
+ }
+
+ private void ButtonCZ_Click(object sender, EventArgs e)
+ {
+ InitData();
+ LoadStackPanel();
+ }
+
+ private void ButtonSZ_Click(object sender, EventArgs e)
+ {
+ stackPanel.AutoScroll = select_autoscroll.SelectedIndex == 0;
+ stackPanel.Gap = (int)input_gap.Value;
+ stackPanel.ItemSize = input_itemsize.Text;
+ stackPanel.Vertical = select_vertical.SelectedIndex == 0;
+ }
+
+ private void InitData()
+ {
+ select_autoscroll.SelectedIndex = 1;
+ input_gap.Value = 0;
+ input_itemsize.Text = "10%";
+ select_vertical.SelectedIndex = 0;
+ }
+
+ }
+}
diff --git a/Views/StackPanelDemo.resx b/Views/StackPanelDemo.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/Views/StackPanelDemo.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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
+
+
\ No newline at end of file
diff --git a/assets/screenshots/FloatButton.png b/assets/screenshots/FloatButton.png
index e064c98..3c20a18 100644
Binary files a/assets/screenshots/FloatButton.png and b/assets/screenshots/FloatButton.png differ
diff --git a/assets/screenshots/FlowPanel.png b/assets/screenshots/FlowPanel.png
index b5f6cb8..0695811 100644
Binary files a/assets/screenshots/FlowPanel.png and b/assets/screenshots/FlowPanel.png differ
diff --git a/assets/screenshots/GridPanel.png b/assets/screenshots/GridPanel.png
index 840e047..152afe7 100644
Binary files a/assets/screenshots/GridPanel.png and b/assets/screenshots/GridPanel.png differ
diff --git a/assets/screenshots/Panel.png b/assets/screenshots/Panel.png
index e402d2e..eed8970 100644
Binary files a/assets/screenshots/Panel.png and b/assets/screenshots/Panel.png differ
diff --git a/assets/screenshots/StackPanel.png b/assets/screenshots/StackPanel.png
new file mode 100644
index 0000000..94dbcc6
Binary files /dev/null and b/assets/screenshots/StackPanel.png differ