private void AddNode() { NsNode node = new NsNode("new", Node); NsNodeEditor edit = new NsNodeEditor(node); if (edit.ShowDialog() == DialogResult.OK) { nodeList.Items.Add(CreateNodeItem(node)); nodeList.Refresh(); } }
void EditSelectedNode() { if (nodeList.SelectedItems != null && nodeList.SelectedItems.Count > 0) { NsNode n = nodeList.SelectedItems[0].Tag as NsNode; if (n != null) { NsNodeEditor edit = new NsNodeEditor(n); if (edit.ShowDialog() == DialogResult.OK) nodeList.SelectedItems[0].Text = n.Label; } } }