Пример #1
0
 protected override void AddNodeClick(object sender, EventArgs e)
 {
     if (this.Tree.SelectedNode != null && this.Tree.SelectedNode is Pose)
     {
         Pose selected = this.Tree.SelectedNode as Pose;
         if (selected.Mode == PoseMode.Collection)
         {
             Pose newPose = new Pose("Pose" + "." + (selected.CumulatedChildCount + 1));
             selected.AddNode(newPose);
             selected.Expand();
         }
         else
         {
             Pose n = new Pose(this.Tree.Nodes.Count == 0 ? "Base" : "Pose");
             this.Tree.Nodes.Add(n);
             this.Selected = n;
         }
     }
 }