Пример #1
0
 public override void WriteStartItemToStream(RPLWriter rplWriter, PageContext pageContext)
 {
     if (rplWriter != null)
     {
         BinaryWriter binaryWriter = rplWriter.BinaryWriter;
         if (binaryWriter != null)
         {
             Stream baseStream = binaryWriter.BaseStream;
             base.m_offset = baseStream.Position;
             binaryWriter.Write((byte)12);
             base.WriteElementProps(binaryWriter, rplWriter, pageContext, base.m_offset + 1);
         }
         else if (base.m_rplElement == null)
         {
             base.m_rplElement = new RPLSubReport();
             base.WriteElementProps(base.m_rplElement.ElementProps, pageContext);
         }
         else
         {
             RPLItemProps rplElementProps = base.m_rplElement.ElementProps as RPLItemProps;
             base.m_rplElement = new RPLSubReport(rplElementProps);
         }
     }
 }
Пример #2
0
        public override RPLElement CreateRPLElement(RPLElementProps props, PageContext pageContext)
        {
            RPLItemProps rplElementProps = props as RPLItemProps;

            return(new RPLSubReport(rplElementProps));
        }
Пример #3
0
 internal RPLHeaderFooter()
 {
     m_rplElementProps            = new RPLItemProps();
     m_rplElementProps.Definition = new RPLHeaderFooterPropsDef();
 }
Пример #4
0
 internal RPLContainer(RPLItemProps rplElementProps)
     : base(rplElementProps)
 {
 }
 public RPLRectangle(RPLItemProps rplElementProps)
     : base(rplElementProps)
 {
 }
 public RPLContainer(RPLItemProps rplElementProps)
     : base(rplElementProps)
 {
 }
