Ejemplo n.º 1
0
        public ITableRow AddRow(s.TableRowStyle style, t.TrackingInfo trackingInfo)
        {
            TableRow row = new TableRow(style, trackingInfo);

            _rows.Add(row);
            return(row);
        }
Ejemplo n.º 2
0
        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);
            }
        }
Ejemplo n.º 3
0
 public TableRow(s.TableRowStyle style, t.TrackingInfo trackingInfo)
 {
     _cells        = new List <TableCell>();
     _trackingInfo = trackingInfo;
 }