diff --git a/MainWindow.cs b/MainWindow.cs index 81cf69d..2629fc6 100644 --- a/MainWindow.cs +++ b/MainWindow.cs @@ -214,6 +214,24 @@ namespace AntdUIDemo case "Badge": control = new BadgeDemo(); break; + case "Calendar": + control = new CalendarDemo(this); + break; + case "Carousel": + control = new CarouselDemo(); + break; + case "Label": + control = new LabelDemo(); + break; + case "Popover": + control = new PopoverDemo(this); + break; + case "Preview": + control = new PreviewDemo(this); + break; + case "Segmented": + control = new SegmentedDemo(); + break; } if (control != null) { diff --git a/Models/DataUtil.cs b/Models/DataUtil.cs index ea487b9..e370e02 100644 --- a/Models/DataUtil.cs +++ b/Models/DataUtil.cs @@ -56,7 +56,7 @@ namespace AntdUIDemo.Models new MenuItems { Text = "Calendar 日历", Tag = "Calendar"}, new MenuItems { Text = "Carousel 走马灯", Tag = "Carousel"}, new MenuItems { Text = "Label 标签", Tag = "Label"}, - new MenuItems { Text = "Popver 气泡卡片", Tag = "Popver"}, + new MenuItems { Text = "Popover 气泡卡片", Tag = "Popover"}, new MenuItems { Text = "Preview 图片预览", Tag = "Preview"}, new MenuItems { Text = "Segmented 分段控制器", Tag = "Segmented"}, new MenuItems { Text = "Table 表格", Tag = "Table"}, diff --git a/Program.cs b/Program.cs index 4bab60f..474a9b8 100644 --- a/Program.cs +++ b/Program.cs @@ -9,6 +9,7 @@ namespace AntdUIDemo { internal static class Program { + private static MainWindow mainWindow; /// /// 应用程序的主入口点。 /// @@ -21,19 +22,22 @@ namespace AntdUIDemo Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); - Application.Run(new MainWindow()); + mainWindow = new MainWindow(); + Application.Run(mainWindow); } // 捕获UI线程中的未处理异常 static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e) { LoggerHelper.Logger.Fatal(e.Exception, "未处理的UI线程异常"); + AntdUI.Notification.error(mainWindow, "未处理的UI线程异常", e.Exception.Message, autoClose: 3, align: AntdUI.TAlignFrom.BR); } // 捕获非UI线程中的未处理异常 static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) { LoggerHelper.Logger.Fatal(e.ExceptionObject as Exception, "未处理的非UI线程异常"); + AntdUI.Notification.error(mainWindow, "未处理的非UI线程异常", e.ToString(), autoClose: 3, align: AntdUI.TAlignFrom.BR); } } } diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs index e8c2953..605987c 100644 --- a/Properties/Resources.Designer.cs +++ b/Properties/Resources.Designer.cs @@ -60,6 +60,36 @@ namespace AntdUIDemo.Properties { } } + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap bg1 { + get { + object obj = ResourceManager.GetObject("bg1", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap bg2 { + get { + object obj = ResourceManager.GetObject("bg2", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + internal static System.Drawing.Bitmap bg3 { + get { + object obj = ResourceManager.GetObject("bg3", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// 查找 System.Drawing.Bitmap 类型的本地化资源。 /// diff --git a/Properties/Resources.resx b/Properties/Resources.resx index c149dce..0e3658c 100644 --- a/Properties/Resources.resx +++ b/Properties/Resources.resx @@ -118,6 +118,15 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ..\Resources\bg1.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\bg2.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\bg3.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\关闭.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a diff --git a/README.md b/README.md index 698e236..e2efe0f 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ #### Calendar 日历 #### Carousel 走马灯 #### Label 标签 -#### Popver 气泡卡片 +#### Popover 气泡卡片 #### Preview 图片预览 #### Segmented 分段控制器 #### Table 表格 diff --git a/Resources/bg1.jpg b/Resources/bg1.jpg new file mode 100644 index 0000000..24ca6c1 Binary files /dev/null and b/Resources/bg1.jpg differ diff --git a/Resources/bg2.jpg b/Resources/bg2.jpg new file mode 100644 index 0000000..59816cf Binary files /dev/null and b/Resources/bg2.jpg differ diff --git a/Resources/bg3.jpg b/Resources/bg3.jpg new file mode 100644 index 0000000..6aa4346 Binary files /dev/null and b/Resources/bg3.jpg differ diff --git a/Views/ButtonDemo.Designer.cs b/Views/ButtonDemo.Designer.cs index 67c45f3..904cbf9 100644 --- a/Views/ButtonDemo.Designer.cs +++ b/Views/ButtonDemo.Designer.cs @@ -84,6 +84,10 @@ this.divider1 = new AntdUI.Divider(); this.label2 = new AntdUI.Label(); this.label1 = new AntdUI.Label(); + this.label10 = new AntdUI.Label(); + this.flowPanel8 = new AntdUI.FlowPanel(); + this.button_toggle = new AntdUI.Button(); + this.button_toggle2 = new AntdUI.Button(); this.stackPanel1.SuspendLayout(); this.flowPanel7.SuspendLayout(); this.flowPanel6.SuspendLayout(); @@ -94,10 +98,13 @@ this.flowPanel3.SuspendLayout(); this.flowPanel2.SuspendLayout(); this.flowPanel1.SuspendLayout(); + this.flowPanel8.SuspendLayout(); this.SuspendLayout(); // // stackPanel1 // + this.stackPanel1.Controls.Add(this.flowPanel8); + this.stackPanel1.Controls.Add(this.label10); this.stackPanel1.Controls.Add(this.flowPanel7); this.stackPanel1.Controls.Add(this.label9); this.stackPanel1.Controls.Add(this.flowPanel6); @@ -118,7 +125,7 @@ this.stackPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.stackPanel1.Location = new System.Drawing.Point(0, 0); this.stackPanel1.Name = "stackPanel1"; - this.stackPanel1.Size = new System.Drawing.Size(700, 629); + this.stackPanel1.Size = new System.Drawing.Size(700, 685); this.stackPanel1.TabIndex = 1; this.stackPanel1.Text = "stackPanel1"; this.stackPanel1.Vertical = true; @@ -137,11 +144,6 @@ this.button39.BackExtend = "135, #6253E1, #04BEFE"; this.button39.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.button39.IconSvg = resources.GetString("button39.IconSvg"); - this.button39.Image = null; - this.button39.ImageHover = null; - this.button39.ImageHoverSvg = null; - this.button39.ImageSize = new System.Drawing.Size(0, 0); - this.button39.ImageSvg = resources.GetString("button39.ImageSvg"); this.button39.Location = new System.Drawing.Point(3, 3); this.button39.Name = "button39"; this.button39.Size = new System.Drawing.Size(156, 32); @@ -186,11 +188,6 @@ this.button36.BorderWidth = 2F; 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.Image = null; - this.button36.ImageHover = null; - this.button36.ImageHoverSvg = null; - this.button36.ImageSize = new System.Drawing.Size(0, 0); - this.button36.ImageSvg = null; this.button36.JoinLeft = true; this.button36.Location = new System.Drawing.Point(77, 3); this.button36.Name = "button36"; @@ -206,11 +203,6 @@ this.button37.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.button37.Ghost = true; this.button37.IconSvg = resources.GetString("button37.IconSvg"); - this.button37.Image = null; - this.button37.ImageHover = null; - this.button37.ImageHoverSvg = null; - this.button37.ImageSize = new System.Drawing.Size(0, 0); - this.button37.ImageSvg = resources.GetString("button37.ImageSvg"); this.button37.JoinRight = true; this.button37.Location = new System.Drawing.Point(3, 3); this.button37.Name = "button37"; @@ -236,11 +228,6 @@ // button33 // this.button33.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button33.Image = null; - this.button33.ImageHover = null; - this.button33.ImageHoverSvg = null; - this.button33.ImageSize = new System.Drawing.Size(0, 0); - this.button33.ImageSvg = null; this.button33.JoinLeft = true; this.button33.Location = new System.Drawing.Point(151, 3); this.button33.Name = "button33"; @@ -254,11 +241,6 @@ // this.button34.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.button34.IconSvg = resources.GetString("button34.IconSvg"); - this.button34.Image = null; - this.button34.ImageHover = null; - this.button34.ImageHoverSvg = null; - this.button34.ImageSize = new System.Drawing.Size(0, 0); - this.button34.ImageSvg = resources.GetString("button34.ImageSvg"); this.button34.JoinLeft = true; this.button34.JoinRight = true; this.button34.Location = new System.Drawing.Point(77, 3); @@ -271,11 +253,6 @@ // button35 // this.button35.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button35.Image = null; - this.button35.ImageHover = null; - this.button35.ImageHoverSvg = null; - this.button35.ImageSize = new System.Drawing.Size(0, 0); - this.button35.ImageSvg = null; this.button35.JoinRight = true; this.button35.Location = new System.Drawing.Point(3, 3); this.button35.Name = "button35"; @@ -313,11 +290,6 @@ this.button28.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.button28.Ghost = true; this.button28.IconSvg = resources.GetString("button28.IconSvg"); - this.button28.Image = null; - this.button28.ImageHover = null; - this.button28.ImageHoverSvg = null; - this.button28.ImageSize = new System.Drawing.Size(0, 0); - this.button28.ImageSvg = resources.GetString("button28.ImageSvg"); this.button28.Location = new System.Drawing.Point(347, 3); this.button28.Name = "button28"; this.button28.ShowArrow = true; @@ -332,11 +304,6 @@ this.button27.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.button27.Ghost = true; this.button27.IconSvg = resources.GetString("button27.IconSvg"); - this.button27.Image = null; - this.button27.ImageHover = null; - this.button27.ImageHoverSvg = null; - this.button27.ImageSize = new System.Drawing.Size(0, 0); - this.button27.ImageSvg = resources.GetString("button27.ImageSvg"); this.button27.Location = new System.Drawing.Point(261, 3); this.button27.Name = "button27"; this.button27.ShowArrow = true; @@ -351,11 +318,6 @@ this.button26.BorderWidth = 2F; this.button26.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.button26.Ghost = true; - this.button26.Image = null; - this.button26.ImageHover = null; - this.button26.ImageHoverSvg = null; - this.button26.ImageSize = new System.Drawing.Size(0, 0); - this.button26.ImageSvg = null; this.button26.Location = new System.Drawing.Point(175, 3); this.button26.Name = "button26"; this.button26.ShowArrow = true; @@ -369,11 +331,6 @@ // this.button25.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.button25.Ghost = true; - this.button25.Image = null; - this.button25.ImageHover = null; - this.button25.ImageHoverSvg = null; - this.button25.ImageSize = new System.Drawing.Size(0, 0); - this.button25.ImageSvg = null; this.button25.Location = new System.Drawing.Point(89, 3); this.button25.Name = "button25"; this.button25.ShowArrow = true; @@ -386,11 +343,6 @@ // button29 // this.button29.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button29.Image = null; - this.button29.ImageHover = null; - this.button29.ImageHoverSvg = null; - this.button29.ImageSize = new System.Drawing.Size(0, 0); - this.button29.ImageSvg = null; this.button29.Location = new System.Drawing.Point(3, 3); this.button29.Name = "button29"; this.button29.ShowArrow = true; @@ -429,11 +381,6 @@ this.button21.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.button21.Ghost = true; this.button21.IconSvg = resources.GetString("button21.IconSvg"); - this.button21.Image = null; - this.button21.ImageHover = null; - this.button21.ImageHoverSvg = null; - this.button21.ImageSize = new System.Drawing.Size(0, 0); - this.button21.ImageSvg = resources.GetString("button21.ImageSvg"); this.button21.Location = new System.Drawing.Point(279, 3); this.button21.Name = "button21"; this.button21.Size = new System.Drawing.Size(75, 32); @@ -448,11 +395,6 @@ this.button22.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.button22.Ghost = true; this.button22.IconSvg = resources.GetString("button22.IconSvg"); - this.button22.Image = null; - this.button22.ImageHover = null; - this.button22.ImageHoverSvg = null; - this.button22.ImageSize = new System.Drawing.Size(0, 0); - this.button22.ImageSvg = resources.GetString("button22.ImageSvg"); this.button22.Location = new System.Drawing.Point(241, 3); this.button22.Name = "button22"; this.button22.Shape = AntdUI.TShape.Circle; @@ -466,11 +408,6 @@ this.button19.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.button19.Ghost = true; this.button19.IconSvg = resources.GetString("button19.IconSvg"); - this.button19.Image = null; - this.button19.ImageHover = null; - this.button19.ImageHoverSvg = null; - this.button19.ImageSize = new System.Drawing.Size(0, 0); - this.button19.ImageSvg = resources.GetString("button19.ImageSvg"); this.button19.Location = new System.Drawing.Point(160, 3); this.button19.Name = "button19"; this.button19.RightToLeft = System.Windows.Forms.RightToLeft.No; @@ -485,11 +422,6 @@ this.button20.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.button20.Ghost = true; this.button20.IconSvg = resources.GetString("button20.IconSvg"); - this.button20.Image = null; - this.button20.ImageHover = null; - this.button20.ImageHoverSvg = null; - this.button20.ImageSize = new System.Drawing.Size(0, 0); - this.button20.ImageSvg = resources.GetString("button20.ImageSvg"); this.button20.Location = new System.Drawing.Point(122, 3); this.button20.Name = "button20"; this.button20.Shape = AntdUI.TShape.Circle; @@ -502,11 +434,6 @@ // this.button23.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.button23.IconSvg = resources.GetString("button23.IconSvg"); - this.button23.Image = null; - this.button23.ImageHover = null; - this.button23.ImageHoverSvg = null; - this.button23.ImageSize = new System.Drawing.Size(0, 0); - this.button23.ImageSvg = resources.GetString("button23.ImageSvg"); this.button23.Location = new System.Drawing.Point(41, 3); this.button23.Name = "button23"; this.button23.Size = new System.Drawing.Size(75, 32); @@ -518,11 +445,6 @@ // this.button24.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.button24.IconSvg = resources.GetString("button24.IconSvg"); - this.button24.Image = null; - this.button24.ImageHover = null; - this.button24.ImageHoverSvg = null; - this.button24.ImageSize = new System.Drawing.Size(0, 0); - this.button24.ImageSvg = resources.GetString("button24.ImageSvg"); this.button24.Location = new System.Drawing.Point(3, 3); this.button24.Name = "button24"; this.button24.Shape = AntdUI.TShape.Circle; @@ -558,11 +480,6 @@ this.button13.BorderWidth = 2F; this.button13.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.button13.Ghost = true; - this.button13.Image = null; - this.button13.ImageHover = null; - this.button13.ImageHoverSvg = null; - this.button13.ImageSize = new System.Drawing.Size(0, 0); - this.button13.ImageSvg = null; this.button13.Location = new System.Drawing.Point(408, 3); this.button13.Name = "button13"; this.button13.Size = new System.Drawing.Size(75, 32); @@ -576,11 +493,6 @@ this.button14.BorderWidth = 2F; this.button14.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.button14.Ghost = true; - this.button14.Image = null; - this.button14.ImageHover = null; - this.button14.ImageHoverSvg = null; - this.button14.ImageSize = new System.Drawing.Size(0, 0); - this.button14.ImageSvg = null; this.button14.Location = new System.Drawing.Point(327, 3); this.button14.Name = "button14"; this.button14.Size = new System.Drawing.Size(75, 32); @@ -594,11 +506,6 @@ this.button15.BorderWidth = 2F; this.button15.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.button15.Ghost = true; - this.button15.Image = null; - this.button15.ImageHover = null; - this.button15.ImageHoverSvg = null; - this.button15.ImageSize = new System.Drawing.Size(0, 0); - this.button15.ImageSvg = null; this.button15.Location = new System.Drawing.Point(246, 3); this.button15.Name = "button15"; this.button15.Size = new System.Drawing.Size(75, 32); @@ -612,11 +519,6 @@ this.button16.BorderWidth = 2F; this.button16.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.button16.Ghost = true; - this.button16.Image = null; - this.button16.ImageHover = null; - this.button16.ImageHoverSvg = null; - this.button16.ImageSize = new System.Drawing.Size(0, 0); - this.button16.ImageSvg = null; this.button16.Location = new System.Drawing.Point(165, 3); this.button16.Name = "button16"; this.button16.Size = new System.Drawing.Size(75, 32); @@ -630,11 +532,6 @@ this.button17.BorderWidth = 2F; this.button17.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.button17.Ghost = true; - this.button17.Image = null; - this.button17.ImageHover = null; - this.button17.ImageHoverSvg = null; - this.button17.ImageSize = new System.Drawing.Size(0, 0); - this.button17.ImageSvg = null; this.button17.Location = new System.Drawing.Point(84, 3); this.button17.Name = "button17"; this.button17.Size = new System.Drawing.Size(75, 32); @@ -648,11 +545,6 @@ this.button18.BorderWidth = 2F; this.button18.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.button18.Ghost = true; - this.button18.Image = null; - this.button18.ImageHover = null; - this.button18.ImageHoverSvg = null; - this.button18.ImageSize = new System.Drawing.Size(0, 0); - this.button18.ImageSvg = null; this.button18.Location = new System.Drawing.Point(3, 3); this.button18.Name = "button18"; this.button18.Size = new System.Drawing.Size(75, 32); @@ -687,11 +579,6 @@ // this.button7.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.button7.Ghost = true; - this.button7.Image = null; - this.button7.ImageHover = null; - this.button7.ImageHoverSvg = null; - this.button7.ImageSize = new System.Drawing.Size(0, 0); - this.button7.ImageSvg = null; this.button7.Location = new System.Drawing.Point(408, 3); this.button7.Name = "button7"; this.button7.Size = new System.Drawing.Size(75, 32); @@ -704,11 +591,6 @@ // this.button8.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.button8.Ghost = true; - this.button8.Image = null; - this.button8.ImageHover = null; - this.button8.ImageHoverSvg = null; - this.button8.ImageSize = new System.Drawing.Size(0, 0); - this.button8.ImageSvg = null; this.button8.Location = new System.Drawing.Point(327, 3); this.button8.Name = "button8"; this.button8.Size = new System.Drawing.Size(75, 32); @@ -721,11 +603,6 @@ // this.button9.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.button9.Ghost = true; - this.button9.Image = null; - this.button9.ImageHover = null; - this.button9.ImageHoverSvg = null; - this.button9.ImageSize = new System.Drawing.Size(0, 0); - this.button9.ImageSvg = null; this.button9.Location = new System.Drawing.Point(246, 3); this.button9.Name = "button9"; this.button9.Size = new System.Drawing.Size(75, 32); @@ -738,11 +615,6 @@ // this.button10.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.button10.Ghost = true; - this.button10.Image = null; - this.button10.ImageHover = null; - this.button10.ImageHoverSvg = null; - this.button10.ImageSize = new System.Drawing.Size(0, 0); - this.button10.ImageSvg = null; this.button10.Location = new System.Drawing.Point(165, 3); this.button10.Name = "button10"; this.button10.Size = new System.Drawing.Size(75, 32); @@ -755,11 +627,6 @@ // this.button11.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.button11.Ghost = true; - this.button11.Image = null; - this.button11.ImageHover = null; - this.button11.ImageHoverSvg = null; - this.button11.ImageSize = new System.Drawing.Size(0, 0); - this.button11.ImageSvg = null; this.button11.Location = new System.Drawing.Point(84, 3); this.button11.Name = "button11"; this.button11.Size = new System.Drawing.Size(75, 32); @@ -772,11 +639,6 @@ // this.button12.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.button12.Ghost = true; - this.button12.Image = null; - this.button12.ImageHover = null; - this.button12.ImageHoverSvg = null; - this.button12.ImageSize = new System.Drawing.Size(0, 0); - this.button12.ImageSvg = null; this.button12.Location = new System.Drawing.Point(3, 3); this.button12.Name = "button12"; this.button12.Size = new System.Drawing.Size(75, 32); @@ -810,11 +672,6 @@ // button6 // this.button6.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button6.Image = null; - this.button6.ImageHover = null; - this.button6.ImageHoverSvg = null; - this.button6.ImageSize = new System.Drawing.Size(0, 0); - this.button6.ImageSvg = null; this.button6.Location = new System.Drawing.Point(408, 3); this.button6.Name = "button6"; this.button6.Size = new System.Drawing.Size(75, 32); @@ -826,11 +683,6 @@ // button5 // this.button5.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button5.Image = null; - this.button5.ImageHover = null; - this.button5.ImageHoverSvg = null; - this.button5.ImageSize = new System.Drawing.Size(0, 0); - this.button5.ImageSvg = null; this.button5.Location = new System.Drawing.Point(327, 3); this.button5.Name = "button5"; this.button5.Size = new System.Drawing.Size(75, 32); @@ -842,11 +694,6 @@ // button4 // this.button4.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button4.Image = null; - this.button4.ImageHover = null; - this.button4.ImageHoverSvg = null; - this.button4.ImageSize = new System.Drawing.Size(0, 0); - this.button4.ImageSvg = null; this.button4.Location = new System.Drawing.Point(246, 3); this.button4.Name = "button4"; this.button4.Size = new System.Drawing.Size(75, 32); @@ -858,11 +705,6 @@ // button3 // this.button3.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button3.Image = null; - this.button3.ImageHover = null; - this.button3.ImageHoverSvg = null; - this.button3.ImageSize = new System.Drawing.Size(0, 0); - this.button3.ImageSvg = null; this.button3.Location = new System.Drawing.Point(165, 3); this.button3.Name = "button3"; this.button3.Size = new System.Drawing.Size(75, 32); @@ -874,11 +716,6 @@ // button2 // this.button2.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button2.Image = null; - this.button2.ImageHover = null; - this.button2.ImageHoverSvg = null; - this.button2.ImageSize = new System.Drawing.Size(0, 0); - this.button2.ImageSvg = null; this.button2.Location = new System.Drawing.Point(84, 3); this.button2.Name = "button2"; this.button2.Size = new System.Drawing.Size(75, 32); @@ -891,11 +728,6 @@ // this.button1.Cursor = System.Windows.Forms.Cursors.Default; this.button1.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.button1.Image = null; - this.button1.ImageHover = null; - this.button1.ImageHoverSvg = null; - this.button1.ImageSize = new System.Drawing.Size(0, 0); - this.button1.ImageSvg = null; this.button1.Location = new System.Drawing.Point(3, 3); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(75, 32); @@ -937,11 +769,56 @@ this.label1.TabIndex = 0; this.label1.Text = "Button 按钮"; // + // 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, 615); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(694, 24); + this.label10.TabIndex = 19; + this.label10.Text = "切换按钮"; + // + // flowPanel8 + // + this.flowPanel8.Controls.Add(this.button_toggle2); + this.flowPanel8.Controls.Add(this.button_toggle); + this.flowPanel8.Location = new System.Drawing.Point(3, 645); + this.flowPanel8.Name = "flowPanel8"; + this.flowPanel8.Size = new System.Drawing.Size(694, 38); + this.flowPanel8.TabIndex = 20; + this.flowPanel8.Text = "flowPanel8"; + // + // button_toggle + // + this.button_toggle.IconSvg = resources.GetString("button_toggle.IconSvg"); + this.button_toggle.Location = new System.Drawing.Point(3, 3); + this.button_toggle.Name = "button_toggle"; + this.button_toggle.Size = new System.Drawing.Size(75, 32); + this.button_toggle.TabIndex = 0; + this.button_toggle.ToggleIconSvg = resources.GetString("button_toggle.ToggleIconSvg"); + this.button_toggle.WaveSize = 0; + // + // button_toggle2 + // + this.button_toggle2.Cursor = System.Windows.Forms.Cursors.Default; + this.button_toggle2.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + this.button_toggle2.IconPosition = AntdUI.TAlignMini.Right; + this.button_toggle2.IconSvg = resources.GetString("button_toggle2.IconSvg"); + this.button_toggle2.Location = new System.Drawing.Point(84, 3); + this.button_toggle2.Name = "button_toggle2"; + this.button_toggle2.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.button_toggle2.Size = new System.Drawing.Size(75, 32); + this.button_toggle2.TabIndex = 1; + this.button_toggle2.Text = "搜索"; + this.button_toggle2.ToggleIconSvg = resources.GetString("button_toggle2.ToggleIconSvg"); + this.button_toggle2.ToggleType = AntdUI.TTypeMini.Primary; + this.button_toggle2.WaveSize = 0; + // // ButtonDemo // this.Controls.Add(this.stackPanel1); this.Name = "ButtonDemo"; - this.Size = new System.Drawing.Size(700, 629); + this.Size = new System.Drawing.Size(700, 685); this.stackPanel1.ResumeLayout(false); this.flowPanel7.ResumeLayout(false); this.flowPanel6.ResumeLayout(false); @@ -952,6 +829,7 @@ this.flowPanel3.ResumeLayout(false); this.flowPanel2.ResumeLayout(false); this.flowPanel1.ResumeLayout(false); + this.flowPanel8.ResumeLayout(false); this.ResumeLayout(false); } @@ -1013,5 +891,9 @@ private AntdUI.FlowPanel flowPanel7; private AntdUI.Button button39; private AntdUI.Label label9; + private AntdUI.FlowPanel flowPanel8; + private AntdUI.Label label10; + private AntdUI.Button button_toggle; + private AntdUI.Button button_toggle2; } } diff --git a/Views/ButtonDemo.cs b/Views/ButtonDemo.cs index 629f769..edd4573 100644 --- a/Views/ButtonDemo.cs +++ b/Views/ButtonDemo.cs @@ -7,12 +7,29 @@ namespace AntdUIDemo.Views { public partial class ButtonDemo : UserControl { - private AntdUI.TooltipComponent tooltipComponent = new AntdUI.TooltipComponent(); + private AntdUI.TooltipComponent tooltipComponent = new AntdUI.TooltipComponent() + { + Font = new Font("Microsoft YaHei UI", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(134))), + }; public ButtonDemo() { InitializeComponent(); // 遍历窗体中的所有控件并绑定 tooltip BindButtonWithToolTip(this); + BindEventHandler(); + } + + private void BindEventHandler() + { + button_toggle.Click += Button_toggle_Click; + button_toggle2.Click += Button_toggle_Click; + } + + private void Button_toggle_Click(object sender, EventArgs e) + { + var button = (AntdUI.Button)sender; + button.Toggle = !button.Toggle; + BindButtonWithToolTip(this); } private void BindButtonWithToolTip(Control parent) @@ -32,9 +49,11 @@ namespace AntdUIDemo.Views bool joinright = button.JoinRight; var iconsvg = button.IconSvg; var backentend = button.BackExtend; + var toggle = button.Toggle; + var toggletype = button.ToggleType; + var toggleiconsvg = button.ToggleIconSvg; // 构建SetTip文本 var tooltipText = new StringBuilder(); - tooltipComponent.Font = new Font("Microsoft YaHei UI", 9F, FontStyle.Regular, GraphicsUnit.Point); tooltipText.AppendLine($"Type: {type}"); tooltipText.AppendLine($"BorderWidth: {borderwidth}"); tooltipText.AppendLine($"Radius: {radius}"); @@ -65,6 +84,16 @@ namespace AntdUIDemo.Views { tooltipText.AppendLine($"BackExtend: {backentend}"); } + if (toggle) + { + tooltipText.AppendLine($"Toggle: {toggle}"); + if (toggletype is not null) + tooltipText.AppendLine($"ToggleType: {toggletype}"); + if (!string.IsNullOrEmpty(toggleiconsvg)) + { + tooltipText.AppendLine($"ToggleIconSvg: 参见ToggleIconSvg属性"); + } + } tooltipComponent.SetTip(control, tooltipText.ToString()); } diff --git a/Views/ButtonDemo.resx b/Views/ButtonDemo.resx index 1110d4d..73a807d 100644 --- a/Views/ButtonDemo.resx +++ b/Views/ButtonDemo.resx @@ -117,70 +117,49 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - <svg viewBox="64 64 896 896"><path d="M716.3 313.8c19-18.9 19-49.7 0-68.6l-69.9-69.9.1.1c-18.5-18.5-50.3-50.3-95.3-95.2-21.2-20.7-55.5-20.5-76.5.5L80.9 474.2a53.84 53.84 0 000 76.4L474.6 944a54.14 54.14 0 0076.5 0l165.1-165c19-18.9 19-49.7 0-68.6a48.7 48.7 0 00-68.7 0l-125 125.2c-5.2 5.2-13.3 5.2-18.5 0L189.5 521.4c-5.2-5.2-5.2-13.3 0-18.5l314.4-314.2c.4-.4.9-.7 1.3-1.1 5.2-4.1 12.4-3.7 17.2 1.1l125.2 125.1c19 19 49.8 19 68.7 0zM408.6 514.4a106.3 106.2 0 10212.6 0 106.3 106.2 0 10-212.6 0zm536.2-38.6L821.9 353.5c-19-18.9-49.8-18.9-68.7.1a48.4 48.4 0 000 68.6l83 82.9c5.2 5.2 5.2 13.3 0 18.5l-81.8 81.7a48.4 48.4 0 000 68.6 48.7 48.7 0 0068.7 0l121.8-121.7a53.93 53.93 0 00-.1-76.4z"></path></svg> + + <svg viewBox="64 64 896 896" focusable="false" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"></path></svg> - + + <svg viewBox="64 64 896 896" focusable="false" data-icon="poweroff" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M705.6 124.9a8 8 0 00-11.6 7.2v64.2c0 5.5 2.9 10.6 7.5 13.6a352.2 352.2 0 0162.2 49.8c32.7 32.8 58.4 70.9 76.3 113.3a355 355 0 0127.9 138.7c0 48.1-9.4 94.8-27.9 138.7a355.92 355.92 0 01-76.3 113.3 353.06 353.06 0 01-113.2 76.4c-43.8 18.6-90.5 28-138.5 28s-94.7-9.4-138.5-28a353.06 353.06 0 01-113.2-76.4A355.92 355.92 0 01184 650.4a355 355 0 01-27.9-138.7c0-48.1 9.4-94.8 27.9-138.7 17.9-42.4 43.6-80.5 76.3-113.3 19-19 39.8-35.6 62.2-49.8 4.7-2.9 7.5-8.1 7.5-13.6V132c0-6-6.3-9.8-11.6-7.2C178.5 195.2 82 339.3 80 506.3 77.2 745.1 272.5 943.5 511.2 944c239 .5 432.8-193.3 432.8-432.4 0-169.2-97-315.7-238.4-386.7zM480 560h64c4.4 0 8-3.6 8-8V88c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z"></path></svg> + + + <svg viewBox="64 64 896 896" focusable="false" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"></path></svg> + + + <svg viewBox="64 64 896 896" focusable="false" data-icon="poweroff" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M705.6 124.9a8 8 0 00-11.6 7.2v64.2c0 5.5 2.9 10.6 7.5 13.6a352.2 352.2 0 0162.2 49.8c32.7 32.8 58.4 70.9 76.3 113.3a355 355 0 0127.9 138.7c0 48.1-9.4 94.8-27.9 138.7a355.92 355.92 0 01-76.3 113.3 353.06 353.06 0 01-113.2 76.4c-43.8 18.6-90.5 28-138.5 28s-94.7-9.4-138.5-28a353.06 353.06 0 01-113.2-76.4A355.92 355.92 0 01184 650.4a355 355 0 01-27.9-138.7c0-48.1 9.4-94.8 27.9-138.7 17.9-42.4 43.6-80.5 76.3-113.3 19-19 39.8-35.6 62.2-49.8 4.7-2.9 7.5-8.1 7.5-13.6V132c0-6-6.3-9.8-11.6-7.2C178.5 195.2 82 339.3 80 506.3 77.2 745.1 272.5 943.5 511.2 944c239 .5 432.8-193.3 432.8-432.4 0-169.2-97-315.7-238.4-386.7zM480 560h64c4.4 0 8-3.6 8-8V88c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z"></path></svg> + + <svg viewBox="64 64 896 896"><path d="M716.3 313.8c19-18.9 19-49.7 0-68.6l-69.9-69.9.1.1c-18.5-18.5-50.3-50.3-95.3-95.2-21.2-20.7-55.5-20.5-76.5.5L80.9 474.2a53.84 53.84 0 000 76.4L474.6 944a54.14 54.14 0 0076.5 0l165.1-165c19-18.9 19-49.7 0-68.6a48.7 48.7 0 00-68.7 0l-125 125.2c-5.2 5.2-13.3 5.2-18.5 0L189.5 521.4c-5.2-5.2-5.2-13.3 0-18.5l314.4-314.2c.4-.4.9-.7 1.3-1.1 5.2-4.1 12.4-3.7 17.2 1.1l125.2 125.1c19 19 49.8 19 68.7 0zM408.6 514.4a106.3 106.2 0 10212.6 0 106.3 106.2 0 10-212.6 0zm536.2-38.6L821.9 353.5c-19-18.9-49.8-18.9-68.7.1a48.4 48.4 0 000 68.6l83 82.9c5.2 5.2 5.2 13.3 0 18.5l-81.8 81.7a48.4 48.4 0 000 68.6 48.7 48.7 0 0068.7 0l121.8-121.7a53.93 53.93 0 00-.1-76.4z"></path></svg> <svg viewBox="64 64 896 896" focusable="false" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"></path></svg> - - <svg viewBox="64 64 896 896" focusable="false" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"></path></svg> - <svg viewBox="64 64 896 896" focusable="false" data-icon="poweroff" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M705.6 124.9a8 8 0 00-11.6 7.2v64.2c0 5.5 2.9 10.6 7.5 13.6a352.2 352.2 0 0162.2 49.8c32.7 32.8 58.4 70.9 76.3 113.3a355 355 0 0127.9 138.7c0 48.1-9.4 94.8-27.9 138.7a355.92 355.92 0 01-76.3 113.3 353.06 353.06 0 01-113.2 76.4c-43.8 18.6-90.5 28-138.5 28s-94.7-9.4-138.5-28a353.06 353.06 0 01-113.2-76.4A355.92 355.92 0 01184 650.4a355 355 0 01-27.9-138.7c0-48.1 9.4-94.8 27.9-138.7 17.9-42.4 43.6-80.5 76.3-113.3 19-19 39.8-35.6 62.2-49.8 4.7-2.9 7.5-8.1 7.5-13.6V132c0-6-6.3-9.8-11.6-7.2C178.5 195.2 82 339.3 80 506.3 77.2 745.1 272.5 943.5 511.2 944c239 .5 432.8-193.3 432.8-432.4 0-169.2-97-315.7-238.4-386.7zM480 560h64c4.4 0 8-3.6 8-8V88c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z"></path></svg> - - <svg viewBox="64 64 896 896" focusable="false" data-icon="poweroff" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M705.6 124.9a8 8 0 00-11.6 7.2v64.2c0 5.5 2.9 10.6 7.5 13.6a352.2 352.2 0 0162.2 49.8c32.7 32.8 58.4 70.9 76.3 113.3a355 355 0 0127.9 138.7c0 48.1-9.4 94.8-27.9 138.7a355.92 355.92 0 01-76.3 113.3 353.06 353.06 0 01-113.2 76.4c-43.8 18.6-90.5 28-138.5 28s-94.7-9.4-138.5-28a353.06 353.06 0 01-113.2-76.4A355.92 355.92 0 01184 650.4a355 355 0 01-27.9-138.7c0-48.1 9.4-94.8 27.9-138.7 17.9-42.4 43.6-80.5 76.3-113.3 19-19 39.8-35.6 62.2-49.8 4.7-2.9 7.5-8.1 7.5-13.6V132c0-6-6.3-9.8-11.6-7.2C178.5 195.2 82 339.3 80 506.3 77.2 745.1 272.5 943.5 511.2 944c239 .5 432.8-193.3 432.8-432.4 0-169.2-97-315.7-238.4-386.7zM480 560h64c4.4 0 8-3.6 8-8V88c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z"></path></svg> - <svg viewBox="64 64 896 896" focusable="false" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"></path></svg> - - <svg viewBox="64 64 896 896" focusable="false" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"></path></svg> - <svg viewBox="64 64 896 896" focusable="false" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"></path></svg> - - <svg viewBox="64 64 896 896" focusable="false" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"></path></svg> - <svg viewBox="64 64 896 896" focusable="false" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"></path></svg> - - <svg viewBox="64 64 896 896" focusable="false" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"></path></svg> - <svg viewBox="64 64 896 896" focusable="false" data-icon="poweroff" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M705.6 124.9a8 8 0 00-11.6 7.2v64.2c0 5.5 2.9 10.6 7.5 13.6a352.2 352.2 0 0162.2 49.8c32.7 32.8 58.4 70.9 76.3 113.3a355 355 0 0127.9 138.7c0 48.1-9.4 94.8-27.9 138.7a355.92 355.92 0 01-76.3 113.3 353.06 353.06 0 01-113.2 76.4c-43.8 18.6-90.5 28-138.5 28s-94.7-9.4-138.5-28a353.06 353.06 0 01-113.2-76.4A355.92 355.92 0 01184 650.4a355 355 0 01-27.9-138.7c0-48.1 9.4-94.8 27.9-138.7 17.9-42.4 43.6-80.5 76.3-113.3 19-19 39.8-35.6 62.2-49.8 4.7-2.9 7.5-8.1 7.5-13.6V132c0-6-6.3-9.8-11.6-7.2C178.5 195.2 82 339.3 80 506.3 77.2 745.1 272.5 943.5 511.2 944c239 .5 432.8-193.3 432.8-432.4 0-169.2-97-315.7-238.4-386.7zM480 560h64c4.4 0 8-3.6 8-8V88c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z"></path></svg> - - <svg viewBox="64 64 896 896" focusable="false" data-icon="poweroff" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M705.6 124.9a8 8 0 00-11.6 7.2v64.2c0 5.5 2.9 10.6 7.5 13.6a352.2 352.2 0 0162.2 49.8c32.7 32.8 58.4 70.9 76.3 113.3a355 355 0 0127.9 138.7c0 48.1-9.4 94.8-27.9 138.7a355.92 355.92 0 01-76.3 113.3 353.06 353.06 0 01-113.2 76.4c-43.8 18.6-90.5 28-138.5 28s-94.7-9.4-138.5-28a353.06 353.06 0 01-113.2-76.4A355.92 355.92 0 01184 650.4a355 355 0 01-27.9-138.7c0-48.1 9.4-94.8 27.9-138.7 17.9-42.4 43.6-80.5 76.3-113.3 19-19 39.8-35.6 62.2-49.8 4.7-2.9 7.5-8.1 7.5-13.6V132c0-6-6.3-9.8-11.6-7.2C178.5 195.2 82 339.3 80 506.3 77.2 745.1 272.5 943.5 511.2 944c239 .5 432.8-193.3 432.8-432.4 0-169.2-97-315.7-238.4-386.7zM480 560h64c4.4 0 8-3.6 8-8V88c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z"></path></svg> - <svg viewBox="64 64 896 896" focusable="false" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"></path></svg> - - <svg viewBox="64 64 896 896" focusable="false" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"></path></svg> - <svg viewBox="64 64 896 896" focusable="false" data-icon="poweroff" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M705.6 124.9a8 8 0 00-11.6 7.2v64.2c0 5.5 2.9 10.6 7.5 13.6a352.2 352.2 0 0162.2 49.8c32.7 32.8 58.4 70.9 76.3 113.3a355 355 0 0127.9 138.7c0 48.1-9.4 94.8-27.9 138.7a355.92 355.92 0 01-76.3 113.3 353.06 353.06 0 01-113.2 76.4c-43.8 18.6-90.5 28-138.5 28s-94.7-9.4-138.5-28a353.06 353.06 0 01-113.2-76.4A355.92 355.92 0 01184 650.4a355 355 0 01-27.9-138.7c0-48.1 9.4-94.8 27.9-138.7 17.9-42.4 43.6-80.5 76.3-113.3 19-19 39.8-35.6 62.2-49.8 4.7-2.9 7.5-8.1 7.5-13.6V132c0-6-6.3-9.8-11.6-7.2C178.5 195.2 82 339.3 80 506.3 77.2 745.1 272.5 943.5 511.2 944c239 .5 432.8-193.3 432.8-432.4 0-169.2-97-315.7-238.4-386.7zM480 560h64c4.4 0 8-3.6 8-8V88c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z"></path></svg> - - <svg viewBox="64 64 896 896" focusable="false" data-icon="poweroff" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M705.6 124.9a8 8 0 00-11.6 7.2v64.2c0 5.5 2.9 10.6 7.5 13.6a352.2 352.2 0 0162.2 49.8c32.7 32.8 58.4 70.9 76.3 113.3a355 355 0 0127.9 138.7c0 48.1-9.4 94.8-27.9 138.7a355.92 355.92 0 01-76.3 113.3 353.06 353.06 0 01-113.2 76.4c-43.8 18.6-90.5 28-138.5 28s-94.7-9.4-138.5-28a353.06 353.06 0 01-113.2-76.4A355.92 355.92 0 01184 650.4a355 355 0 01-27.9-138.7c0-48.1 9.4-94.8 27.9-138.7 17.9-42.4 43.6-80.5 76.3-113.3 19-19 39.8-35.6 62.2-49.8 4.7-2.9 7.5-8.1 7.5-13.6V132c0-6-6.3-9.8-11.6-7.2C178.5 195.2 82 339.3 80 506.3 77.2 745.1 272.5 943.5 511.2 944c239 .5 432.8-193.3 432.8-432.4 0-169.2-97-315.7-238.4-386.7zM480 560h64c4.4 0 8-3.6 8-8V88c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z"></path></svg> - <svg viewBox="64 64 896 896" focusable="false" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"></path></svg> - - <svg viewBox="64 64 896 896" focusable="false" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"></path></svg> - <svg viewBox="64 64 896 896" focusable="false" data-icon="poweroff" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M705.6 124.9a8 8 0 00-11.6 7.2v64.2c0 5.5 2.9 10.6 7.5 13.6a352.2 352.2 0 0162.2 49.8c32.7 32.8 58.4 70.9 76.3 113.3a355 355 0 0127.9 138.7c0 48.1-9.4 94.8-27.9 138.7a355.92 355.92 0 01-76.3 113.3 353.06 353.06 0 01-113.2 76.4c-43.8 18.6-90.5 28-138.5 28s-94.7-9.4-138.5-28a353.06 353.06 0 01-113.2-76.4A355.92 355.92 0 01184 650.4a355 355 0 01-27.9-138.7c0-48.1 9.4-94.8 27.9-138.7 17.9-42.4 43.6-80.5 76.3-113.3 19-19 39.8-35.6 62.2-49.8 4.7-2.9 7.5-8.1 7.5-13.6V132c0-6-6.3-9.8-11.6-7.2C178.5 195.2 82 339.3 80 506.3 77.2 745.1 272.5 943.5 511.2 944c239 .5 432.8-193.3 432.8-432.4 0-169.2-97-315.7-238.4-386.7zM480 560h64c4.4 0 8-3.6 8-8V88c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z"></path></svg> - - <svg viewBox="64 64 896 896" focusable="false" data-icon="poweroff" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M705.6 124.9a8 8 0 00-11.6 7.2v64.2c0 5.5 2.9 10.6 7.5 13.6a352.2 352.2 0 0162.2 49.8c32.7 32.8 58.4 70.9 76.3 113.3a355 355 0 0127.9 138.7c0 48.1-9.4 94.8-27.9 138.7a355.92 355.92 0 01-76.3 113.3 353.06 353.06 0 01-113.2 76.4c-43.8 18.6-90.5 28-138.5 28s-94.7-9.4-138.5-28a353.06 353.06 0 01-113.2-76.4A355.92 355.92 0 01184 650.4a355 355 0 01-27.9-138.7c0-48.1 9.4-94.8 27.9-138.7 17.9-42.4 43.6-80.5 76.3-113.3 19-19 39.8-35.6 62.2-49.8 4.7-2.9 7.5-8.1 7.5-13.6V132c0-6-6.3-9.8-11.6-7.2C178.5 195.2 82 339.3 80 506.3 77.2 745.1 272.5 943.5 511.2 944c239 .5 432.8-193.3 432.8-432.4 0-169.2-97-315.7-238.4-386.7zM480 560h64c4.4 0 8-3.6 8-8V88c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z"></path></svg> - \ No newline at end of file diff --git a/Views/CalendarDemo.Designer.cs b/Views/CalendarDemo.Designer.cs new file mode 100644 index 0000000..b847081 --- /dev/null +++ b/Views/CalendarDemo.Designer.cs @@ -0,0 +1,121 @@ +namespace AntdUIDemo.Views +{ + partial class CalendarDemo + { + /// + /// 必需的设计器变量。 + /// + 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.label3 = new AntdUI.Label(); + this.divider1 = new AntdUI.Divider(); + this.label2 = new AntdUI.Label(); + this.label1 = new AntdUI.Label(); + this.calendar = new AntdUI.Calendar(); + this.stackPanel1.SuspendLayout(); + this.SuspendLayout(); + // + // stackPanel1 + // + this.stackPanel1.Controls.Add(this.calendar); + this.stackPanel1.Controls.Add(this.label3); + this.stackPanel1.Controls.Add(this.divider1); + this.stackPanel1.Controls.Add(this.label2); + this.stackPanel1.Controls.Add(this.label1); + this.stackPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.stackPanel1.Location = new System.Drawing.Point(0, 0); + this.stackPanel1.Name = "stackPanel1"; + this.stackPanel1.Size = new System.Drawing.Size(700, 550); + this.stackPanel1.TabIndex = 0; + this.stackPanel1.Text = "stackPanel1"; + this.stackPanel1.Vertical = true; + // + // label3 + // + this.label3.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label3.Location = new System.Drawing.Point(3, 97); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(694, 24); + this.label3.TabIndex = 23; + this.label3.Text = "基本用法"; + // + // divider1 + // + this.divider1.Location = new System.Drawing.Point(3, 79); + this.divider1.Name = "divider1"; + this.divider1.Size = new System.Drawing.Size(694, 12); + this.divider1.TabIndex = 22; + // + // label2 + // + this.label2.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label2.Location = new System.Drawing.Point(3, 49); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(694, 24); + this.label2.TabIndex = 21; + this.label2.Text = "按照日历形式展示数据的容器。"; + // + // label1 + // + this.label1.Font = new System.Drawing.Font("Microsoft YaHei UI", 26.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label1.Location = new System.Drawing.Point(3, 3); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(694, 40); + this.label1.TabIndex = 20; + this.label1.Text = "Calendar 日历"; + // + // calendar + // + this.calendar.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F); + this.calendar.Full = true; + this.calendar.Location = new System.Drawing.Point(3, 127); + this.calendar.Name = "calendar"; + this.calendar.ShowChinese = true; + this.calendar.Size = new System.Drawing.Size(694, 414); + this.calendar.TabIndex = 24; + this.calendar.Text = "calendar1"; + this.calendar.Value = new System.DateTime(2024, 8, 30, 8, 41, 9, 706); + // + // CalendarDemo + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; + this.Controls.Add(this.stackPanel1); + this.Name = "CalendarDemo"; + this.Size = new System.Drawing.Size(700, 550); + this.stackPanel1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private AntdUI.StackPanel stackPanel1; + private AntdUI.Divider divider1; + private AntdUI.Label label2; + private AntdUI.Label label1; + private AntdUI.Label label3; + private AntdUI.Calendar calendar; + } +} diff --git a/Views/CalendarDemo.cs b/Views/CalendarDemo.cs new file mode 100644 index 0000000..e1df9c7 --- /dev/null +++ b/Views/CalendarDemo.cs @@ -0,0 +1,47 @@ +using AntdUI; +using System.Collections.Generic; +using System.Drawing; +using System.Windows.Forms; + +namespace AntdUIDemo.Views +{ + public partial class CalendarDemo : UserControl + { + private AntdUI.Window window; + public CalendarDemo(AntdUI.Window _window) + { + window = _window; + InitializeComponent(); + InitData(); + + BindEventHandler(); + } + + private void BindEventHandler() + { + calendar.DateChanged += Calendar_DateChanged; + } + + private void Calendar_DateChanged(object sender, DateTimeEventArgs e) + { + AntdUI.Message.info(window, e.Value.ToString("yyyy-MM-dd"), autoClose: 1); + } + + private void InitData() + { + calendar.BadgeAction = dates => + { + // dates 参数为 DateTime[] 数组长度固定为2,返回UI上显示的开始日期与结束日期 + // DateTime start_date = dates[0], end_date = dates[1]; + var now = dates[1]; + return [ + new(now.ToString("yyyy-MM-dd"),0), + new(now.AddDays(-20).ToString("yyyy-MM-dd"),5), + new(now.AddDays(-2).ToString("yyyy-MM-dd"),99), + new(now.AddDays(-6).ToString("yyyy-MM-dd"),998,Color.FromArgb(112, 237, 58)), + ]; + }; + calendar.LoadBadge(); + } + } +} diff --git a/Views/CalendarDemo.resx b/Views/CalendarDemo.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Views/CalendarDemo.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/CarouselDemo.Designer.cs b/Views/CarouselDemo.Designer.cs new file mode 100644 index 0000000..dae87bc --- /dev/null +++ b/Views/CarouselDemo.Designer.cs @@ -0,0 +1,212 @@ +namespace AntdUIDemo.Views +{ + partial class CarouselDemo + { + /// + /// 必需的设计器变量。 + /// + 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() + { + AntdUI.CarouselItem carouselItem1 = new AntdUI.CarouselItem(); + AntdUI.CarouselItem carouselItem2 = new AntdUI.CarouselItem(); + AntdUI.CarouselItem carouselItem3 = new AntdUI.CarouselItem(); + AntdUI.CarouselItem carouselItem4 = new AntdUI.CarouselItem(); + AntdUI.CarouselItem carouselItem5 = new AntdUI.CarouselItem(); + AntdUI.CarouselItem carouselItem6 = new AntdUI.CarouselItem(); + AntdUI.CarouselItem carouselItem7 = new AntdUI.CarouselItem(); + AntdUI.CarouselItem carouselItem8 = new AntdUI.CarouselItem(); + AntdUI.CarouselItem carouselItem9 = new AntdUI.CarouselItem(); + this.stackPanel1 = new AntdUI.StackPanel(); + this.flowPanel2 = new AntdUI.FlowPanel(); + this.carousel3 = new AntdUI.Carousel(); + this.label4 = new AntdUI.Label(); + this.flowPanel1 = new AntdUI.FlowPanel(); + this.carousel2 = new AntdUI.Carousel(); + this.carousel1 = new AntdUI.Carousel(); + this.label3 = new AntdUI.Label(); + this.divider1 = new AntdUI.Divider(); + this.label2 = new AntdUI.Label(); + this.label1 = new AntdUI.Label(); + this.stackPanel1.SuspendLayout(); + this.flowPanel2.SuspendLayout(); + this.flowPanel1.SuspendLayout(); + this.SuspendLayout(); + // + // stackPanel1 + // + this.stackPanel1.Controls.Add(this.flowPanel2); + this.stackPanel1.Controls.Add(this.label4); + this.stackPanel1.Controls.Add(this.flowPanel1); + this.stackPanel1.Controls.Add(this.label3); + this.stackPanel1.Controls.Add(this.divider1); + this.stackPanel1.Controls.Add(this.label2); + this.stackPanel1.Controls.Add(this.label1); + this.stackPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.stackPanel1.Location = new System.Drawing.Point(0, 0); + this.stackPanel1.Name = "stackPanel1"; + this.stackPanel1.Size = new System.Drawing.Size(700, 499); + this.stackPanel1.TabIndex = 0; + this.stackPanel1.Text = "stackPanel1"; + this.stackPanel1.Vertical = true; + // + // flowPanel2 + // + this.flowPanel2.Controls.Add(this.carousel3); + this.flowPanel2.Location = new System.Drawing.Point(3, 331); + this.flowPanel2.Name = "flowPanel2"; + this.flowPanel2.Size = new System.Drawing.Size(694, 168); + this.flowPanel2.TabIndex = 29; + this.flowPanel2.Text = "flowPanel2"; + // + // carousel3 + // + this.carousel3.Autoplay = true; + this.carousel3.DotPosition = AntdUI.TAlignMini.Bottom; + carouselItem1.Img = global::AntdUIDemo.Properties.Resources.bg1; + carouselItem2.Img = global::AntdUIDemo.Properties.Resources.bg2; + carouselItem3.Img = global::AntdUIDemo.Properties.Resources.bg3; + this.carousel3.Image.Add(carouselItem1); + this.carousel3.Image.Add(carouselItem2); + this.carousel3.Image.Add(carouselItem3); + this.carousel3.Location = new System.Drawing.Point(3, 3); + this.carousel3.Name = "carousel3"; + this.carousel3.Radius = 12; + this.carousel3.SelectIndex = 1; + this.carousel3.Size = new System.Drawing.Size(320, 162); + this.carousel3.TabIndex = 1; + this.carousel3.Text = "carousel3"; + // + // 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, 301); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(694, 24); + this.label4.TabIndex = 28; + this.label4.Text = "自动轮播"; + // + // flowPanel1 + // + this.flowPanel1.Controls.Add(this.carousel2); + this.flowPanel1.Controls.Add(this.carousel1); + this.flowPanel1.Location = new System.Drawing.Point(3, 127); + this.flowPanel1.Name = "flowPanel1"; + this.flowPanel1.Size = new System.Drawing.Size(694, 168); + this.flowPanel1.TabIndex = 27; + this.flowPanel1.Text = "flowPanel1"; + // + // carousel2 + // + this.carousel2.DotMargin = 24; + this.carousel2.DotPosition = AntdUI.TAlignMini.Right; + this.carousel2.DotSize = new System.Drawing.Size(60, 8); + carouselItem4.Img = global::AntdUIDemo.Properties.Resources.bg1; + carouselItem5.Img = global::AntdUIDemo.Properties.Resources.bg2; + carouselItem6.Img = global::AntdUIDemo.Properties.Resources.bg3; + this.carousel2.Image.Add(carouselItem4); + this.carousel2.Image.Add(carouselItem5); + this.carousel2.Image.Add(carouselItem6); + this.carousel2.Location = new System.Drawing.Point(329, 3); + this.carousel2.Name = "carousel2"; + this.carousel2.Size = new System.Drawing.Size(320, 162); + this.carousel2.TabIndex = 1; + this.carousel2.Text = "carousel2"; + // + // carousel1 + // + this.carousel1.DotPosition = AntdUI.TAlignMini.Bottom; + carouselItem7.Img = global::AntdUIDemo.Properties.Resources.bg1; + carouselItem8.Img = global::AntdUIDemo.Properties.Resources.bg2; + carouselItem9.Img = global::AntdUIDemo.Properties.Resources.bg3; + this.carousel1.Image.Add(carouselItem7); + this.carousel1.Image.Add(carouselItem8); + this.carousel1.Image.Add(carouselItem9); + this.carousel1.Location = new System.Drawing.Point(3, 3); + this.carousel1.Name = "carousel1"; + this.carousel1.Size = new System.Drawing.Size(320, 162); + this.carousel1.TabIndex = 0; + this.carousel1.Text = "carousel1"; + // + // label3 + // + this.label3.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label3.Location = new System.Drawing.Point(3, 97); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(694, 24); + this.label3.TabIndex = 26; + this.label3.Text = "基本用法"; + // + // divider1 + // + this.divider1.Location = new System.Drawing.Point(3, 79); + this.divider1.Name = "divider1"; + this.divider1.Size = new System.Drawing.Size(694, 12); + this.divider1.TabIndex = 25; + // + // label2 + // + this.label2.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label2.Location = new System.Drawing.Point(3, 49); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(694, 24); + this.label2.TabIndex = 24; + this.label2.Text = "一组轮播的区域。"; + // + // label1 + // + this.label1.Font = new System.Drawing.Font("Microsoft YaHei UI", 26.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label1.Location = new System.Drawing.Point(3, 3); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(694, 40); + this.label1.TabIndex = 23; + this.label1.Text = "Carousel 走马灯"; + // + // CarouselDemo + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; + this.Controls.Add(this.stackPanel1); + this.Name = "CarouselDemo"; + this.Size = new System.Drawing.Size(700, 499); + this.stackPanel1.ResumeLayout(false); + this.flowPanel2.ResumeLayout(false); + this.flowPanel1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private AntdUI.StackPanel stackPanel1; + private AntdUI.Divider divider1; + private AntdUI.Label label2; + private AntdUI.Label label1; + private AntdUI.Label label3; + private AntdUI.FlowPanel flowPanel1; + private AntdUI.Carousel carousel1; + private AntdUI.FlowPanel flowPanel2; + private AntdUI.Carousel carousel3; + private AntdUI.Label label4; + private AntdUI.Carousel carousel2; + } +} diff --git a/Views/CarouselDemo.cs b/Views/CarouselDemo.cs new file mode 100644 index 0000000..10d7cb3 --- /dev/null +++ b/Views/CarouselDemo.cs @@ -0,0 +1,20 @@ +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 CarouselDemo : UserControl + { + public CarouselDemo() + { + InitializeComponent(); + } + } +} diff --git a/Views/CarouselDemo.resx b/Views/CarouselDemo.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Views/CarouselDemo.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/DropDownDemo.Designer.cs b/Views/DropDownDemo.Designer.cs index 4826f3a..4fee427 100644 --- a/Views/DropDownDemo.Designer.cs +++ b/Views/DropDownDemo.Designer.cs @@ -34,6 +34,27 @@ this.label4 = new AntdUI.Label(); this.label5 = new AntdUI.Label(); this.stackPanel1 = new AntdUI.StackPanel(); + this.flowPanel7 = new AntdUI.FlowPanel(); + this.dropdown_custom = new AntdUI.Dropdown(); + this.dropdown_enable = new AntdUI.Dropdown(); + this.dropdown_online = new AntdUI.Dropdown(); + this.label12 = new AntdUI.Label(); + this.flowPanel4 = new AntdUI.FlowPanel(); + this.dropdown_icon = new AntdUI.Dropdown(); + this.label11 = new AntdUI.Label(); + this.flowPanel3 = new AntdUI.FlowPanel(); + this.dropdown_multi = new AntdUI.Dropdown(); + this.label10 = new AntdUI.Label(); + this.flowPanel2 = new AntdUI.FlowPanel(); + this.dropdown4 = new AntdUI.Dropdown(); + this.dropdown5 = new AntdUI.Dropdown(); + this.dropdown6 = new AntdUI.Dropdown(); + this.label9 = new AntdUI.Label(); + this.flowPanel1 = new AntdUI.FlowPanel(); + this.dropdown3 = new AntdUI.Dropdown(); + this.dropdown1 = new AntdUI.Dropdown(); + this.dropdown2 = new AntdUI.Dropdown(); + this.label6 = new AntdUI.Label(); this.flowPanel6 = new AntdUI.FlowPanel(); this.dropdown33 = new AntdUI.Dropdown(); this.dropdown32 = new AntdUI.Dropdown(); @@ -47,35 +68,14 @@ this.dropdown25 = new AntdUI.Dropdown(); this.label7 = new AntdUI.Label(); this.divider1 = new AntdUI.Divider(); - this.label6 = new AntdUI.Label(); - this.flowPanel1 = new AntdUI.FlowPanel(); - this.dropdown1 = new AntdUI.Dropdown(); - this.dropdown2 = new AntdUI.Dropdown(); - this.dropdown3 = new AntdUI.Dropdown(); - this.label9 = new AntdUI.Label(); - this.flowPanel2 = new AntdUI.FlowPanel(); - this.dropdown4 = new AntdUI.Dropdown(); - this.dropdown5 = new AntdUI.Dropdown(); - this.dropdown6 = new AntdUI.Dropdown(); - this.label10 = new AntdUI.Label(); - this.flowPanel3 = new AntdUI.FlowPanel(); - this.dropdown_multi = new AntdUI.Dropdown(); - this.label11 = new AntdUI.Label(); - this.flowPanel4 = new AntdUI.FlowPanel(); - this.dropdown_icon = new AntdUI.Dropdown(); - this.label12 = new AntdUI.Label(); - this.flowPanel7 = new AntdUI.FlowPanel(); - this.dropdown_online = new AntdUI.Dropdown(); - this.dropdown_enable = new AntdUI.Dropdown(); - this.dropdown_custom = new AntdUI.Dropdown(); this.stackPanel1.SuspendLayout(); + this.flowPanel7.SuspendLayout(); + this.flowPanel4.SuspendLayout(); + this.flowPanel3.SuspendLayout(); + this.flowPanel2.SuspendLayout(); + this.flowPanel1.SuspendLayout(); this.flowPanel6.SuspendLayout(); this.flowPanel5.SuspendLayout(); - this.flowPanel1.SuspendLayout(); - this.flowPanel2.SuspendLayout(); - this.flowPanel3.SuspendLayout(); - this.flowPanel4.SuspendLayout(); - this.flowPanel7.SuspendLayout(); this.SuspendLayout(); // // label1 @@ -153,6 +153,283 @@ this.stackPanel1.Text = "stackPanel1"; this.stackPanel1.Vertical = true; // + // flowPanel7 + // + this.flowPanel7.Controls.Add(this.dropdown_custom); + this.flowPanel7.Controls.Add(this.dropdown_enable); + this.flowPanel7.Controls.Add(this.dropdown_online); + this.flowPanel7.Location = new System.Drawing.Point(3, 676); + this.flowPanel7.Name = "flowPanel7"; + this.flowPanel7.Size = new System.Drawing.Size(694, 38); + this.flowPanel7.TabIndex = 45; + this.flowPanel7.Text = "flowPanel7"; + // + // dropdown_custom + // + this.dropdown_custom.BorderWidth = 2F; + this.dropdown_custom.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.dropdown_custom.Location = new System.Drawing.Point(185, 3); + this.dropdown_custom.Name = "dropdown_custom"; + this.dropdown_custom.ShowArrow = true; + this.dropdown_custom.Size = new System.Drawing.Size(85, 32); + this.dropdown_custom.TabIndex = 6; + this.dropdown_custom.Text = "自定义"; + this.dropdown_custom.Trigger = AntdUI.Trigger.Hover; + this.dropdown_custom.WaveSize = 0; + // + // dropdown_enable + // + this.dropdown_enable.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.dropdown_enable.Location = new System.Drawing.Point(94, 3); + this.dropdown_enable.Name = "dropdown_enable"; + this.dropdown_enable.ShowArrow = true; + this.dropdown_enable.Size = new System.Drawing.Size(85, 32); + this.dropdown_enable.TabIndex = 5; + this.dropdown_enable.Text = "启用状态"; + this.dropdown_enable.Trigger = AntdUI.Trigger.Hover; + this.dropdown_enable.Type = AntdUI.TTypeMini.Primary; + this.dropdown_enable.WaveSize = 0; + // + // dropdown_online + // + this.dropdown_online.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.dropdown_online.Location = new System.Drawing.Point(3, 3); + this.dropdown_online.Name = "dropdown_online"; + this.dropdown_online.ShowArrow = true; + this.dropdown_online.Size = new System.Drawing.Size(85, 32); + this.dropdown_online.TabIndex = 2; + this.dropdown_online.Text = "在线状态"; + this.dropdown_online.Trigger = AntdUI.Trigger.Hover; + this.dropdown_online.Type = AntdUI.TTypeMini.Primary; + this.dropdown_online.WaveSize = 0; + // + // 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, 646); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(694, 24); + this.label12.TabIndex = 44; + this.label12.Text = "菜单状态"; + // + // flowPanel4 + // + this.flowPanel4.Controls.Add(this.dropdown_icon); + this.flowPanel4.Location = new System.Drawing.Point(3, 602); + this.flowPanel4.Name = "flowPanel4"; + this.flowPanel4.Size = new System.Drawing.Size(694, 38); + this.flowPanel4.TabIndex = 43; + this.flowPanel4.Text = "flowPanel4"; + // + // dropdown_icon + // + this.dropdown_icon.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.dropdown_icon.Location = new System.Drawing.Point(3, 3); + this.dropdown_icon.Name = "dropdown_icon"; + this.dropdown_icon.ShowArrow = true; + this.dropdown_icon.Size = new System.Drawing.Size(85, 32); + this.dropdown_icon.TabIndex = 2; + this.dropdown_icon.Text = "Icon"; + this.dropdown_icon.Trigger = AntdUI.Trigger.Hover; + this.dropdown_icon.Type = AntdUI.TTypeMini.Primary; + this.dropdown_icon.WaveSize = 0; + // + // 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, 572); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(694, 24); + this.label11.TabIndex = 42; + this.label11.Text = "图标菜单"; + // + // flowPanel3 + // + this.flowPanel3.Controls.Add(this.dropdown_multi); + this.flowPanel3.Location = new System.Drawing.Point(3, 528); + this.flowPanel3.Name = "flowPanel3"; + this.flowPanel3.Size = new System.Drawing.Size(694, 38); + this.flowPanel3.TabIndex = 41; + this.flowPanel3.Text = "flowPanel3"; + // + // dropdown_multi + // + this.dropdown_multi.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.dropdown_multi.Location = new System.Drawing.Point(3, 3); + this.dropdown_multi.Name = "dropdown_multi"; + this.dropdown_multi.ShowArrow = true; + this.dropdown_multi.Size = new System.Drawing.Size(85, 32); + this.dropdown_multi.TabIndex = 2; + this.dropdown_multi.Text = "Items"; + this.dropdown_multi.Trigger = AntdUI.Trigger.Hover; + this.dropdown_multi.Type = AntdUI.TTypeMini.Primary; + this.dropdown_multi.WaveSize = 0; + // + // 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, 498); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(694, 24); + this.label10.TabIndex = 40; + this.label10.Text = "多级菜单"; + // + // flowPanel2 + // + this.flowPanel2.Controls.Add(this.dropdown4); + this.flowPanel2.Controls.Add(this.dropdown5); + this.flowPanel2.Controls.Add(this.dropdown6); + this.flowPanel2.Location = new System.Drawing.Point(3, 454); + this.flowPanel2.Name = "flowPanel2"; + this.flowPanel2.Size = new System.Drawing.Size(694, 38); + this.flowPanel2.TabIndex = 39; + this.flowPanel2.Text = "flowPanel2"; + // + // dropdown4 + // + this.dropdown4.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.dropdown4.Items.AddRange(new object[] { + "first menu item", + "second menu item", + "third menu item", + "fourth menu item", + "fifth menu item"}); + this.dropdown4.Location = new System.Drawing.Point(185, 3); + this.dropdown4.MaxCount = 5; + this.dropdown4.Name = "dropdown4"; + this.dropdown4.ShowArrow = true; + this.dropdown4.Size = new System.Drawing.Size(85, 32); + this.dropdown4.TabIndex = 4; + this.dropdown4.Text = "5"; + this.dropdown4.Trigger = AntdUI.Trigger.Hover; + this.dropdown4.Type = AntdUI.TTypeMini.Primary; + this.dropdown4.WaveSize = 0; + // + // dropdown5 + // + this.dropdown5.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.dropdown5.Items.AddRange(new object[] { + "first menu item", + "second menu item", + "third menu item", + "fourth menu item", + "fifth menu item"}); + this.dropdown5.Location = new System.Drawing.Point(94, 3); + this.dropdown5.Name = "dropdown5"; + this.dropdown5.ShowArrow = true; + this.dropdown5.Size = new System.Drawing.Size(85, 32); + this.dropdown5.TabIndex = 3; + this.dropdown5.Text = "4"; + this.dropdown5.Trigger = AntdUI.Trigger.Hover; + this.dropdown5.Type = AntdUI.TTypeMini.Primary; + this.dropdown5.WaveSize = 0; + // + // dropdown6 + // + this.dropdown6.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.dropdown6.Items.AddRange(new object[] { + "first menu item", + "second menu item", + "third menu item", + "fourth menu item", + "fifth menu item"}); + this.dropdown6.Location = new System.Drawing.Point(3, 3); + this.dropdown6.MaxCount = 3; + this.dropdown6.Name = "dropdown6"; + this.dropdown6.ShowArrow = true; + this.dropdown6.Size = new System.Drawing.Size(85, 32); + this.dropdown6.TabIndex = 2; + this.dropdown6.Text = "3"; + this.dropdown6.Trigger = AntdUI.Trigger.Hover; + this.dropdown6.Type = AntdUI.TTypeMini.Primary; + this.dropdown6.WaveSize = 0; + // + // 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, 424); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(694, 24); + this.label9.TabIndex = 38; + this.label9.Text = "显示数量"; + // + // flowPanel1 + // + this.flowPanel1.Controls.Add(this.dropdown3); + this.flowPanel1.Controls.Add(this.dropdown1); + this.flowPanel1.Controls.Add(this.dropdown2); + this.flowPanel1.Location = new System.Drawing.Point(3, 380); + this.flowPanel1.Name = "flowPanel1"; + this.flowPanel1.Size = new System.Drawing.Size(694, 38); + this.flowPanel1.TabIndex = 37; + this.flowPanel1.Text = "flowPanel1"; + // + // dropdown3 + // + this.dropdown3.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.dropdown3.IsLink = true; + this.dropdown3.Items.AddRange(new object[] { + "first menu item", + "second menu item", + "third menu item", + "fourth menu item", + "fifth menu item"}); + this.dropdown3.Location = new System.Drawing.Point(185, 3); + this.dropdown3.Name = "dropdown3"; + this.dropdown3.ShowArrow = true; + this.dropdown3.Size = new System.Drawing.Size(85, 32); + this.dropdown3.TabIndex = 4; + this.dropdown3.Text = "link Arrow"; + this.dropdown3.Trigger = AntdUI.Trigger.Hover; + this.dropdown3.Type = AntdUI.TTypeMini.Primary; + this.dropdown3.WaveSize = 0; + // + // dropdown1 + // + this.dropdown1.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.dropdown1.Items.AddRange(new object[] { + "first menu item", + "second menu item", + "third menu item", + "fourth menu item", + "fifth menu item"}); + this.dropdown1.Location = new System.Drawing.Point(94, 3); + this.dropdown1.Name = "dropdown1"; + this.dropdown1.ShowArrow = true; + this.dropdown1.Size = new System.Drawing.Size(85, 32); + this.dropdown1.TabIndex = 3; + this.dropdown1.Text = "Arrow"; + this.dropdown1.Trigger = AntdUI.Trigger.Hover; + this.dropdown1.Type = AntdUI.TTypeMini.Primary; + this.dropdown1.WaveSize = 0; + // + // dropdown2 + // + this.dropdown2.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.dropdown2.Items.AddRange(new object[] { + "first menu item", + "second menu item", + "third menu item", + "fourth menu item", + "fifth menu item"}); + this.dropdown2.Location = new System.Drawing.Point(3, 3); + this.dropdown2.Name = "dropdown2"; + this.dropdown2.Size = new System.Drawing.Size(85, 32); + this.dropdown2.TabIndex = 2; + this.dropdown2.Text = "无"; + this.dropdown2.Trigger = AntdUI.Trigger.Hover; + this.dropdown2.Type = AntdUI.TTypeMini.Primary; + this.dropdown2.WaveSize = 0; + // + // 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, 350); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(694, 24); + this.label6.TabIndex = 36; + this.label6.Text = "显示箭头"; + // // flowPanel6 // this.flowPanel6.Controls.Add(this.dropdown33); @@ -183,7 +460,7 @@ this.dropdown33.Placement = AntdUI.TAlignFrom.TR; this.dropdown33.Size = new System.Drawing.Size(85, 32); this.dropdown33.TabIndex = 7; - this.dropdown33.Text = "TopRight"; + this.dropdown33.Text = "TR"; this.dropdown33.Trigger = AntdUI.Trigger.Hover; this.dropdown33.Type = AntdUI.TTypeMini.Primary; this.dropdown33.WaveSize = 0; @@ -225,7 +502,7 @@ this.dropdown31.Placement = AntdUI.TAlignFrom.TL; this.dropdown31.Size = new System.Drawing.Size(85, 32); this.dropdown31.TabIndex = 5; - this.dropdown31.Text = "TopLeft"; + this.dropdown31.Text = "TL"; this.dropdown31.Trigger = AntdUI.Trigger.Hover; this.dropdown31.Type = AntdUI.TTypeMini.Primary; this.dropdown31.WaveSize = 0; @@ -244,7 +521,7 @@ this.dropdown30.Placement = AntdUI.TAlignFrom.BR; this.dropdown30.Size = new System.Drawing.Size(85, 32); this.dropdown30.TabIndex = 4; - this.dropdown30.Text = "BottomRight"; + this.dropdown30.Text = "BR"; this.dropdown30.Trigger = AntdUI.Trigger.Hover; this.dropdown30.Type = AntdUI.TTypeMini.Primary; this.dropdown30.WaveSize = 0; @@ -281,7 +558,7 @@ this.dropdown34.Name = "dropdown34"; this.dropdown34.Size = new System.Drawing.Size(85, 32); this.dropdown34.TabIndex = 2; - this.dropdown34.Text = "BottomLeft"; + this.dropdown34.Text = "BL"; this.dropdown34.Trigger = AntdUI.Trigger.Hover; this.dropdown34.Type = AntdUI.TTypeMini.Primary; this.dropdown34.WaveSize = 0; @@ -358,283 +635,6 @@ this.divider1.Size = new System.Drawing.Size(694, 12); this.divider1.TabIndex = 31; // - // 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, 350); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(694, 24); - this.label6.TabIndex = 36; - this.label6.Text = "显示箭头"; - // - // flowPanel1 - // - this.flowPanel1.Controls.Add(this.dropdown3); - this.flowPanel1.Controls.Add(this.dropdown1); - this.flowPanel1.Controls.Add(this.dropdown2); - this.flowPanel1.Location = new System.Drawing.Point(3, 380); - this.flowPanel1.Name = "flowPanel1"; - this.flowPanel1.Size = new System.Drawing.Size(694, 38); - this.flowPanel1.TabIndex = 37; - this.flowPanel1.Text = "flowPanel1"; - // - // dropdown1 - // - this.dropdown1.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.dropdown1.Items.AddRange(new object[] { - "first menu item", - "second menu item", - "third menu item", - "fourth menu item", - "fifth menu item"}); - this.dropdown1.Location = new System.Drawing.Point(94, 3); - this.dropdown1.Name = "dropdown1"; - this.dropdown1.ShowArrow = true; - this.dropdown1.Size = new System.Drawing.Size(85, 32); - this.dropdown1.TabIndex = 3; - this.dropdown1.Text = "Arrow"; - this.dropdown1.Trigger = AntdUI.Trigger.Hover; - this.dropdown1.Type = AntdUI.TTypeMini.Primary; - this.dropdown1.WaveSize = 0; - // - // dropdown2 - // - this.dropdown2.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.dropdown2.Items.AddRange(new object[] { - "first menu item", - "second menu item", - "third menu item", - "fourth menu item", - "fifth menu item"}); - this.dropdown2.Location = new System.Drawing.Point(3, 3); - this.dropdown2.Name = "dropdown2"; - this.dropdown2.Size = new System.Drawing.Size(85, 32); - this.dropdown2.TabIndex = 2; - this.dropdown2.Text = "无"; - this.dropdown2.Trigger = AntdUI.Trigger.Hover; - this.dropdown2.Type = AntdUI.TTypeMini.Primary; - this.dropdown2.WaveSize = 0; - // - // dropdown3 - // - this.dropdown3.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.dropdown3.IsLink = true; - this.dropdown3.Items.AddRange(new object[] { - "first menu item", - "second menu item", - "third menu item", - "fourth menu item", - "fifth menu item"}); - this.dropdown3.Location = new System.Drawing.Point(185, 3); - this.dropdown3.Name = "dropdown3"; - this.dropdown3.ShowArrow = true; - this.dropdown3.Size = new System.Drawing.Size(85, 32); - this.dropdown3.TabIndex = 4; - this.dropdown3.Text = "link Arrow"; - this.dropdown3.Trigger = AntdUI.Trigger.Hover; - this.dropdown3.Type = AntdUI.TTypeMini.Primary; - this.dropdown3.WaveSize = 0; - // - // 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, 424); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(694, 24); - this.label9.TabIndex = 38; - this.label9.Text = "显示数量"; - // - // flowPanel2 - // - this.flowPanel2.Controls.Add(this.dropdown4); - this.flowPanel2.Controls.Add(this.dropdown5); - this.flowPanel2.Controls.Add(this.dropdown6); - this.flowPanel2.Location = new System.Drawing.Point(3, 454); - this.flowPanel2.Name = "flowPanel2"; - this.flowPanel2.Size = new System.Drawing.Size(694, 38); - this.flowPanel2.TabIndex = 39; - this.flowPanel2.Text = "flowPanel2"; - // - // dropdown4 - // - this.dropdown4.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.dropdown4.Items.AddRange(new object[] { - "first menu item", - "second menu item", - "third menu item", - "fourth menu item", - "fifth menu item"}); - this.dropdown4.Location = new System.Drawing.Point(185, 3); - this.dropdown4.MaxCount = 5; - this.dropdown4.Name = "dropdown4"; - this.dropdown4.ShowArrow = true; - this.dropdown4.Size = new System.Drawing.Size(85, 32); - this.dropdown4.TabIndex = 4; - this.dropdown4.Text = "5"; - this.dropdown4.Trigger = AntdUI.Trigger.Hover; - this.dropdown4.Type = AntdUI.TTypeMini.Primary; - this.dropdown4.WaveSize = 0; - // - // dropdown5 - // - this.dropdown5.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.dropdown5.Items.AddRange(new object[] { - "first menu item", - "second menu item", - "third menu item", - "fourth menu item", - "fifth menu item"}); - this.dropdown5.Location = new System.Drawing.Point(94, 3); - this.dropdown5.Name = "dropdown5"; - this.dropdown5.ShowArrow = true; - this.dropdown5.Size = new System.Drawing.Size(85, 32); - this.dropdown5.TabIndex = 3; - this.dropdown5.Text = "4"; - this.dropdown5.Trigger = AntdUI.Trigger.Hover; - this.dropdown5.Type = AntdUI.TTypeMini.Primary; - this.dropdown5.WaveSize = 0; - // - // dropdown6 - // - this.dropdown6.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.dropdown6.Items.AddRange(new object[] { - "first menu item", - "second menu item", - "third menu item", - "fourth menu item", - "fifth menu item"}); - this.dropdown6.Location = new System.Drawing.Point(3, 3); - this.dropdown6.MaxCount = 3; - this.dropdown6.Name = "dropdown6"; - this.dropdown6.ShowArrow = true; - this.dropdown6.Size = new System.Drawing.Size(85, 32); - this.dropdown6.TabIndex = 2; - this.dropdown6.Text = "3"; - this.dropdown6.Trigger = AntdUI.Trigger.Hover; - this.dropdown6.Type = AntdUI.TTypeMini.Primary; - this.dropdown6.WaveSize = 0; - // - // 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, 498); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(694, 24); - this.label10.TabIndex = 40; - this.label10.Text = "多级菜单"; - // - // flowPanel3 - // - this.flowPanel3.Controls.Add(this.dropdown_multi); - this.flowPanel3.Location = new System.Drawing.Point(3, 528); - this.flowPanel3.Name = "flowPanel3"; - this.flowPanel3.Size = new System.Drawing.Size(694, 38); - this.flowPanel3.TabIndex = 41; - this.flowPanel3.Text = "flowPanel3"; - // - // dropdown_multi - // - this.dropdown_multi.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.dropdown_multi.Location = new System.Drawing.Point(3, 3); - this.dropdown_multi.Name = "dropdown_multi"; - this.dropdown_multi.ShowArrow = true; - this.dropdown_multi.Size = new System.Drawing.Size(85, 32); - this.dropdown_multi.TabIndex = 2; - this.dropdown_multi.Text = "Items"; - this.dropdown_multi.Trigger = AntdUI.Trigger.Hover; - this.dropdown_multi.Type = AntdUI.TTypeMini.Primary; - this.dropdown_multi.WaveSize = 0; - // - // 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, 572); - this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(694, 24); - this.label11.TabIndex = 42; - this.label11.Text = "图标菜单"; - // - // flowPanel4 - // - this.flowPanel4.Controls.Add(this.dropdown_icon); - this.flowPanel4.Location = new System.Drawing.Point(3, 602); - this.flowPanel4.Name = "flowPanel4"; - this.flowPanel4.Size = new System.Drawing.Size(694, 38); - this.flowPanel4.TabIndex = 43; - this.flowPanel4.Text = "flowPanel4"; - // - // dropdown_icon - // - this.dropdown_icon.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.dropdown_icon.Location = new System.Drawing.Point(3, 3); - this.dropdown_icon.Name = "dropdown_icon"; - this.dropdown_icon.ShowArrow = true; - this.dropdown_icon.Size = new System.Drawing.Size(85, 32); - this.dropdown_icon.TabIndex = 2; - this.dropdown_icon.Text = "Icon"; - this.dropdown_icon.Trigger = AntdUI.Trigger.Hover; - this.dropdown_icon.Type = AntdUI.TTypeMini.Primary; - this.dropdown_icon.WaveSize = 0; - // - // 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, 646); - this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(694, 24); - this.label12.TabIndex = 44; - this.label12.Text = "菜单状态"; - // - // flowPanel7 - // - this.flowPanel7.Controls.Add(this.dropdown_custom); - this.flowPanel7.Controls.Add(this.dropdown_enable); - this.flowPanel7.Controls.Add(this.dropdown_online); - this.flowPanel7.Location = new System.Drawing.Point(3, 676); - this.flowPanel7.Name = "flowPanel7"; - this.flowPanel7.Size = new System.Drawing.Size(694, 38); - this.flowPanel7.TabIndex = 45; - this.flowPanel7.Text = "flowPanel7"; - // - // dropdown_online - // - this.dropdown_online.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.dropdown_online.Location = new System.Drawing.Point(3, 3); - this.dropdown_online.Name = "dropdown_online"; - this.dropdown_online.ShowArrow = true; - this.dropdown_online.Size = new System.Drawing.Size(85, 32); - this.dropdown_online.TabIndex = 2; - this.dropdown_online.Text = "在线状态"; - this.dropdown_online.Trigger = AntdUI.Trigger.Hover; - this.dropdown_online.Type = AntdUI.TTypeMini.Primary; - this.dropdown_online.WaveSize = 0; - // - // dropdown_enable - // - this.dropdown_enable.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.dropdown_enable.Location = new System.Drawing.Point(94, 3); - this.dropdown_enable.Name = "dropdown_enable"; - this.dropdown_enable.ShowArrow = true; - this.dropdown_enable.Size = new System.Drawing.Size(85, 32); - this.dropdown_enable.TabIndex = 5; - this.dropdown_enable.Text = "启用状态"; - this.dropdown_enable.Trigger = AntdUI.Trigger.Hover; - this.dropdown_enable.Type = AntdUI.TTypeMini.Primary; - this.dropdown_enable.WaveSize = 0; - // - // dropdown_custom - // - this.dropdown_custom.BorderWidth = 2F; - this.dropdown_custom.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.dropdown_custom.Location = new System.Drawing.Point(185, 3); - this.dropdown_custom.Name = "dropdown_custom"; - this.dropdown_custom.ShowArrow = true; - this.dropdown_custom.Size = new System.Drawing.Size(85, 32); - this.dropdown_custom.TabIndex = 6; - this.dropdown_custom.Text = "自定义"; - this.dropdown_custom.Trigger = AntdUI.Trigger.Hover; - this.dropdown_custom.WaveSize = 0; - // // DropDownDemo // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; @@ -642,13 +642,13 @@ this.Name = "DropDownDemo"; this.Size = new System.Drawing.Size(700, 730); this.stackPanel1.ResumeLayout(false); + this.flowPanel7.ResumeLayout(false); + this.flowPanel4.ResumeLayout(false); + this.flowPanel3.ResumeLayout(false); + this.flowPanel2.ResumeLayout(false); + this.flowPanel1.ResumeLayout(false); this.flowPanel6.ResumeLayout(false); this.flowPanel5.ResumeLayout(false); - this.flowPanel1.ResumeLayout(false); - this.flowPanel2.ResumeLayout(false); - this.flowPanel3.ResumeLayout(false); - this.flowPanel4.ResumeLayout(false); - this.flowPanel7.ResumeLayout(false); this.ResumeLayout(false); } diff --git a/Views/LabelDemo.Designer.cs b/Views/LabelDemo.Designer.cs new file mode 100644 index 0000000..eb04427 --- /dev/null +++ b/Views/LabelDemo.Designer.cs @@ -0,0 +1,226 @@ +namespace AntdUIDemo.Views +{ + partial class LabelDemo + { + /// + /// 必需的设计器变量。 + /// + 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() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LabelDemo)); + this.stackPanel1 = new AntdUI.StackPanel(); + this.divider1 = new AntdUI.Divider(); + this.label2 = new AntdUI.Label(); + this.label1 = new AntdUI.Label(); + this.flowPanel1 = new AntdUI.FlowPanel(); + this.label3 = new AntdUI.Label(); + this.label4 = new AntdUI.Label(); + this.label5 = new AntdUI.Label(); + this.label6 = new AntdUI.Label(); + this.label9 = new AntdUI.Label(); + this.flowPanel2 = new AntdUI.FlowPanel(); + this.label10 = new AntdUI.Label(); + this.label11 = new AntdUI.Label(); + this.stackPanel1.SuspendLayout(); + this.flowPanel1.SuspendLayout(); + this.flowPanel2.SuspendLayout(); + this.SuspendLayout(); + // + // stackPanel1 + // + this.stackPanel1.Controls.Add(this.flowPanel2); + this.stackPanel1.Controls.Add(this.label9); + this.stackPanel1.Controls.Add(this.flowPanel1); + this.stackPanel1.Controls.Add(this.label3); + this.stackPanel1.Controls.Add(this.divider1); + this.stackPanel1.Controls.Add(this.label2); + this.stackPanel1.Controls.Add(this.label1); + this.stackPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.stackPanel1.Location = new System.Drawing.Point(0, 0); + this.stackPanel1.Name = "stackPanel1"; + this.stackPanel1.Size = new System.Drawing.Size(700, 464); + this.stackPanel1.TabIndex = 0; + this.stackPanel1.Text = "stackPanel1"; + this.stackPanel1.Vertical = true; + // + // divider1 + // + this.divider1.Location = new System.Drawing.Point(3, 79); + this.divider1.Name = "divider1"; + this.divider1.Size = new System.Drawing.Size(694, 12); + this.divider1.TabIndex = 28; + // + // label2 + // + this.label2.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label2.Location = new System.Drawing.Point(3, 49); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(694, 24); + this.label2.TabIndex = 27; + this.label2.Text = "字符标签。"; + // + // label1 + // + this.label1.Font = new System.Drawing.Font("Microsoft YaHei UI", 26.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label1.Location = new System.Drawing.Point(3, 3); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(694, 40); + this.label1.TabIndex = 26; + this.label1.Text = "Label 标签"; + // + // flowPanel1 + // + this.flowPanel1.Controls.Add(this.label6); + this.flowPanel1.Controls.Add(this.label5); + this.flowPanel1.Controls.Add(this.label4); + this.flowPanel1.Gap = 6; + this.flowPanel1.Location = new System.Drawing.Point(3, 127); + this.flowPanel1.Name = "flowPanel1"; + this.flowPanel1.Size = new System.Drawing.Size(694, 38); + this.flowPanel1.TabIndex = 30; + this.flowPanel1.Text = "flowPanel1"; + // + // label3 + // + this.label3.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label3.Location = new System.Drawing.Point(3, 97); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(694, 24); + this.label3.TabIndex = 29; + this.label3.Text = "基本用法"; + // + // 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(120, 32); + this.label4.TabIndex = 0; + this.label4.Text = "常规标签"; + this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label5 + // + this.label5.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(150)))), ((int)(((byte)(243))))); + this.label5.Location = new System.Drawing.Point(135, 3); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(120, 32); + this.label5.TabIndex = 1; + this.label5.Text = "标签颜色"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label6 + // + this.label6.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label6.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(150)))), ((int)(((byte)(243))))); + this.label6.Location = new System.Drawing.Point(267, 3); + this.label6.Name = "label6"; + this.label6.Shadow = 3; + this.label6.Size = new System.Drawing.Size(120, 32); + this.label6.TabIndex = 2; + this.label6.Text = "标签阴影"; + this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // 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, 171); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(694, 24); + this.label9.TabIndex = 31; + this.label9.Text = "前/后标签"; + // + // flowPanel2 + // + this.flowPanel2.Controls.Add(this.label10); + this.flowPanel2.Controls.Add(this.label11); + this.flowPanel2.Gap = 6; + this.flowPanel2.Location = new System.Drawing.Point(3, 201); + this.flowPanel2.Name = "flowPanel2"; + this.flowPanel2.Size = new System.Drawing.Size(694, 38); + this.flowPanel2.TabIndex = 32; + this.flowPanel2.Text = "flowPanel2"; + // + // label10 + // + this.label10.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label10.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(150)))), ((int)(((byte)(243))))); + this.label10.IconRatio = 0.6F; + this.label10.Location = new System.Drawing.Point(135, 3); + this.label10.Name = "label10"; + this.label10.PrefixColor = System.Drawing.Color.FromArgb(((int)(((byte)(233)))), ((int)(((byte)(30)))), ((int)(((byte)(99))))); + this.label10.PrefixSvg = resources.GetString("label10.PrefixSvg"); + this.label10.Size = new System.Drawing.Size(120, 32); + this.label10.SuffixColor = System.Drawing.Color.FromArgb(((int)(((byte)(233)))), ((int)(((byte)(30)))), ((int)(((byte)(99))))); + this.label10.SuffixSvg = resources.GetString("label10.SuffixSvg"); + this.label10.TabIndex = 4; + this.label10.Text = "图标"; + this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label11 + // + this.label11.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label11.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(150)))), ((int)(((byte)(243))))); + this.label11.Location = new System.Drawing.Point(3, 3); + this.label11.Name = "label11"; + this.label11.Prefix = "♥"; + this.label11.PrefixColor = System.Drawing.Color.FromArgb(((int)(((byte)(233)))), ((int)(((byte)(30)))), ((int)(((byte)(99))))); + this.label11.Size = new System.Drawing.Size(120, 32); + this.label11.Suffix = "♥"; + this.label11.SuffixColor = System.Drawing.Color.FromArgb(((int)(((byte)(233)))), ((int)(((byte)(30)))), ((int)(((byte)(99))))); + this.label11.TabIndex = 3; + this.label11.Text = "文本"; + this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // LabelDemo + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; + this.Controls.Add(this.stackPanel1); + this.Name = "LabelDemo"; + this.Size = new System.Drawing.Size(700, 464); + this.stackPanel1.ResumeLayout(false); + this.flowPanel1.ResumeLayout(false); + this.flowPanel2.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private AntdUI.StackPanel stackPanel1; + private AntdUI.Divider divider1; + private AntdUI.Label label2; + private AntdUI.Label label1; + private AntdUI.FlowPanel flowPanel1; + private AntdUI.Label label3; + private AntdUI.Label label4; + private AntdUI.Label label5; + private AntdUI.Label label6; + private AntdUI.Label label9; + private AntdUI.FlowPanel flowPanel2; + private AntdUI.Label label10; + private AntdUI.Label label11; + } +} diff --git a/Views/LabelDemo.cs b/Views/LabelDemo.cs new file mode 100644 index 0000000..88f2c1a --- /dev/null +++ b/Views/LabelDemo.cs @@ -0,0 +1,20 @@ +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 LabelDemo : UserControl + { + public LabelDemo() + { + InitializeComponent(); + } + } +} diff --git a/Views/LabelDemo.resx b/Views/LabelDemo.resx new file mode 100644 index 0000000..5aa8bd1 --- /dev/null +++ b/Views/LabelDemo.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + <svg viewBox="64 64 896 896" focusable="false" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"></path></svg> + + + <svg viewBox="64 64 896 896" focusable="false" data-icon="poweroff" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M705.6 124.9a8 8 0 00-11.6 7.2v64.2c0 5.5 2.9 10.6 7.5 13.6a352.2 352.2 0 0162.2 49.8c32.7 32.8 58.4 70.9 76.3 113.3a355 355 0 0127.9 138.7c0 48.1-9.4 94.8-27.9 138.7a355.92 355.92 0 01-76.3 113.3 353.06 353.06 0 01-113.2 76.4c-43.8 18.6-90.5 28-138.5 28s-94.7-9.4-138.5-28a353.06 353.06 0 01-113.2-76.4A355.92 355.92 0 01184 650.4a355 355 0 01-27.9-138.7c0-48.1 9.4-94.8 27.9-138.7 17.9-42.4 43.6-80.5 76.3-113.3 19-19 39.8-35.6 62.2-49.8 4.7-2.9 7.5-8.1 7.5-13.6V132c0-6-6.3-9.8-11.6-7.2C178.5 195.2 82 339.3 80 506.3 77.2 745.1 272.5 943.5 511.2 944c239 .5 432.8-193.3 432.8-432.4 0-169.2-97-315.7-238.4-386.7zM480 560h64c4.4 0 8-3.6 8-8V88c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z"></path></svg> + + \ No newline at end of file diff --git a/Views/PopoverDemo.Designer.cs b/Views/PopoverDemo.Designer.cs new file mode 100644 index 0000000..1074b9f --- /dev/null +++ b/Views/PopoverDemo.Designer.cs @@ -0,0 +1,432 @@ +namespace AntdUIDemo.Views +{ + partial class PopoverDemo + { + /// + /// 必需的设计器变量。 + /// + 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.flowPanel1 = new AntdUI.FlowPanel(); + this.button_base = new AntdUI.Button(); + this.label3 = new AntdUI.Label(); + this.divider1 = new AntdUI.Divider(); + this.label4 = new AntdUI.Label(); + this.label2 = new AntdUI.Label(); + this.label1 = new AntdUI.Label(); + this.label8 = new AntdUI.Label(); + this.flowPanel2 = new AntdUI.FlowPanel(); + this.buttonBR = new AntdUI.Button(); + this.buttonBottom = new AntdUI.Button(); + this.buttonBL = new AntdUI.Button(); + this.buttonLT = new AntdUI.Button(); + this.buttonLeft = new AntdUI.Button(); + this.buttonLB = new AntdUI.Button(); + this.flowPanel3 = new AntdUI.FlowPanel(); + this.buttonRB = new AntdUI.Button(); + this.buttonRight = new AntdUI.Button(); + this.buttonRT = new AntdUI.Button(); + this.buttonTL = new AntdUI.Button(); + this.buttonTop = new AntdUI.Button(); + this.buttonTR = new AntdUI.Button(); + this.button_close = new AntdUI.Button(); + this.label5 = new AntdUI.Label(); + this.flowPanel4 = new AntdUI.FlowPanel(); + this.button_control = new AntdUI.Button(); + this.button_calendar = new AntdUI.Button(); + this.button_form = new AntdUI.Button(); + this.stackPanel1.SuspendLayout(); + this.flowPanel1.SuspendLayout(); + this.flowPanel2.SuspendLayout(); + this.flowPanel3.SuspendLayout(); + this.flowPanel4.SuspendLayout(); + this.SuspendLayout(); + // + // stackPanel1 + // + this.stackPanel1.Controls.Add(this.flowPanel4); + this.stackPanel1.Controls.Add(this.label5); + this.stackPanel1.Controls.Add(this.flowPanel3); + this.stackPanel1.Controls.Add(this.flowPanel2); + this.stackPanel1.Controls.Add(this.label8); + this.stackPanel1.Controls.Add(this.flowPanel1); + this.stackPanel1.Controls.Add(this.label3); + this.stackPanel1.Controls.Add(this.divider1); + this.stackPanel1.Controls.Add(this.label4); + this.stackPanel1.Controls.Add(this.label2); + this.stackPanel1.Controls.Add(this.label1); + this.stackPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.stackPanel1.Location = new System.Drawing.Point(0, 0); + this.stackPanel1.Name = "stackPanel1"; + this.stackPanel1.Size = new System.Drawing.Size(700, 472); + this.stackPanel1.TabIndex = 0; + this.stackPanel1.Text = "stackPanel1"; + this.stackPanel1.Vertical = true; + // + // flowPanel1 + // + this.flowPanel1.Controls.Add(this.button_close); + this.flowPanel1.Controls.Add(this.button_base); + this.flowPanel1.Location = new System.Drawing.Point(3, 157); + this.flowPanel1.Name = "flowPanel1"; + this.flowPanel1.Size = new System.Drawing.Size(694, 38); + this.flowPanel1.TabIndex = 16; + this.flowPanel1.Text = "flowPanel1"; + // + // button_base + // + this.button_base.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + this.button_base.Location = new System.Drawing.Point(3, 3); + this.button_base.Name = "button_base"; + this.button_base.Size = new System.Drawing.Size(90, 32); + this.button_base.TabIndex = 0; + this.button_base.Text = "Click me"; + this.button_base.Type = AntdUI.TTypeMini.Primary; + this.button_base.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, 127); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(694, 24); + this.label3.TabIndex = 15; + this.label3.Text = "基本用法"; + // + // divider1 + // + this.divider1.Location = new System.Drawing.Point(3, 109); + this.divider1.Name = "divider1"; + this.divider1.Size = new System.Drawing.Size(694, 12); + this.divider1.TabIndex = 14; + // + // label4 + // + this.label4.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + this.label4.Location = new System.Drawing.Point(3, 79); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(694, 24); + this.label4.TabIndex = 13; + this.label4.Text = "Popover没有工具箱控件,使用代码方式调用。"; + // + // label2 + // + this.label2.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label2.Location = new System.Drawing.Point(3, 49); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(694, 24); + this.label2.TabIndex = 9; + this.label2.Text = "下拉选择器。"; + // + // label1 + // + this.label1.Font = new System.Drawing.Font("Microsoft YaHei UI", 26.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label1.Location = new System.Drawing.Point(3, 3); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(694, 40); + this.label1.TabIndex = 8; + this.label1.Text = "Popover 气泡卡片"; + // + // 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, 201); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(694, 24); + this.label8.TabIndex = 35; + this.label8.Text = "弹出位置"; + // + // flowPanel2 + // + this.flowPanel2.Controls.Add(this.buttonLB); + this.flowPanel2.Controls.Add(this.buttonLeft); + this.flowPanel2.Controls.Add(this.buttonLT); + this.flowPanel2.Controls.Add(this.buttonBL); + this.flowPanel2.Controls.Add(this.buttonBottom); + this.flowPanel2.Controls.Add(this.buttonBR); + this.flowPanel2.Location = new System.Drawing.Point(3, 231); + this.flowPanel2.Name = "flowPanel2"; + this.flowPanel2.Size = new System.Drawing.Size(694, 38); + this.flowPanel2.TabIndex = 36; + this.flowPanel2.Text = "flowPanel2"; + // + // buttonBR + // + this.buttonBR.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + this.buttonBR.Location = new System.Drawing.Point(3, 3); + this.buttonBR.Name = "buttonBR"; + this.buttonBR.Size = new System.Drawing.Size(90, 32); + this.buttonBR.TabIndex = 0; + this.buttonBR.Text = "BR"; + this.buttonBR.Type = AntdUI.TTypeMini.Primary; + this.buttonBR.WaveSize = 0; + // + // buttonBottom + // + this.buttonBottom.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + this.buttonBottom.Location = new System.Drawing.Point(99, 3); + this.buttonBottom.Name = "buttonBottom"; + this.buttonBottom.Size = new System.Drawing.Size(90, 32); + this.buttonBottom.TabIndex = 1; + this.buttonBottom.Text = "Bottom"; + this.buttonBottom.Type = AntdUI.TTypeMini.Primary; + this.buttonBottom.WaveSize = 0; + // + // buttonBL + // + this.buttonBL.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + this.buttonBL.Location = new System.Drawing.Point(195, 3); + this.buttonBL.Name = "buttonBL"; + this.buttonBL.Size = new System.Drawing.Size(90, 32); + this.buttonBL.TabIndex = 2; + this.buttonBL.Text = "BL"; + this.buttonBL.Type = AntdUI.TTypeMini.Primary; + this.buttonBL.WaveSize = 0; + // + // buttonLT + // + this.buttonLT.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + this.buttonLT.Location = new System.Drawing.Point(291, 3); + this.buttonLT.Name = "buttonLT"; + this.buttonLT.Size = new System.Drawing.Size(90, 32); + this.buttonLT.TabIndex = 3; + this.buttonLT.Text = "LT"; + this.buttonLT.Type = AntdUI.TTypeMini.Primary; + this.buttonLT.WaveSize = 0; + // + // buttonLeft + // + this.buttonLeft.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + this.buttonLeft.Location = new System.Drawing.Point(387, 3); + this.buttonLeft.Name = "buttonLeft"; + this.buttonLeft.Size = new System.Drawing.Size(90, 32); + this.buttonLeft.TabIndex = 4; + this.buttonLeft.Text = "Left"; + this.buttonLeft.Type = AntdUI.TTypeMini.Primary; + this.buttonLeft.WaveSize = 0; + // + // buttonLB + // + this.buttonLB.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + this.buttonLB.Location = new System.Drawing.Point(483, 3); + this.buttonLB.Name = "buttonLB"; + this.buttonLB.Size = new System.Drawing.Size(90, 32); + this.buttonLB.TabIndex = 5; + this.buttonLB.Text = "LB"; + this.buttonLB.Type = AntdUI.TTypeMini.Primary; + this.buttonLB.WaveSize = 0; + // + // flowPanel3 + // + this.flowPanel3.Controls.Add(this.buttonRB); + this.flowPanel3.Controls.Add(this.buttonRight); + this.flowPanel3.Controls.Add(this.buttonRT); + this.flowPanel3.Controls.Add(this.buttonTL); + this.flowPanel3.Controls.Add(this.buttonTop); + this.flowPanel3.Controls.Add(this.buttonTR); + this.flowPanel3.Location = new System.Drawing.Point(3, 275); + this.flowPanel3.Name = "flowPanel3"; + this.flowPanel3.Size = new System.Drawing.Size(694, 38); + this.flowPanel3.TabIndex = 37; + this.flowPanel3.Text = "flowPanel3"; + // + // buttonRB + // + this.buttonRB.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + this.buttonRB.Location = new System.Drawing.Point(483, 3); + this.buttonRB.Name = "buttonRB"; + this.buttonRB.Size = new System.Drawing.Size(90, 32); + this.buttonRB.TabIndex = 5; + this.buttonRB.Text = "RB"; + this.buttonRB.Type = AntdUI.TTypeMini.Primary; + this.buttonRB.WaveSize = 0; + // + // buttonRight + // + this.buttonRight.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + this.buttonRight.Location = new System.Drawing.Point(387, 3); + this.buttonRight.Name = "buttonRight"; + this.buttonRight.Size = new System.Drawing.Size(90, 32); + this.buttonRight.TabIndex = 4; + this.buttonRight.Text = "Right"; + this.buttonRight.Type = AntdUI.TTypeMini.Primary; + this.buttonRight.WaveSize = 0; + // + // buttonRT + // + this.buttonRT.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + this.buttonRT.Location = new System.Drawing.Point(291, 3); + this.buttonRT.Name = "buttonRT"; + this.buttonRT.Size = new System.Drawing.Size(90, 32); + this.buttonRT.TabIndex = 3; + this.buttonRT.Text = "RT"; + this.buttonRT.Type = AntdUI.TTypeMini.Primary; + this.buttonRT.WaveSize = 0; + // + // buttonTL + // + this.buttonTL.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + this.buttonTL.Location = new System.Drawing.Point(195, 3); + this.buttonTL.Name = "buttonTL"; + this.buttonTL.Size = new System.Drawing.Size(90, 32); + this.buttonTL.TabIndex = 2; + this.buttonTL.Text = "TL"; + this.buttonTL.Type = AntdUI.TTypeMini.Primary; + this.buttonTL.WaveSize = 0; + // + // buttonTop + // + this.buttonTop.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + this.buttonTop.Location = new System.Drawing.Point(99, 3); + this.buttonTop.Name = "buttonTop"; + this.buttonTop.Size = new System.Drawing.Size(90, 32); + this.buttonTop.TabIndex = 1; + this.buttonTop.Text = "Top"; + this.buttonTop.Type = AntdUI.TTypeMini.Primary; + this.buttonTop.WaveSize = 0; + // + // buttonTR + // + this.buttonTR.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + this.buttonTR.Location = new System.Drawing.Point(3, 3); + this.buttonTR.Name = "buttonTR"; + this.buttonTR.Size = new System.Drawing.Size(90, 32); + this.buttonTR.TabIndex = 0; + this.buttonTR.Text = "TR"; + this.buttonTR.Type = AntdUI.TTypeMini.Primary; + this.buttonTR.WaveSize = 0; + // + // button_close + // + this.button_close.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + this.button_close.Location = new System.Drawing.Point(99, 3); + this.button_close.Name = "button_close"; + this.button_close.Size = new System.Drawing.Size(90, 32); + this.button_close.TabIndex = 1; + this.button_close.Text = "自动关闭"; + this.button_close.Type = AntdUI.TTypeMini.Primary; + this.button_close.WaveSize = 0; + // + // label5 + // + this.label5.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label5.Location = new System.Drawing.Point(3, 319); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(694, 24); + this.label5.TabIndex = 38; + this.label5.Text = "自定义弹出内容"; + // + // flowPanel4 + // + this.flowPanel4.Controls.Add(this.button_form); + this.flowPanel4.Controls.Add(this.button_calendar); + this.flowPanel4.Controls.Add(this.button_control); + this.flowPanel4.Location = new System.Drawing.Point(3, 349); + this.flowPanel4.Name = "flowPanel4"; + this.flowPanel4.Size = new System.Drawing.Size(694, 38); + this.flowPanel4.TabIndex = 39; + this.flowPanel4.Text = "flowPanel4"; + // + // button_control + // + this.button_control.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + this.button_control.Location = new System.Drawing.Point(3, 3); + this.button_control.Name = "button_control"; + this.button_control.Size = new System.Drawing.Size(90, 32); + this.button_control.TabIndex = 0; + this.button_control.Text = "Button"; + this.button_control.Type = AntdUI.TTypeMini.Primary; + this.button_control.WaveSize = 0; + // + // button_calendar + // + this.button_calendar.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + this.button_calendar.Location = new System.Drawing.Point(99, 3); + this.button_calendar.Name = "button_calendar"; + this.button_calendar.Size = new System.Drawing.Size(90, 32); + this.button_calendar.TabIndex = 4; + this.button_calendar.Text = "Calendar"; + this.button_calendar.Type = AntdUI.TTypeMini.Primary; + this.button_calendar.WaveSize = 0; + // + // button_form + // + this.button_form.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + this.button_form.Location = new System.Drawing.Point(195, 3); + this.button_form.Name = "button_form"; + this.button_form.Size = new System.Drawing.Size(90, 32); + this.button_form.TabIndex = 5; + this.button_form.Text = "窗口"; + this.button_form.Type = AntdUI.TTypeMini.Primary; + this.button_form.WaveSize = 0; + // + // PopoverDemo + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; + this.Controls.Add(this.stackPanel1); + this.Name = "PopoverDemo"; + this.Size = new System.Drawing.Size(700, 472); + this.stackPanel1.ResumeLayout(false); + this.flowPanel1.ResumeLayout(false); + this.flowPanel2.ResumeLayout(false); + this.flowPanel3.ResumeLayout(false); + this.flowPanel4.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private AntdUI.StackPanel stackPanel1; + private AntdUI.Label label2; + private AntdUI.Label label1; + private AntdUI.FlowPanel flowPanel1; + private AntdUI.Button button_base; + private AntdUI.Label label3; + private AntdUI.Divider divider1; + private AntdUI.Label label4; + private AntdUI.FlowPanel flowPanel2; + private AntdUI.Button buttonBR; + private AntdUI.Label label8; + private AntdUI.Button buttonLB; + private AntdUI.Button buttonLeft; + private AntdUI.Button buttonLT; + private AntdUI.Button buttonBL; + private AntdUI.Button buttonBottom; + private AntdUI.FlowPanel flowPanel3; + private AntdUI.Button buttonRB; + private AntdUI.Button buttonRight; + private AntdUI.Button buttonRT; + private AntdUI.Button buttonTL; + private AntdUI.Button buttonTop; + private AntdUI.Button buttonTR; + private AntdUI.Button button_close; + private AntdUI.Label label5; + private AntdUI.FlowPanel flowPanel4; + private AntdUI.Button button_control; + private AntdUI.Button button_form; + private AntdUI.Button button_calendar; + } +} diff --git a/Views/PopoverDemo.cs b/Views/PopoverDemo.cs new file mode 100644 index 0000000..c71b910 --- /dev/null +++ b/Views/PopoverDemo.cs @@ -0,0 +1,177 @@ +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 PopoverDemo : UserControl + { + private AntdUI.Window window; + public PopoverDemo(AntdUI.Window _window) + { + window = _window; + InitializeComponent(); + BindEventHandler(); + } + + private void BindEventHandler() + { + button_base.Click += button_base_Click; + button_close.Click += button_close_Click; + + button_control.Click += button_control_Click; + button_calendar.Click += button_calendar_Click; + button_form.Click += button_form_Click; + + buttonBL.Click += button_popover_Click; + buttonBottom.Click += button_popover_Click; + buttonBR.Click += button_popover_Click; + buttonLeft.Click += button_popover_Click; + buttonLB.Click += button_popover_Click; + buttonLT.Click += button_popover_Click; + buttonRight.Click += button_popover_Click; + buttonRB.Click += button_popover_Click; + buttonRT.Click += button_popover_Click; + buttonTop.Click += button_popover_Click; + buttonTL.Click += button_popover_Click; + buttonTR.Click += button_popover_Click; + } + + private void button_calendar_Click(object sender, EventArgs e) + { + var button = sender as AntdUI.Button; + var popovercalendar = new AntdUI.Calendar() + { + Font = new Font("Microsoft YaHei UI", 9F, FontStyle.Regular, GraphicsUnit.Point), + Size = new Size(150, 300), + Full = true, + }; + window.AutoDpi(popovercalendar); + Popover.open(new Popover.Config(button, popovercalendar) + { + ArrowAlign = TAlign.TL, + OnControlLoad = () => + { + popovercalendar.DateChanged += (sender, e) => + AntdUI.Message.info(window, e.Value.ToString("yyyy-MM-dd"), autoClose: 1); + } + }); + } + + private void button_form_Click(object sender, EventArgs e) + { + var button = sender as AntdUI.Button; + var form = new SwitchDemo(); + form.Size = new Size(500, 500); + Popover.open(new Popover.Config(button, form) + { + + ArrowAlign = TAlign.TL, + }); + } + + private async void button_control_Click(object sender, EventArgs e) + { + var button = sender as AntdUI.Button; + var popoverbutton = new AntdUI.Button() + { + Font = new Font("Microsoft YaHei UI", 9F, FontStyle.Regular, GraphicsUnit.Point), + Size = new Size(90, 32), + WaveSize = 0, + Text = "PopoverButton", + Type = TTypeMini.Primary, + }; + window.AutoDpi(popoverbutton); + Popover.open(new Popover.Config(button, popoverbutton) + { + OnControlLoad = () => + { + popoverbutton.Click += (sender, e) => + AntdUI.Message.info(window, "点击了PopoverButton", autoClose: 1); + } + }); + } + + private void button_close_Click(object sender, EventArgs e) + { + Popover.open(new Popover.Config(button_close, "Title", "Content\r\nContent\r\nContent") + { + Font = new Font("Microsoft YaHei UI", 9F, FontStyle.Regular, GraphicsUnit.Point), + AutoClose = 1 + }); + } + + private void button_base_Click(object sender, EventArgs e) + { + Popover.open(new Popover.Config(button_base, "Title", "Content\r\nContent\r\nContent") + { + Font = new Font("Microsoft YaHei UI", 9F, FontStyle.Regular, GraphicsUnit.Point), + }); + } + + private void button_popover_Click(object sender, EventArgs e) + { + var button = sender as AntdUI.Button; + var text = button.Text; + var align = TAlign.Bottom; + switch (text) + { + case "LT": + align = TAlign.LT; + break; + case "LB": + align = TAlign.LB; + break; + case "RT": + align = TAlign.RT; + break; + case "RB": + align = TAlign.RB; + break; + case "TL": + align = TAlign.TL; + break; + case "TR": + align = TAlign.TR; + break; + case "BL": + align = TAlign.BL; + break; + case "BR": + align = TAlign.BR; + break; + case "Top": + align = TAlign.Top; + break; + case "Bottom": + align = TAlign.Bottom; + break; + case "Left": + align = TAlign.Left; + break; + case "Right": + align = TAlign.Right; + break; + default: + align = TAlign.Bottom; + break; + } + + Popover.open(new Popover.Config(button, "Title", "Content\r\nContent\r\nContent") + { + Font = new Font("Microsoft YaHei UI", 9F, FontStyle.Regular, GraphicsUnit.Point), + AutoClose = 3, + ArrowSize = 12, + ArrowAlign = align, + }); + + } + } +} diff --git a/Views/PopoverDemo.resx b/Views/PopoverDemo.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Views/PopoverDemo.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/PreviewDemo.Designer.cs b/Views/PreviewDemo.Designer.cs new file mode 100644 index 0000000..4790e9a --- /dev/null +++ b/Views/PreviewDemo.Designer.cs @@ -0,0 +1,159 @@ +namespace AntdUIDemo.Views +{ + partial class PreviewDemo + { + /// + /// 必需的设计器变量。 + /// + 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.label4 = new AntdUI.Label(); + this.flowPanel1 = new AntdUI.FlowPanel(); + this.button_views = new AntdUI.Button(); + this.button_view = new AntdUI.Button(); + this.label3 = new AntdUI.Label(); + this.divider1 = new AntdUI.Divider(); + this.stackPanel1.SuspendLayout(); + this.flowPanel1.SuspendLayout(); + this.SuspendLayout(); + // + // stackPanel1 + // + this.stackPanel1.Controls.Add(this.flowPanel1); + this.stackPanel1.Controls.Add(this.label3); + this.stackPanel1.Controls.Add(this.divider1); + this.stackPanel1.Controls.Add(this.label4); + this.stackPanel1.Controls.Add(this.label2); + this.stackPanel1.Controls.Add(this.label1); + this.stackPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.stackPanel1.Location = new System.Drawing.Point(0, 0); + this.stackPanel1.Name = "stackPanel1"; + this.stackPanel1.Size = new System.Drawing.Size(700, 222); + this.stackPanel1.TabIndex = 0; + this.stackPanel1.Text = "stackPanel1"; + this.stackPanel1.Vertical = true; + // + // label2 + // + this.label2.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label2.Location = new System.Drawing.Point(3, 49); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(694, 24); + this.label2.TabIndex = 7; + this.label2.Text = "实现简单的图片预览。"; + // + // label1 + // + this.label1.Font = new System.Drawing.Font("Microsoft YaHei UI", 26.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label1.Location = new System.Drawing.Point(3, 3); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(694, 40); + this.label1.TabIndex = 6; + this.label1.Text = "Preview 图片预览"; + // + // label4 + // + this.label4.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + this.label4.Location = new System.Drawing.Point(3, 79); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(694, 24); + this.label4.TabIndex = 14; + this.label4.Text = "Preview没有工具箱控件,使用代码方式调用。"; + // + // flowPanel1 + // + this.flowPanel1.Controls.Add(this.button_views); + this.flowPanel1.Controls.Add(this.button_view); + this.flowPanel1.Location = new System.Drawing.Point(3, 157); + this.flowPanel1.Name = "flowPanel1"; + this.flowPanel1.Size = new System.Drawing.Size(694, 38); + this.flowPanel1.TabIndex = 19; + this.flowPanel1.Text = "flowPanel1"; + // + // button_views + // + this.button_views.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button_views.Location = new System.Drawing.Point(84, 3); + this.button_views.Name = "button_views"; + this.button_views.Size = new System.Drawing.Size(75, 32); + this.button_views.TabIndex = 2; + this.button_views.Text = "多图预览"; + this.button_views.Type = AntdUI.TTypeMini.Primary; + this.button_views.WaveSize = 0; + // + // button_view + // + this.button_view.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button_view.Location = new System.Drawing.Point(3, 3); + this.button_view.Name = "button_view"; + this.button_view.Size = new System.Drawing.Size(75, 32); + this.button_view.TabIndex = 1; + this.button_view.Text = "单图预览"; + this.button_view.Type = AntdUI.TTypeMini.Primary; + this.button_view.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, 127); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(694, 24); + this.label3.TabIndex = 18; + this.label3.Text = "基本用法"; + // + // divider1 + // + this.divider1.Location = new System.Drawing.Point(3, 109); + this.divider1.Name = "divider1"; + this.divider1.Size = new System.Drawing.Size(694, 12); + this.divider1.TabIndex = 17; + // + // PreviewDemo + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; + this.Controls.Add(this.stackPanel1); + this.Name = "PreviewDemo"; + this.Size = new System.Drawing.Size(700, 222); + this.stackPanel1.ResumeLayout(false); + this.flowPanel1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private AntdUI.StackPanel stackPanel1; + private AntdUI.Label label2; + private AntdUI.Label label1; + private AntdUI.Label label4; + private AntdUI.FlowPanel flowPanel1; + private AntdUI.Button button_views; + private AntdUI.Button button_view; + private AntdUI.Label label3; + private AntdUI.Divider divider1; + } +} diff --git a/Views/PreviewDemo.cs b/Views/PreviewDemo.cs new file mode 100644 index 0000000..51c643f --- /dev/null +++ b/Views/PreviewDemo.cs @@ -0,0 +1,41 @@ +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 PreviewDemo : UserControl + { + private AntdUI.Window window; + public PreviewDemo(AntdUI.Window _window) + { + window = _window; + InitializeComponent(); + BindEventHandler(); + } + + private void BindEventHandler() + { + button_view.Click += Button_view_Click; + button_views.Click += Button_views_Click; + } + + private void Button_views_Click(object sender, EventArgs e) + { + Preview.open(new Preview.Config(window, + [Properties.Resources.bg1, Properties.Resources.bg2, Properties.Resources.bg3])); + } + + private void Button_view_Click(object sender, EventArgs e) + { + Preview.open(new Preview.Config(window, Properties.Resources.bg1)); + } + } +} diff --git a/Views/PreviewDemo.resx b/Views/PreviewDemo.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Views/PreviewDemo.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/SegmentedDemo.Designer.cs b/Views/SegmentedDemo.Designer.cs new file mode 100644 index 0000000..af80a7a --- /dev/null +++ b/Views/SegmentedDemo.Designer.cs @@ -0,0 +1,319 @@ +namespace AntdUIDemo.Views +{ + partial class SegmentedDemo + { + /// + /// 必需的设计器变量。 + /// + 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() + { + AntdUI.SegmentedItem segmentedItem16 = new AntdUI.SegmentedItem(); + AntdUI.SegmentedItem segmentedItem17 = new AntdUI.SegmentedItem(); + AntdUI.SegmentedItem segmentedItem18 = new AntdUI.SegmentedItem(); + AntdUI.SegmentedItem segmentedItem19 = new AntdUI.SegmentedItem(); + AntdUI.SegmentedItem segmentedItem20 = new AntdUI.SegmentedItem(); + AntdUI.SegmentedItem segmentedItem11 = new AntdUI.SegmentedItem(); + AntdUI.SegmentedItem segmentedItem12 = new AntdUI.SegmentedItem(); + AntdUI.SegmentedItem segmentedItem13 = new AntdUI.SegmentedItem(); + AntdUI.SegmentedItem segmentedItem14 = new AntdUI.SegmentedItem(); + AntdUI.SegmentedItem segmentedItem15 = new AntdUI.SegmentedItem(); + AntdUI.SegmentedItem segmentedItem6 = new AntdUI.SegmentedItem(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SegmentedDemo)); + AntdUI.SegmentedItem segmentedItem7 = new AntdUI.SegmentedItem(); + AntdUI.SegmentedItem segmentedItem8 = new AntdUI.SegmentedItem(); + AntdUI.SegmentedItem segmentedItem9 = new AntdUI.SegmentedItem(); + AntdUI.SegmentedItem segmentedItem10 = new AntdUI.SegmentedItem(); + AntdUI.SegmentedItem segmentedItem1 = new AntdUI.SegmentedItem(); + AntdUI.SegmentedItem segmentedItem2 = new AntdUI.SegmentedItem(); + AntdUI.SegmentedItem segmentedItem3 = new AntdUI.SegmentedItem(); + AntdUI.SegmentedItem segmentedItem4 = new AntdUI.SegmentedItem(); + AntdUI.SegmentedItem segmentedItem5 = new AntdUI.SegmentedItem(); + this.stackPanel1 = new AntdUI.StackPanel(); + this.divider1 = new AntdUI.Divider(); + this.label2 = new AntdUI.Label(); + this.label1 = new AntdUI.Label(); + this.flowPanel1 = new AntdUI.FlowPanel(); + this.label3 = new AntdUI.Label(); + this.segmented1 = new AntdUI.Segmented(); + this.label4 = new AntdUI.Label(); + this.flowPanel2 = new AntdUI.FlowPanel(); + this.segmented2 = new AntdUI.Segmented(); + this.flowPanel3 = new AntdUI.FlowPanel(); + this.segmented3 = new AntdUI.Segmented(); + this.label5 = new AntdUI.Label(); + this.flowPanel4 = new AntdUI.FlowPanel(); + this.segmented4 = new AntdUI.Segmented(); + this.stackPanel1.SuspendLayout(); + this.flowPanel1.SuspendLayout(); + this.flowPanel2.SuspendLayout(); + this.flowPanel3.SuspendLayout(); + this.flowPanel4.SuspendLayout(); + this.SuspendLayout(); + // + // stackPanel1 + // + this.stackPanel1.Controls.Add(this.flowPanel4); + this.stackPanel1.Controls.Add(this.label5); + this.stackPanel1.Controls.Add(this.flowPanel3); + this.stackPanel1.Controls.Add(this.flowPanel2); + this.stackPanel1.Controls.Add(this.label4); + this.stackPanel1.Controls.Add(this.flowPanel1); + this.stackPanel1.Controls.Add(this.label3); + this.stackPanel1.Controls.Add(this.divider1); + this.stackPanel1.Controls.Add(this.label2); + this.stackPanel1.Controls.Add(this.label1); + this.stackPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.stackPanel1.Location = new System.Drawing.Point(0, 0); + this.stackPanel1.Name = "stackPanel1"; + this.stackPanel1.Size = new System.Drawing.Size(700, 434); + this.stackPanel1.TabIndex = 0; + this.stackPanel1.Text = "stackPanel1"; + this.stackPanel1.Vertical = true; + // + // divider1 + // + this.divider1.Location = new System.Drawing.Point(3, 79); + this.divider1.Name = "divider1"; + this.divider1.Size = new System.Drawing.Size(694, 12); + this.divider1.TabIndex = 20; + // + // label2 + // + this.label2.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label2.Location = new System.Drawing.Point(3, 49); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(694, 24); + this.label2.TabIndex = 19; + this.label2.Text = "用于展示多个选项并允许用户选择其中单个选项。"; + // + // label1 + // + this.label1.Font = new System.Drawing.Font("Microsoft YaHei UI", 26.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label1.Location = new System.Drawing.Point(3, 3); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(694, 40); + this.label1.TabIndex = 18; + this.label1.Text = "Segmented 分段控制器"; + // + // flowPanel1 + // + this.flowPanel1.Controls.Add(this.segmented1); + this.flowPanel1.Location = new System.Drawing.Point(3, 127); + this.flowPanel1.Name = "flowPanel1"; + this.flowPanel1.Size = new System.Drawing.Size(694, 38); + this.flowPanel1.TabIndex = 22; + this.flowPanel1.Text = "flowPanel1"; + // + // label3 + // + this.label3.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label3.Location = new System.Drawing.Point(3, 97); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(694, 24); + this.label3.TabIndex = 21; + this.label3.Text = "基本用法"; + // + // segmented1 + // + this.segmented1.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + this.segmented1.Full = true; + segmentedItem16.Text = "Daily"; + segmentedItem17.Text = "Weekly"; + segmentedItem18.Text = "Monthly"; + segmentedItem19.Text = "Quarterly"; + segmentedItem20.Text = "Yearly"; + this.segmented1.Items.Add(segmentedItem16); + this.segmented1.Items.Add(segmentedItem17); + this.segmented1.Items.Add(segmentedItem18); + this.segmented1.Items.Add(segmentedItem19); + this.segmented1.Items.Add(segmentedItem20); + this.segmented1.Location = new System.Drawing.Point(3, 3); + this.segmented1.Name = "segmented1"; + this.segmented1.SelectIndex = 0; + this.segmented1.Size = new System.Drawing.Size(500, 32); + this.segmented1.TabIndex = 0; + this.segmented1.Text = "segmented1"; + // + // label4 + // + this.label4.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label4.Location = new System.Drawing.Point(3, 171); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(694, 24); + this.label4.TabIndex = 23; + this.label4.Text = "图标"; + // + // flowPanel2 + // + this.flowPanel2.Controls.Add(this.segmented2); + this.flowPanel2.Location = new System.Drawing.Point(3, 201); + this.flowPanel2.Name = "flowPanel2"; + this.flowPanel2.Size = new System.Drawing.Size(694, 38); + this.flowPanel2.TabIndex = 24; + this.flowPanel2.Text = "flowPanel2"; + // + // segmented2 + // + this.segmented2.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + this.segmented2.Full = true; + this.segmented2.IconAlign = AntdUI.TAlignMini.Left; + segmentedItem11.IconSvg = resources.GetString("segmentedItem11.IconSvg"); + segmentedItem11.Text = "Daily"; + segmentedItem12.IconSvg = resources.GetString("segmentedItem12.IconSvg"); + segmentedItem12.Text = "Weekly"; + segmentedItem13.IconSvg = resources.GetString("segmentedItem13.IconSvg"); + segmentedItem13.Text = "Monthly"; + segmentedItem14.IconSvg = resources.GetString("segmentedItem14.IconSvg"); + segmentedItem14.Text = "Quarterly"; + segmentedItem15.IconSvg = resources.GetString("segmentedItem15.IconSvg"); + segmentedItem15.Text = "Yearly"; + this.segmented2.Items.Add(segmentedItem11); + this.segmented2.Items.Add(segmentedItem12); + this.segmented2.Items.Add(segmentedItem13); + this.segmented2.Items.Add(segmentedItem14); + this.segmented2.Items.Add(segmentedItem15); + this.segmented2.Location = new System.Drawing.Point(3, 3); + this.segmented2.Name = "segmented2"; + this.segmented2.SelectIndex = 0; + this.segmented2.Size = new System.Drawing.Size(500, 32); + this.segmented2.TabIndex = 0; + this.segmented2.Text = "segmented2"; + // + // flowPanel3 + // + this.flowPanel3.Controls.Add(this.segmented3); + this.flowPanel3.Location = new System.Drawing.Point(3, 245); + this.flowPanel3.Name = "flowPanel3"; + this.flowPanel3.Size = new System.Drawing.Size(694, 76); + this.flowPanel3.TabIndex = 25; + this.flowPanel3.Text = "flowPanel3"; + // + // segmented3 + // + this.segmented3.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + this.segmented3.Full = true; + segmentedItem6.IconActiveSvg = resources.GetString("segmentedItem6.IconActiveSvg"); + segmentedItem6.IconSvg = resources.GetString("segmentedItem6.IconSvg"); + segmentedItem6.Text = "Daily"; + segmentedItem7.IconActiveSvg = resources.GetString("segmentedItem7.IconActiveSvg"); + segmentedItem7.IconSvg = resources.GetString("segmentedItem7.IconSvg"); + segmentedItem7.Text = "Weekly"; + segmentedItem8.IconActiveSvg = resources.GetString("segmentedItem8.IconActiveSvg"); + segmentedItem8.IconSvg = resources.GetString("segmentedItem8.IconSvg"); + segmentedItem8.Text = "Monthly"; + segmentedItem9.IconActiveSvg = resources.GetString("segmentedItem9.IconActiveSvg"); + segmentedItem9.IconSvg = resources.GetString("segmentedItem9.IconSvg"); + segmentedItem9.Text = "Quarterly"; + segmentedItem10.IconActiveSvg = resources.GetString("segmentedItem10.IconActiveSvg"); + segmentedItem10.IconSvg = resources.GetString("segmentedItem10.IconSvg"); + segmentedItem10.Text = "Yearly"; + this.segmented3.Items.Add(segmentedItem6); + this.segmented3.Items.Add(segmentedItem7); + this.segmented3.Items.Add(segmentedItem8); + this.segmented3.Items.Add(segmentedItem9); + this.segmented3.Items.Add(segmentedItem10); + this.segmented3.Location = new System.Drawing.Point(3, 3); + this.segmented3.Name = "segmented3"; + this.segmented3.Size = new System.Drawing.Size(500, 70); + this.segmented3.TabIndex = 0; + this.segmented3.Text = "segmented3"; + // + // 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, 327); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(694, 24); + this.label5.TabIndex = 27; + this.label5.Text = "线条样式"; + // + // flowPanel4 + // + this.flowPanel4.Controls.Add(this.segmented4); + this.flowPanel4.Location = new System.Drawing.Point(3, 357); + this.flowPanel4.Name = "flowPanel4"; + this.flowPanel4.Size = new System.Drawing.Size(694, 38); + this.flowPanel4.TabIndex = 28; + this.flowPanel4.Text = "flowPanel4"; + // + // segmented4 + // + this.segmented4.BackActive = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(87)))), ((int)(((byte)(34))))); + this.segmented4.BarPadding = 8; + this.segmented4.BarRadius = 4; + this.segmented4.BarSize = 4F; + this.segmented4.BarStyle = true; + this.segmented4.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + this.segmented4.Full = true; + segmentedItem1.Text = "Daily"; + segmentedItem2.Text = "Weekly"; + segmentedItem3.Text = "Monthly"; + segmentedItem4.Text = "Quarterly"; + segmentedItem5.Text = "Yearly"; + this.segmented4.Items.Add(segmentedItem1); + this.segmented4.Items.Add(segmentedItem2); + this.segmented4.Items.Add(segmentedItem3); + this.segmented4.Items.Add(segmentedItem4); + this.segmented4.Items.Add(segmentedItem5); + this.segmented4.Location = new System.Drawing.Point(3, 3); + this.segmented4.Name = "segmented4"; + this.segmented4.SelectIndex = 0; + this.segmented4.Size = new System.Drawing.Size(500, 32); + this.segmented4.TabIndex = 0; + this.segmented4.Text = "segmented4"; + // + // SegmentedDemo + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; + this.Controls.Add(this.stackPanel1); + this.Name = "SegmentedDemo"; + this.Size = new System.Drawing.Size(700, 434); + this.stackPanel1.ResumeLayout(false); + this.flowPanel1.ResumeLayout(false); + this.flowPanel2.ResumeLayout(false); + this.flowPanel3.ResumeLayout(false); + this.flowPanel4.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private AntdUI.StackPanel stackPanel1; + private AntdUI.Divider divider1; + private AntdUI.Label label2; + private AntdUI.Label label1; + private AntdUI.FlowPanel flowPanel1; + private AntdUI.Label label3; + private AntdUI.Segmented segmented1; + private AntdUI.FlowPanel flowPanel2; + private AntdUI.Segmented segmented2; + private AntdUI.Label label4; + private AntdUI.FlowPanel flowPanel3; + private AntdUI.Segmented segmented3; + private AntdUI.FlowPanel flowPanel4; + private AntdUI.Segmented segmented4; + private AntdUI.Label label5; + } +} diff --git a/Views/SegmentedDemo.cs b/Views/SegmentedDemo.cs new file mode 100644 index 0000000..f112120 --- /dev/null +++ b/Views/SegmentedDemo.cs @@ -0,0 +1,20 @@ +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 SegmentedDemo : UserControl + { + public SegmentedDemo() + { + InitializeComponent(); + } + } +} diff --git a/Views/SegmentedDemo.resx b/Views/SegmentedDemo.resx new file mode 100644 index 0000000..8e13c89 --- /dev/null +++ b/Views/SegmentedDemo.resx @@ -0,0 +1,165 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + <svg viewBox="0 0 1024 1024"><path d="M911.945421 306.603008l-62.497894 36.07767c-17.62304 10.177843-40.14592 4.144435-50.315981-13.476966-10.177229-17.622323-4.143514-40.145306 13.469286-50.324173l62.422221-36.033638c-30.075187-43.229594-67.660698-80.808448-110.886912-110.890598l-36.04951 62.414541c-10.171085 17.621299-32.692941 23.654707-50.315981 13.486182-17.625088-10.177843-23.656755-32.700723-13.479526-50.322125L700.379443 95.037542c-46.631936-22.00105-97.723597-36.02135-151.551693-40.466637l0 72.03564c0 20.337152-16.480973 36.835942-36.837478 36.835942-20.336947 0-36.836454-16.49879-36.836454-36.835942L475.153818 54.56985c-53.817856 4.44631-104.912589 18.465587-151.533261 40.461517l36.089344 62.502502c10.170061 17.622323 4.134298 40.144282-13.488742 50.322125-17.611776 10.168627-40.14592 4.135219-50.325197-13.486182l-36.032102-62.414541c-43.23543 30.08215-80.811725 67.666125-110.89408 110.890598l62.410957 36.033638c17.624064 10.178867 23.656755 32.702771 13.488742 50.324173-10.170061 17.621299-32.703181 23.655731-50.327245 13.476966l-62.497894-36.071526c-26.967245 57.152717-42.104627 120.981402-42.104627 188.367155 0 244.134298 197.907354 442.041651 442.05056 442.041651 244.153446 0 442.066944-197.905408 442.066944-442.041651C954.05824 427.586458 938.919834 363.755725 911.945421 306.603008zM767.225549 642.319053c-81.385882 140.943053-261.623091 189.244109-402.584166 107.86775-140.962099-81.382502-189.253939-261.618483-107.864986-402.564608 81.37769-140.946125 261.624115-189.245133 402.584166-107.869798C800.302285 321.13705 848.603238 501.372928 767.225549 642.319053zM667.258778 305.542861 562.319565 482.312909c-10.170061 17.611059-32.694989 23.654707-50.325197 13.487206-17.6128-10.178867-23.655731-32.710963-13.478502-50.324173L603.857306 268.040704c-28.383539-11.459994-59.370598-17.823949-91.862938-17.823949-135.626342 0-245.582029 109.951181-245.582029 245.583258 0 135.619789 109.955686 245.571994 245.582029 245.571994 135.644774 0 245.593293-109.950157 245.593293-245.571994C757.587661 419.071488 722.381414 350.581658 667.258778 305.542861z"></path></svg> + + + <svg viewBox="0 0 1024 1024"><path d="M848.794624 939.156685 571.780416 939.156685 571.780416 653.17123l341.897539 0 0 221.100654C913.677926 909.960704 884.482867 939.156685 848.794624 939.156685zM571.780403 318.743552c-11.861606-3.210138-31.443354-8.36864-39.829709-16.176435-0.596582-0.561766-1.016218-1.246413-1.613824-1.841971-0.560845 0.596582-1.016218 1.280205-1.613824 1.841971-8.386355 7.807795-15.96631 12.965274-27.827917 16.176435l0 263.544325L141.030675 582.287877 141.030675 355.202884c0-35.687834 29.195059-64.882688 64.883302-64.882688l150.649125 0c-16.984474-9.525965-32.846438-20.56233-46.111027-32.932045-60.250624-56.144691-71.129907-137.062605-24.283034-180.767027 19.615539-18.264986 46.252237-27.124736 75.026739-27.124736 39.933133 0 83.972915 17.070797 118.995968 49.706086 20.353331 18.983322 37.722624 43.405619 50.145075 69.056819 12.457267-25.6512 29.791744-50.074419 50.180915-69.056819 35.022029-32.63529 79.062835-49.706086 118.994944-49.706086 28.74071 0 55.410176 8.860774 75.025715 27.124736 46.882611 43.704422 35.96759 124.622336-24.283034 180.767027-13.264589 12.368691-29.127578 23.40608-46.111027 32.932045l144.649234 0c35.688243 0 64.882278 29.195981 64.882278 64.882688l0 227.084948L571.780416 582.287833 571.780416 318.743508zM435.064218 147.625267c-21.476966-19.965747-49.094144-31.913882-73.868288-31.913882-7.404954 0-21.125018 1.211597-29.863322 9.386803-2.000691 1.824563-8.070144 7.439462-8.070144 21.369754 0 15.650406 8.492749 40.24873 32.319386 62.477926 29.124506 27.12576 77.202432 47.601152 111.76704 47.601152 12.176794 0 16.492237-2.666701 16.527053-2.702541C489.524736 242.54505 475.664486 185.453773 435.064218 147.625267zM577.78135 254.790963c0 0 0.034816-0.034816 0.069632-0.034816 0.807424 0 5.50871 1.790771 15.509914 1.790771 34.564608 0 82.64151-20.47529 111.76704-47.601152 23.826637-22.229299 32.283546-46.810112 32.283546-62.442189 0-13.930291-6.033613-19.562496-8.035328-21.404467-8.77312-8.17623-22.457344-9.386803-29.864346-9.386803-24.808038 0-52.390298 11.948134-73.867264 31.913882C585.325466 185.208218 571.358822 241.73865 577.78135 254.790963zM500.89513 939.156685 205.914017 939.156685c-35.688243 0-64.883302-29.195981-64.883302-64.883712L141.030714 653.17123l359.864462 0L500.895177 939.15666z"></path></svg> + + + <svg viewBox="0 0 1024 1024"><path d="M193.536 915.456l473.088 0 0 52.224q0 20.48-15.36 38.4t-45.056 17.92l-351.232 0q-26.624 0-44.032-16.384t-17.408-39.936l0-52.224zM829.44 488.448q34.816 0 67.584 4.608t55.296 19.968 32.256 44.032 0.512 77.824q-10.24 51.2-30.208 77.824t-46.08 38.4-56.32 11.776-61.952-2.048q-11.264 18.432-25.6 33.28t-30.72 28.672-33.28 28.672-34.304 33.28l-473.088 0q-22.528-31.744-50.176-53.248t-51.2-49.664-39.936-72.192-16.384-119.808l0-107.52q0-20.48 7.168-30.72t16.384-15.36q11.264-5.12 24.576-7.168l697.344 0q12.288 2.048 23.552 7.168 9.216 5.12 16.896 15.36t7.68 30.72l0 6.144zM251.904 349.184q-2.048 15.36-13.312 23.04t-24.064 7.68-23.552-7.68-10.752-23.04q0-35.84 3.584-58.88t6.656-43.52q5.12-29.696 17.92-50.176t26.624-37.376 25.088-32.768 14.336-37.376q4.096-30.72 5.632-48.64t5.12-26.624 10.752-10.752 23.552-2.048 23.552 11.776 8.192 29.696-2.048 37.888-6.144 35.328q-2.048 14.336-9.728 29.184t-17.92 30.72-20.48 31.232-18.432 29.696q-9.216 15.36-14.336 38.4t-10.24 74.24zM445.44 349.184q-2.048 15.36-13.312 23.04t-24.064 7.68-23.552-7.68-10.752-23.04q0-35.84 3.584-58.88t7.68-43.52q5.12-29.696 17.92-50.176t26.112-37.376 24.576-32.768 14.336-37.376q4.096-30.72 6.144-48.64t5.632-26.624 10.752-10.752 23.552-2.048 23.04 11.776 7.68 29.696-1.536 37.888-5.632 35.328q-3.072 14.336-10.752 29.184t-17.408 30.72-20.48 31.232-18.944 29.696q-9.216 15.36-14.336 38.4t-10.24 74.24zM640 349.184q-2.048 15.36-13.312 23.04t-24.064 7.68-23.552-7.68-10.752-23.04q0-35.84 3.072-58.88t7.168-43.52q5.12-29.696 17.92-50.176t26.624-37.376 25.088-32.768 14.336-37.376q4.096-30.72 5.632-48.64t5.12-26.624 10.752-10.752 23.552-2.048 23.552 11.776 8.192 29.696-2.048 37.888-6.144 35.328q-3.072 14.336-10.752 29.184t-17.408 30.72-19.968 31.232-18.432 29.696q-5.12 8.192-8.704 16.896t-6.144 21.504-4.608 30.72-5.12 43.52z"></path></svg> + + + <svg viewBox="0 0 1024 1024"><path d="M911.945421 306.603008l-62.497894 36.07767c-17.62304 10.177843-40.14592 4.144435-50.315981-13.476966-10.177229-17.622323-4.143514-40.145306 13.469286-50.324173l62.422221-36.033638c-30.075187-43.229594-67.660698-80.808448-110.886912-110.890598l-36.04951 62.414541c-10.171085 17.621299-32.692941 23.654707-50.315981 13.486182-17.625088-10.177843-23.656755-32.700723-13.479526-50.322125L700.379443 95.037542c-46.631936-22.00105-97.723597-36.02135-151.551693-40.466637l0 72.03564c0 20.337152-16.480973 36.835942-36.837478 36.835942-20.336947 0-36.836454-16.49879-36.836454-36.835942L475.153818 54.56985c-53.817856 4.44631-104.912589 18.465587-151.533261 40.461517l36.089344 62.502502c10.170061 17.622323 4.134298 40.144282-13.488742 50.322125-17.611776 10.168627-40.14592 4.135219-50.325197-13.486182l-36.032102-62.414541c-43.23543 30.08215-80.811725 67.666125-110.89408 110.890598l62.410957 36.033638c17.624064 10.178867 23.656755 32.702771 13.488742 50.324173-10.170061 17.621299-32.703181 23.655731-50.327245 13.476966l-62.497894-36.071526c-26.967245 57.152717-42.104627 120.981402-42.104627 188.367155 0 244.134298 197.907354 442.041651 442.05056 442.041651 244.153446 0 442.066944-197.905408 442.066944-442.041651C954.05824 427.586458 938.919834 363.755725 911.945421 306.603008zM767.225549 642.319053c-81.385882 140.943053-261.623091 189.244109-402.584166 107.86775-140.962099-81.382502-189.253939-261.618483-107.864986-402.564608 81.37769-140.946125 261.624115-189.245133 402.584166-107.869798C800.302285 321.13705 848.603238 501.372928 767.225549 642.319053zM667.258778 305.542861 562.319565 482.312909c-10.170061 17.611059-32.694989 23.654707-50.325197 13.487206-17.6128-10.178867-23.655731-32.710963-13.478502-50.324173L603.857306 268.040704c-28.383539-11.459994-59.370598-17.823949-91.862938-17.823949-135.626342 0-245.582029 109.951181-245.582029 245.583258 0 135.619789 109.955686 245.571994 245.582029 245.571994 135.644774 0 245.593293-109.950157 245.593293-245.571994C757.587661 419.071488 722.381414 350.581658 667.258778 305.542861z"></path></svg> + + + <svg viewBox="0 0 1086 1024"><path d="M321.214785 391.8002l455.224775-2.045954-218.917083 550.361638zM373.386613 192.31968l346.789211 3.068931 61.378621 134.00999-450.10989-3.068931zM274.157842 322.237762l-274.157842-114.573427 147.308691-109.458541 175.952048 91.044955zM0 274.157842l259.836164 115.596404 279.272727 546.26973zM841.91009 388.731269l243.468531-125.826174-512.511489 670.04995zM836.795205 321.214785l-68.539461-141.170829 156.515485-86.953047 135.032967 113.55045zM368.271728 124.803197l-59.332667-15.344655-111.504496-62.401598 130.941059-47.056943 427.604396 0 129.918082 54.217782-124.803197 60.355644-41.942058 10.22977-350.881119 0z"></path></svg> + + + <svg viewBox="0 0 1024 1024"><path d="M193.536 915.456l473.088 0 0 52.224q0 20.48-15.36 38.4t-45.056 17.92l-351.232 0q-26.624 0-44.032-16.384t-17.408-39.936l0-52.224zM829.44 488.448q34.816 0 67.584 4.608t55.296 19.968 32.256 44.032 0.512 77.824q-10.24 51.2-30.208 77.824t-46.08 38.4-56.32 11.776-61.952-2.048q-11.264 18.432-25.6 33.28t-30.72 28.672-33.28 28.672-34.304 33.28l-473.088 0q-22.528-31.744-50.176-53.248t-51.2-49.664-39.936-72.192-16.384-119.808l0-107.52q0-20.48 7.168-30.72t16.384-15.36q11.264-5.12 24.576-7.168l697.344 0q12.288 2.048 23.552 7.168 9.216 5.12 16.896 15.36t7.68 30.72l0 6.144zM251.904 349.184q-2.048 15.36-13.312 23.04t-24.064 7.68-23.552-7.68-10.752-23.04q0-35.84 3.584-58.88t6.656-43.52q5.12-29.696 17.92-50.176t26.624-37.376 25.088-32.768 14.336-37.376q4.096-30.72 5.632-48.64t5.12-26.624 10.752-10.752 23.552-2.048 23.552 11.776 8.192 29.696-2.048 37.888-6.144 35.328q-2.048 14.336-9.728 29.184t-17.92 30.72-20.48 31.232-18.432 29.696q-9.216 15.36-14.336 38.4t-10.24 74.24zM445.44 349.184q-2.048 15.36-13.312 23.04t-24.064 7.68-23.552-7.68-10.752-23.04q0-35.84 3.584-58.88t7.68-43.52q5.12-29.696 17.92-50.176t26.112-37.376 24.576-32.768 14.336-37.376q4.096-30.72 6.144-48.64t5.632-26.624 10.752-10.752 23.552-2.048 23.04 11.776 7.68 29.696-1.536 37.888-5.632 35.328q-3.072 14.336-10.752 29.184t-17.408 30.72-20.48 31.232-18.944 29.696q-9.216 15.36-14.336 38.4t-10.24 74.24zM640 349.184q-2.048 15.36-13.312 23.04t-24.064 7.68-23.552-7.68-10.752-23.04q0-35.84 3.072-58.88t7.168-43.52q5.12-29.696 17.92-50.176t26.624-37.376 25.088-32.768 14.336-37.376q4.096-30.72 5.632-48.64t5.12-26.624 10.752-10.752 23.552-2.048 23.552 11.776 8.192 29.696-2.048 37.888-6.144 35.328q-3.072 14.336-10.752 29.184t-17.408 30.72-19.968 31.232-18.432 29.696q-5.12 8.192-8.704 16.896t-6.144 21.504-4.608 30.72-5.12 43.52z"></path></svg> + + + <svg viewBox="0 0 1024 1024"><path d="M533.504 268.288q33.792-41.984 71.68-75.776 32.768-27.648 74.24-50.176t86.528-19.456q63.488 5.12 105.984 30.208t67.584 63.488 34.304 87.04 6.144 99.84-17.92 97.792-36.864 87.04-48.64 74.752-53.248 61.952q-40.96 41.984-85.504 78.336t-84.992 62.464-73.728 41.472-51.712 15.36q-20.48 1.024-52.224-14.336t-69.632-41.472-79.872-61.952-82.944-75.776q-26.624-25.6-57.344-59.392t-57.856-74.24-46.592-87.552-21.504-100.352 11.264-99.84 39.936-83.456 65.536-61.952 88.064-35.328q24.576-5.12 49.152-1.536t48.128 12.288 45.056 22.016 40.96 27.648q45.056 33.792 86.016 80.896z"></path></svg> + + + <svg viewBox="0 0 1086 1024"><path d="M321.214785 391.8002l455.224775-2.045954-218.917083 550.361638zM373.386613 192.31968l346.789211 3.068931 61.378621 134.00999-450.10989-3.068931zM274.157842 322.237762l-274.157842-114.573427 147.308691-109.458541 175.952048 91.044955zM0 274.157842l259.836164 115.596404 279.272727 546.26973zM841.91009 388.731269l243.468531-125.826174-512.511489 670.04995zM836.795205 321.214785l-68.539461-141.170829 156.515485-86.953047 135.032967 113.55045zM368.271728 124.803197l-59.332667-15.344655-111.504496-62.401598 130.941059-47.056943 427.604396 0 129.918082 54.217782-124.803197 60.355644-41.942058 10.22977-350.881119 0z"></path></svg> + + + <svg viewBox="0 0 1024 1024"><path d="M848.794624 939.156685 571.780416 939.156685 571.780416 653.17123l341.897539 0 0 221.100654C913.677926 909.960704 884.482867 939.156685 848.794624 939.156685zM571.780403 318.743552c-11.861606-3.210138-31.443354-8.36864-39.829709-16.176435-0.596582-0.561766-1.016218-1.246413-1.613824-1.841971-0.560845 0.596582-1.016218 1.280205-1.613824 1.841971-8.386355 7.807795-15.96631 12.965274-27.827917 16.176435l0 263.544325L141.030675 582.287877 141.030675 355.202884c0-35.687834 29.195059-64.882688 64.883302-64.882688l150.649125 0c-16.984474-9.525965-32.846438-20.56233-46.111027-32.932045-60.250624-56.144691-71.129907-137.062605-24.283034-180.767027 19.615539-18.264986 46.252237-27.124736 75.026739-27.124736 39.933133 0 83.972915 17.070797 118.995968 49.706086 20.353331 18.983322 37.722624 43.405619 50.145075 69.056819 12.457267-25.6512 29.791744-50.074419 50.180915-69.056819 35.022029-32.63529 79.062835-49.706086 118.994944-49.706086 28.74071 0 55.410176 8.860774 75.025715 27.124736 46.882611 43.704422 35.96759 124.622336-24.283034 180.767027-13.264589 12.368691-29.127578 23.40608-46.111027 32.932045l144.649234 0c35.688243 0 64.882278 29.195981 64.882278 64.882688l0 227.084948L571.780416 582.287833 571.780416 318.743508zM435.064218 147.625267c-21.476966-19.965747-49.094144-31.913882-73.868288-31.913882-7.404954 0-21.125018 1.211597-29.863322 9.386803-2.000691 1.824563-8.070144 7.439462-8.070144 21.369754 0 15.650406 8.492749 40.24873 32.319386 62.477926 29.124506 27.12576 77.202432 47.601152 111.76704 47.601152 12.176794 0 16.492237-2.666701 16.527053-2.702541C489.524736 242.54505 475.664486 185.453773 435.064218 147.625267zM577.78135 254.790963c0 0 0.034816-0.034816 0.069632-0.034816 0.807424 0 5.50871 1.790771 15.509914 1.790771 34.564608 0 82.64151-20.47529 111.76704-47.601152 23.826637-22.229299 32.283546-46.810112 32.283546-62.442189 0-13.930291-6.033613-19.562496-8.035328-21.404467-8.77312-8.17623-22.457344-9.386803-29.864346-9.386803-24.808038 0-52.390298 11.948134-73.867264 31.913882C585.325466 185.208218 571.358822 241.73865 577.78135 254.790963zM500.89513 939.156685 205.914017 939.156685c-35.688243 0-64.883302-29.195981-64.883302-64.883712L141.030714 653.17123l359.864462 0L500.895177 939.15666z"></path></svg> + + + <svg viewBox="0 0 1024 1024"><path d="M533.504 268.288q33.792-41.984 71.68-75.776 32.768-27.648 74.24-50.176t86.528-19.456q63.488 5.12 105.984 30.208t67.584 63.488 34.304 87.04 6.144 99.84-17.92 97.792-36.864 87.04-48.64 74.752-53.248 61.952q-40.96 41.984-85.504 78.336t-84.992 62.464-73.728 41.472-51.712 15.36q-20.48 1.024-52.224-14.336t-69.632-41.472-79.872-61.952-82.944-75.776q-26.624-25.6-57.344-59.392t-57.856-74.24-46.592-87.552-21.504-100.352 11.264-99.84 39.936-83.456 65.536-61.952 88.064-35.328q24.576-5.12 49.152-1.536t48.128 12.288 45.056 22.016 40.96 27.648q45.056 33.792 86.016 80.896z"></path></svg> + + + <svg viewBox="0 0 1024 1024"><path d="M848.794624 939.156685 571.780416 939.156685 571.780416 653.17123l341.897539 0 0 221.100654C913.677926 909.960704 884.482867 939.156685 848.794624 939.156685zM571.780403 318.743552c-11.861606-3.210138-31.443354-8.36864-39.829709-16.176435-0.596582-0.561766-1.016218-1.246413-1.613824-1.841971-0.560845 0.596582-1.016218 1.280205-1.613824 1.841971-8.386355 7.807795-15.96631 12.965274-27.827917 16.176435l0 263.544325L141.030675 582.287877 141.030675 355.202884c0-35.687834 29.195059-64.882688 64.883302-64.882688l150.649125 0c-16.984474-9.525965-32.846438-20.56233-46.111027-32.932045-60.250624-56.144691-71.129907-137.062605-24.283034-180.767027 19.615539-18.264986 46.252237-27.124736 75.026739-27.124736 39.933133 0 83.972915 17.070797 118.995968 49.706086 20.353331 18.983322 37.722624 43.405619 50.145075 69.056819 12.457267-25.6512 29.791744-50.074419 50.180915-69.056819 35.022029-32.63529 79.062835-49.706086 118.994944-49.706086 28.74071 0 55.410176 8.860774 75.025715 27.124736 46.882611 43.704422 35.96759 124.622336-24.283034 180.767027-13.264589 12.368691-29.127578 23.40608-46.111027 32.932045l144.649234 0c35.688243 0 64.882278 29.195981 64.882278 64.882688l0 227.084948L571.780416 582.287833 571.780416 318.743508zM435.064218 147.625267c-21.476966-19.965747-49.094144-31.913882-73.868288-31.913882-7.404954 0-21.125018 1.211597-29.863322 9.386803-2.000691 1.824563-8.070144 7.439462-8.070144 21.369754 0 15.650406 8.492749 40.24873 32.319386 62.477926 29.124506 27.12576 77.202432 47.601152 111.76704 47.601152 12.176794 0 16.492237-2.666701 16.527053-2.702541C489.524736 242.54505 475.664486 185.453773 435.064218 147.625267zM577.78135 254.790963c0 0 0.034816-0.034816 0.069632-0.034816 0.807424 0 5.50871 1.790771 15.509914 1.790771 34.564608 0 82.64151-20.47529 111.76704-47.601152 23.826637-22.229299 32.283546-46.810112 32.283546-62.442189 0-13.930291-6.033613-19.562496-8.035328-21.404467-8.77312-8.17623-22.457344-9.386803-29.864346-9.386803-24.808038 0-52.390298 11.948134-73.867264 31.913882C585.325466 185.208218 571.358822 241.73865 577.78135 254.790963zM500.89513 939.156685 205.914017 939.156685c-35.688243 0-64.883302-29.195981-64.883302-64.883712L141.030714 653.17123l359.864462 0L500.895177 939.15666z"></path></svg> + + + <svg viewBox="0 0 1024 1024"><path d="M911.945421 306.603008l-62.497894 36.07767c-17.62304 10.177843-40.14592 4.144435-50.315981-13.476966-10.177229-17.622323-4.143514-40.145306 13.469286-50.324173l62.422221-36.033638c-30.075187-43.229594-67.660698-80.808448-110.886912-110.890598l-36.04951 62.414541c-10.171085 17.621299-32.692941 23.654707-50.315981 13.486182-17.625088-10.177843-23.656755-32.700723-13.479526-50.322125L700.379443 95.037542c-46.631936-22.00105-97.723597-36.02135-151.551693-40.466637l0 72.03564c0 20.337152-16.480973 36.835942-36.837478 36.835942-20.336947 0-36.836454-16.49879-36.836454-36.835942L475.153818 54.56985c-53.817856 4.44631-104.912589 18.465587-151.533261 40.461517l36.089344 62.502502c10.170061 17.622323 4.134298 40.144282-13.488742 50.322125-17.611776 10.168627-40.14592 4.135219-50.325197-13.486182l-36.032102-62.414541c-43.23543 30.08215-80.811725 67.666125-110.89408 110.890598l62.410957 36.033638c17.624064 10.178867 23.656755 32.702771 13.488742 50.324173-10.170061 17.621299-32.703181 23.655731-50.327245 13.476966l-62.497894-36.071526c-26.967245 57.152717-42.104627 120.981402-42.104627 188.367155 0 244.134298 197.907354 442.041651 442.05056 442.041651 244.153446 0 442.066944-197.905408 442.066944-442.041651C954.05824 427.586458 938.919834 363.755725 911.945421 306.603008zM767.225549 642.319053c-81.385882 140.943053-261.623091 189.244109-402.584166 107.86775-140.962099-81.382502-189.253939-261.618483-107.864986-402.564608 81.37769-140.946125 261.624115-189.245133 402.584166-107.869798C800.302285 321.13705 848.603238 501.372928 767.225549 642.319053zM667.258778 305.542861 562.319565 482.312909c-10.170061 17.611059-32.694989 23.654707-50.325197 13.487206-17.6128-10.178867-23.655731-32.710963-13.478502-50.324173L603.857306 268.040704c-28.383539-11.459994-59.370598-17.823949-91.862938-17.823949-135.626342 0-245.582029 109.951181-245.582029 245.583258 0 135.619789 109.955686 245.571994 245.582029 245.571994 135.644774 0 245.593293-109.950157 245.593293-245.571994C757.587661 419.071488 722.381414 350.581658 667.258778 305.542861z"></path></svg> + + + <svg viewBox="0 0 1024 1024"><path d="M193.536 915.456l473.088 0 0 52.224q0 20.48-15.36 38.4t-45.056 17.92l-351.232 0q-26.624 0-44.032-16.384t-17.408-39.936l0-52.224zM829.44 488.448q34.816 0 67.584 4.608t55.296 19.968 32.256 44.032 0.512 77.824q-10.24 51.2-30.208 77.824t-46.08 38.4-56.32 11.776-61.952-2.048q-11.264 18.432-25.6 33.28t-30.72 28.672-33.28 28.672-34.304 33.28l-473.088 0q-22.528-31.744-50.176-53.248t-51.2-49.664-39.936-72.192-16.384-119.808l0-107.52q0-20.48 7.168-30.72t16.384-15.36q11.264-5.12 24.576-7.168l697.344 0q12.288 2.048 23.552 7.168 9.216 5.12 16.896 15.36t7.68 30.72l0 6.144zM251.904 349.184q-2.048 15.36-13.312 23.04t-24.064 7.68-23.552-7.68-10.752-23.04q0-35.84 3.584-58.88t6.656-43.52q5.12-29.696 17.92-50.176t26.624-37.376 25.088-32.768 14.336-37.376q4.096-30.72 5.632-48.64t5.12-26.624 10.752-10.752 23.552-2.048 23.552 11.776 8.192 29.696-2.048 37.888-6.144 35.328q-2.048 14.336-9.728 29.184t-17.92 30.72-20.48 31.232-18.432 29.696q-9.216 15.36-14.336 38.4t-10.24 74.24zM445.44 349.184q-2.048 15.36-13.312 23.04t-24.064 7.68-23.552-7.68-10.752-23.04q0-35.84 3.584-58.88t7.68-43.52q5.12-29.696 17.92-50.176t26.112-37.376 24.576-32.768 14.336-37.376q4.096-30.72 6.144-48.64t5.632-26.624 10.752-10.752 23.552-2.048 23.04 11.776 7.68 29.696-1.536 37.888-5.632 35.328q-3.072 14.336-10.752 29.184t-17.408 30.72-20.48 31.232-18.944 29.696q-9.216 15.36-14.336 38.4t-10.24 74.24zM640 349.184q-2.048 15.36-13.312 23.04t-24.064 7.68-23.552-7.68-10.752-23.04q0-35.84 3.072-58.88t7.168-43.52q5.12-29.696 17.92-50.176t26.624-37.376 25.088-32.768 14.336-37.376q4.096-30.72 5.632-48.64t5.12-26.624 10.752-10.752 23.552-2.048 23.552 11.776 8.192 29.696-2.048 37.888-6.144 35.328q-3.072 14.336-10.752 29.184t-17.408 30.72-19.968 31.232-18.432 29.696q-5.12 8.192-8.704 16.896t-6.144 21.504-4.608 30.72-5.12 43.52z"></path></svg> + + + <svg viewBox="0 0 1086 1024"><path d="M321.214785 391.8002l455.224775-2.045954-218.917083 550.361638zM373.386613 192.31968l346.789211 3.068931 61.378621 134.00999-450.10989-3.068931zM274.157842 322.237762l-274.157842-114.573427 147.308691-109.458541 175.952048 91.044955zM0 274.157842l259.836164 115.596404 279.272727 546.26973zM841.91009 388.731269l243.468531-125.826174-512.511489 670.04995zM836.795205 321.214785l-68.539461-141.170829 156.515485-86.953047 135.032967 113.55045zM368.271728 124.803197l-59.332667-15.344655-111.504496-62.401598 130.941059-47.056943 427.604396 0 129.918082 54.217782-124.803197 60.355644-41.942058 10.22977-350.881119 0z"></path></svg> + + + <svg viewBox="0 0 1024 1024"><path d="M533.504 268.288q33.792-41.984 71.68-75.776 32.768-27.648 74.24-50.176t86.528-19.456q63.488 5.12 105.984 30.208t67.584 63.488 34.304 87.04 6.144 99.84-17.92 97.792-36.864 87.04-48.64 74.752-53.248 61.952q-40.96 41.984-85.504 78.336t-84.992 62.464-73.728 41.472-51.712 15.36q-20.48 1.024-52.224-14.336t-69.632-41.472-79.872-61.952-82.944-75.776q-26.624-25.6-57.344-59.392t-57.856-74.24-46.592-87.552-21.504-100.352 11.264-99.84 39.936-83.456 65.536-61.952 88.064-35.328q24.576-5.12 49.152-1.536t48.128 12.288 45.056 22.016 40.96 27.648q45.056 33.792 86.016 80.896z"></path></svg> + + \ No newline at end of file diff --git a/Views/SwitchDemo.Designer.cs b/Views/SwitchDemo.Designer.cs index 1cd3084..a2efd16 100644 --- a/Views/SwitchDemo.Designer.cs +++ b/Views/SwitchDemo.Designer.cs @@ -29,26 +29,26 @@ private void InitializeComponent() { this.stackPanel1 = new AntdUI.StackPanel(); + this.flowPanel2 = new AntdUI.FlowPanel(); + this.switch6 = new AntdUI.Switch(); + this.switch5 = new AntdUI.Switch(); + this.switch7 = new AntdUI.Switch(); + this.switch8 = new AntdUI.Switch(); + this.label4 = new AntdUI.Label(); + this.flowPanel1 = new AntdUI.FlowPanel(); + this.switch9 = new AntdUI.Switch(); + this.switch10 = new AntdUI.Switch(); + this.switch3 = new AntdUI.Switch(); + this.switch4 = new AntdUI.Switch(); + this.switch2 = new AntdUI.Switch(); + this.switch1 = new AntdUI.Switch(); + this.label3 = new AntdUI.Label(); this.divider1 = new AntdUI.Divider(); this.label2 = new AntdUI.Label(); this.label1 = new AntdUI.Label(); - this.label3 = new AntdUI.Label(); - this.flowPanel1 = new AntdUI.FlowPanel(); - this.switch1 = new AntdUI.Switch(); - this.switch2 = new AntdUI.Switch(); - this.switch4 = new AntdUI.Switch(); - this.switch3 = new AntdUI.Switch(); - this.label4 = new AntdUI.Label(); - this.flowPanel2 = new AntdUI.FlowPanel(); - this.switch7 = new AntdUI.Switch(); - this.switch8 = new AntdUI.Switch(); - this.switch5 = new AntdUI.Switch(); - this.switch6 = new AntdUI.Switch(); - this.switch9 = new AntdUI.Switch(); - this.switch10 = new AntdUI.Switch(); this.stackPanel1.SuspendLayout(); - this.flowPanel1.SuspendLayout(); this.flowPanel2.SuspendLayout(); + this.flowPanel1.SuspendLayout(); this.SuspendLayout(); // // stackPanel1 @@ -68,104 +68,6 @@ this.stackPanel1.Text = "stackPanel1"; this.stackPanel1.Vertical = true; // - // divider1 - // - this.divider1.Location = new System.Drawing.Point(3, 79); - this.divider1.Name = "divider1"; - this.divider1.Size = new System.Drawing.Size(694, 12); - this.divider1.TabIndex = 19; - // - // label2 - // - this.label2.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(3, 49); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(694, 24); - this.label2.TabIndex = 18; - this.label2.Text = "使用开关切换两种状态之间。"; - // - // label1 - // - this.label1.Font = new System.Drawing.Font("Microsoft YaHei UI", 26.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label1.Location = new System.Drawing.Point(3, 3); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(694, 40); - this.label1.TabIndex = 17; - this.label1.Text = "Switch 开关"; - // - // label3 - // - this.label3.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label3.Location = new System.Drawing.Point(3, 97); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(694, 24); - this.label3.TabIndex = 20; - this.label3.Text = "基本用法"; - // - // flowPanel1 - // - this.flowPanel1.Controls.Add(this.switch9); - this.flowPanel1.Controls.Add(this.switch10); - this.flowPanel1.Controls.Add(this.switch3); - this.flowPanel1.Controls.Add(this.switch4); - this.flowPanel1.Controls.Add(this.switch2); - this.flowPanel1.Controls.Add(this.switch1); - this.flowPanel1.Gap = 6; - this.flowPanel1.Location = new System.Drawing.Point(3, 127); - this.flowPanel1.Name = "flowPanel1"; - this.flowPanel1.Size = new System.Drawing.Size(694, 38); - this.flowPanel1.TabIndex = 21; - this.flowPanel1.Text = "flowPanel1"; - // - // switch1 - // - this.switch1.AutoCheck = true; - this.switch1.Location = new System.Drawing.Point(3, 3); - this.switch1.Name = "switch1"; - this.switch1.Size = new System.Drawing.Size(60, 32); - this.switch1.TabIndex = 0; - this.switch1.Text = "switch1"; - // - // switch2 - // - this.switch2.AutoCheck = true; - this.switch2.Checked = true; - this.switch2.Location = new System.Drawing.Point(75, 3); - this.switch2.Name = "switch2"; - this.switch2.Size = new System.Drawing.Size(60, 32); - this.switch2.TabIndex = 1; - this.switch2.Text = "switch2"; - // - // switch4 - // - this.switch4.AutoCheck = true; - this.switch4.Enabled = false; - this.switch4.Location = new System.Drawing.Point(147, 3); - this.switch4.Name = "switch4"; - this.switch4.Size = new System.Drawing.Size(60, 32); - this.switch4.TabIndex = 3; - this.switch4.Text = "switch4"; - // - // switch3 - // - this.switch3.AutoCheck = true; - this.switch3.Checked = true; - this.switch3.Enabled = false; - this.switch3.Location = new System.Drawing.Point(219, 3); - this.switch3.Name = "switch3"; - this.switch3.Size = new System.Drawing.Size(60, 32); - this.switch3.TabIndex = 4; - this.switch3.Text = "switch3"; - // - // label4 - // - this.label4.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label4.Location = new System.Drawing.Point(3, 171); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(694, 24); - this.label4.TabIndex = 22; - this.label4.Text = "文字提示"; - // // flowPanel2 // this.flowPanel2.Controls.Add(this.switch6); @@ -179,6 +81,38 @@ this.flowPanel2.TabIndex = 23; this.flowPanel2.Text = "flowPanel2"; // + // switch6 + // + this.switch6.AutoCheck = true; + this.switch6.CheckedText = "True"; + this.switch6.Fill = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(87)))), ((int)(((byte)(34))))); + this.switch6.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + this.switch6.Gap = 6; + this.switch6.Location = new System.Drawing.Point(219, 3); + this.switch6.Name = "switch6"; + this.switch6.Size = new System.Drawing.Size(60, 32); + this.switch6.TabIndex = 7; + this.switch6.Text = "switch6"; + this.switch6.UnCheckedText = "False"; + this.switch6.WaveSize = 0; + // + // switch5 + // + this.switch5.AutoCheck = true; + this.switch5.Checked = true; + this.switch5.CheckedText = "是"; + this.switch5.Fill = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(87)))), ((int)(((byte)(34))))); + this.switch5.FillHover = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(133)))), ((int)(((byte)(34))))); + this.switch5.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + this.switch5.Gap = 6; + this.switch5.Location = new System.Drawing.Point(147, 3); + this.switch5.Name = "switch5"; + this.switch5.Size = new System.Drawing.Size(60, 32); + this.switch5.TabIndex = 6; + this.switch5.Text = "switch5"; + this.switch5.UnCheckedText = "否"; + this.switch5.WaveSize = 0; + // // switch7 // this.switch7.AutoCheck = true; @@ -204,43 +138,36 @@ this.switch8.Text = "switch8"; this.switch8.UnCheckedText = "关"; // - // switch5 + // label4 // - this.switch5.AutoCheck = true; - this.switch5.Checked = true; - this.switch5.CheckedText = "是"; - this.switch5.Fill = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(87)))), ((int)(((byte)(34))))); - this.switch5.FillHover = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(133)))), ((int)(((byte)(34))))); - this.switch5.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); - this.switch5.Gap = 6; - this.switch5.Location = new System.Drawing.Point(147, 3); - this.switch5.Name = "switch5"; - this.switch5.Size = new System.Drawing.Size(60, 32); - this.switch5.TabIndex = 6; - this.switch5.Text = "switch5"; - this.switch5.UnCheckedText = "否"; - this.switch5.WaveSize = 0; + this.label4.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label4.Location = new System.Drawing.Point(3, 171); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(694, 24); + this.label4.TabIndex = 22; + this.label4.Text = "文字提示"; // - // switch6 + // flowPanel1 // - this.switch6.AutoCheck = true; - this.switch6.CheckedText = "True"; - this.switch6.Fill = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(87)))), ((int)(((byte)(34))))); - this.switch6.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); - this.switch6.Gap = 6; - this.switch6.Location = new System.Drawing.Point(219, 3); - this.switch6.Name = "switch6"; - this.switch6.Size = new System.Drawing.Size(60, 32); - this.switch6.TabIndex = 7; - this.switch6.Text = "switch6"; - this.switch6.UnCheckedText = "False"; - this.switch6.WaveSize = 0; + this.flowPanel1.Controls.Add(this.switch9); + this.flowPanel1.Controls.Add(this.switch10); + this.flowPanel1.Controls.Add(this.switch3); + this.flowPanel1.Controls.Add(this.switch4); + this.flowPanel1.Controls.Add(this.switch2); + this.flowPanel1.Controls.Add(this.switch1); + this.flowPanel1.Gap = 6; + this.flowPanel1.Location = new System.Drawing.Point(3, 127); + this.flowPanel1.Name = "flowPanel1"; + this.flowPanel1.Size = new System.Drawing.Size(694, 38); + this.flowPanel1.TabIndex = 21; + this.flowPanel1.Text = "flowPanel1"; // // switch9 // this.switch9.AutoCheck = true; this.switch9.CheckedText = ""; this.switch9.Fill = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(87)))), ((int)(((byte)(34))))); + this.switch9.FillHover = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(133)))), ((int)(((byte)(34))))); this.switch9.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); this.switch9.Gap = 6; this.switch9.Location = new System.Drawing.Point(363, 3); @@ -268,6 +195,80 @@ this.switch10.UnCheckedText = ""; this.switch10.WaveSize = 0; // + // switch3 + // + this.switch3.AutoCheck = true; + this.switch3.Checked = true; + this.switch3.Enabled = false; + this.switch3.Location = new System.Drawing.Point(219, 3); + this.switch3.Name = "switch3"; + this.switch3.Size = new System.Drawing.Size(60, 32); + this.switch3.TabIndex = 4; + this.switch3.Text = "switch3"; + // + // switch4 + // + this.switch4.AutoCheck = true; + this.switch4.Enabled = false; + this.switch4.Location = new System.Drawing.Point(147, 3); + this.switch4.Name = "switch4"; + this.switch4.Size = new System.Drawing.Size(60, 32); + this.switch4.TabIndex = 3; + this.switch4.Text = "switch4"; + // + // switch2 + // + this.switch2.AutoCheck = true; + this.switch2.Checked = true; + this.switch2.Location = new System.Drawing.Point(75, 3); + this.switch2.Name = "switch2"; + this.switch2.Size = new System.Drawing.Size(60, 32); + this.switch2.TabIndex = 1; + this.switch2.Text = "switch2"; + // + // switch1 + // + this.switch1.AutoCheck = true; + this.switch1.Location = new System.Drawing.Point(3, 3); + this.switch1.Name = "switch1"; + this.switch1.Size = new System.Drawing.Size(60, 32); + this.switch1.TabIndex = 0; + this.switch1.Text = "switch1"; + // + // label3 + // + this.label3.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label3.Location = new System.Drawing.Point(3, 97); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(694, 24); + this.label3.TabIndex = 20; + this.label3.Text = "基本用法"; + // + // divider1 + // + this.divider1.Location = new System.Drawing.Point(3, 79); + this.divider1.Name = "divider1"; + this.divider1.Size = new System.Drawing.Size(694, 12); + this.divider1.TabIndex = 19; + // + // label2 + // + this.label2.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label2.Location = new System.Drawing.Point(3, 49); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(694, 24); + this.label2.TabIndex = 18; + this.label2.Text = "使用开关切换两种状态之间。"; + // + // label1 + // + this.label1.Font = new System.Drawing.Font("Microsoft YaHei UI", 26.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label1.Location = new System.Drawing.Point(3, 3); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(694, 40); + this.label1.TabIndex = 17; + this.label1.Text = "Switch 开关"; + // // SwitchDemo // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; @@ -275,8 +276,8 @@ this.Name = "SwitchDemo"; this.Size = new System.Drawing.Size(700, 458); this.stackPanel1.ResumeLayout(false); - this.flowPanel1.ResumeLayout(false); this.flowPanel2.ResumeLayout(false); + this.flowPanel1.ResumeLayout(false); this.ResumeLayout(false); }