From 6c53c426aad51abf766577af0a475b3fd6d0665f Mon Sep 17 00:00:00 2001 From: luoxingjian <1010378449@qq.com> Date: Fri, 13 Dec 2024 16:10:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=AE=B3=E7=B1=BB=E5=9E=8B=E7=BB=B4?= =?UTF-8?q?=E6=8A=A4=E4=B8=AD-=E6=A3=80=E6=9F=A5=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=8A=A0=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PEIS/View/Setting/HazardTypeForm.cs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/PEIS/View/Setting/HazardTypeForm.cs b/PEIS/View/Setting/HazardTypeForm.cs index 71f9495..02defef 100644 --- a/PEIS/View/Setting/HazardTypeForm.cs +++ b/PEIS/View/Setting/HazardTypeForm.cs @@ -52,12 +52,16 @@ namespace PEIS.View.Setting opMenuItem.TsmiDelete.Visible = false; opMenuItem.TsmiSave.Visible = false; opMenuItem.TsmiSearch.Visible = false; - opMenuItem.TstbKey.Visible = false; + opMenuItem.TstbKey.Visible = true; + opMenuItem.TstbKey.TextChanged += TstbKey_TextChanged1; gVFeelItem.DoubleClick += GVFeelItem_DoubleClick; Shown += HazardTypeForm_Shown; } + + + private void HazardTypeForm_Shown(object sender, EventArgs e) { ThreadPool.QueueUserWorkItem(s => @@ -202,6 +206,18 @@ namespace PEIS.View.Setting } } + private void TstbKey_TextChanged1(object sender, EventArgs e) + { + var textValue = (sender as ToolStripTextBox).Text; + if (!string.IsNullOrEmpty(textValue) && !textValue.Equals("输入条件查询")) + { + gVFeelItem.ApplyFindFilter(textValue); + } + else + { + gVFeelItem.ApplyFindFilter(""); + } + } #endregion #region 接害类型关联检查项目 //接害类型关联检查项目