From 638fca0e74646310152cce0b03043157d5febbda Mon Sep 17 00:00:00 2001 From: czz_y Date: Tue, 21 Jan 2025 08:59:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8F=B3=E9=94=AETabs?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E6=89=80=E6=9C=89=E9=80=89=E9=A1=B9=E5=8D=A1?= =?UTF-8?q?=E5=86=8D=E6=AC=A1=E7=82=B9=E5=87=BB=E8=8F=9C=E5=8D=95=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E7=A9=BA=E7=99=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MainWindow.Designer.cs | 8 ++++---- MainWindow.cs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/MainWindow.Designer.cs b/MainWindow.Designer.cs index 0baeeab..f63f11b 100644 --- a/MainWindow.Designer.cs +++ b/MainWindow.Designer.cs @@ -29,7 +29,7 @@ private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainWindow)); - AntdUI.Tabs.StyleCard styleCard2 = new AntdUI.Tabs.StyleCard(); + AntdUI.Tabs.StyleCard styleCard1 = new AntdUI.Tabs.StyleCard(); this.titlebar = new AntdUI.PageHeader(); this.input_search = new AntdUI.Input(); this.dropdown_translate = new AntdUI.Dropdown(); @@ -63,7 +63,7 @@ this.titlebar.Size = new System.Drawing.Size(1024, 40); this.titlebar.SubText = "Demo"; this.titlebar.TabIndex = 0; - this.titlebar.Text = "AntdUI"; + this.titlebar.Text = "AntdUI 1.8.4"; // // input_search // @@ -153,8 +153,8 @@ this.tabs.Name = "tabs"; this.tabs.Pages.Add(this.tabPage); this.tabs.Size = new System.Drawing.Size(954, 560); - styleCard2.Closable = true; - this.tabs.Style = styleCard2; + styleCard1.Closable = true; + this.tabs.Style = styleCard1; this.tabs.TabIndex = 9; this.tabs.Type = AntdUI.TabType.Card; // diff --git a/MainWindow.cs b/MainWindow.cs index d129081..3609c0f 100644 --- a/MainWindow.cs +++ b/MainWindow.cs @@ -90,6 +90,7 @@ namespace AntdUIDemo { if (item.Text == closeall) { + tabs.SelectedIndex = 0; // 只清除从第二个页面开始的控件 for (int i = 1; i < tabs.Pages.Count; i++) { @@ -101,7 +102,6 @@ namespace AntdUIDemo { tabs.Pages.RemoveRange(1, tabs.Pages.Count - 1); // 从索引1开始,移除后面的所有页面 } - tabs.SelectedIndex = 0; } }, menulist);