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 PageLayoutTable createIndicatorTable(Blox _blox) { PageLayoutTable table = new PageLayoutTable(null); table.addTableData(createBloxIndicatorTableHeader()); PageLayoutTableData tableRow; PageLayoutText name; PageLayoutText type; PageLayoutText scope; PageLayoutText parameter; PageLayoutList paramlist; PageLayoutListItem param; PageLayoutText sourceparams; PageLayoutList sourcelist; PageLayoutListItem source; PageLayoutText plots; foreach (Indicator indi in _blox.Indicators) { name = new PageLayoutText(null, PageLayoutType.Plain, indi.ScriptName); type = new PageLayoutText(null, PageLayoutType.Plain, indi.Type); scope = new PageLayoutText(null, PageLayoutType.Plain, indi.Scope.ToString()); paramlist = new PageLayoutList(new string[] {Class_Params}); foreach(string str in indi.Params) { parameter = new PageLayoutText(null, PageLayoutType.Plain, str); param = new PageLayoutListItem(null, parameter); paramlist.addListElem(param); } sourcelist = new PageLayoutList(new string[] {Class_Params}); foreach (string str in indi.SourceParameters) { if (str != "Enter Value") sourceparams = new PageLayoutText(null, PageLayoutType.Plain, str); else sourceparams = new PageLayoutText(null, PageLayoutType.Plain, "-"); source = new PageLayoutListItem(null, sourceparams); sourcelist.addListElem(source); } plots = new PageLayoutText(null, PageLayoutType.Plain, indi.Plot.ToString()); tableRow = new PageLayoutTableData(null, new PageLayout[] {name, type, scope, paramlist, sourcelist,plots}); table.addTableData(tableRow); } return table; }
private void createBlox(Blox _blox) { PageDef page = new PageDef(_blox.Name, _blox.Name, _blox.Name + ".html", new XHTMLGenerator(m_szOutputDir + "\\")); createHeader(page); page.addPageLayout(new PageLayoutText(null, PageLayoutType.Section, _blox.Name + " Description")); page.addPageLayout(new PageLayoutText(null, PageLayoutType.Paragraph, "Here is a brief overview of all variables used in this block")); PageLayoutTable table = new PageLayoutTable(null); PageLayoutTableData tableRow; PageLayoutText name; PageLayoutText varType; PageLayoutText useType; PageLayoutText scope; PageLayoutText defaultValue; PageLayoutText external; PageLayoutText autoIndex; PageLayoutText SeriesSize; PageLayoutText plotName; table.addTableData(createBloxTableHeader()); //TODO: plot Eigenschaften der Variablen in die Tabelle schreiben foreach (BlockVar var in _blox.Vars) { name = new PageLayoutText(null, PageLayoutType.Plain, var.Name); varType = new PageLayoutText(null, PageLayoutType.Plain, var.VarType); useType = new PageLayoutText(null, PageLayoutType.Plain, var.UseType.ToString()); scope = new PageLayoutText(null, PageLayoutType.Plain, var.Scope.ToString()); defaultValue = new PageLayoutText(null, PageLayoutType.Plain, var.DefaultValue); external = new PageLayoutText(null,PageLayoutType.Plain,var.External.ToString()); if (var.VarType == "Series") { autoIndex = new PageLayoutText(null, PageLayoutType.Plain, var.AutoIndex.ToString()); SeriesSize = new PageLayoutText(null, PageLayoutType.Plain, var.SeriesSize.ToString()); } else { autoIndex = new PageLayoutText(null, PageLayoutType.Plain, "-"); SeriesSize = new PageLayoutText(null, PageLayoutType.Plain, "-"); } if (var.Plots == true) { plotName = new PageLayoutText(null, PageLayoutType.Plain, var.Plotname); } else { plotName = new PageLayoutText(null, PageLayoutType.Plain, "-"); } tableRow = new PageLayoutTableData(null, new PageLayout[] { name, varType, useType, scope, defaultValue, external, autoIndex, SeriesSize,plotName}); table.addTableData(tableRow); } page.addPageLayout(table); //Auskommentieren um auch Indikatoren auszugeben //Neue Tabelle mit Indikatoren erstellen, falls vorhanden in dem Block //if (_blox.Indicators.Count > 0) { // page.addPageLayout(createIndicatorTable(_blox)); //} Pages.getInstance().addPage(page); }