diff --git a/Source/GrasscutterTools/Forms/FormMain.Designer.cs b/Source/GrasscutterTools/Forms/FormMain.Designer.cs
index 46e39e4..c865c5f 100644
--- a/Source/GrasscutterTools/Forms/FormMain.Designer.cs
+++ b/Source/GrasscutterTools/Forms/FormMain.Designer.cs
@@ -39,6 +39,7 @@ namespace GrasscutterTools.Forms
this.GrpCommand = new System.Windows.Forms.GroupBox();
this.BtnInvokeOpenCommand = new System.Windows.Forms.Button();
this.MenuSpawnEntityFilter = new System.Windows.Forms.ContextMenuStrip(this.components);
+ this.LblClearFilter = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.NavContainer)).BeginInit();
this.NavContainer.Panel1.SuspendLayout();
this.NavContainer.Panel2.SuspendLayout();
@@ -85,6 +86,7 @@ namespace GrasscutterTools.Forms
this.CmbCommand.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
this.CmbCommand.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.CmbCommand.Name = "CmbCommand";
+ this.CmbCommand.TextChanged += new System.EventHandler(this.CmbCommand_TextChanged);
this.CmbCommand.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TxtCommand_KeyDown);
//
// BtnCopy
@@ -103,6 +105,7 @@ namespace GrasscutterTools.Forms
// GrpCommand
//
resources.ApplyResources(this.GrpCommand, "GrpCommand");
+ this.GrpCommand.Controls.Add(this.LblClearFilter);
this.GrpCommand.Controls.Add(this.BtnInvokeOpenCommand);
this.GrpCommand.Controls.Add(this.BtnCopy);
this.GrpCommand.Controls.Add(this.ChkAutoCopy);
@@ -122,6 +125,14 @@ namespace GrasscutterTools.Forms
this.MenuSpawnEntityFilter.Name = "MenuSpawnEntityFilter";
resources.ApplyResources(this.MenuSpawnEntityFilter, "MenuSpawnEntityFilter");
//
+ // LblClearFilter
+ //
+ resources.ApplyResources(this.LblClearFilter, "LblClearFilter");
+ this.LblClearFilter.BackColor = System.Drawing.Color.White;
+ this.LblClearFilter.Cursor = System.Windows.Forms.Cursors.Hand;
+ this.LblClearFilter.Name = "LblClearFilter";
+ this.LblClearFilter.Click += new System.EventHandler(this.LblClearFilter_Click);
+ //
// FormMain
//
resources.ApplyResources(this, "$this");
@@ -154,5 +165,6 @@ namespace GrasscutterTools.Forms
private System.Windows.Forms.ContextMenuStrip MenuSpawnEntityFilter;
private System.Windows.Forms.ListBox ListPages;
private System.Windows.Forms.SplitContainer NavContainer;
+ private System.Windows.Forms.Label LblClearFilter;
}
}
diff --git a/Source/GrasscutterTools/Forms/FormMain.cs b/Source/GrasscutterTools/Forms/FormMain.cs
index 47534f8..22f9f5f 100644
--- a/Source/GrasscutterTools/Forms/FormMain.cs
+++ b/Source/GrasscutterTools/Forms/FormMain.cs
@@ -765,5 +765,22 @@ namespace GrasscutterTools.Forms
}
#endregion - 通用 General -
+
+
+ ///
+ /// 命令栏文本改变时触发
+ ///
+ private void CmbCommand_TextChanged(object sender, EventArgs e)
+ {
+ LblClearFilter.Visible = CmbCommand.Text.Length > 0;
+ }
+
+ ///
+ /// 点击清空命令栏标签时触发
+ ///
+ private void LblClearFilter_Click(object sender, EventArgs e)
+ {
+ CmbCommand.Text = "";
+ }
}
}
\ No newline at end of file
diff --git a/Source/GrasscutterTools/Forms/FormMain.resx b/Source/GrasscutterTools/Forms/FormMain.resx
index bd4abdc..3803d46 100644
--- a/Source/GrasscutterTools/Forms/FormMain.resx
+++ b/Source/GrasscutterTools/Forms/FormMain.resx
@@ -262,7 +262,7 @@
GrpCommand
- 3
+ 4
NoControl
@@ -289,7 +289,7 @@
GrpCommand
- 1
+ 2
True
@@ -319,11 +319,47 @@
GrpCommand
- 2
+ 3
Bottom, Left, Right
+
+ Top, Right
+
+
+ True
+
+
+ NoControl
+
+
+ 680, 26
+
+
+ 16, 17
+
+
+ 24
+
+
+ X
+
+
+ False
+
+
+ LblClearFilter
+
+
+ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ GrpCommand
+
+
+ 0
+
Top, Right
@@ -352,7 +388,7 @@
GrpCommand
- 0
+ 1
12, 293