Пример #1
0
 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();
     }
 }
Пример #2
0
 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;
         }
     }
 }