示例#1
0
 private void UpdateMatrixMemberInfoCache(int currentAllocationSize, MatrixMemberInfoCache newMatrixMemberCellIndexes)
 {
     if (base.m_isColumn)
     {
         MatrixMemberInfoCache matrixMemberInfoCache = (base.m_parent == null) ? null : ((ShimMatrixMember)base.m_parent).CurrentMatrixMemberCellIndexes;
         if (matrixMemberInfoCache == null)
         {
             if (newMatrixMemberCellIndexes != null)
             {
                 this.m_currentMatrixMemberCellIndexes = newMatrixMemberCellIndexes;
             }
         }
         else
         {
             int adjustedRenderCollectionIndex            = ((ShimMatrixMember)base.m_parent).AdjustedRenderCollectionIndex;
             MatrixMemberInfoCache matrixMemberInfoCache2 = matrixMemberInfoCache.Children[adjustedRenderCollectionIndex];
             if (matrixMemberInfoCache2 == null)
             {
                 matrixMemberInfoCache2 = ((base.m_children == null) ? new MatrixMemberInfoCache(matrixMemberInfoCache.GetCellIndex((ShimMatrixMember)base.m_parent), -1) : new MatrixMemberInfoCache(-1, currentAllocationSize));
                 matrixMemberInfoCache.Children[adjustedRenderCollectionIndex] = matrixMemberInfoCache2;
             }
             this.m_currentMatrixMemberCellIndexes = matrixMemberInfoCache2;
         }
     }
 }
示例#2
0
 private void GenerateInnerHierarchy(Tablix owner, ShimMatrixMember parent, bool isColumn, MatrixMemberCollection children)
 {
     if (children != null)
     {
         MatrixMemberInfoCache matrixMemberInfoCache = null;
         if (base.m_isColumn)
         {
             if (children.MatrixHeadingDef.SubHeading != null)
             {
                 matrixMemberInfoCache = new MatrixMemberInfoCache(-1, children.Count);
             }
             else
             {
                 int startIndex = (this.m_staticOrSubtotal != null) ? this.m_staticOrSubtotal.MemberCellIndex : this.AdjustedRenderCollectionIndex;
                 matrixMemberInfoCache = new MatrixMemberInfoCache(startIndex, -1);
             }
             this.m_currentMatrixMemberCellIndexes.Children[this.AdjustedRenderCollectionIndex] = matrixMemberInfoCache;
         }
         base.m_children = new ShimMatrixMemberCollection(this, owner, isColumn, this, children, matrixMemberInfoCache);
     }
     else
     {
         owner.GetAndIncrementMemberCellDefinitionIndex();
     }
 }
示例#3
0
 public ShimMatrixMember(IDefinitionPath parentDefinitionPath, Tablix owner, ShimMatrixMember parent, int parentCollectionIndex, bool isColumn, int renderCollectionIndex, ShimRenderGroups renderGroups, MatrixMemberInfoCache matrixMemberCellIndexes)
     : base(parentDefinitionPath, owner, parent, parentCollectionIndex, isColumn)
 {
     this.m_renderCollectionIndex          = renderCollectionIndex;
     this.m_currentMatrixMemberCellIndexes = matrixMemberCellIndexes;
     this.m_definitionStartIndex           = owner.GetCurrentMemberCellDefinitionIndex();
     base.m_group = new Group(owner, renderGroups, this);
     this.GenerateInnerHierarchy(owner, parent, isColumn, ((MatrixMember)base.m_group.CurrentShimRenderGroup).Children);
     this.m_definitionEndIndex = owner.GetCurrentMemberCellDefinitionIndex();
 }
示例#4
0
 public ShimMatrixMember(IDefinitionPath parentDefinitionPath, Tablix owner, ShimMatrixMember parent, int parentCollectionIndex, bool isColumn, int renderCollectionIndex, MatrixMember staticOrSubtotal, bool isAfterSubtotal, MatrixMemberInfoCache matrixMemberCellIndexes)
     : base(parentDefinitionPath, owner, parent, parentCollectionIndex, isColumn)
 {
     this.m_renderCollectionIndex          = renderCollectionIndex;
     this.m_isAfterSubtotal                = isAfterSubtotal;
     this.m_currentMatrixMemberCellIndexes = matrixMemberCellIndexes;
     this.m_definitionStartIndex           = owner.GetCurrentMemberCellDefinitionIndex();
     this.m_staticOrSubtotal               = staticOrSubtotal;
     this.GenerateInnerHierarchy(owner, parent, isColumn, staticOrSubtotal.Children);
     this.m_definitionEndIndex = owner.GetCurrentMemberCellDefinitionIndex();
 }
