/// <summary> /// Adds a child to the node. /// </summary> /// <param name="childNode"> /// A <see cref="SequenceNode"/> /// </param> public void AddChildSequence(SequenceNode childNode) { AddChildSequenceArgs _args = new AddChildSequenceArgs(childNode); Application.Invoke(this, _args, delegate(object sender, EventArgs args) { AddChildSequenceArgs a = args as AddChildSequenceArgs; a.ChildNode.NodeName = String.Format("{0}.{1}", this.NodeName, this.ChildCount + 1); this.AddChild(a.ChildNode); if (widget != null) { // We expand the node widget.ExpandAll(); widget.ColumnsAutosize(); } }); }
/// <summary> /// Adds a child to the node. /// </summary> /// <param name="childNode"> /// A <see cref="SequenceNode"/> /// </param> public void AddChildSequence(SequenceNode childNode) { AddChildSequenceArgs _args = new AddChildSequenceArgs(childNode); Application.Invoke(this, _args, delegate(object sender, EventArgs args) { AddChildSequenceArgs a = args as AddChildSequenceArgs; a.ChildNode.NodeName = String.Format("{0}.{1}",this.NodeName,this.ChildCount+1); this.AddChild(a.ChildNode); if(widget!=null) { // We expand the node widget.ExpandAll(); widget.ColumnsAutosize(); } }); }