Пример #7
0
        private static void ReadMeasurement(RPLElement element, ALayout layout, int top, int left, int generationIndex, BlockOutlines blockOutlines, Dictionary <string, ToggleParent> toggleParents, bool suppressOutlines, int elementWidth, string subreportLanguage)
        {
            RPLContainer rPLContainer = element as RPLContainer;

            if (rPLContainer != null)
            {
                if (rPLContainer.Children != null)
                {
                    bool         flag         = false;
                    int          num          = 0;
                    RPLSubReport rPLSubReport = element as RPLSubReport;
                    if (rPLSubReport != null)
                    {
                        flag = true;
                        if (!suppressOutlines)
                        {
                            toggleParents = new Dictionary <string, ToggleParent>();
                        }
                        string language = ((RPLSubReportProps)rPLSubReport.ElementProps).Language;
                        if (!string.IsNullOrEmpty(language))
                        {
                            subreportLanguage = language;
                        }
                    }
                    int[]     array  = new int[rPLContainer.Children.Length];
                    int[]     array2 = new int[rPLContainer.Children.Length];
                    int[]     array3 = new int[rPLContainer.Children.Length];
                    RPLItem[] array4 = new RPLItem[rPLContainer.Children.Length];
                    for (int i = 0; i < rPLContainer.Children.Length; i++)
                    {
                        RPLItemMeasurement rPLItemMeasurement = rPLContainer.Children[i];
                        if (0.0 == rPLItemMeasurement.Width && 0.0 == rPLItemMeasurement.Height)
                        {
                            rPLContainer.Children[i] = null;
                        }
                        else
                        {
                            if ((0.0 == rPLItemMeasurement.Width || 0.0 == rPLItemMeasurement.Height) && !(rPLItemMeasurement.Element is RPLLine))
                            {
                                rPLContainer.Children[i] = null;
                                continue;
                            }
                            int num2 = LayoutConvert.ConvertMMTo20thPoints((double)rPLItemMeasurement.Height);
                            int num3 = 0;
                            if (flag)
                            {
                                num3      = elementWidth;
                                array2[i] = LayoutConvert.ConvertMMTo20thPoints((double)rPLItemMeasurement.Top) + top + num;
                                num      += num2;
                            }
                            else
                            {
                                num3      = LayoutConvert.ConvertMMTo20thPoints((double)rPLItemMeasurement.Width);
                                array2[i] = LayoutConvert.ConvertMMTo20thPoints((double)rPLItemMeasurement.Top) + top;
                            }
                            array[i]  = num3;
                            array3[i] = LayoutConvert.ConvertMMTo20thPoints((double)rPLItemMeasurement.Left) + left;
                            RPLItem      rPLItem   = array4[i] = rPLItemMeasurement.Element;
                            byte         b         = default(byte);
                            RPLItemProps itemProps = layout.RPLReport.GetItemProps(rPLItem.RPLSource, out b);
                            if (b == 7)
                            {
                                RPLTextBoxPropsDef rPLTextBoxPropsDef = (RPLTextBoxPropsDef)itemProps.Definition;
                                if (rPLTextBoxPropsDef.IsSimple)
                                {
                                    layout.AddReportItem(rPLItem.RPLSource, array2[i], array3[i], num3, num2, generationIndex, rPLItemMeasurement.State, subreportLanguage, toggleParents);
                                }
                                else
                                {
                                    layout.AddReportItem(rPLItem, array2[i], array3[i], num3, num2, generationIndex, rPLItemMeasurement.State, subreportLanguage, toggleParents);
                                }
                                if (!suppressOutlines && rPLTextBoxPropsDef.IsToggleParent && !toggleParents.ContainsKey(rPLTextBoxPropsDef.Name))
                                {
                                    toggleParents.Add(rPLTextBoxPropsDef.Name, new ToggleParent(array2[i], array3[i], num3, num2));
                                }
                            }
                            else
                            {
                                layout.AddReportItem(rPLItem.RPLSource, array2[i], array3[i], num3, num2, generationIndex, rPLItemMeasurement.State, subreportLanguage, toggleParents);
                            }
                        }
                    }
                    for (int j = 0; j < rPLContainer.Children.Length; j++)
                    {
                        if (rPLContainer.Children[j] != null)
                        {
                            Reader.ReadMeasurement(array4[j], layout, array2[j], array3[j], generationIndex + 1, blockOutlines, toggleParents, suppressOutlines, array[j], subreportLanguage);
                            rPLContainer.Children[j] = null;
                            array4[j] = null;
                        }
                    }
                    rPLContainer.Children = null;
                }
            }
            else
            {
                Reader.ReadTablixStructure(element as RPLTablix, layout, top, left, generationIndex, blockOutlines, toggleParents, suppressOutlines, subreportLanguage);
            }
        }
Пример #8
0
 internal RPLBody()
 {
     m_rplElementProps            = new RPLItemProps();
     m_rplElementProps.Definition = new RPLItemPropsDef();
 }
Пример #9
0
 public RPLBody(RPLItemProps props)
     : base(props)
 {
 }
Пример #10
0
 internal RPLItem(RPLItemProps rplElementProps)
     : base(rplElementProps)
 {
 }
Пример #11
0
 internal RPLRectangle()
 {
     m_rplElementProps            = new RPLItemProps();
     m_rplElementProps.Definition = new RPLRectanglePropsDef();
 }
Пример #12
0
 internal RPLRectangle(RPLItemProps rplElementProps)
     : base(rplElementProps)
 {
 }
