コード例 #1
0
ファイル: FCfgFolder.cs プロジェクト: whztt07/MoCross
        //============================================================
        // <T>获取层级目录集合。</T>
        //
        // @return 目录集合
        //============================================================
        public FObjects <FCfgFolder> FetchFolderStack(bool constainsSelf = true)
        {
            FObjects <FCfgFolder> stack = new FObjects <FCfgFolder>();
            FCfgFolder            find  = this;

            while (find != null)
            {
                if (constainsSelf)
                {
                    stack.Push(find);
                }
                else if (find != this)
                {
                    stack.Push(find);
                }
                find = find.Parent;
            }
            stack.Reverse();
            return(stack);
        }