完善系统设置相关选项
This commit is contained in:
Generated
+2
-16
@@ -62,7 +62,6 @@
|
||||
this.stackPanel2 = new AntdUI.StackPanel();
|
||||
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();
|
||||
@@ -438,7 +437,6 @@
|
||||
//
|
||||
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, 127);
|
||||
this.stackPanel2.Name = "stackPanel2";
|
||||
this.stackPanel2.Size = new System.Drawing.Size(694, 38);
|
||||
@@ -448,7 +446,7 @@
|
||||
// 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(165, 3);
|
||||
this.buttonCZ.Location = new System.Drawing.Point(84, 3);
|
||||
this.buttonCZ.Name = "buttonCZ";
|
||||
this.buttonCZ.Size = new System.Drawing.Size(75, 32);
|
||||
this.buttonCZ.TabIndex = 4;
|
||||
@@ -459,7 +457,7 @@
|
||||
// buttonClose
|
||||
//
|
||||
this.buttonClose.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.buttonClose.Location = new System.Drawing.Point(84, 3);
|
||||
this.buttonClose.Location = new System.Drawing.Point(3, 3);
|
||||
this.buttonClose.Name = "buttonClose";
|
||||
this.buttonClose.Size = new System.Drawing.Size(75, 32);
|
||||
this.buttonClose.TabIndex = 3;
|
||||
@@ -467,17 +465,6 @@
|
||||
this.buttonClose.Type = AntdUI.TTypeMini.Error;
|
||||
this.buttonClose.WaveSize = 0;
|
||||
//
|
||||
// buttonOpen
|
||||
//
|
||||
this.buttonOpen.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.buttonOpen.Location = new System.Drawing.Point(3, 3);
|
||||
this.buttonOpen.Name = "buttonOpen";
|
||||
this.buttonOpen.Size = new System.Drawing.Size(75, 32);
|
||||
this.buttonOpen.TabIndex = 2;
|
||||
this.buttonOpen.Text = "开 启";
|
||||
this.buttonOpen.Type = AntdUI.TTypeMini.Primary;
|
||||
this.buttonOpen.WaveSize = 0;
|
||||
//
|
||||
// divider1
|
||||
//
|
||||
this.divider1.Location = new System.Drawing.Point(3, 109);
|
||||
@@ -568,7 +555,6 @@
|
||||
private AntdUI.StackPanel stackPanel2;
|
||||
private AntdUI.Button buttonCZ;
|
||||
private AntdUI.Button buttonClose;
|
||||
private AntdUI.Button buttonOpen;
|
||||
private AntdUI.Divider divider1;
|
||||
}
|
||||
}
|
||||
|
||||
+47
-11
@@ -17,8 +17,8 @@ namespace AntdUIDemo.Views
|
||||
InitSelectItems();
|
||||
//设置默认值
|
||||
InitData();
|
||||
// 绑定按钮事件
|
||||
BindButtonClick();
|
||||
// 绑定事件
|
||||
BindEventHandler();
|
||||
}
|
||||
|
||||
private void FloatButtonDemo_Load(object sender, EventArgs e)
|
||||
@@ -27,11 +27,26 @@ namespace AntdUIDemo.Views
|
||||
LoadFloatButton();
|
||||
}
|
||||
|
||||
private void BindButtonClick()
|
||||
private void BindEventHandler()
|
||||
{
|
||||
buttonOpen.Click += buttonOpen_Click;
|
||||
buttonClose.Click += buttonClose_Click;
|
||||
buttonCZ.Click += buttonCZ_Click;
|
||||
|
||||
select_align.SelectedIndexChanged += select_intvalue_SelectedIndexChanged;
|
||||
select_round.SelectedIndexChanged += select_intvalue_SelectedIndexChanged;
|
||||
select_topmost.SelectedIndexChanged += select_intvalue_SelectedIndexChanged;
|
||||
select_vertical.SelectedIndexChanged += select_intvalue_SelectedIndexChanged;
|
||||
select_type.SelectedIndexChanged += select_intvalue_SelectedIndexChanged;
|
||||
|
||||
input_size.ValueChanged += input_decimalvalue_ValeChanged;
|
||||
input_mx.ValueChanged += input_decimalvalue_ValeChanged;
|
||||
input_my.ValueChanged += input_decimalvalue_ValeChanged;
|
||||
input_radius.ValueChanged += input_decimalvalue_ValeChanged;
|
||||
input_badgesize.ValueChanged += input_decimalvalue_ValeChanged;
|
||||
|
||||
input_badge.TextChanged += input_badge_TextChanged;
|
||||
|
||||
colorPicker.ValueChanged += colorPicker_ValueChanged;
|
||||
}
|
||||
|
||||
// 初始化下拉框
|
||||
@@ -157,17 +172,38 @@ namespace AntdUIDemo.Views
|
||||
LoadFloatButton();
|
||||
}
|
||||
|
||||
// 设置
|
||||
private void buttonOpen_Click(object sender, EventArgs e)
|
||||
{
|
||||
CloseFloatButtonForm();
|
||||
LoadFloatButton();
|
||||
}
|
||||
|
||||
// 关闭
|
||||
private void buttonClose_Click(object sender, EventArgs e)
|
||||
{
|
||||
CloseFloatButtonForm();
|
||||
}
|
||||
|
||||
#region EventHandler
|
||||
private void select_intvalue_SelectedIndexChanged(object sender, int value)
|
||||
{
|
||||
CloseFloatButtonForm();
|
||||
LoadFloatButton();
|
||||
}
|
||||
|
||||
private void colorPicker_ValueChanged(object sender, Color value)
|
||||
{
|
||||
CloseFloatButtonForm();
|
||||
LoadFloatButton();
|
||||
}
|
||||
|
||||
private void input_badge_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
CloseFloatButtonForm();
|
||||
LoadFloatButton();
|
||||
}
|
||||
|
||||
private void input_decimalvalue_ValeChanged(object sender, decimal value)
|
||||
{
|
||||
CloseFloatButtonForm();
|
||||
LoadFloatButton();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+16
-31
@@ -34,8 +34,6 @@
|
||||
this.stackPanel3 = new AntdUI.StackPanel();
|
||||
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();
|
||||
@@ -48,6 +46,7 @@
|
||||
this.divider1 = new AntdUI.Divider();
|
||||
this.label2 = new AntdUI.Label();
|
||||
this.label1 = new AntdUI.Label();
|
||||
this.buttonCZ = new AntdUI.Button();
|
||||
this.stackPanel1.SuspendLayout();
|
||||
this.stackPanel2.SuspendLayout();
|
||||
this.stackPanel3.SuspendLayout();
|
||||
@@ -82,7 +81,6 @@
|
||||
//
|
||||
// flowPanel
|
||||
//
|
||||
this.flowPanel.BackColor = System.Drawing.Color.White;
|
||||
this.flowPanel.Badge = "";
|
||||
this.flowPanel.Location = new System.Drawing.Point(289, 3);
|
||||
this.flowPanel.Name = "flowPanel";
|
||||
@@ -91,10 +89,9 @@
|
||||
//
|
||||
// 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);
|
||||
@@ -108,7 +105,7 @@
|
||||
// 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, 231);
|
||||
this.buttonDEL.Location = new System.Drawing.Point(3, 155);
|
||||
this.buttonDEL.Name = "buttonDEL";
|
||||
this.buttonDEL.Size = new System.Drawing.Size(274, 32);
|
||||
this.buttonDEL.TabIndex = 36;
|
||||
@@ -119,7 +116,7 @@
|
||||
// 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, 193);
|
||||
this.buttonADD.Location = new System.Drawing.Point(3, 117);
|
||||
this.buttonADD.Name = "buttonADD";
|
||||
this.buttonADD.Size = new System.Drawing.Size(274, 32);
|
||||
this.buttonADD.TabIndex = 35;
|
||||
@@ -127,28 +124,6 @@
|
||||
this.buttonADD.Type = AntdUI.TTypeMini.Info;
|
||||
this.buttonADD.WaveSize = 0;
|
||||
//
|
||||
// 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
|
||||
//
|
||||
this.stackPanel6.Controls.Add(this.select_autoscroll);
|
||||
@@ -267,6 +242,17 @@
|
||||
this.label1.TabIndex = 4;
|
||||
this.label1.Text = "FlowPanel 流动布局";
|
||||
//
|
||||
// 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 = 37;
|
||||
this.buttonCZ.Text = "重 置";
|
||||
this.buttonCZ.Type = AntdUI.TTypeMini.Warn;
|
||||
this.buttonCZ.WaveSize = 0;
|
||||
//
|
||||
// FlowPanelDemo
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
|
||||
@@ -302,9 +288,8 @@
|
||||
private AntdUI.StackPanel stackPanel6;
|
||||
private AntdUI.Select select_autoscroll;
|
||||
private AntdUI.Label label4;
|
||||
private AntdUI.Button buttonCZ;
|
||||
private AntdUI.Button buttonSZ;
|
||||
private AntdUI.Button buttonDEL;
|
||||
private AntdUI.Button buttonADD;
|
||||
private AntdUI.Button buttonCZ;
|
||||
}
|
||||
}
|
||||
|
||||
+19
-12
@@ -16,8 +16,8 @@ namespace AntdUIDemo.Views
|
||||
InitSelectItems();
|
||||
//设置默认值
|
||||
InitData();
|
||||
// 绑定按钮事件
|
||||
BindButtonClick();
|
||||
// 绑定事件
|
||||
BindEventHandler();
|
||||
}
|
||||
|
||||
private void FlowPanelDemo_Load(object sender, EventArgs e)
|
||||
@@ -60,12 +60,27 @@ namespace AntdUIDemo.Views
|
||||
}
|
||||
|
||||
// 绑定按钮事件
|
||||
private void BindButtonClick()
|
||||
private void BindEventHandler()
|
||||
{
|
||||
buttonSZ.Click += buttonSZ_Click;
|
||||
buttonCZ.Click += buttonCZ_Click;
|
||||
buttonADD.Click += buttonADD_Click;
|
||||
buttonDEL.Click += buttonDEL_Click;
|
||||
|
||||
select_align.SelectedIndexChanged += select_intvalue_SelectedIndexChanged;
|
||||
select_autoscroll.SelectedIndexChanged += select_intvalue_SelectedIndexChanged;
|
||||
|
||||
input_gap.ValueChanged += input_gap_ValueChanged;
|
||||
}
|
||||
|
||||
private void select_intvalue_SelectedIndexChanged(object sender, int value)
|
||||
{
|
||||
flowPanel.Align = (TAlignFlow)select_align.SelectedValue;
|
||||
flowPanel.AutoScroll = select_autoscroll.SelectedIndex == 0;
|
||||
}
|
||||
|
||||
private void input_gap_ValueChanged(object sender, decimal value)
|
||||
{
|
||||
flowPanel.Gap = (int)input_gap.Value;
|
||||
}
|
||||
|
||||
// 初始化下拉框
|
||||
@@ -105,14 +120,6 @@ 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)
|
||||
{
|
||||
|
||||
Generated
+1
-16
@@ -33,7 +33,6 @@
|
||||
this.gridPanel = new AntdUI.GridPanel();
|
||||
this.stackPanel3 = new AntdUI.StackPanel();
|
||||
this.buttonCZ = new AntdUI.Button();
|
||||
this.buttonSZ = new AntdUI.Button();
|
||||
this.stackPanel4 = new AntdUI.StackPanel();
|
||||
this.input_gap = new AntdUI.InputNumber();
|
||||
this.label4 = new AntdUI.Label();
|
||||
@@ -76,7 +75,6 @@
|
||||
//
|
||||
// gridPanel
|
||||
//
|
||||
this.gridPanel.BackColor = System.Drawing.Color.White;
|
||||
this.gridPanel.Location = new System.Drawing.Point(289, 3);
|
||||
this.gridPanel.Name = "gridPanel";
|
||||
this.gridPanel.Size = new System.Drawing.Size(400, 293);
|
||||
@@ -86,7 +84,6 @@
|
||||
// stackPanel3
|
||||
//
|
||||
this.stackPanel3.Controls.Add(this.buttonCZ);
|
||||
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);
|
||||
@@ -99,7 +96,7 @@
|
||||
// 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, 136);
|
||||
this.buttonCZ.Location = new System.Drawing.Point(3, 98);
|
||||
this.buttonCZ.Name = "buttonCZ";
|
||||
this.buttonCZ.Size = new System.Drawing.Size(274, 32);
|
||||
this.buttonCZ.TabIndex = 20;
|
||||
@@ -107,17 +104,6 @@
|
||||
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, 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);
|
||||
@@ -230,7 +216,6 @@
|
||||
private AntdUI.Input input_span;
|
||||
private AntdUI.Label label3;
|
||||
private AntdUI.GridPanel gridPanel;
|
||||
private AntdUI.Button buttonSZ;
|
||||
private AntdUI.StackPanel stackPanel4;
|
||||
private AntdUI.InputNumber input_gap;
|
||||
private AntdUI.Label label4;
|
||||
|
||||
+12
-5
@@ -12,8 +12,8 @@ namespace AntdUIDemo.Views
|
||||
InitializeComponent();
|
||||
//设置默认值
|
||||
InitData();
|
||||
// 绑定按钮事件
|
||||
BindButtonClick();
|
||||
// 绑定事件
|
||||
BindEventHandler();
|
||||
}
|
||||
|
||||
private void GridPanelDemo_Load(object sender, EventArgs e)
|
||||
@@ -27,13 +27,20 @@ namespace AntdUIDemo.Views
|
||||
input_span.Text = "50% 50%;50% 50%";
|
||||
}
|
||||
|
||||
private void BindButtonClick()
|
||||
private void BindEventHandler()
|
||||
{
|
||||
buttonSZ.Click += buttonSZ_Click;
|
||||
buttonCZ.Click += buttonCZ_Click;
|
||||
|
||||
input_span.TextChanged += input_span_TextChanged;
|
||||
input_gap.ValueChanged += input_gap_ValueChanged;
|
||||
}
|
||||
|
||||
private void buttonSZ_Click(object sender, EventArgs e)
|
||||
private void input_gap_ValueChanged(object sender, decimal value)
|
||||
{
|
||||
LoadGridPanel(input_span.Text, input_gap.Value);
|
||||
}
|
||||
|
||||
private void input_span_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
LoadGridPanel(input_span.Text, input_gap.Value);
|
||||
}
|
||||
|
||||
Generated
+3
-17
@@ -33,7 +33,6 @@
|
||||
this.stackPanel15 = new AntdUI.StackPanel();
|
||||
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();
|
||||
@@ -124,7 +123,6 @@
|
||||
//
|
||||
this.stackPanel15.Controls.Add(this.panel);
|
||||
this.stackPanel15.Controls.Add(this.buttonCZ);
|
||||
this.stackPanel15.Controls.Add(this.buttonSZ);
|
||||
this.stackPanel15.Controls.Add(this.stackPanel13);
|
||||
this.stackPanel15.Controls.Add(this.stackPanel14);
|
||||
this.stackPanel15.Location = new System.Drawing.Point(289, 3);
|
||||
@@ -136,8 +134,8 @@
|
||||
//
|
||||
// panel
|
||||
//
|
||||
this.panel.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.panel.Location = new System.Drawing.Point(3, 155);
|
||||
this.panel.BackColor = System.Drawing.Color.Transparent;
|
||||
this.panel.Location = new System.Drawing.Point(3, 117);
|
||||
this.panel.Name = "panel";
|
||||
this.panel.Shadow = 12;
|
||||
this.panel.ShadowOpacityAnimation = true;
|
||||
@@ -148,7 +146,7 @@
|
||||
// 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, 117);
|
||||
this.buttonCZ.Location = new System.Drawing.Point(3, 79);
|
||||
this.buttonCZ.Name = "buttonCZ";
|
||||
this.buttonCZ.Size = new System.Drawing.Size(360, 32);
|
||||
this.buttonCZ.TabIndex = 33;
|
||||
@@ -156,17 +154,6 @@
|
||||
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, 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
|
||||
//
|
||||
this.stackPanel13.Controls.Add(this.input_shadowOH);
|
||||
@@ -680,7 +667,6 @@
|
||||
private AntdUI.StackPanel stackPanel15;
|
||||
private AntdUI.Panel panel;
|
||||
private AntdUI.Button buttonCZ;
|
||||
private AntdUI.Button buttonSZ;
|
||||
private AntdUI.StackPanel stackPanel13;
|
||||
private AntdUI.InputNumber input_shadowOH;
|
||||
private AntdUI.Label label12;
|
||||
|
||||
+46
-17
@@ -1,5 +1,6 @@
|
||||
using AntdUI;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace AntdUIDemo.Views
|
||||
@@ -13,19 +14,30 @@ namespace AntdUIDemo.Views
|
||||
InitSelectItems();
|
||||
// 设置默认值
|
||||
InitData();
|
||||
// 绑定按钮事件
|
||||
BindButtonClick();
|
||||
// 绑定事件
|
||||
BindEventHandler();
|
||||
}
|
||||
|
||||
private void BindButtonClick()
|
||||
private void BindEventHandler()
|
||||
{
|
||||
buttonSZ.Click += buttonSZ_Click;
|
||||
buttonCZ.Click += buttonCZ_Click;
|
||||
}
|
||||
|
||||
private void PanelDemo_Load(object sender, EventArgs e)
|
||||
{
|
||||
LoadPanel();
|
||||
select_arrowalign.SelectedIndexChanged += select_intvalue_SelectedIndexChanged;
|
||||
select_shadowalign.SelectedIndexChanged += select_intvalue_SelectedIndexChanged;
|
||||
select_shadowOA.SelectedIndexChanged += select_intvalue_SelectedIndexChanged;
|
||||
|
||||
input_arrowsize.ValueChanged += input_decimalvalue_ValueChanged;
|
||||
input_radius.ValueChanged += input_decimalvalue_ValueChanged;
|
||||
input_borderwidth.ValueChanged += input_decimalvalue_ValueChanged;
|
||||
input_shadow.ValueChanged += input_decimalvalue_ValueChanged;
|
||||
input_shadowX.ValueChanged += input_decimalvalue_ValueChanged;
|
||||
input_shadowY.ValueChanged += input_decimalvalue_ValueChanged;
|
||||
input_shadowO.ValueChanged += input_decimalvalue_ValueChanged;
|
||||
input_shadowOH.ValueChanged += input_decimalvalue_ValueChanged;
|
||||
|
||||
colorPicker_border.ValueChanged += colorPicker_ValueChanged;
|
||||
colorPicker_shadow.ValueChanged += colorPicker_ValueChanged;
|
||||
|
||||
}
|
||||
|
||||
private void InitSelectItems()
|
||||
@@ -57,28 +69,23 @@ namespace AntdUIDemo.Views
|
||||
select_arrowalign.SelectedIndex = 0;
|
||||
select_shadowalign.SelectedIndex = 0;
|
||||
select_shadowOA.SelectedIndex = 0;
|
||||
|
||||
input_arrowsize.Value = 8;
|
||||
input_radius.Value = 6;
|
||||
input_shadow.Value = 12;
|
||||
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;
|
||||
}
|
||||
|
||||
// 设置
|
||||
private void buttonSZ_Click(object sender, EventArgs e)
|
||||
{
|
||||
LoadPanel();
|
||||
colorPicker_shadow.Value = Style.Db.TextBase;
|
||||
colorPicker_border.Value = Style.Db.BorderColor;
|
||||
}
|
||||
|
||||
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;
|
||||
@@ -91,8 +98,30 @@ namespace AntdUIDemo.Views
|
||||
panel.ShadowOpacity = (float)input_shadowO.Value;
|
||||
panel.ShadowOpacityAnimation = select_shadowOA.SelectedIndex == 0;
|
||||
panel.ShadowOpacityHover = (float)input_shadowOH.Value;
|
||||
panel.Invalidate();
|
||||
}
|
||||
|
||||
#region 控件事件
|
||||
|
||||
private void colorPicker_ValueChanged(object sender, Color value)
|
||||
{
|
||||
LoadPanel();
|
||||
}
|
||||
|
||||
private void input_decimalvalue_ValueChanged(object sender, decimal value)
|
||||
{
|
||||
LoadPanel();
|
||||
}
|
||||
|
||||
private void select_intvalue_SelectedIndexChanged(object sender, int value)
|
||||
{
|
||||
LoadPanel();
|
||||
}
|
||||
|
||||
private void PanelDemo_Load(object sender, EventArgs e)
|
||||
{
|
||||
LoadPanel();
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+167
-182
@@ -29,35 +29,34 @@
|
||||
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.stackPanel3 = new AntdUI.StackPanel();
|
||||
this.buttonDEL = new AntdUI.Button();
|
||||
this.buttonADD = new AntdUI.Button();
|
||||
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.stackPanel7 = new AntdUI.StackPanel();
|
||||
this.input_itemsize = new AntdUI.Input();
|
||||
this.label5 = new AntdUI.Label();
|
||||
this.stackPanel5 = new AntdUI.StackPanel();
|
||||
this.input_gap = new AntdUI.InputNumber();
|
||||
this.label3 = new AntdUI.Label();
|
||||
this.stackPanel6 = new AntdUI.StackPanel();
|
||||
this.select_autoscroll = new AntdUI.Select();
|
||||
this.label4 = new AntdUI.Label();
|
||||
this.divider1 = new AntdUI.Divider();
|
||||
this.label2 = new AntdUI.Label();
|
||||
this.label1 = new AntdUI.Label();
|
||||
this.buttonCZ = new AntdUI.Button();
|
||||
this.stackPanel1.SuspendLayout();
|
||||
this.stackPanel2.SuspendLayout();
|
||||
this.stackPanel3.SuspendLayout();
|
||||
this.stackPanel6.SuspendLayout();
|
||||
this.stackPanel5.SuspendLayout();
|
||||
this.stackPanel7.SuspendLayout();
|
||||
this.stackPanel8.SuspendLayout();
|
||||
this.stackPanel7.SuspendLayout();
|
||||
this.stackPanel5.SuspendLayout();
|
||||
this.stackPanel6.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// stackPanel1
|
||||
@@ -74,31 +73,6 @@
|
||||
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);
|
||||
@@ -109,12 +83,20 @@
|
||||
this.stackPanel2.TabIndex = 11;
|
||||
this.stackPanel2.Text = "stackPanel2";
|
||||
//
|
||||
// stackPanel
|
||||
//
|
||||
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;
|
||||
//
|
||||
// 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.stackPanel8);
|
||||
this.stackPanel3.Controls.Add(this.stackPanel7);
|
||||
this.stackPanel3.Controls.Add(this.stackPanel5);
|
||||
@@ -126,98 +108,27 @@
|
||||
this.stackPanel3.Text = "stackPanel3";
|
||||
this.stackPanel3.Vertical = true;
|
||||
//
|
||||
// stackPanel
|
||||
// buttonDEL
|
||||
//
|
||||
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;
|
||||
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, 193);
|
||||
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;
|
||||
//
|
||||
// stackPanel6
|
||||
// buttonADD
|
||||
//
|
||||
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";
|
||||
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, 155);
|
||||
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;
|
||||
//
|
||||
// stackPanel8
|
||||
//
|
||||
@@ -254,49 +165,15 @@
|
||||
this.label6.TabIndex = 4;
|
||||
this.label6.Text = "Vertical";
|
||||
//
|
||||
// buttonCZ
|
||||
// stackPanel7
|
||||
//
|
||||
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;
|
||||
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";
|
||||
//
|
||||
// input_itemsize
|
||||
//
|
||||
@@ -308,6 +185,115 @@
|
||||
this.input_itemsize.TabIndex = 5;
|
||||
this.input_itemsize.WaveSize = 0;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label5.Location = new System.Drawing.Point(3, 3);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(88, 26);
|
||||
this.label5.TabIndex = 4;
|
||||
this.label5.Text = "ItemSize";
|
||||
//
|
||||
// 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";
|
||||
//
|
||||
// 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";
|
||||
//
|
||||
// divider1
|
||||
//
|
||||
this.divider1.Location = new System.Drawing.Point(3, 79);
|
||||
this.divider1.Name = "divider1";
|
||||
this.divider1.Size = new System.Drawing.Size(694, 12);
|
||||
this.divider1.TabIndex = 10;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label2.Location = new System.Drawing.Point(3, 49);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(694, 24);
|
||||
this.label2.TabIndex = 9;
|
||||
this.label2.Text = "将子元素排列成水平或垂直的一行。";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Font = new System.Drawing.Font("Microsoft YaHei UI", 26.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.label1.Location = new System.Drawing.Point(3, 3);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(694, 40);
|
||||
this.label1.TabIndex = 8;
|
||||
this.label1.Text = "StackPanel 堆叠布局";
|
||||
//
|
||||
// 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, 231);
|
||||
this.buttonCZ.Name = "buttonCZ";
|
||||
this.buttonCZ.Size = new System.Drawing.Size(274, 32);
|
||||
this.buttonCZ.TabIndex = 39;
|
||||
this.buttonCZ.Text = "重 置";
|
||||
this.buttonCZ.Type = AntdUI.TTypeMini.Warn;
|
||||
this.buttonCZ.WaveSize = 0;
|
||||
//
|
||||
// StackPanelDemo
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
|
||||
@@ -318,10 +304,10 @@
|
||||
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.stackPanel7.ResumeLayout(false);
|
||||
this.stackPanel5.ResumeLayout(false);
|
||||
this.stackPanel6.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
@@ -346,10 +332,9 @@
|
||||
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;
|
||||
private AntdUI.Button buttonCZ;
|
||||
}
|
||||
}
|
||||
|
||||
+37
-20
@@ -18,8 +18,8 @@ namespace AntdUIDemo.Views
|
||||
InitializeComponent();
|
||||
//设置默认值
|
||||
InitData();
|
||||
// 绑定按钮事件
|
||||
BindButtonClick();
|
||||
// 绑定事件
|
||||
BindEventHandler();
|
||||
}
|
||||
|
||||
private void StackPanelDemo_Load(object sender, EventArgs e)
|
||||
@@ -47,12 +47,44 @@ namespace AntdUIDemo.Views
|
||||
}
|
||||
}
|
||||
|
||||
private void BindButtonClick()
|
||||
private void BindEventHandler()
|
||||
{
|
||||
buttonSZ.Click += ButtonSZ_Click;
|
||||
buttonCZ.Click += ButtonCZ_Click;
|
||||
buttonADD.Click += ButtonADD_Click;
|
||||
buttonDEL.Click += ButtonDEL_Click;
|
||||
|
||||
select_autoscroll.SelectedIndexChanged += select_intvalue_SelectedIndexChanged;
|
||||
select_vertical.SelectedIndexChanged += select_intvalue_SelectedIndexChanged;
|
||||
|
||||
input_gap.ValueChanged += input_gap_ValueChanged;
|
||||
|
||||
input_itemsize.TextChanged += input_itemsize_TextChanged;
|
||||
}
|
||||
|
||||
private void InitData()
|
||||
{
|
||||
select_autoscroll.SelectedIndex = 1;
|
||||
input_gap.Value = 0;
|
||||
input_itemsize.Text = "10%";
|
||||
select_vertical.SelectedIndex = 0;
|
||||
}
|
||||
|
||||
#region 事件
|
||||
|
||||
private void input_itemsize_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
stackPanel.ItemSize = input_itemsize.Text;
|
||||
}
|
||||
|
||||
private void input_gap_ValueChanged(object sender, decimal value)
|
||||
{
|
||||
stackPanel.Gap = (int)input_gap.Value;
|
||||
}
|
||||
|
||||
private void select_intvalue_SelectedIndexChanged(object sender, int value)
|
||||
{
|
||||
stackPanel.AutoScroll = select_autoscroll.SelectedIndex == 0;
|
||||
stackPanel.Vertical = select_vertical.SelectedIndex == 0;
|
||||
}
|
||||
|
||||
private void ButtonDEL_Click(object sender, EventArgs e)
|
||||
@@ -81,22 +113,7 @@ namespace AntdUIDemo.Views
|
||||
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;
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user