private void редактироватьToolStripMenuItem_Click(object sender, EventArgs e) { DialogForm dF = new DialogForm("Редактирование", treeView1.SelectedNode.Text); dF.ShowDialog(); if (dF.DialogResult == DialogResult.OK) { treeView1.SelectedNode.Text = dF.getText(); } }
private void создатьКореньToolStripMenuItem_Click(object sender, EventArgs e) { DialogForm dF = new DialogForm("Создать корень"); dF.ShowDialog(); if (dF.DialogResult == DialogResult.OK) { treeView1.Nodes.Add(dF.getText()); Find(treeView1.Nodes, dF.getText()); } }
private void добавитьВетвьToolStripMenuItem_Click(object sender, EventArgs e) { DialogForm dF = new DialogForm("Добавить ветвь"); dF.ShowDialog(); string findText = ""; if (dF.DialogResult == DialogResult.OK) { findText = dF.getText(); treeView1.SelectedNode.Nodes.Add(findText); } //выделить узел Find(treeView1.Nodes, dF.getText()); }