From c888cc778c0e75e0810ade6d15b88362af34a597 Mon Sep 17 00:00:00 2001 From: czz_y Date: Sat, 14 Sep 2024 12:59:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9EBreadcrumb=E9=9D=A2=E5=8C=85?= =?UTF-8?q?=E5=B1=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MainWindow.cs | 3 + Models/DataUtil.cs | 1 + README.md | 2 + Views/BreadcrumbDemo.Designer.cs | 172 +++++++++++++++++++++++++++++++ Views/BreadcrumbDemo.cs | 20 ++++ Views/BreadcrumbDemo.resx | 120 +++++++++++++++++++++ 6 files changed, 318 insertions(+) create mode 100644 Views/BreadcrumbDemo.Designer.cs create mode 100644 Views/BreadcrumbDemo.cs create mode 100644 Views/BreadcrumbDemo.resx diff --git a/MainWindow.cs b/MainWindow.cs index f5c9afc..d51dcf7 100644 --- a/MainWindow.cs +++ b/MainWindow.cs @@ -170,6 +170,9 @@ namespace AntdUIDemo case "StackPanel": control = new StackPanelDemo(); break; + case "Breadcrumb": + control = new BreadcrumbDemo(); + break; case "Dropdown": control = new DropDownDemo(); break; diff --git a/Models/DataUtil.cs b/Models/DataUtil.cs index 740f73d..b20f899 100644 --- a/Models/DataUtil.cs +++ b/Models/DataUtil.cs @@ -28,6 +28,7 @@ namespace AntdUIDemo.Models }, { "导航", new List { + new MenuItems { Text = "Breadcrumb 面包屑", Tag = "Breadcrumb"}, new MenuItems { Text = "Dropdown 下拉菜单", Tag = "Dropdown"}, new MenuItems { Text = "Menu 导航菜单", Tag = "Menu"}, new MenuItems { Text = "Pagination 分页", Tag = "Pagination"}, diff --git a/README.md b/README.md index d0704b8..7172252 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,8 @@ #### VirtualPanel 虚拟布局 ### 导航 +#### Breadcrumb 面包屑 +![Breadcrumb](assets/screenshots/Breadcrumb.png) #### Dropdown 下拉菜单 ![Dropdown](assets/screenshots/Dropdown.png) #### Menu 导航菜单 diff --git a/Views/BreadcrumbDemo.Designer.cs b/Views/BreadcrumbDemo.Designer.cs new file mode 100644 index 0000000..ddd98f1 --- /dev/null +++ b/Views/BreadcrumbDemo.Designer.cs @@ -0,0 +1,172 @@ +namespace AntdUIDemo.Views +{ + partial class BreadcrumbDemo + { + /// + /// 必需的设计器变量。 + /// + 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.BreadcrumbItem breadcrumbItem8 = new AntdUI.BreadcrumbItem(); + AntdUI.BreadcrumbItem breadcrumbItem9 = new AntdUI.BreadcrumbItem(); + AntdUI.BreadcrumbItem breadcrumbItem10 = new AntdUI.BreadcrumbItem(); + AntdUI.BreadcrumbItem breadcrumbItem11 = new AntdUI.BreadcrumbItem(); + AntdUI.BreadcrumbItem breadcrumbItem12 = new AntdUI.BreadcrumbItem(); + AntdUI.BreadcrumbItem breadcrumbItem13 = new AntdUI.BreadcrumbItem(); + AntdUI.BreadcrumbItem breadcrumbItem14 = new AntdUI.BreadcrumbItem(); + this.stackPanel1 = new AntdUI.StackPanel(); + this.label4 = new AntdUI.Label(); + this.divider1 = new AntdUI.Divider(); + this.label2 = new AntdUI.Label(); + this.label1 = new AntdUI.Label(); + this.breadcrumb1 = new AntdUI.Breadcrumb(); + this.label3 = new AntdUI.Label(); + this.breadcrumb2 = new AntdUI.Breadcrumb(); + this.stackPanel1.SuspendLayout(); + this.SuspendLayout(); + // + // stackPanel1 + // + this.stackPanel1.Controls.Add(this.breadcrumb2); + this.stackPanel1.Controls.Add(this.label3); + this.stackPanel1.Controls.Add(this.breadcrumb1); + this.stackPanel1.Controls.Add(this.label4); + 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, 505); + this.stackPanel1.TabIndex = 0; + this.stackPanel1.Text = "stackPanel1"; + this.stackPanel1.Vertical = true; + // + // 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, 97); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(694, 24); + this.label4.TabIndex = 46; + this.label4.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 = 45; + // + // 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 = 44; + 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 = 43; + this.label1.Text = "Breadcrumb 面包屑"; + // + // breadcrumb1 + // + this.breadcrumb1.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + breadcrumbItem8.ID = null; + breadcrumbItem8.Text = "Home"; + breadcrumbItem9.ID = null; + breadcrumbItem9.Text = "Application Center"; + breadcrumbItem10.ID = null; + breadcrumbItem10.Text = "Application List"; + breadcrumbItem11.ID = null; + breadcrumbItem11.Text = "An Application"; + this.breadcrumb1.Items.Add(breadcrumbItem8); + this.breadcrumb1.Items.Add(breadcrumbItem9); + this.breadcrumb1.Items.Add(breadcrumbItem10); + this.breadcrumb1.Items.Add(breadcrumbItem11); + this.breadcrumb1.Location = new System.Drawing.Point(3, 127); + this.breadcrumb1.Name = "breadcrumb1"; + this.breadcrumb1.Size = new System.Drawing.Size(694, 32); + this.breadcrumb1.TabIndex = 47; + this.breadcrumb1.Text = "breadcrumb1"; + // + // 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, 165); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(694, 24); + this.label3.TabIndex = 48; + this.label3.Text = "图标"; + // + // breadcrumb2 + // + this.breadcrumb2.Font = new System.Drawing.Font("Microsoft YaHei UI", 9F); + breadcrumbItem12.IconSvg = "HomeOutlined"; + breadcrumbItem12.ID = null; + breadcrumbItem12.Text = ""; + breadcrumbItem13.IconSvg = "UserOutlined"; + breadcrumbItem13.ID = null; + breadcrumbItem13.Text = "Application Center"; + breadcrumbItem14.ID = null; + breadcrumbItem14.Text = "Application"; + this.breadcrumb2.Items.Add(breadcrumbItem12); + this.breadcrumb2.Items.Add(breadcrumbItem13); + this.breadcrumb2.Items.Add(breadcrumbItem14); + this.breadcrumb2.Location = new System.Drawing.Point(3, 195); + this.breadcrumb2.Name = "breadcrumb2"; + this.breadcrumb2.Size = new System.Drawing.Size(694, 32); + this.breadcrumb2.TabIndex = 49; + this.breadcrumb2.Text = "breadcrumb2"; + // + // BreadcrumbDemo + // + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; + this.Controls.Add(this.stackPanel1); + this.Name = "BreadcrumbDemo"; + this.Size = new System.Drawing.Size(700, 505); + this.stackPanel1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private AntdUI.StackPanel stackPanel1; + private AntdUI.Label label4; + private AntdUI.Divider divider1; + private AntdUI.Label label2; + private AntdUI.Label label1; + private AntdUI.Breadcrumb breadcrumb1; + private AntdUI.Breadcrumb breadcrumb2; + private AntdUI.Label label3; + } +} diff --git a/Views/BreadcrumbDemo.cs b/Views/BreadcrumbDemo.cs new file mode 100644 index 0000000..80e0250 --- /dev/null +++ b/Views/BreadcrumbDemo.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 BreadcrumbDemo : UserControl + { + public BreadcrumbDemo() + { + InitializeComponent(); + } + } +} diff --git a/Views/BreadcrumbDemo.resx b/Views/BreadcrumbDemo.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Views/BreadcrumbDemo.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