コード例 #1
0
        public ITableRow AddRow(s.TableRowStyle style, t.TrackingInfo trackingInfo)
        {
            TableRow row = new TableRow(style, trackingInfo);

            _rows.Add(row);
            return(row);
        }
コード例 #2
0
ファイル: Word.cs プロジェクト: jdaomilang/report-generator
        private void RenderPhotoTable(PhotoTableLayout layout, IContentContainer container)
        {
            //	Create a table
            s.TableStyle tableStyle = null;
            if (layout.Style != null)
            {
                s.PhotoStyle photoStyle = (s.PhotoStyle)layout.Style;
                tableStyle = new s.TableStyle
                {
                    Border  = photoStyle.Border,
                    Padding = photoStyle.Padding
                };
            }

            int columnWidth = layout.Bounds.Width / layout.NumColumns;

            int[] columnWidths = new int[layout.NumColumns];
            for (int x = 0; x < columnWidths.Length; ++x)
            {
                columnWidths[x] = columnWidth;
            }

            ITable table = container.AddTable(layout.Bounds.Width, columnWidths, tableStyle, layout.TrackingInfo);

            //	Create a table row for each photo row
            foreach (PhotoRowLayout photoRow in layout.SubLayouts)
            {
                s.TableRowStyle rowStyle = null;
                if (photoRow.Style != null)
                {
                    s.PhotoStyle photoStyle = (s.PhotoStyle)photoRow.Style;
                    rowStyle = new s.TableRowStyle
                    {
                        BackColor = photoRow.BackgroundColor,
                        Padding   = photoStyle.Padding
                    };
                }
                ITableRow tableRow = table.AddRow(rowStyle, photoRow.TrackingInfo);
                RenderPhotoRow(photoRow, tableRow);
            }
        }
コード例 #3
0
 public TableRow(s.TableRowStyle style, t.TrackingInfo trackingInfo)
 {
     _cells        = new List <TableCell>();
     _trackingInfo = trackingInfo;
 }