public void NotifyInsert(object sender, UpdateEventArgs e) { TreeNode[] nodesToUpdate = control.BindingTree.Nodes.Find(e.NewNode.parent, true); TreeNode node = new TreeNode(); node.Text = e.NewNode.newtext; node.Tag = e.NewNode.tag; node.Name = e.NewNode.newtext; nodesToUpdate[0].Nodes.Add(node); }
public void NotifyRename(object sender, UpdateEventArgs e) { if (e.NewNode.oldtext != null) { TreeNode[] nodesToUpdate = control.BindingTree.Nodes.Find(e.NewNode.oldtext, e.NewNode.parent != null); nodesToUpdate[0].Tag = e.NewNode.tag; nodesToUpdate[0].Text = e.NewNode.newtext; nodesToUpdate[0].Name = e.NewNode.newtext; } else if (null == e.NewNode.parent) { TreeNode node = new TreeNode(e.NewNode.newtext); node.Name = e.NewNode.newtext; control.BindingTree.Nodes.Add(node); } }
public void NotifyRemove(object sender, UpdateEventArgs e) { TreeNode[] nodesToUpdate = control.BindingTree.Nodes.Find(e.NewNode.oldtext, true); nodesToUpdate[0].Remove(); }