コード例 #1
0
        public OutlineNode FindInChildren(Guid ID)
        {
            OutlineNode ans = null;

            foreach (OutlineNode item in Children)
            {
                if (item.GID == ID)
                {
                    ans = item;
                }
            }
            return(ans);
        }
コード例 #2
0
        public void DelItem(Guid ID)
        {
            OutlineNode node = FindInChildren(ID);

            if (node != null)
            {
                Children.Remove(node);
            }
            else
            {
                if (Children.Count == 0)
                {
                    return;
                }
                else
                {
                    foreach (OutlineNode item in Children)
                    {
                        item.DelItem(ID);
                    }
                }
            }
        }