Пример #13
0
        internal void ProcessBorders(GdiWriter writer, RPLItemProps properties, RectangleF bounds, byte state)
        {
            RPLFormat.BorderStyles stylePropertyValueBorderStyle = SharedRenderer.GetStylePropertyValueBorderStyle(properties, 5, RPLFormat.BorderStyles.None);
            m_borderLeft.Style   = SharedRenderer.GetStylePropertyValueBorderStyle(properties, 6, stylePropertyValueBorderStyle);
            m_borderRight.Style  = SharedRenderer.GetStylePropertyValueBorderStyle(properties, 7, stylePropertyValueBorderStyle);
            m_borderTop.Style    = SharedRenderer.GetStylePropertyValueBorderStyle(properties, 8, stylePropertyValueBorderStyle);
            m_borderBottom.Style = SharedRenderer.GetStylePropertyValueBorderStyle(properties, 9, stylePropertyValueBorderStyle);
            if (m_borderLeft.Style == RPLFormat.BorderStyles.None && m_borderRight.Style == RPLFormat.BorderStyles.None && m_borderTop.Style == RPLFormat.BorderStyles.None && m_borderBottom.Style == RPLFormat.BorderStyles.None)
            {
                return;
            }
            float stylePropertyValueSizeMM = GdiContext.GetStylePropertyValueSizeMM(properties, 10);

            m_borderLeft.Width = GdiContext.GetStylePropertyValueSizeMM(properties, 11);
            if (float.IsNaN(m_borderLeft.Width) && !float.IsNaN(stylePropertyValueSizeMM))
            {
                m_borderLeft.Width = stylePropertyValueSizeMM;
            }
            m_borderRight.Width = GdiContext.GetStylePropertyValueSizeMM(properties, 12);
            if (float.IsNaN(m_borderRight.Width) && !float.IsNaN(stylePropertyValueSizeMM))
            {
                m_borderRight.Width = stylePropertyValueSizeMM;
            }
            m_borderTop.Width = GdiContext.GetStylePropertyValueSizeMM(properties, 13);
            if (float.IsNaN(m_borderTop.Width) && !float.IsNaN(stylePropertyValueSizeMM))
            {
                m_borderTop.Width = stylePropertyValueSizeMM;
            }
            m_borderBottom.Width = GdiContext.GetStylePropertyValueSizeMM(properties, 14);
            if (float.IsNaN(m_borderBottom.Width) && !float.IsNaN(stylePropertyValueSizeMM))
            {
                m_borderBottom.Width = stylePropertyValueSizeMM;
            }
            if (!float.IsNaN(m_borderLeft.Width) || !float.IsNaN(m_borderRight.Width) || !float.IsNaN(m_borderTop.Width) || !float.IsNaN(m_borderBottom.Width))
            {
                Color stylePropertyValueColor = GdiContext.GetStylePropertyValueColor(properties, 0);
                m_borderLeft.Color = GdiContext.GetStylePropertyValueColor(properties, 1);
                if (m_borderLeft.Color == Color.Empty && stylePropertyValueColor != Color.Empty)
                {
                    m_borderLeft.Color = stylePropertyValueColor;
                }
                m_borderRight.Color = GdiContext.GetStylePropertyValueColor(properties, 2);
                if (m_borderRight.Color == Color.Empty && stylePropertyValueColor != Color.Empty)
                {
                    m_borderRight.Color = stylePropertyValueColor;
                }
                m_borderTop.Color = GdiContext.GetStylePropertyValueColor(properties, 3);
                if (m_borderTop.Color == Color.Empty && stylePropertyValueColor != Color.Empty)
                {
                    m_borderTop.Color = stylePropertyValueColor;
                }
                m_borderBottom.Color = GdiContext.GetStylePropertyValueColor(properties, 4);
                if (m_borderBottom.Color == Color.Empty && stylePropertyValueColor != Color.Empty)
                {
                    m_borderBottom.Color = stylePropertyValueColor;
                }
                if (!(m_borderLeft.Color == Color.Empty) || !(m_borderRight.Color == Color.Empty) || !(m_borderTop.Color == Color.Empty) || !(m_borderBottom.Color == Color.Empty))
                {
                    ProcessBorders(writer, ref m_borderTop, ref m_borderLeft, ref m_borderBottom, ref m_borderRight, base.Position, bounds, state);
                }
            }
        }
