예제 #1
0
        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;
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }