public void createBloxList() { createHeader(m_pBloxList); m_pBloxList.addPageLayout(new PageLayoutText(null, PageLayoutType.Section, m_System.SystemName.Substring(0,m_System.SystemName.Length - 4) + " Blox List")); m_pBloxList.addPageLayout(new PageLayoutText(null, PageLayoutType.Paragraph, "Here is a list of all Blox used")); PageLayoutTable table = new PageLayoutTable(null); PageLayoutTableData tableRow; PageLayoutText bloxName; PageLayoutText type; PageLayoutLink link; foreach (Blox blox in m_System.BloxList) { bloxName = new PageLayoutText(null, PageLayoutType.Plain, blox.Name); link = new PageLayoutLink(null, blox.Name + ".html", bloxName); type = new PageLayoutText(null, PageLayoutType.Plain, blox.BlockType); createBlox(blox); tableRow = new PageLayoutTableData(null, new PageLayout[2] { link, type }); table.addTableData(tableRow); } m_pBloxList.addPageLayout(table); }
public void createVarList() { //int i; bool used = false; createHeader(m_pVarList); PageLayoutTable table = new PageLayoutTable(null); PageLayoutTableData data = null; PageLayoutLink createdLink; PageLayoutLink usedLink; PageLayoutText createdText; PageLayoutText usedText; PageLayoutText varName; PageLayoutList usedList; PageLayoutListItem listItem; PageLayoutText fillText = new PageLayoutText(null, PageLayoutType.Plain, ""); m_pVarList.addPageLayout(new PageLayoutText(null,PageLayoutType.Section, m_System.SystemName.Substring(0,m_System.SystemName.Length - 4) + "Variable List")); m_pVarList.addPageLayout(new PageLayoutText(null, PageLayoutType.Paragraph, "Here is brief overview of all variables used in this System.")); table.addTableData(createVarHeader()); foreach (GlobalVar var in m_System.VarList) { if (var.BloxCreated == null) { log.Error("Variable is never created in a block. VarName: " + var.Name); continue; } //i = 0; varName = new PageLayoutText(null, PageLayoutType.Plain, var.Name); createdText = new PageLayoutText(null, PageLayoutType.Plain, var.BloxCreated.Name); createdLink = new PageLayoutLink(null,Pages.getInstance().getPageFileName(var.BloxCreated.Name),createdText); usedList = new PageLayoutList(null); foreach (Blox blox in var.BloxUsed) { usedText = new PageLayoutText(null, PageLayoutType.Plain, blox.Name); usedLink = new PageLayoutLink(null, Pages.getInstance().getPageFileName(blox.Name),usedText); listItem = new PageLayoutListItem(new string[1] {Class_UsedBlox}, usedLink); usedList.addListElem(listItem); data = new PageLayoutTableData(null, new PageLayout[3]{ varName, createdLink, usedList}); used = true; } if (!used) { data = new PageLayoutTableData(null, new PageLayout[3] { varName ,createdLink, fillText }); } table.addTableData(data); used = false; } m_pVarList.addPageLayout(table); }
private void createHeader(PageDef _page) { //Create Link List PageLayoutList linkList = new PageLayoutList(null); PageLayoutListItem item; PageLayoutLink link; PageLayoutText span; for (int i = 0; i < 3; i++) { span = new PageLayoutText(null,PageLayoutType.Span,pages[i].Title); link = new PageLayoutLink(null, pages[i].FileName, span); if(_page == pages[i]) item = new PageLayoutListItem(new string[]{ID_Current}, link); else item = new PageLayoutListItem(null, link); linkList.addListElem(item); } PageLayoutDiv div = new PageLayoutDiv(new string[]{Class_Tabs}, new PageLayout[] {linkList}); _page.addPageLayout(div); }