Exemple #1
0
 /// <summary>
 /// Add Snippet Node
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void toolStripButton1_Click(object sender, EventArgs e)
 {
     Components.TreeNode treeNode1 = new Components.TreeNode
     {
         NodeKey = (treeView1.LastNode + 1).ToString()
     };
     treeView1.AddNode(treeNode1, ((Components.TreeNode)(treeView1.SelectedNode)).Key?.ToString()); //.Nodes.Add(treeNode1);
     treeView1.SelectedNode = treeNode1;
     treeView1.LabelEdit    = true;
     if (!treeNode1.IsEditing)
     {
         treeNode1.BeginEdit();
     }
 }
Exemple #2
0
 /// <summary>
 /// Add Root Node
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void toolStripButton8_Click(object sender, EventArgs e)
 {
     Components.TreeNode treeNode1 = new Components.TreeNode
     {
         NodeKey = (treeView1.LastNode + 1).ToString()
     };
     //(++this.NodeList).ToString();
     treeView1.AddNodeRoot(treeNode1); //.Nodes.Add(treeNode1);
     treeView1.SelectedNode = treeNode1;
     treeView1.LabelEdit    = true;
     if (!treeNode1.IsEditing)
     {
         treeNode1.BeginEdit();
     }
 }