public void OnToolStripButtonSearch(object sender, EventArgs e) { try { FormSearch form = new FormSearch(); if (DialogResult.OK == form.ShowDialog()) { treeView.PopulateAndSelectNode(new NodeTag(NodeTag.NType.NTBranch, form.ResultNodeId)); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
/// <summary> /// Search /// </summary> private void toolStripButtonSearch_Click(object sender, EventArgs e) { try { FormSearch form = new FormSearch(); if (DialogResult.OK == form.ShowDialog()) { // show selected node _treeViewCtrl.PopulateAndSelectNode(new NodeTag(NodeTag.NodeType.NT_TREENODE, form.ResultNodeId)); } } catch (Exception ex) { _log.Error(ex.ToString()); } }