private void 修改ToolStripMenuItem_Click(object sender, EventArgs e) { if (treeViewRoot.SelectedNode.Level > 2) { ScriptCommand cmd = (ScriptCommand)treeViewRoot.SelectedNode.Tag; if (cmd.Keys.Length > 0) { CCodeEditDlg dlg = new CCodeEditDlg(cmd); if (dlg.ShowDialog() == DialogResult.OK) { treeViewRoot.SelectedNode.Text = CScenario.getNodeText(cmd); } } } }
private void treeViewRoot_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e) { if (treeViewRoot.SelectedNode.Level > 2) { //treeViewRoot.l ScriptCommand cmd = (ScriptCommand)treeViewRoot.SelectedNode.Tag; if (cmd.Keys.Length > 0) { CCodeEditDlg dlg = new CCodeEditDlg(cmd); if (dlg.ShowDialog() == DialogResult.OK) { treeViewRoot.SelectedNode.Text = CScenario.getNodeText(cmd); } } } }