From cb9add923d00d03ccf6430443534dad781d54bd8 Mon Sep 17 00:00:00 2001 From: czz_y Date: Fri, 16 Aug 2024 14:37:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0FlowPanel,GridPanel,Panel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MainWindow.cs | 9 + Program.cs | 1 + Views/ButtonDemo.Designer.cs | 2 +- Views/ButtonDemo.cs | 8 +- Views/FloatButtonDemo.Designer.cs | 125 +++--- Views/FloatButtonDemo.cs | 60 +-- Views/FlowPanelDemo.Designer.cs | 499 +++++++++++++++++++++++ Views/FlowPanelDemo.cs | 98 +++++ Views/FlowPanelDemo.resx | 120 ++++++ Views/GridPanelDemo.Designer.cs | 298 ++++++++++++++ Views/GridPanelDemo.cs | 52 +++ Views/GridPanelDemo.resx | 120 ++++++ Views/PanelDemo.Designer.cs | 639 ++++++++++++++++++++++++++++++ Views/PanelDemo.cs | 79 ++++ Views/PanelDemo.resx | 120 ++++++ 15 files changed, 2126 insertions(+), 104 deletions(-) create mode 100644 Views/FlowPanelDemo.Designer.cs create mode 100644 Views/FlowPanelDemo.cs create mode 100644 Views/FlowPanelDemo.resx create mode 100644 Views/GridPanelDemo.Designer.cs create mode 100644 Views/GridPanelDemo.cs create mode 100644 Views/GridPanelDemo.resx create mode 100644 Views/PanelDemo.Designer.cs create mode 100644 Views/PanelDemo.cs create mode 100644 Views/PanelDemo.resx diff --git a/MainWindow.cs b/MainWindow.cs index e3cf738..0ed1938 100644 --- a/MainWindow.cs +++ b/MainWindow.cs @@ -65,6 +65,15 @@ namespace AntdUIDemo case "FloatButton": control = new FloatButtonDemo(this); break; + case "FlowPanel": + control = new FlowPanelDemo(); + break; + case "GridPanel": + control = new GridPanelDemo(); + break; + case "Panel": + control = new PanelDemo(); + break; } if (control != null) { diff --git a/Program.cs b/Program.cs index 4828d14..c5bb8ff 100644 --- a/Program.cs +++ b/Program.cs @@ -16,6 +16,7 @@ namespace AntdUIDemo { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); + //AntdUI.Config.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit; Application.Run(new MainWindow()); } } diff --git a/Views/ButtonDemo.Designer.cs b/Views/ButtonDemo.Designer.cs index 176f8d2..abe9107 100644 --- a/Views/ButtonDemo.Designer.cs +++ b/Views/ButtonDemo.Designer.cs @@ -181,7 +181,7 @@ this.button36.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.button36.Ghost = true; this.button36.JoinLeft = true; - this.button36.Location = new System.Drawing.Point(78, 3); + this.button36.Location = new System.Drawing.Point(77, 3); this.button36.Name = "button36"; this.button36.Size = new System.Drawing.Size(75, 32); this.button36.TabIndex = 4; diff --git a/Views/ButtonDemo.cs b/Views/ButtonDemo.cs index 8d8858d..8240402 100644 --- a/Views/ButtonDemo.cs +++ b/Views/ButtonDemo.cs @@ -21,10 +21,10 @@ namespace AntdUIDemo.Views private void ButtonDemo_Load(object sender, EventArgs e) { // 遍历窗体中的所有控件并绑定 tooltip - BindButtonMouseHoverEvent(this); + BindButtonWithToolTip(this); } - private void BindButtonMouseHoverEvent(Control parent) + private void BindButtonWithToolTip(Control parent) { foreach (Control control in parent.Controls) { @@ -44,7 +44,7 @@ namespace AntdUIDemo.Views var backentend = button.BackExtend; // 构建SetTip文本 var tooltipText = new StringBuilder(); - tooltipComponent.Font = new Font("Microsoft JhengHei UI", 9F, FontStyle.Regular, GraphicsUnit.Point); + tooltipComponent.Font = new Font("Microsoft YaHei UI", 9F, FontStyle.Regular, GraphicsUnit.Point); tooltipText.AppendLine($"Type: {type}"); tooltipText.AppendLine($"BorderWidth: {borderwidth}"); tooltipText.AppendLine($"Radius: {radius}"); @@ -81,7 +81,7 @@ namespace AntdUIDemo.Views // 递归遍历子控件 if (control.HasChildren) { - BindButtonMouseHoverEvent(control); + BindButtonWithToolTip(control); } } } diff --git a/Views/FloatButtonDemo.Designer.cs b/Views/FloatButtonDemo.Designer.cs index 00f773c..f854432 100644 --- a/Views/FloatButtonDemo.Designer.cs +++ b/Views/FloatButtonDemo.Designer.cs @@ -102,7 +102,7 @@ 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, 321); + this.stackPanel6.Location = new System.Drawing.Point(3, 327); this.stackPanel6.Name = "stackPanel6"; this.stackPanel6.Size = new System.Drawing.Size(704, 32); this.stackPanel6.TabIndex = 12; @@ -110,9 +110,9 @@ // // colorPicker // - this.colorPicker.Location = new System.Drawing.Point(447, 3); + this.colorPicker.Location = new System.Drawing.Point(469, 3); this.colorPicker.Name = "colorPicker"; - this.colorPicker.Size = new System.Drawing.Size(75, 26); + this.colorPicker.Size = new System.Drawing.Size(80, 26); this.colorPicker.TabIndex = 15; this.colorPicker.Text = "colorPicker1"; this.colorPicker.Value = System.Drawing.Color.FromArgb(((int)(((byte)(22)))), ((int)(((byte)(119)))), ((int)(((byte)(255))))); @@ -121,17 +121,17 @@ // label16 // this.label16.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label16.Location = new System.Drawing.Point(353, 3); + this.label16.Location = new System.Drawing.Point(371, 3); this.label16.Name = "label16"; - this.label16.Size = new System.Drawing.Size(88, 26); + this.label16.Size = new System.Drawing.Size(92, 26); this.label16.TabIndex = 14; this.label16.Text = "BadgeBack"; // // input_badgesize // - this.input_badgesize.Location = new System.Drawing.Point(272, 3); + this.input_badgesize.Location = new System.Drawing.Point(285, 3); this.input_badgesize.Name = "input_badgesize"; - this.input_badgesize.Size = new System.Drawing.Size(75, 26); + this.input_badgesize.Size = new System.Drawing.Size(80, 26); this.input_badgesize.TabIndex = 13; this.input_badgesize.Text = "6"; this.input_badgesize.Value = new decimal(new int[] { @@ -144,17 +144,17 @@ // 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(178, 3); + this.label15.Location = new System.Drawing.Point(187, 3); this.label15.Name = "label15"; - this.label15.Size = new System.Drawing.Size(88, 26); + this.label15.Size = new System.Drawing.Size(92, 26); this.label15.TabIndex = 12; this.label15.Text = "BadgeSize"; // // input_badge // - this.input_badge.Location = new System.Drawing.Point(97, 3); + this.input_badge.Location = new System.Drawing.Point(101, 3); this.input_badge.Name = "input_badge"; - this.input_badge.Size = new System.Drawing.Size(75, 26); + this.input_badge.Size = new System.Drawing.Size(80, 26); this.input_badge.TabIndex = 5; this.input_badge.WaveSize = 1; // @@ -163,7 +163,7 @@ this.label17.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.label17.Location = new System.Drawing.Point(3, 3); this.label17.Name = "label17"; - this.label17.Size = new System.Drawing.Size(88, 26); + this.label17.Size = new System.Drawing.Size(92, 26); this.label17.TabIndex = 4; this.label17.Text = "Badge"; // @@ -175,7 +175,7 @@ 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, 283); + this.stackPanel5.Location = new System.Drawing.Point(3, 289); this.stackPanel5.Name = "stackPanel5"; this.stackPanel5.Size = new System.Drawing.Size(704, 32); this.stackPanel5.TabIndex = 11; @@ -183,9 +183,9 @@ // // input_radius // - this.input_radius.Location = new System.Drawing.Point(447, 3); + this.input_radius.Location = new System.Drawing.Point(469, 3); this.input_radius.Name = "input_radius"; - this.input_radius.Size = new System.Drawing.Size(75, 26); + this.input_radius.Size = new System.Drawing.Size(80, 26); this.input_radius.TabIndex = 11; this.input_radius.Text = "6"; this.input_radius.Value = new decimal(new int[] { @@ -198,9 +198,9 @@ // label12 // this.label12.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label12.Location = new System.Drawing.Point(353, 3); + this.label12.Location = new System.Drawing.Point(371, 3); this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(88, 26); + this.label12.Size = new System.Drawing.Size(92, 26); this.label12.TabIndex = 10; this.label12.Text = "Radius"; // @@ -208,18 +208,18 @@ // this.select_type.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.select_type.List = true; - this.select_type.Location = new System.Drawing.Point(272, 3); + this.select_type.Location = new System.Drawing.Point(285, 3); this.select_type.Name = "select_type"; - this.select_type.Size = new System.Drawing.Size(75, 26); + this.select_type.Size = new System.Drawing.Size(80, 26); this.select_type.TabIndex = 9; this.select_type.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(178, 3); + this.label13.Location = new System.Drawing.Point(187, 3); this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(88, 26); + this.label13.Size = new System.Drawing.Size(92, 26); this.label13.TabIndex = 8; this.label13.Text = "Type"; // @@ -227,9 +227,9 @@ // this.select_shape.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); this.select_shape.List = true; - this.select_shape.Location = new System.Drawing.Point(97, 3); + this.select_shape.Location = new System.Drawing.Point(101, 3); this.select_shape.Name = "select_shape"; - this.select_shape.Size = new System.Drawing.Size(75, 26); + this.select_shape.Size = new System.Drawing.Size(80, 26); this.select_shape.TabIndex = 5; this.select_shape.WaveSize = 1; // @@ -238,14 +238,14 @@ 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(88, 26); + this.label14.Size = new System.Drawing.Size(92, 26); this.label14.TabIndex = 4; this.label14.Text = "Shape"; // // label11 // this.label11.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F); - this.label11.Location = new System.Drawing.Point(3, 253); + this.label11.Location = new System.Drawing.Point(3, 259); this.label11.Name = "label11"; this.label11.Size = new System.Drawing.Size(704, 24); this.label11.TabIndex = 10; @@ -259,7 +259,7 @@ 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, 215); + this.stackPanel4.Location = new System.Drawing.Point(3, 221); this.stackPanel4.Name = "stackPanel4"; this.stackPanel4.Size = new System.Drawing.Size(704, 32); this.stackPanel4.TabIndex = 9; @@ -267,45 +267,55 @@ // // input_my // - this.input_my.Location = new System.Drawing.Point(447, 3); + this.input_my.Location = new System.Drawing.Point(469, 3); this.input_my.Name = "input_my"; - this.input_my.Size = new System.Drawing.Size(75, 26); + this.input_my.Size = new System.Drawing.Size(80, 26); this.input_my.TabIndex = 9; - this.input_my.Text = "0"; + this.input_my.Text = "24"; + this.input_my.Value = new decimal(new int[] { + 24, + 0, + 0, + 0}); this.input_my.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(353, 3); + this.label8.Location = new System.Drawing.Point(371, 3); this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(88, 26); + this.label8.Size = new System.Drawing.Size(92, 26); this.label8.TabIndex = 8; this.label8.Text = "MarginY"; // // input_mx // - this.input_mx.Location = new System.Drawing.Point(272, 3); + this.input_mx.Location = new System.Drawing.Point(285, 3); this.input_mx.Name = "input_mx"; - this.input_mx.Size = new System.Drawing.Size(75, 26); + this.input_mx.Size = new System.Drawing.Size(80, 26); this.input_mx.TabIndex = 7; - this.input_mx.Text = "0"; + this.input_mx.Text = "24"; + this.input_mx.Value = new decimal(new int[] { + 24, + 0, + 0, + 0}); this.input_mx.WaveSize = 1; // // 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(178, 3); + this.label7.Location = new System.Drawing.Point(187, 3); this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(88, 26); + this.label7.Size = new System.Drawing.Size(92, 26); this.label7.TabIndex = 6; this.label7.Text = "MarginX"; // // input_size // - this.input_size.Location = new System.Drawing.Point(97, 3); + this.input_size.Location = new System.Drawing.Point(101, 3); this.input_size.Name = "input_size"; - this.input_size.Size = new System.Drawing.Size(75, 26); + this.input_size.Size = new System.Drawing.Size(80, 26); this.input_size.TabIndex = 5; this.input_size.Text = "40"; this.input_size.Value = new decimal(new int[] { @@ -320,7 +330,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, 3); this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(88, 26); + this.label9.Size = new System.Drawing.Size(92, 26); this.label9.TabIndex = 4; this.label9.Text = "Size"; // @@ -332,7 +342,7 @@ 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, 177); + this.stackPanel3.Location = new System.Drawing.Point(3, 183); this.stackPanel3.Name = "stackPanel3"; this.stackPanel3.Size = new System.Drawing.Size(704, 32); this.stackPanel3.TabIndex = 8; @@ -345,10 +355,10 @@ "True", "Flase"}); this.select_vertical.List = true; - this.select_vertical.Location = new System.Drawing.Point(447, 3); + this.select_vertical.Location = new System.Drawing.Point(469, 3); this.select_vertical.Name = "select_vertical"; this.select_vertical.SelectedValue = "是"; - this.select_vertical.Size = new System.Drawing.Size(75, 26); + this.select_vertical.Size = new System.Drawing.Size(80, 26); this.select_vertical.TabIndex = 11; this.select_vertical.Text = "True"; this.select_vertical.WaveSize = 1; @@ -356,9 +366,9 @@ // 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(353, 3); + this.label5.Location = new System.Drawing.Point(371, 3); this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(88, 26); + this.label5.Size = new System.Drawing.Size(92, 26); this.label5.TabIndex = 10; this.label5.Text = "Vertical"; // @@ -369,10 +379,10 @@ "True", "Flase"}); this.select_topmost.List = true; - this.select_topmost.Location = new System.Drawing.Point(272, 3); + this.select_topmost.Location = new System.Drawing.Point(285, 3); this.select_topmost.Name = "select_topmost"; this.select_topmost.SelectedValue = "是"; - this.select_topmost.Size = new System.Drawing.Size(75, 26); + this.select_topmost.Size = new System.Drawing.Size(80, 26); this.select_topmost.TabIndex = 9; this.select_topmost.Text = "True"; this.select_topmost.WaveSize = 1; @@ -380,9 +390,9 @@ // 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(178, 3); + this.label6.Location = new System.Drawing.Point(187, 3); this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(88, 26); + this.label6.Size = new System.Drawing.Size(92, 26); this.label6.TabIndex = 8; this.label6.Text = "TopMost"; // @@ -390,9 +400,9 @@ // this.select_align.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); this.select_align.List = true; - this.select_align.Location = new System.Drawing.Point(97, 3); + this.select_align.Location = new System.Drawing.Point(101, 3); this.select_align.Name = "select_align"; - this.select_align.Size = new System.Drawing.Size(75, 26); + this.select_align.Size = new System.Drawing.Size(80, 26); this.select_align.TabIndex = 5; this.select_align.WaveSize = 1; // @@ -401,14 +411,14 @@ 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(88, 26); + this.label10.Size = new System.Drawing.Size(92, 26); this.label10.TabIndex = 4; this.label10.Text = "Align"; // // label4 // this.label4.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F); - this.label4.Location = new System.Drawing.Point(3, 147); + this.label4.Location = new System.Drawing.Point(3, 153); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(704, 24); this.label4.TabIndex = 6; @@ -421,7 +431,7 @@ this.stackPanel2.Controls.Add(this.buttonOpen); this.stackPanel2.Location = new System.Drawing.Point(3, 109); this.stackPanel2.Name = "stackPanel2"; - this.stackPanel2.Size = new System.Drawing.Size(704, 32); + this.stackPanel2.Size = new System.Drawing.Size(704, 38); this.stackPanel2.TabIndex = 5; this.stackPanel2.Text = "stackPanel2"; // @@ -430,7 +440,7 @@ 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.Name = "buttonCZ"; - this.buttonCZ.Size = new System.Drawing.Size(75, 26); + this.buttonCZ.Size = new System.Drawing.Size(75, 32); this.buttonCZ.TabIndex = 4; this.buttonCZ.Text = "重 置"; this.buttonCZ.Type = AntdUI.TTypeMini.Warn; @@ -442,7 +452,7 @@ 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.Name = "buttonClose"; - this.buttonClose.Size = new System.Drawing.Size(75, 26); + this.buttonClose.Size = new System.Drawing.Size(75, 32); this.buttonClose.TabIndex = 3; this.buttonClose.Text = "关 闭"; this.buttonClose.Type = AntdUI.TTypeMini.Error; @@ -454,7 +464,7 @@ 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, 26); + this.buttonOpen.Size = new System.Drawing.Size(75, 32); this.buttonOpen.TabIndex = 2; this.buttonOpen.Text = "开 启"; this.buttonOpen.Type = AntdUI.TTypeMini.Primary; @@ -490,8 +500,7 @@ // // FloatButtonDemo // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.Controls.Add(this.stackPanel1); this.Name = "FloatButtonDemo"; this.Size = new System.Drawing.Size(710, 372); diff --git a/Views/FloatButtonDemo.cs b/Views/FloatButtonDemo.cs index 8fb38ae..5013541 100644 --- a/Views/FloatButtonDemo.cs +++ b/Views/FloatButtonDemo.cs @@ -14,7 +14,7 @@ namespace AntdUIDemo.Views public partial class FloatButtonDemo : UserControl { private Form form; - public Form floatButtonForm = null; + private Form floatButtonForm = null; public FloatButtonDemo(Form _form) { form = _form; @@ -57,12 +57,12 @@ namespace AntdUIDemo.Views select_topmost.SelectedIndex = 1; select_vertical.SelectedIndex = 0; - input_size.Text = "40"; - input_mx.Text = "24"; - input_my.Text = "24"; - input_radius.Text = "6"; + input_size.Value = 40; + input_mx.Value = 24; + input_my.Value = 24; + input_radius.Value = 6; input_badge.Text = ""; - input_badgesize.Text = "6"; + input_badgesize.Value = 6; colorPicker.Value = Color.FromArgb(22, 119, 255); } @@ -71,28 +71,6 @@ namespace AntdUIDemo.Views { if (floatButtonForm == null || floatButtonForm.IsDisposed) { - var buttonType = TTypeMini.Default; - switch (select_type.SelectedIndex) - { - case 0: - buttonType = TTypeMini.Default; - break; - case 1: - buttonType = TTypeMini.Primary; - break; - case 2: - buttonType = TTypeMini.Success; - break; - case 3: - buttonType = TTypeMini.Error; - break; - case 4: - buttonType = TTypeMini.Warn; - break; - case 5: - buttonType = TTypeMini.Info; - break; - } floatButtonForm = AntdUI.FloatButton.open(new AntdUI.FloatButton.Config(form, new AntdUI.FloatButton.ConfigBtn[] { // 使用 svg 图片 @@ -101,10 +79,10 @@ namespace AntdUIDemo.Views Tooltip = "SVG图片按钮", IconSvg = "", Shape = select_shape.SelectedIndex == 0 ? TShape.Default :(select_shape.SelectedIndex == 1 ? TShape.Round : TShape.Circle), - Type = buttonType, - Radius = input_radius.Text == "" ? 6 : Convert.ToInt32(input_radius.Text), + Type = (TTypeMini)select_type.SelectedValue, + Radius = Convert.ToInt32(input_radius.Value), Badge = input_badge.Text, - BadgeSize = input_badgesize.Text == "" ? 6 : Convert.ToInt32(input_badgesize.Text), + BadgeSize = Convert.ToInt32(input_badgesize.Value), BadgeBack = colorPicker.Value, }, // 使用资源图片 @@ -112,21 +90,21 @@ namespace AntdUIDemo.Views { Tooltip = "资源图片按钮", Shape = select_shape.SelectedIndex == 0 ? TShape.Default :(select_shape.SelectedIndex == 1 ? TShape.Round : TShape.Circle), - Type = buttonType, - Radius = input_radius.Text == "" ? 6 : Convert.ToInt32(input_radius.Text), + Type = (TTypeMini)select_type.SelectedValue, + Radius = Convert.ToInt32(input_radius.Value), Badge = input_badge.Text, - BadgeSize = input_badgesize.Text == "" ? 6 : Convert.ToInt32(input_badgesize.Text), + BadgeSize = Convert.ToInt32(input_badgesize.Value), BadgeBack = colorPicker.Value, }, - + // 使用文本 new AntdUI.FloatButton.ConfigBtn("按钮3", "关闭") { Tooltip = "文本按钮", Shape = select_shape.SelectedIndex == 0 ? TShape.Default :(select_shape.SelectedIndex == 1 ? TShape.Round : TShape.Circle), - Type = buttonType, - Radius = input_radius.Text == "" ? 6 : Convert.ToInt32(input_radius.Text), + Type = (TTypeMini)select_type.SelectedValue, + Radius = Convert.ToInt32(input_radius.Value), Badge = input_badge.Text, - BadgeSize = input_badgesize.Text == "" ? 6 : Convert.ToInt32(input_badgesize.Text), + BadgeSize = Convert.ToInt32(input_badgesize.Value), BadgeBack = colorPicker.Value, }, @@ -141,9 +119,9 @@ namespace AntdUIDemo.Views Align = (TAlign)select_align.SelectedIndex, Vertical = select_vertical.SelectedIndex == 0, TopMost = select_topmost.SelectedIndex == 0, - Size = input_size.Text == "" ? 40 : Convert.ToInt32(input_size.Text), - MarginX = input_mx.Text == "" ? 24 : Convert.ToInt32(input_mx.Text), - MarginY = input_my.Text == "" ? 24 : Convert.ToInt32(input_my.Text), + Size =Convert.ToInt32(input_size.Value), + MarginX = Convert.ToInt32(input_mx.Value), + MarginY = Convert.ToInt32(input_my.Value), }); } } diff --git a/Views/FlowPanelDemo.Designer.cs b/Views/FlowPanelDemo.Designer.cs new file mode 100644 index 0000000..b45e69c --- /dev/null +++ b/Views/FlowPanelDemo.Designer.cs @@ -0,0 +1,499 @@ +namespace AntdUIDemo.Views +{ + partial class FlowPanelDemo + { + /// + /// 必需的设计器变量。 + /// + 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.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.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.stackPanel4 = new AntdUI.StackPanel(); + this.select_align = 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.flowPanel.SuspendLayout(); + this.stackPanel3.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(707, 496); + this.stackPanel1.TabIndex = 1; + this.stackPanel1.Text = "stackPanel1"; + this.stackPanel1.Vertical = true; + // + // stackPanel2 + // + this.stackPanel2.Controls.Add(this.flowPanel); + 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.TabIndex = 7; + this.stackPanel2.Text = "stackPanel2"; + // + // flowPanel + // + 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.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.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.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.Name = "buttonDEL"; + this.buttonDEL.Size = new System.Drawing.Size(274, 32); + this.buttonDEL.TabIndex = 14; + this.buttonDEL.Text = "删除按钮"; + 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.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.WaveSize = 0; + this.buttonADD.Click += new System.EventHandler(this.buttonADD_Click); + // + // stackPanel6 + // + this.stackPanel6.Controls.Add(this.select_autoscroll); + 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 = 11; + 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", + "Flase"}); + 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 = "Flase"; + this.select_autoscroll.Size = new System.Drawing.Size(105, 26); + this.select_autoscroll.TabIndex = 11; + this.select_autoscroll.Text = "Flase"; + this.select_autoscroll.WaveSize = 1; + this.select_autoscroll.SelectedIndexChanged += new AntdUI.IntEventHandler(this.select_autoscroll_SelectedIndexChanged); + // + // 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 = 10; + 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(105, 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 + // + 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"; + // + // stackPanel4 + // + this.stackPanel4.Controls.Add(this.select_align); + 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 = 9; + this.stackPanel4.Text = "stackPanel4"; + // + // select_align + // + this.select_align.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + 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.TabIndex = 11; + this.select_align.WaveSize = 1; + this.select_align.SelectedIndexChanged += new AntdUI.IntEventHandler(this.select_align_SelectedIndexChanged); + // + // 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(88, 26); + this.label10.TabIndex = 4; + this.label10.Text = "Align"; + // + // divider1 + // + this.divider1.Location = new System.Drawing.Point(3, 79); + this.divider1.Name = "divider1"; + this.divider1.Size = new System.Drawing.Size(701, 12); + this.divider1.TabIndex = 6; + // + // 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(701, 24); + this.label2.TabIndex = 5; + 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(701, 40); + this.label1.TabIndex = 4; + this.label1.Text = "FlowPanel 流动布局"; + // + // FlowPanelDemo + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.Controls.Add(this.stackPanel1); + this.Name = "FlowPanelDemo"; + this.Size = new System.Drawing.Size(707, 496); + this.stackPanel1.ResumeLayout(false); + this.stackPanel2.ResumeLayout(false); + this.flowPanel.ResumeLayout(false); + this.stackPanel3.ResumeLayout(false); + this.stackPanel6.ResumeLayout(false); + this.stackPanel5.ResumeLayout(false); + this.stackPanel4.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.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; + private AntdUI.StackPanel stackPanel5; + private AntdUI.InputNumber input_gap; + private AntdUI.Label label3; + 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 buttonDEL; + private AntdUI.Button buttonADD; + private AntdUI.Button buttonCZ; + } +} diff --git a/Views/FlowPanelDemo.cs b/Views/FlowPanelDemo.cs new file mode 100644 index 0000000..97717e4 --- /dev/null +++ b/Views/FlowPanelDemo.cs @@ -0,0 +1,98 @@ +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 FlowPanelDemo : UserControl + { + public FlowPanelDemo() + { + InitializeComponent(); + //初始化下拉框 + InitSelectItems(); + } + + private void InitSelectItems() + { + //初始化方向 + select_align.Items.Clear(); + foreach (TAlignFlow align in Enum.GetValues(typeof(TAlignFlow))) + { + 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; + } + + // 添加按钮 + private void buttonADD_Click(object sender, EventArgs e) + { + flowPanel.Controls.Add(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), + + }); + } + + // 删除按钮 + private void buttonDEL_Click(object sender, EventArgs e) + { + if (flowPanel.Controls.Count > 0) + { + // 删除最后一个控件 + flowPanel.Controls.RemoveAt(flowPanel.Controls.Count - 1); + } + } + + // 重置 + 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++) + { + flowPanel.Controls.Add(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), + + }); + } + + } + } +} diff --git a/Views/FlowPanelDemo.resx b/Views/FlowPanelDemo.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Views/FlowPanelDemo.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/Views/GridPanelDemo.Designer.cs b/Views/GridPanelDemo.Designer.cs new file mode 100644 index 0000000..a297968 --- /dev/null +++ b/Views/GridPanelDemo.Designer.cs @@ -0,0 +1,298 @@ +namespace AntdUIDemo.Views +{ + partial class GridPanelDemo + { + /// + /// 必需的设计器变量。 + /// + 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.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.stackPanel4 = new AntdUI.StackPanel(); + this.input_gap = new AntdUI.InputNumber(); + this.label4 = new AntdUI.Label(); + this.stackPanel5 = new AntdUI.StackPanel(); + this.input_span = new AntdUI.Input(); + this.label3 = 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.gridPanel.SuspendLayout(); + this.stackPanel3.SuspendLayout(); + this.stackPanel4.SuspendLayout(); + this.stackPanel5.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(683, 475); + this.stackPanel1.TabIndex = 0; + this.stackPanel1.Text = "stackPanel1"; + this.stackPanel1.Vertical = true; + // + // stackPanel2 + // + this.stackPanel2.Controls.Add(this.gridPanel); + 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.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.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.stackPanel4); + this.stackPanel3.Controls.Add(this.stackPanel5); + this.stackPanel3.Location = new System.Drawing.Point(3, 3); + this.stackPanel3.Name = "stackPanel3"; + this.stackPanel3.Size = new System.Drawing.Size(280, 293); + 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, 206); + 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 + // + 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); + // + // 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.Name = "stackPanel4"; + this.stackPanel4.Size = new System.Drawing.Size(274, 32); + this.stackPanel4.TabIndex = 18; + this.stackPanel4.Text = "stackPanel4"; + // + // 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; + // + // 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 = "Gap"; + // + // stackPanel5 + // + this.stackPanel5.Controls.Add(this.input_span); + 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.TabIndex = 15; + this.stackPanel5.Text = "stackPanel5"; + // + // input_span + // + this.input_span.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + 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.TabIndex = 5; + this.input_span.Text = "50% 50%;50% 50%"; + this.input_span.WaveSize = 0; + // + // label3 + // + this.label3.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label3.Location = new System.Drawing.Point(3, 3); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(88, 115); + this.label3.TabIndex = 4; + this.label3.Text = "Span"; + // + // divider1 + // + this.divider1.Location = new System.Drawing.Point(3, 79); + this.divider1.Name = "divider1"; + this.divider1.Size = new System.Drawing.Size(677, 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(677, 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(677, 40); + this.label1.TabIndex = 6; + this.label1.Text = "GridPanel 网格布局"; + // + // GridPanelDemo + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.Controls.Add(this.stackPanel1); + this.Name = "GridPanelDemo"; + this.Size = new System.Drawing.Size(683, 475); + this.stackPanel1.ResumeLayout(false); + this.stackPanel2.ResumeLayout(false); + this.gridPanel.ResumeLayout(false); + this.stackPanel3.ResumeLayout(false); + this.stackPanel4.ResumeLayout(false); + this.stackPanel5.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 stackPanel3; + private AntdUI.StackPanel stackPanel5; + private AntdUI.Input input_span; + private AntdUI.Label label3; + private AntdUI.GridPanel gridPanel; + private AntdUI.Button buttonCZ; + private AntdUI.Button buttonSPAN; + 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; + } +} diff --git a/Views/GridPanelDemo.cs b/Views/GridPanelDemo.cs new file mode 100644 index 0000000..3f84d04 --- /dev/null +++ b/Views/GridPanelDemo.cs @@ -0,0 +1,52 @@ +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 GridPanelDemo : UserControl + { + public GridPanelDemo() + { + InitializeComponent(); + } + + private void buttonSPAN_Click(object sender, EventArgs e) + { + LoadGridPanel(input_span.Text, input_gap.Value); + } + + private void LoadGridPanel(string spantext, decimal gap) + { + gridPanel.Controls.Clear(); + gridPanel.Span = spantext; + gridPanel.Gap = (int)gap; + string[] array = spantext.Split(';', ' ', '\n'); + for (int i = 0; i < array.Length; i++) + { + gridPanel.Controls.Add(new AntdUI.Button() + { + Text = "Button", + Type = TTypeMini.Primary, + WaveSize = 0, + Font = new Font("Microsoft YaHei UI", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(134))), + }); + } + } + + 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); + } + } +} diff --git a/Views/GridPanelDemo.resx b/Views/GridPanelDemo.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Views/GridPanelDemo.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/Views/PanelDemo.Designer.cs b/Views/PanelDemo.Designer.cs new file mode 100644 index 0000000..6d896a1 --- /dev/null +++ b/Views/PanelDemo.Designer.cs @@ -0,0 +1,639 @@ +namespace AntdUIDemo.Views +{ + partial class PanelDemo + { + /// + /// 必需的设计器变量。 + /// + 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.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.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.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.SuspendLayout(); + // + // stackPanel1 + // + this.stackPanel1.Controls.Add(this.stackPanel2); + 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.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.Name = "stackPanel2"; + this.stackPanel2.Size = new System.Drawing.Size(673, 353); + this.stackPanel2.TabIndex = 8; + 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); + 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); + this.stackPanel15.Name = "stackPanel15"; + this.stackPanel15.Size = new System.Drawing.Size(366, 347); + this.stackPanel15.TabIndex = 1; + this.stackPanel15.Text = "stackPanel15"; + this.stackPanel15.Vertical = true; + // + // stackPanel10 + // + 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"; + // + // 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"; + // + // 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"; + // + // stackPanel13 + // + this.stackPanel13.Controls.Add(this.input_shadowOH); + this.stackPanel13.Controls.Add(this.label12); + this.stackPanel13.Location = new System.Drawing.Point(3, 41); + this.stackPanel13.Name = "stackPanel13"; + this.stackPanel13.Size = new System.Drawing.Size(360, 32); + this.stackPanel13.TabIndex = 30; + this.stackPanel13.Text = "stackPanel13"; + // + // input_shadowOH + // + this.input_shadowOH.DecimalPlaces = 2; + this.input_shadowOH.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + this.input_shadowOH.Increment = new decimal(new int[] { + 1, + 0, + 0, + 65536}); + this.input_shadowOH.Location = new System.Drawing.Point(229, 3); + this.input_shadowOH.Maximum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.input_shadowOH.Name = "input_shadowOH"; + this.input_shadowOH.Size = new System.Drawing.Size(132, 26); + this.input_shadowOH.TabIndex = 5; + this.input_shadowOH.Text = "0.30"; + this.input_shadowOH.Value = new decimal(new int[] { + 3, + 0, + 0, + 65536}); + this.input_shadowOH.WaveSize = 1; + // + // label12 + // + this.label12.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label12.Location = new System.Drawing.Point(3, 3); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(220, 26); + this.label12.TabIndex = 4; + this.label12.Text = "ShadowOpacityHover"; + // + // 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.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); + // + // 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; + this.buttonSZ.Click += new System.EventHandler(this.buttonSZ_Click); + // + // panel + // + 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"; + // + // PanelDemo + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; + this.Controls.Add(this.stackPanel1); + this.Name = "PanelDemo"; + this.Size = new System.Drawing.Size(679, 435); + 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.ResumeLayout(false); + + } + + #endregion + + private AntdUI.StackPanel stackPanel1; + private AntdUI.Label label2; + private AntdUI.Label label1; + 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.Button buttonCZ; + private AntdUI.Button buttonSZ; + private AntdUI.StackPanel stackPanel13; + private AntdUI.InputNumber input_shadowOH; + private AntdUI.Label label12; + private AntdUI.StackPanel stackPanel14; + private AntdUI.Select select_shadowOA; + private AntdUI.Label label13; + private AntdUI.StackPanel stackPanel12; + private AntdUI.InputNumber input_shadowO; + private AntdUI.Label label11; + private AntdUI.StackPanel stackPanel11; + private AntdUI.InputNumber input_shadowY; + private AntdUI.Label label9; + private AntdUI.StackPanel stackPanel10; + private AntdUI.InputNumber input_shadowX; + private AntdUI.Label label8; + private AntdUI.Panel panel; + } +} diff --git a/Views/PanelDemo.cs b/Views/PanelDemo.cs new file mode 100644 index 0000000..dacbd27 --- /dev/null +++ b/Views/PanelDemo.cs @@ -0,0 +1,79 @@ +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 PanelDemo : UserControl + { + public PanelDemo() + { + InitializeComponent(); + //初始化下拉框 + InitSelectItems(); + // 设置默认值 + InitData(); + } + + private void InitSelectItems() + { + //初始化箭头方向 + select_arrowalign.Items.Clear(); + foreach (TAlign align in Enum.GetValues(typeof(TAlign))) + { + select_arrowalign.Items.Add(align); + } + //初始化阴影方向 + select_shadowalign.Items.Clear(); + foreach (TAlignMini align in Enum.GetValues(typeof(TAlignMini))) + { + select_shadowalign.Items.Add(align); + } + } + + // 重置 + private void buttonCZ_Click(object sender, EventArgs e) + { + InitData(); + } + + // 设置默认值 + private void InitData() + { + 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.Value = Style.Db.TextBase; + 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) + { + panel.ArrowAlign = (TAlign)select_arrowalign.SelectedValue; + panel.ArrowSize = (int)input_arrowsize.Value; + panel.Radius = (int)input_radius.Value; + panel.Shadow = (int)input_shadow.Value; + panel.ShadowAlign = (TAlignMini)select_shadowalign.SelectedValue; + panel.ShadowColor = colorPicker.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; + } + } +} diff --git a/Views/PanelDemo.resx b/Views/PanelDemo.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Views/PanelDemo.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