示例#5
0
 public void UpdateContext(MatrixMemberInfoCache matrixMemberCellIndexes)
 {
     if (base.m_children != null)
     {
         if (base.m_isColumnGroup)
         {
             this.ResetContext(base.OwnerTablix.RenderMatrix.ColumnMemberCollection, matrixMemberCellIndexes);
         }
         else
         {
             this.ResetContext(base.OwnerTablix.RenderMatrix.RowMemberCollection);
         }
     }
 }
示例#6
0
 public void ResetContext(MatrixMemberCollection newRenderMemberCollection, MatrixMemberInfoCache matrixMemberCellIndexes)
 {
     if (base.m_children != null)
     {
         MatrixMember     staticOrSubtotal = null;
         int              newAfterSubtotalCollectionIndex = -1;
         ShimRenderGroups renderGroups = null;
         if (newRenderMemberCollection != null)
         {
             renderGroups = new ShimRenderGroups(newRenderMemberCollection, 0 == this.m_subtotalChildIndex, 1 == this.m_subtotalChildIndex);
             int count = newRenderMemberCollection.Count;
             if (this.m_subtotalChildIndex == 0)
             {
                 staticOrSubtotal = newRenderMemberCollection[0];
             }
             else if (1 == this.m_subtotalChildIndex)
             {
                 staticOrSubtotal = newRenderMemberCollection[count - 1];
                 newAfterSubtotalCollectionIndex = count - 1;
             }
         }
         if (this.m_dynamicSubgroupChildIndex >= 0)
         {
             ((ShimMatrixMember)base.m_children[this.m_dynamicSubgroupChildIndex]).ResetContext(null, -1, renderGroups, matrixMemberCellIndexes);
             if (this.m_subtotalChildIndex >= 0)
             {
                 ((ShimMatrixMember)base.m_children[this.m_subtotalChildIndex]).ResetContext(staticOrSubtotal, newAfterSubtotalCollectionIndex, null, matrixMemberCellIndexes);
             }
         }
         else
         {
             for (int i = 0; i < base.m_children.Length; i++)
             {
                 staticOrSubtotal = ((newRenderMemberCollection != null) ? newRenderMemberCollection[i] : null);
                 ((ShimMatrixMember)base.m_children[i]).ResetContext(staticOrSubtotal, -1, null, matrixMemberCellIndexes);
             }
         }
     }
 }
示例#7
0
        public void ResetContext(bool clearCache)
        {
            if (clearCache)
            {
                this.OwnerTablix.ResetMemberCellDefinitionIndex(0);
            }
            if (base.m_members != null && this.OwnerTablix.IsOldSnapshot)
            {
                switch (this.OwnerTablix.SnapshotTablixType)
                {
                case DataRegion.Type.List:
                    if (!base.m_isColumn)
                    {
                        ((ShimListMemberCollection)base.m_members).UpdateContext(this.OwnerTablix.RenderList.Contents);
                    }
                    break;

                case DataRegion.Type.Table:
                    if (!base.m_isColumn)
                    {
                        ((ShimTableMemberCollection)base.m_members).UpdateContext();
                    }
                    break;

                case DataRegion.Type.Matrix:
                {
                    MatrixMemberInfoCache matrixMemberCellIndexes = null;
                    if (clearCache && base.m_isColumn)
                    {
                        matrixMemberCellIndexes = this.CreateMatrixMemberCache();
                    }
                    ((ShimMatrixMemberCollection)base.m_members).UpdateContext(matrixMemberCellIndexes);
                    break;
                }
                }
            }
        }
