예제 #1
0
        public void OnChanged(TreePage page, TreePageChangeFlags flags)
        {
            switch (flags)
            {
            case TreePageChangeFlags.New:
                if (page.IsBranch)
                {
                    Header.PageCount++;
                    Header.BranchCount++;
                    break;
                }

                Header.PageCount++;
                Header.LeafCount++;
                break;

            case TreePageChangeFlags.Free:
                if (page.IsBranch)
                {
                    Header.PageCount--;
                    Header.BranchCount--;
                    break;
                }

                Header.PageCount--;
                Header.LeafCount--;
                break;
            }

            IsChanged = true;
        }
예제 #2
0
        public void OnChanged(OverflowPage page, TreePageChangeFlags flags)
        {
            switch (flags)
            {
            case TreePageChangeFlags.New:
                Header.PageCount++;
                Header.OverflowCount++;
                break;

            case TreePageChangeFlags.Free:
                Header.PageCount--;
                Header.OverflowCount--;
                break;
            }
        }