private void checkModel(TableModel model) { check(model.getRows().Any(), "Must have rows"); check(model.getTitles().Any(), "Must have titles"); foreach (Cell c in model.getTitles()) { check(c); } foreach (Row r in model.getRows()) { check(r, "rows", model.getTitles().Count); } }
public XElement generate(TableModel model) { checkModel(model); var table = new XElement(XmlNs.XHTMLNS + "table", new XAttribute("border", "0"), new XAttribute("cellspacing", "0"), new XAttribute("cellpadding", "0"), new XAttribute("style", "border: 0px; font-size: 11px; font-family: verdana; vertical-align: top;")); var tr = new XElement(XmlNs.XHTMLNS + "tr", new XAttribute("style", "border: 1px #F0F0F0 solid; font-size: 11px; font-family: verdana; vertical-align: top;")); table.Add(tr); foreach (Title t in model.getTitles()) { var tc = renderCell(tr, t, "th", null, null, false, null); } foreach (Row r in model.getRows()) { renderRow(table, r, 0, new List <bool>()); } return(table); }
public XElement generate(Profile p, bool extensionsOnly) { var gen = new HierarchicalTableGenerator(OutputPath, InlineGraphics); TableModel model = gen.initNormalTable(); genProfile(model.getRows(), p, extensionsOnly); return(gen.generate(model)); }
private void checkModel(TableModel model) { check(model.getRows().Any(), "Must have rows"); check(model.getTitles().Any(), "Must have titles"); foreach (Cell c in model.getTitles()) check(c); foreach (Row r in model.getRows()) check(r, "rows", model.getTitles().Count); }
public XElement generate(TableModel model) { checkModel(model); var table = new XElement(XmlNs.XHTMLNS + "table", new XAttribute("border", "0"), new XAttribute("cellspacing", "0"), new XAttribute("cellpadding", "0"), new XAttribute("style", "border: 0px; font-size: 11px; font-family: verdana; vertical-align: top;")); var tr = new XElement(XmlNs.XHTMLNS + "tr", new XAttribute("style", "border: 1px #F0F0F0 solid; font-size: 11px; font-family: verdana; vertical-align: top;")); table.Add(tr); foreach (Title t in model.getTitles()) { var tc = renderCell(tr, t, "th", null, null, false, null); } foreach (Row r in model.getRows()) { renderRow(table, r, 0, new List<bool>()); } return table; }
public XElement generateStructureTable(String defFile, Profile.ProfileStructureComponent structure, bool diff, String imageFolder, bool inlineGraphics, Profile profile, string profileUrl, String profileBaseFileName) { HierarchicalTableGenerator gen = new HierarchicalTableGenerator(imageFolder, inlineGraphics); TableModel model = gen.initNormalTable(); // List<Profile.ElementComponent> list = diff ? structure.getDifferential().getElement() : structure.getSnapshot().getElement(); DSTU2 var list = structure.Element; var nav = new ElementNavigator(structure); nav.MoveToFirstChild(); genElement(defFile == null ? null : defFile + "#" + structure.Name + ".", gen, model.getRows(), nav, profile, diff, profileUrl, profileBaseFileName); return(gen.generate(model)); }