示例#1
0
        private void ConsumeWhitespaceVertical(ItemSizes itemSizes, double adjustHeightTo)
        {
            double num = adjustHeightTo - itemSizes.Height;

            itemSizes.AdjustHeightTo(adjustHeightTo);
            if (!(num <= 0.0) && !(this.m_bottomPadding <= 0.0))
            {
                double num2 = num - this.m_bottomPadding;
                if (num2 > 0.0)
                {
                    itemSizes.AdjustHeightTo(itemSizes.Height - this.m_bottomPadding);
                    this.m_bottomPadding = 0.0;
                }
                else
                {
                    itemSizes.AdjustHeightTo(itemSizes.Height - num);
                    this.m_bottomPadding = 0.0 - num2;
                }
            }
        }
示例#2
0
        private void HorizontalDependecy()
        {
            PageItem      pageItem       = null;
            ItemSizes     itemSizes      = null;
            PageItem      pageItem2      = null;
            ItemSizes     itemSizes2     = null;
            RoundedDouble roundedDouble  = new RoundedDouble(-1.0);
            RoundedDouble roundedDouble2 = new RoundedDouble(0.0);

            for (int i = 0; i < this.m_children.Length; i++)
            {
                pageItem             = this.m_children[this.m_indexesLeftToRight[i]];
                itemSizes            = pageItem.ItemPageSizes;
                roundedDouble.Value  = -1.0;
                roundedDouble2.Value = itemSizes.Right;
                for (int j = i + 1; j < this.m_children.Length; j++)
                {
                    pageItem2  = this.m_children[this.m_indexesLeftToRight[j]];
                    itemSizes2 = pageItem2.ItemPageSizes;
                    if (roundedDouble >= 0.0 && roundedDouble <= itemSizes2.Left)
                    {
                        break;
                    }
                    if (roundedDouble2 <= itemSizes2.Left)
                    {
                        if (pageItem2.PageItemsLeft == null)
                        {
                            pageItem2.PageItemsLeft = new List <int>();
                        }
                        pageItem2.PageItemsLeft.Add(this.m_indexesLeftToRight[i]);
                        if (roundedDouble < 0.0 || roundedDouble > itemSizes2.Right)
                        {
                            roundedDouble.Value = itemSizes2.Right;
                        }
                    }
                }
            }
        }
