提交当前本机整理版本
This commit is contained in:
@@ -1084,4 +1084,41 @@ namespace Lskj.Control
|
||||
if (node.Parent != null)
|
||||
{
|
||||
node.Expand();
|
||||
ExpandNode(
|
||||
ExpandNode(node.Parent);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//获得符合条件的节点
|
||||
private void SearchLayernew(TreeNode node, string name)
|
||||
{
|
||||
//node.BackColor = Color.White;
|
||||
//node.ForeColor = Color.Black;
|
||||
if (string.Equals(node.Text, name) || node.Text.Contains(name))
|
||||
{
|
||||
searchtreeNodes.Add(node);
|
||||
}
|
||||
if (node.Nodes.Count != 0)
|
||||
{
|
||||
for (int i = 0; i < node.Nodes.Count; i++)
|
||||
{
|
||||
SearchLayernew(node.Nodes[i], name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 搜索框回车事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void txt_Key_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Enter)
|
||||
{
|
||||
BtnSearch_Click(null, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user