diff --git a/Views/MenuDemo.Designer.cs b/Views/MenuDemo.Designer.cs index 79567e7..d6170dd 100644 --- a/Views/MenuDemo.Designer.cs +++ b/Views/MenuDemo.Designer.cs @@ -69,6 +69,13 @@ this.stackPanel1 = new AntdUI.Panel(); this.tabs1 = new AntdUI.Tabs(); this.tabPage1 = new AntdUI.TabPage(); + this.menu_inline = new AntdUI.Menu(); + this.tabPage2 = new AntdUI.TabPage(); + this.menu_vertical = new AntdUI.Menu(); + this.tabPage3 = new AntdUI.TabPage(); + this.menu_horizontal = new AntdUI.Menu(); + this.divider2 = new AntdUI.Divider(); + this.stackPanel3 = new AntdUI.Panel(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.label13 = new AntdUI.Label(); this.label12 = new AntdUI.Label(); @@ -90,22 +97,15 @@ this.switch_collapsed = new AntdUI.Switch(); this.label4 = new AntdUI.Label(); this.label3 = new AntdUI.Label(); - this.menu_inline = new AntdUI.Menu(); - this.tabPage2 = new AntdUI.TabPage(); - this.menu_vertical = new AntdUI.Menu(); - this.tabPage3 = new AntdUI.TabPage(); - this.menu_horizontal = new AntdUI.Menu(); - this.divider2 = new AntdUI.Divider(); - this.stackPanel3 = new AntdUI.Panel(); this.buttonCZ = new AntdUI.Button(); this.header1 = new AntdUI.PageHeader(); this.stackPanel1.SuspendLayout(); this.tabs1.SuspendLayout(); this.tabPage1.SuspendLayout(); - this.tableLayoutPanel1.SuspendLayout(); this.tabPage2.SuspendLayout(); this.tabPage3.SuspendLayout(); this.stackPanel3.SuspendLayout(); + this.tableLayoutPanel1.SuspendLayout(); this.SuspendLayout(); // // stackPanel1 @@ -141,7 +141,6 @@ // tabPage1 // this.tabPage1.Controls.Add(this.menu_inline); - this.tabPage1.Dock = System.Windows.Forms.DockStyle.Fill; this.tabPage1.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.tabPage1.Location = new System.Drawing.Point(3, 38); this.tabPage1.Name = "tabPage1"; @@ -150,6 +149,227 @@ this.tabPage1.TabIndex = 0; this.tabPage1.Text = "Inline"; // + // menu_inline + // + this.menu_inline.AutoCollapse = true; + this.menu_inline.Dock = System.Windows.Forms.DockStyle.Left; + this.menu_inline.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.menu_inline.Indent = true; + menuItem1.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + menuItem1.IconSvg = resources.GetString("menuItem1.IconSvg"); + menuItem1.PARENTITEM = null; + menuItem2.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + menuItem2.PARENTITEM = menuItem1; + menuItem2.Text = "SVG可以变色"; + menuItem3.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + menuItem3.PARENTITEM = menuItem1; + menuItem3.Text = "如果变不了"; + menuItem4.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + menuItem4.PARENTITEM = menuItem1; + menuItem4.Text = "调整svg内容"; + menuItem1.Sub.Add(menuItem2); + menuItem1.Sub.Add(menuItem3); + menuItem1.Sub.Add(menuItem4); + menuItem1.Text = "SVG图标菜单"; + menuItem5.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + menuItem5.Icon = global::AntdUIDemo.Properties.Resources.关闭; + menuItem5.PARENTITEM = null; + menuItem6.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + menuItem6.PARENTITEM = menuItem5; + menuItem6.Text = "不能变色"; + menuItem7.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + menuItem7.PARENTITEM = menuItem5; + menuItem7.Text = "不适合使用黑白"; + menuItem8.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + menuItem8.PARENTITEM = menuItem5; + menuItem8.Text = "子菜单"; + menuItem5.Sub.Add(menuItem6); + menuItem5.Sub.Add(menuItem7); + menuItem5.Sub.Add(menuItem8); + menuItem5.Text = "图片资源菜单"; + menuItem9.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + menuItem9.IconSvg = resources.GetString("menuItem9.IconSvg"); + menuItem9.PARENTITEM = null; + menuItem10.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + menuItem10.PARENTITEM = menuItem9; + menuItem10.Text = "二级菜单"; + menuItem11.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + menuItem11.PARENTITEM = menuItem9; + menuItem11.Text = "二级菜单"; + menuItem12.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + menuItem12.PARENTITEM = menuItem9; + menuItem12.Text = "二级菜单"; + menuItem9.Sub.Add(menuItem10); + menuItem9.Sub.Add(menuItem11); + menuItem9.Sub.Add(menuItem12); + menuItem9.Text = "一级菜单"; + this.menu_inline.Items.Add(menuItem1); + this.menu_inline.Items.Add(menuItem5); + this.menu_inline.Items.Add(menuItem9); + this.menu_inline.Location = new System.Drawing.Point(9, 9); + this.menu_inline.Name = "menu_inline"; + this.menu_inline.Size = new System.Drawing.Size(185, 418); + this.menu_inline.TabIndex = 4; + this.menu_inline.Text = "menu1"; + // + // tabPage2 + // + this.tabPage2.Controls.Add(this.menu_vertical); + this.tabPage2.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.tabPage2.Location = new System.Drawing.Point(-470, -436); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(9); + this.tabPage2.Size = new System.Drawing.Size(470, 436); + this.tabPage2.TabIndex = 0; + this.tabPage2.Text = "Vertical"; + // + // menu_vertical + // + this.menu_vertical.AutoCollapse = true; + this.menu_vertical.Dock = System.Windows.Forms.DockStyle.Left; + this.menu_vertical.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.menu_vertical.Indent = true; + menuItem13.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + menuItem13.IconSvg = resources.GetString("menuItem13.IconSvg"); + menuItem13.PARENTITEM = null; + menuItem14.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + menuItem14.PARENTITEM = menuItem13; + menuItem14.Text = "SVG可以变色"; + menuItem15.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + menuItem15.PARENTITEM = menuItem13; + menuItem15.Text = "如果变不了"; + menuItem16.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + menuItem16.PARENTITEM = menuItem13; + menuItem16.Text = "调整svg内容"; + menuItem13.Sub.Add(menuItem14); + menuItem13.Sub.Add(menuItem15); + menuItem13.Sub.Add(menuItem16); + menuItem13.Text = "SVG图标菜单"; + menuItem17.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + menuItem17.Icon = global::AntdUIDemo.Properties.Resources.关闭; + menuItem17.PARENTITEM = null; + menuItem18.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + menuItem18.PARENTITEM = menuItem17; + menuItem18.Text = "不能变色"; + menuItem19.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + menuItem19.PARENTITEM = menuItem17; + menuItem19.Text = "不适合使用黑白"; + menuItem20.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + menuItem20.PARENTITEM = menuItem17; + menuItem20.Text = "子菜单"; + menuItem17.Sub.Add(menuItem18); + menuItem17.Sub.Add(menuItem19); + menuItem17.Sub.Add(menuItem20); + menuItem17.Text = "图片资源菜单"; + menuItem21.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + menuItem21.IconSvg = resources.GetString("menuItem21.IconSvg"); + menuItem21.PARENTITEM = null; + menuItem22.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + menuItem22.PARENTITEM = menuItem21; + menuItem22.Text = "二级菜单"; + menuItem23.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + menuItem23.PARENTITEM = menuItem21; + menuItem23.Text = "二级菜单"; + menuItem24.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + menuItem24.PARENTITEM = menuItem21; + menuItem24.Text = "二级菜单"; + menuItem21.Sub.Add(menuItem22); + menuItem21.Sub.Add(menuItem23); + menuItem21.Sub.Add(menuItem24); + menuItem21.Text = "一级菜单"; + this.menu_vertical.Items.Add(menuItem13); + this.menu_vertical.Items.Add(menuItem17); + this.menu_vertical.Items.Add(menuItem21); + this.menu_vertical.Location = new System.Drawing.Point(9, 9); + this.menu_vertical.Mode = AntdUI.TMenuMode.Vertical; + this.menu_vertical.Name = "menu_vertical"; + this.menu_vertical.Size = new System.Drawing.Size(164, 418); + this.menu_vertical.TabIndex = 5; + this.menu_vertical.Text = "menu1"; + // + // tabPage3 + // + this.tabPage3.Controls.Add(this.menu_horizontal); + this.tabPage3.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.tabPage3.Location = new System.Drawing.Point(-376, -404); + this.tabPage3.Name = "tabPage3"; + this.tabPage3.Padding = new System.Windows.Forms.Padding(9); + this.tabPage3.Size = new System.Drawing.Size(376, 404); + this.tabPage3.TabIndex = 0; + this.tabPage3.Text = "Horizontal"; + // + // menu_horizontal + // + this.menu_horizontal.AutoCollapse = true; + this.menu_horizontal.Dock = System.Windows.Forms.DockStyle.Top; + this.menu_horizontal.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.menu_horizontal.Indent = true; + menuItem25.IconSvg = resources.GetString("menuItem25.IconSvg"); + menuItem25.PARENTITEM = null; + menuItem26.PARENTITEM = null; + menuItem26.Text = "SVG可以变色"; + menuItem27.PARENTITEM = null; + menuItem27.Text = "如果变不了"; + menuItem28.PARENTITEM = null; + menuItem28.Text = "调整svg内容"; + menuItem25.Sub.Add(menuItem26); + menuItem25.Sub.Add(menuItem27); + menuItem25.Sub.Add(menuItem28); + menuItem25.Text = "SVG图标菜单"; + menuItem29.Icon = global::AntdUIDemo.Properties.Resources.关闭; + menuItem29.PARENTITEM = null; + menuItem30.PARENTITEM = null; + menuItem30.Text = "不能变色"; + menuItem31.PARENTITEM = null; + menuItem31.Text = "不适合使用黑白"; + menuItem32.PARENTITEM = null; + menuItem32.Text = "二级菜单"; + menuItem29.Sub.Add(menuItem30); + menuItem29.Sub.Add(menuItem31); + menuItem29.Sub.Add(menuItem32); + menuItem29.Text = "图片资源菜单"; + menuItem33.IconSvg = resources.GetString("menuItem33.IconSvg"); + menuItem33.PARENTITEM = null; + menuItem34.PARENTITEM = null; + menuItem34.Text = "二级菜单"; + menuItem35.PARENTITEM = null; + menuItem35.Text = "二级菜单"; + menuItem36.PARENTITEM = null; + menuItem36.Text = "二级菜单"; + menuItem33.Sub.Add(menuItem34); + menuItem33.Sub.Add(menuItem35); + menuItem33.Sub.Add(menuItem36); + menuItem33.Text = "一级菜单"; + this.menu_horizontal.Items.Add(menuItem25); + this.menu_horizontal.Items.Add(menuItem29); + this.menu_horizontal.Items.Add(menuItem33); + this.menu_horizontal.Location = new System.Drawing.Point(9, 9); + this.menu_horizontal.Mode = AntdUI.TMenuMode.Horizontal; + this.menu_horizontal.Name = "menu_horizontal"; + this.menu_horizontal.Size = new System.Drawing.Size(358, 35); + this.menu_horizontal.TabIndex = 5; + this.menu_horizontal.Text = "menu1"; + // + // divider2 + // + this.divider2.Dock = System.Windows.Forms.DockStyle.Left; + this.divider2.Location = new System.Drawing.Point(250, 0); + this.divider2.Name = "divider2"; + this.divider2.Size = new System.Drawing.Size(20, 477); + this.divider2.TabIndex = 2; + this.divider2.Vertical = true; + // + // stackPanel3 + // + this.stackPanel3.Controls.Add(this.tableLayoutPanel1); + this.stackPanel3.Controls.Add(this.buttonCZ); + this.stackPanel3.Dock = System.Windows.Forms.DockStyle.Left; + this.stackPanel3.Location = new System.Drawing.Point(0, 0); + this.stackPanel3.Name = "stackPanel3"; + this.stackPanel3.Radius = 0; + this.stackPanel3.Size = new System.Drawing.Size(250, 477); + this.stackPanel3.TabIndex = 0; + // // tableLayoutPanel1 // this.tableLayoutPanel1.ColumnCount = 2; @@ -218,6 +438,7 @@ // // colorPicker_backactive // + this.colorPicker_backactive.AllowClear = true; this.colorPicker_backactive.DisabledAlpha = true; this.colorPicker_backactive.Dock = System.Windows.Forms.DockStyle.Fill; this.colorPicker_backactive.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); @@ -227,11 +448,11 @@ this.colorPicker_backactive.Size = new System.Drawing.Size(121, 34); this.colorPicker_backactive.TabIndex = 5; this.colorPicker_backactive.Text = "colorPicker3"; - this.colorPicker_backactive.Value = System.Drawing.Color.FromArgb(((int)(((byte)(22)))), ((int)(((byte)(119)))), ((int)(((byte)(255))))); this.colorPicker_backactive.WaveSize = 0; // // colorPicker_backhover // + this.colorPicker_backhover.AllowClear = true; this.colorPicker_backhover.DisabledAlpha = true; this.colorPicker_backhover.Dock = System.Windows.Forms.DockStyle.Fill; this.colorPicker_backhover.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); @@ -241,11 +462,11 @@ this.colorPicker_backhover.Size = new System.Drawing.Size(121, 34); this.colorPicker_backhover.TabIndex = 5; this.colorPicker_backhover.Text = "colorPicker2"; - this.colorPicker_backhover.Value = System.Drawing.Color.FromArgb(((int)(((byte)(22)))), ((int)(((byte)(119)))), ((int)(((byte)(255))))); this.colorPicker_backhover.WaveSize = 0; // // colorPicker_foreactive // + this.colorPicker_foreactive.AllowClear = true; this.colorPicker_foreactive.DisabledAlpha = true; this.colorPicker_foreactive.Dock = System.Windows.Forms.DockStyle.Fill; this.colorPicker_foreactive.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); @@ -255,11 +476,11 @@ this.colorPicker_foreactive.Size = new System.Drawing.Size(121, 34); this.colorPicker_foreactive.TabIndex = 5; this.colorPicker_foreactive.Text = "colorPicker1"; - this.colorPicker_foreactive.Value = System.Drawing.Color.FromArgb(((int)(((byte)(22)))), ((int)(((byte)(119)))), ((int)(((byte)(255))))); this.colorPicker_foreactive.WaveSize = 0; // // colorPicker_forecolor // + this.colorPicker_forecolor.AllowClear = true; this.colorPicker_forecolor.DisabledAlpha = true; this.colorPicker_forecolor.Dock = System.Windows.Forms.DockStyle.Fill; this.colorPicker_forecolor.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); @@ -269,7 +490,6 @@ this.colorPicker_forecolor.Size = new System.Drawing.Size(121, 34); this.colorPicker_forecolor.TabIndex = 5; this.colorPicker_forecolor.Text = "colorPicker1"; - this.colorPicker_forecolor.Value = System.Drawing.Color.FromArgb(((int)(((byte)(22)))), ((int)(((byte)(119)))), ((int)(((byte)(255))))); this.colorPicker_forecolor.WaveSize = 0; // // label14 @@ -432,229 +652,6 @@ this.label3.TabIndex = 4; this.label3.Text = "Collapsed"; // - // menu_inline - // - this.menu_inline.AutoCollapse = true; - this.menu_inline.Dock = System.Windows.Forms.DockStyle.Left; - this.menu_inline.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.menu_inline.Indent = true; - menuItem1.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); - menuItem1.IconSvg = resources.GetString("menuItem1.IconSvg"); - menuItem1.PARENTITEM = null; - menuItem2.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - menuItem2.PARENTITEM = menuItem1; - menuItem2.Text = "SVG可以变色"; - menuItem3.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); - menuItem3.PARENTITEM = menuItem1; - menuItem3.Text = "如果变不了"; - menuItem4.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); - menuItem4.PARENTITEM = menuItem1; - menuItem4.Text = "调整svg内容"; - menuItem1.Sub.Add(menuItem2); - menuItem1.Sub.Add(menuItem3); - menuItem1.Sub.Add(menuItem4); - menuItem1.Text = "SVG图标菜单"; - menuItem5.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); - menuItem5.Icon = global::AntdUIDemo.Properties.Resources.关闭; - menuItem5.PARENTITEM = null; - menuItem6.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); - menuItem6.PARENTITEM = menuItem5; - menuItem6.Text = "不能变色"; - menuItem7.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); - menuItem7.PARENTITEM = menuItem5; - menuItem7.Text = "不适合使用黑白"; - menuItem8.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); - menuItem8.PARENTITEM = menuItem5; - menuItem8.Text = "子菜单"; - menuItem5.Sub.Add(menuItem6); - menuItem5.Sub.Add(menuItem7); - menuItem5.Sub.Add(menuItem8); - menuItem5.Text = "图片资源菜单"; - menuItem9.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); - menuItem9.IconSvg = resources.GetString("menuItem9.IconSvg"); - menuItem9.PARENTITEM = null; - menuItem10.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - menuItem10.PARENTITEM = menuItem9; - menuItem10.Text = "二级菜单"; - menuItem11.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); - menuItem11.PARENTITEM = menuItem9; - menuItem11.Text = "二级菜单"; - menuItem12.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); - menuItem12.PARENTITEM = menuItem9; - menuItem12.Text = "二级菜单"; - menuItem9.Sub.Add(menuItem10); - menuItem9.Sub.Add(menuItem11); - menuItem9.Sub.Add(menuItem12); - menuItem9.Text = "一级菜单"; - this.menu_inline.Items.Add(menuItem1); - this.menu_inline.Items.Add(menuItem5); - this.menu_inline.Items.Add(menuItem9); - this.menu_inline.Location = new System.Drawing.Point(9, 9); - this.menu_inline.Name = "menu_inline"; - this.menu_inline.Size = new System.Drawing.Size(185, 418); - this.menu_inline.TabIndex = 4; - this.menu_inline.Text = "menu1"; - // - // tabPage2 - // - this.tabPage2.Controls.Add(this.menu_vertical); - this.tabPage2.Dock = System.Windows.Forms.DockStyle.Fill; - this.tabPage2.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.tabPage2.Location = new System.Drawing.Point(3, 38); - this.tabPage2.Name = "tabPage2"; - this.tabPage2.Padding = new System.Windows.Forms.Padding(9); - this.tabPage2.Size = new System.Drawing.Size(470, 436); - this.tabPage2.TabIndex = 0; - this.tabPage2.Text = "Vertical"; - // - // menu_vertical - // - this.menu_vertical.AutoCollapse = true; - this.menu_vertical.Dock = System.Windows.Forms.DockStyle.Left; - this.menu_vertical.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.menu_vertical.Indent = true; - menuItem13.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); - menuItem13.IconSvg = resources.GetString("menuItem13.IconSvg"); - menuItem13.PARENTITEM = null; - menuItem14.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - menuItem14.PARENTITEM = menuItem13; - menuItem14.Text = "SVG可以变色"; - menuItem15.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); - menuItem15.PARENTITEM = menuItem13; - menuItem15.Text = "如果变不了"; - menuItem16.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); - menuItem16.PARENTITEM = menuItem13; - menuItem16.Text = "调整svg内容"; - menuItem13.Sub.Add(menuItem14); - menuItem13.Sub.Add(menuItem15); - menuItem13.Sub.Add(menuItem16); - menuItem13.Text = "SVG图标菜单"; - menuItem17.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); - menuItem17.Icon = global::AntdUIDemo.Properties.Resources.关闭; - menuItem17.PARENTITEM = null; - menuItem18.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); - menuItem18.PARENTITEM = menuItem17; - menuItem18.Text = "不能变色"; - menuItem19.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); - menuItem19.PARENTITEM = menuItem17; - menuItem19.Text = "不适合使用黑白"; - menuItem20.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); - menuItem20.PARENTITEM = menuItem17; - menuItem20.Text = "子菜单"; - menuItem17.Sub.Add(menuItem18); - menuItem17.Sub.Add(menuItem19); - menuItem17.Sub.Add(menuItem20); - menuItem17.Text = "图片资源菜单"; - menuItem21.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); - menuItem21.IconSvg = resources.GetString("menuItem21.IconSvg"); - menuItem21.PARENTITEM = null; - menuItem22.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - menuItem22.PARENTITEM = menuItem21; - menuItem22.Text = "二级菜单"; - menuItem23.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); - menuItem23.PARENTITEM = menuItem21; - menuItem23.Text = "二级菜单"; - menuItem24.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); - menuItem24.PARENTITEM = menuItem21; - menuItem24.Text = "二级菜单"; - menuItem21.Sub.Add(menuItem22); - menuItem21.Sub.Add(menuItem23); - menuItem21.Sub.Add(menuItem24); - menuItem21.Text = "一级菜单"; - this.menu_vertical.Items.Add(menuItem13); - this.menu_vertical.Items.Add(menuItem17); - this.menu_vertical.Items.Add(menuItem21); - this.menu_vertical.Location = new System.Drawing.Point(9, 9); - this.menu_vertical.Mode = AntdUI.TMenuMode.Vertical; - this.menu_vertical.Name = "menu_vertical"; - this.menu_vertical.Size = new System.Drawing.Size(164, 418); - this.menu_vertical.TabIndex = 5; - this.menu_vertical.Text = "menu1"; - // - // tabPage3 - // - this.tabPage3.Controls.Add(this.menu_horizontal); - this.tabPage3.Dock = System.Windows.Forms.DockStyle.Fill; - this.tabPage3.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.tabPage3.Location = new System.Drawing.Point(3, 38); - this.tabPage3.Name = "tabPage3"; - this.tabPage3.Padding = new System.Windows.Forms.Padding(9); - this.tabPage3.Size = new System.Drawing.Size(376, 404); - this.tabPage3.TabIndex = 0; - this.tabPage3.Text = "Horizontal"; - // - // menu_horizontal - // - this.menu_horizontal.AutoCollapse = true; - this.menu_horizontal.Dock = System.Windows.Forms.DockStyle.Top; - this.menu_horizontal.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.menu_horizontal.Indent = true; - menuItem25.IconSvg = resources.GetString("menuItem25.IconSvg"); - menuItem25.PARENTITEM = null; - menuItem26.PARENTITEM = null; - menuItem26.Text = "SVG可以变色"; - menuItem27.PARENTITEM = null; - menuItem27.Text = "如果变不了"; - menuItem28.PARENTITEM = null; - menuItem28.Text = "调整svg内容"; - menuItem25.Sub.Add(menuItem26); - menuItem25.Sub.Add(menuItem27); - menuItem25.Sub.Add(menuItem28); - menuItem25.Text = "SVG图标菜单"; - menuItem29.Icon = global::AntdUIDemo.Properties.Resources.关闭; - menuItem29.PARENTITEM = null; - menuItem30.PARENTITEM = null; - menuItem30.Text = "不能变色"; - menuItem31.PARENTITEM = null; - menuItem31.Text = "不适合使用黑白"; - menuItem32.PARENTITEM = null; - menuItem32.Text = "二级菜单"; - menuItem29.Sub.Add(menuItem30); - menuItem29.Sub.Add(menuItem31); - menuItem29.Sub.Add(menuItem32); - menuItem29.Text = "图片资源菜单"; - menuItem33.IconSvg = resources.GetString("menuItem33.IconSvg"); - menuItem33.PARENTITEM = null; - menuItem34.PARENTITEM = null; - menuItem34.Text = "二级菜单"; - menuItem35.PARENTITEM = null; - menuItem35.Text = "二级菜单"; - menuItem36.PARENTITEM = null; - menuItem36.Text = "二级菜单"; - menuItem33.Sub.Add(menuItem34); - menuItem33.Sub.Add(menuItem35); - menuItem33.Sub.Add(menuItem36); - menuItem33.Text = "一级菜单"; - this.menu_horizontal.Items.Add(menuItem25); - this.menu_horizontal.Items.Add(menuItem29); - this.menu_horizontal.Items.Add(menuItem33); - this.menu_horizontal.Location = new System.Drawing.Point(9, 9); - this.menu_horizontal.Mode = AntdUI.TMenuMode.Horizontal; - this.menu_horizontal.Name = "menu_horizontal"; - this.menu_horizontal.Size = new System.Drawing.Size(358, 35); - this.menu_horizontal.TabIndex = 5; - this.menu_horizontal.Text = "menu1"; - // - // divider2 - // - this.divider2.Dock = System.Windows.Forms.DockStyle.Left; - this.divider2.Location = new System.Drawing.Point(250, 0); - this.divider2.Name = "divider2"; - this.divider2.Size = new System.Drawing.Size(20, 477); - this.divider2.TabIndex = 2; - this.divider2.Vertical = true; - // - // stackPanel3 - // - this.stackPanel3.Controls.Add(this.tableLayoutPanel1); - this.stackPanel3.Controls.Add(this.buttonCZ); - this.stackPanel3.Dock = System.Windows.Forms.DockStyle.Left; - this.stackPanel3.Location = new System.Drawing.Point(0, 0); - this.stackPanel3.Name = "stackPanel3"; - this.stackPanel3.Radius = 0; - this.stackPanel3.Size = new System.Drawing.Size(250, 477); - this.stackPanel3.TabIndex = 0; - // // buttonCZ // this.buttonCZ.Dock = System.Windows.Forms.DockStyle.Bottom; @@ -690,10 +687,10 @@ this.stackPanel1.ResumeLayout(false); this.tabs1.ResumeLayout(false); this.tabPage1.ResumeLayout(false); - this.tableLayoutPanel1.ResumeLayout(false); this.tabPage2.ResumeLayout(false); this.tabPage3.ResumeLayout(false); this.stackPanel3.ResumeLayout(false); + this.tableLayoutPanel1.ResumeLayout(false); this.ResumeLayout(false); } diff --git a/Views/MenuDemo.cs b/Views/MenuDemo.cs index 234b767..5368866 100644 --- a/Views/MenuDemo.cs +++ b/Views/MenuDemo.cs @@ -70,10 +70,10 @@ namespace AntdUIDemo.Views input_radius.Value = 6; - colorPicker_forecolor.Value = Color.Transparent; - colorPicker_foreactive.Value = Color.Transparent; - colorPicker_backhover.Value = Color.Transparent; - colorPicker_backactive.Value = Color.Transparent; + colorPicker_forecolor.ClearValue(); + colorPicker_foreactive.ClearValue(); + colorPicker_backhover.ClearValue(); + colorPicker_backactive.ClearValue(); } private void LoadMenu() @@ -93,38 +93,10 @@ namespace AntdUIDemo.Views menu.Radius = (int)input_radius.Value; - if (colorPicker_forecolor.Value == Color.Transparent) - { - menu.ForeColor = null; - } - else - { - menu.ForeColor = colorPicker_forecolor.Value; - } - if (colorPicker_foreactive.Value == Color.Transparent) - { - menu.ForeActive = null; - } - else - { - menu.ForeActive = colorPicker_foreactive.Value; - } - if (colorPicker_backhover.Value == Color.Transparent) - { - menu.BackHover = null; - } - else - { - menu.BackHover = colorPicker_backhover.Value; - } - if (colorPicker_backactive.Value == Color.Transparent) - { - menu.BackActive = null; - } - else - { - menu.BackActive = colorPicker_backactive.Value; - } + menu.ForeColor = colorPicker_forecolor.ValueClear; + menu.ForeActive = colorPicker_foreactive.ValueClear; + menu.BackHover = colorPicker_backhover.ValueClear; + menu.BackActive = colorPicker_backactive.ValueClear; } }