Пример #14
0
        private static void ReadTablixCellProperties(RPLTablixCell cell, ALayout layout, int[] rowTops, int[] columnLefts, int generationIndex, bool isRTL, BlockOutlines blockOutlines, Dictionary <string, ToggleParent> toggleParents, bool suppressOutlines, string subreportLanguage)
        {
            int  num  = columnLefts[cell.ColIndex];
            int  num2 = rowTops[cell.RowIndex];
            int  num3 = columnLefts[cell.ColIndex + cell.ColSpan] - num;
            int  num4 = rowTops[cell.RowIndex + cell.RowSpan] - num2;
            bool flag = false;

            if (num3 == 0 && cell.ColSpan != 0)
            {
                return;
            }
            if (num4 == 0 && cell.RowSpan != 0)
            {
                return;
            }
            if (!suppressOutlines && cell is RPLTablixMemberCell && blockOutlines != (BlockOutlines)3)
            {
                RPLTablixMemberCell rPLTablixMemberCell = (RPLTablixMemberCell)cell;
                TogglePosition      togglePosition      = TogglePosition.None;
                flag = rPLTablixMemberCell.HasToggle;
                if (rPLTablixMemberCell.TablixMemberDef.IsColumn)
                {
                    if ((blockOutlines & BlockOutlines.Columns) != 0)
                    {
                        flag = false;
                    }
                    togglePosition = TogglePosition.Above;
                }
                else
                {
                    if ((blockOutlines & BlockOutlines.Rows) != 0)
                    {
                        flag = false;
                    }
                    togglePosition = (TogglePosition)((!isRTL) ? 1 : 2);
                }
                int left = num;
                if (isRTL && num3 == 0 && cell.ColIndex > 0)
                {
                    left = columnLefts[cell.ColIndex - 1];
                }
                layout.AddStructuralItem(num2, left, num3, num4, flag, generationIndex, rPLTablixMemberCell, togglePosition);
            }
            RPLItem element = cell.Element;

            if (element != null)
            {
                byte         b         = default(byte);
                RPLItemProps itemProps = layout.RPLReport.GetItemProps(element.RPLSource, out b);
                if (b == 7)
                {
                    RPLTextBoxPropsDef rPLTextBoxPropsDef = (RPLTextBoxPropsDef)itemProps.Definition;
                    if (rPLTextBoxPropsDef.IsSimple)
                    {
                        layout.AddReportItem(element.RPLSource, num2, num, num3, num4, generationIndex, cell.ElementState, subreportLanguage, toggleParents);
                    }
                    else
                    {
                        layout.AddReportItem(element, num2, num, num3, num4, generationIndex, cell.ElementState, subreportLanguage, toggleParents);
                    }
                    if (!suppressOutlines && rPLTextBoxPropsDef.IsToggleParent && !toggleParents.ContainsKey(rPLTextBoxPropsDef.Name))
                    {
                        toggleParents.Add(rPLTextBoxPropsDef.Name, new ToggleParent(num2, num, num3, num4));
                    }
                }
                else
                {
                    layout.AddReportItem(element.RPLSource, num2, num, num3, num4, generationIndex, cell.ElementState, subreportLanguage, toggleParents);
                }
                if (!suppressOutlines)
                {
                    if (rowTops.Length > 2)
                    {
                        blockOutlines |= BlockOutlines.Columns;
                    }
                    if (columnLefts.Length > 2)
                    {
                        blockOutlines |= BlockOutlines.Rows;
                    }
                }
                Reader.ReadMeasurement(element, layout, num2, num, generationIndex + 1, blockOutlines, toggleParents, suppressOutlines, num3, subreportLanguage);
            }
        }
Пример #15
0
 internal RPLSubReport(RPLItemProps rplElementProps)
     : base(rplElementProps)
 {
 }
Пример #16
0
 internal RPLBody(RPLItemProps props)
     : base(props)
 {
 }
Пример #17
0
 public RPLSubReport(RPLItemProps rplElementProps)
     : base(rplElementProps)
 {
 }
Пример #18
0
 public RPLItem(RPLItemProps rplElementProps)
     : base(rplElementProps)
 {
 }
Пример #19
0
        public override RPLElement CreateRPLElement(RPLElementProps props, PageContext pageContext)
        {
            RPLItemProps props2 = props as RPLItemProps;

            return(new RPLBody(props2));
        }