public void Add(TreeNode treeNode, TreeNodeViewModel parent) { var treeNodeViewModel = new TreeNodeViewModel(treeNode, parent); this.treeNodes.Add(treeNodeViewModel); if (parent != null) { parent.Children.Add(treeNodeViewModel); } BehaviorTreeLayout.ExcuteLayout(this.Root); }
public void Remove(TreeNodeViewModel treeNodeViewModel) { this.RecursionRemove(treeNodeViewModel); BehaviorTreeLayout.ExcuteLayout(this.Root); }