示例#8
0
        public ShimMatrixMemberCollection(IDefinitionPath parentDefinitionPath, Tablix owner, bool isColumnGroup, ShimMatrixMember parent, MatrixMemberCollection renderMemberCollection, MatrixMemberInfoCache matrixMemberCellIndexes)
            : base(parentDefinitionPath, owner, isColumnGroup)
        {
            this.m_definitionStartIndex = owner.GetCurrentMemberCellDefinitionIndex();
            int count = renderMemberCollection.Count;

            if (renderMemberCollection[0].IsStatic)
            {
                base.m_children = new ShimMatrixMember[count];
                for (int i = 0; i < count; i++)
                {
                    base.m_children[i] = new ShimMatrixMember(this, owner, parent, i, isColumnGroup, i, renderMemberCollection[i], false, matrixMemberCellIndexes);
                }
            }
            else
            {
                this.m_dynamicSubgroupChildIndex = 0;
                bool flag  = null != renderMemberCollection.MatrixHeadingDef.Subtotal;
                bool flag2 = flag && Subtotal.PositionType.After == renderMemberCollection.MatrixHeadingDef.Subtotal.Position;
                base.m_children = new ShimMatrixMember[(!flag) ? 1 : 2];
                if (flag)
                {
                    this.m_subtotalChildIndex = 0;
                    if (flag2)
                    {
                        this.m_subtotalChildIndex++;
                    }
                    else
                    {
                        this.m_dynamicSubgroupChildIndex++;
                    }
                }
                if (flag)
                {
                    MatrixMember matrixMember = renderMemberCollection[this.m_subtotalChildIndex];
                    AspNetCore.ReportingServices.ReportRendering.ReportItem reportItem = matrixMember.ReportItem;
                    if (reportItem != null)
                    {
                        if (isColumnGroup)
                        {
                            this.m_sizeDelta += reportItem.Width.ToMillimeters();
                        }
                        else
                        {
                            this.m_sizeDelta += reportItem.Height.ToMillimeters();
                        }
                    }
                }
                if (flag && !flag2)
                {
                    base.m_children[this.m_subtotalChildIndex] = new ShimMatrixMember(this, owner, parent, this.m_subtotalChildIndex, isColumnGroup, 0, renderMemberCollection[0], flag2, matrixMemberCellIndexes);
                }
                ShimRenderGroups renderGroups     = new ShimRenderGroups(renderMemberCollection, flag && !flag2, flag && flag2);
                ShimMatrixMember shimMatrixMember = (ShimMatrixMember)(base.m_children[this.m_dynamicSubgroupChildIndex] = new ShimMatrixMember(this, owner, parent, this.m_dynamicSubgroupChildIndex, isColumnGroup, this.m_dynamicSubgroupChildIndex, renderGroups, matrixMemberCellIndexes));
                if (flag && flag2)
                {
                    base.m_children[this.m_subtotalChildIndex] = new ShimMatrixMember(this, owner, parent, this.m_subtotalChildIndex, isColumnGroup, count - 1, renderMemberCollection[count - 1], flag2, matrixMemberCellIndexes);
                }
                this.m_sizeDelta += shimMatrixMember.SizeDelta;
            }
            this.m_definitionEndIndex = owner.GetCurrentMemberCellDefinitionIndex();
        }
示例#9
0
        public void ResetContext(MatrixMember staticOrSubtotal, int newAfterSubtotalCollectionIndex, ShimRenderGroups renderGroups, MatrixMemberInfoCache newMatrixMemberCellIndexes)
        {
            int currentAllocationSize = 1;

            if (base.m_group != null)
            {
                base.m_group.CurrentRenderGroupIndex = -1;
                if (renderGroups != null)
                {
                    base.m_group.RenderGroups = renderGroups;
                }
                currentAllocationSize = base.m_group.RenderGroups.MatrixMemberCollectionCount;
            }
            else if (staticOrSubtotal != null)
            {
                this.m_staticOrSubtotal = staticOrSubtotal;
                if (this.m_isAfterSubtotal && newAfterSubtotalCollectionIndex >= 0)
                {
                    this.m_renderCollectionIndex = newAfterSubtotalCollectionIndex;
                }
            }
            this.UpdateMatrixMemberInfoCache(currentAllocationSize, newMatrixMemberCellIndexes);
            if (this.IsStatic)
            {
                this.UpdateContext(this.m_staticOrSubtotal);
            }
            else if (!base.OwnerTablix.RenderMatrix.NoRows && base.m_group.RenderGroups != null && base.m_group.RenderGroups.Count > 0)
            {
                this.UpdateContext(base.m_group.RenderGroups[0] as MatrixMember);
            }
        }