示例#1
0
 public table_cell(table_cell val)
 {
     el         = val.el;
     colspan    = val.colspan;
     rowspan    = val.rowspan;
     width      = val.width;
     height     = val.height;
     min_width  = val.min_width;
     min_height = val.min_height;
     max_width  = val.max_width;
     max_height = val.max_height;
     borders    = val.borders;
 }
示例#2
0
        public void add_cell(element el)
        {
            var cell = new table_cell
            {
                el      = el,
                colspan = int.Parse(el.get_attr("colspan", "1")),
                rowspan = int.Parse(el.get_attr("rowspan", "1")),
                borders = el.get_borders,
            };

            while (is_rowspanned(_cells.Count - 1, _cells.Back().Count))
            {
                _cells.Back().Add(new table_cell());
            }
            _cells.Back().Add(cell);
            for (var i = 1; i < cell.colspan; i++)
            {
                _cells.Back().Add(new table_cell());
            }
        }