private void BtnsClick(string s) { if (s.EndsWith("\\")) { s = s.Remove(s.Length - 1, 1);//移除 字符 / } FindNode fd = new FindNode(treeView1); fd.SelectByNodeFullPath(s); DisposeButtons(); CreateButtons(s); }
public void SelectByNodeFullPath(string nodetext) { FindNode f = new FindNode(treeView1); bool b = f.SelectByNodeFullPath(nodetext); if (!b) { if (computerNode != null) { treeView1.SelectedNode = computerNode; } } }