示例#3
0
        private void VerticalDependency()
        {
            PageItem      pageItem       = null;
            ItemSizes     itemSizes      = null;
            PageItem      pageItem2      = null;
            ItemSizes     itemSizes2     = null;
            RoundedDouble roundedDouble  = new RoundedDouble(-1.0);
            RoundedDouble roundedDouble2 = new RoundedDouble(0.0);

            for (int i = 0; i < this.m_children.Length; i++)
            {
                pageItem             = this.m_children[i];
                itemSizes            = pageItem.ItemPageSizes;
                roundedDouble2.Value = itemSizes.Bottom;
                roundedDouble.Value  = -1.0;
                for (int j = i + 1; j < this.m_children.Length; j++)
                {
                    pageItem2  = this.m_children[j];
                    itemSizes2 = pageItem2.ItemPageSizes;
                    if (roundedDouble >= 0.0 && roundedDouble <= itemSizes2.Top)
                    {
                        break;
                    }
                    if (roundedDouble2 <= itemSizes2.Top)
                    {
                        if (pageItem2.PageItemsAbove == null)
                        {
                            pageItem2.PageItemsAbove = new List <int>();
                        }
                        pageItem2.PageItemsAbove.Add(i);
                        if (roundedDouble < 0.0 || roundedDouble > itemSizes2.Bottom)
                        {
                            roundedDouble.Value = itemSizes2.Bottom;
                        }
                    }
                }
            }
        }
        private static List <Declaration> BuildDeclarations()
        {
            List <Declaration> list = new List <Declaration>(30);

            list.Add(PageItem.GetDeclaration());
            list.Add(PageItemContainer.GetDeclaration());
            list.Add(ItemSizes.GetDeclaration());
            list.Add(HiddenPageItem.GetDeclaration());
            list.Add(NoRowsItem.GetDeclaration());
            list.Add(SubReport.GetDeclaration());
            list.Add(ReportBody.GetDeclaration());
            list.Add(Rectangle.GetDeclaration());
            list.Add(TextBox.GetDeclaration());
            list.Add(TextBox.TextBoxOffset.GetDeclaration());
            list.Add(Paragraph.GetDeclaration());
            list.Add(TextRun.GetDeclaration());
            list.Add(Line.GetDeclaration());
            list.Add(DynamicImage.GetDeclaration());
            list.Add(Chart.GetDeclaration());
            list.Add(GaugePanel.GetDeclaration());
            list.Add(Image.GetDeclaration());
            list.Add(Tablix.GetDeclaration());
            list.Add(Tablix.RowInfo.GetDeclaration());
            list.Add(Tablix.SizeInfo.GetDeclaration());
            list.Add(Tablix.ColumnInfo.GetDeclaration());
            list.Add(Tablix.PageTalixCell.GetDeclaration());
            list.Add(Tablix.PageDetailCell.GetDeclaration());
            list.Add(Tablix.PageCornerCell.GetDeclaration());
            list.Add(Tablix.PageMemberCell.GetDeclaration());
            list.Add(Tablix.PageStructMemberCell.GetDeclaration());
            list.Add(Tablix.PageStructStaticMemberCell.GetDeclaration());
            list.Add(Tablix.PageStructDynamicMemberCell.GetDeclaration());
            list.Add(Map.GetDeclaration());
            list.Add(PageBreakProperties.GetDeclaration());
            return(list);
        }
        public bool TryCreateObject(ObjectType objectType, out IPersistable persistObj)
        {
            switch (objectType)
            {
            case ObjectType.ItemSizes:
                persistObj = new ItemSizes();
                break;

            case ObjectType.PageBreakProperties:
                persistObj = new PageBreakProperties();
                break;

            case ObjectType.HiddenPageItem:
                persistObj = new HiddenPageItem();
                break;

            case ObjectType.NoRowsItem:
                persistObj = new NoRowsItem();
                break;

            case ObjectType.SubReport:
                persistObj = new SubReport();
                break;

            case ObjectType.ReportBody:
                persistObj = new ReportBody();
                break;

            case ObjectType.Rectangle:
                persistObj = new Rectangle();
                break;

            case ObjectType.TextBox:
                persistObj = new TextBox();
                break;

            case ObjectType.Paragraph:
                persistObj = new Paragraph();
                break;

            case ObjectType.TextRun:
                persistObj = new TextRun();
                break;

            case ObjectType.TextBoxOffset:
                persistObj = new TextBox.TextBoxOffset();
                break;

            case ObjectType.Line:
                persistObj = new Line();
                break;

            case ObjectType.Chart:
                persistObj = new Chart();
                break;

            case ObjectType.GaugePanel:
                persistObj = new GaugePanel();
                break;

            case ObjectType.Map:
                persistObj = new Map();
                break;

            case ObjectType.Image:
                persistObj = new Image();
                break;

            case ObjectType.Tablix:
                persistObj = new Tablix();
                break;

            case ObjectType.RowInfo:
                persistObj = new Tablix.RowInfo();
                break;

            case ObjectType.SizeInfo:
                persistObj = new Tablix.SizeInfo();
                break;

            case ObjectType.ColumnInfo:
                persistObj = new Tablix.ColumnInfo();
                break;

            case ObjectType.PageDetailCell:
                persistObj = new Tablix.PageDetailCell();
                break;

            case ObjectType.PageCornerCell:
                persistObj = new Tablix.PageCornerCell();
                break;

            case ObjectType.PageMemberCell:
                persistObj = new Tablix.PageMemberCell();
                break;

            case ObjectType.PageStructStaticMemberCell:
                persistObj = new Tablix.PageStructStaticMemberCell();
                break;

            case ObjectType.PageStructDynamicMemberCell:
                persistObj = new Tablix.PageStructDynamicMemberCell();
                break;

            default:
                persistObj = null;
                return(false);
            }
            return(true);
        }