private void AddRootToolStripMenuItem_Click(object sender, EventArgs e) { var a = new AItem() { Name = "new root1" }; AllItems.Add(a); }
public void AddChildToSelected() { if (selected == null) { return; } var a = new AItem() { Name = "new node1", Position = new PointF(selected.Position.X + selected.Radius * 2, selected.Position.Y) }; selected.AddChild(a); AllItems.Add(a); }
public void SampleTree() { AItem Root = new AItem() { Name = "Happy life" }; Root.AddChild(new AItem() { Name = "child1", Position = new PointF(200, 0), Progress = 45, IsProgress = true }); AllItems.Add(Root); AllItems.AddRange(Root.Childs); }
internal void AddChild(AItem aItem) { Childs.Add(aItem); aItem.Parents.Add(this); }