public IEnumerable <string> ToColumnReport(string Title = null)
        {
            var report = new ColumnReport();

            if (Title != null)
            {
                report.WriteTextLine(Title);
            }
            else
            {
                report.WriteTextLine(this.ReportTitle);
            }

            report.AddColDefn("Control Char1", 0, WhichSide.Left);
            report.AddColDefn("Control Char2");

            report.WriteColumnHeading();
            var valueList = new string[]
            {
                this.ControlChars[0].ToHex( ),
                this.ControlChars[1].ToHex( ),
            };

            report.WriteDetail(valueList);
            return(report);
        }
Exemplo n.º 2
0
 private static void DefineReportColumns(ColumnReport Report)
 {
     Report.AddColDefn("Row");
     Report.AddColDefn("Col");
     Report.AddColDefn("Length");
     Report.AddColDefn("Value text", 40);
 }
Exemplo n.º 3
0
        public IEnumerable <string> ToColumnReport(string Title = null)
        {
            var report = new ColumnReport(this.ReportTitle, 60);

            DefineReportColumns(report);

            // report.WriteColumnHeading();

            foreach (var itemBase in this.Items)
            {
                if (itemBase is ScreenSection)
                {
                }
                else
                {
                    var item = itemBase as ScreenAtomic;

                    var valueList = new List <string>();
                    valueList.Add(item.ScreenLoc.RowNum.ToString());
                    valueList.Add(item.ScreenLoc.ColNum.ToString());
                    valueList.Add(item.ItemName);
                    valueList.Add(item.ItemType.ToString());
                    valueList.Add(item.GetValue());

                    report.WriteDetail(valueList.ToArray());
                }
            }

            return(report.ToLines());
        }
Exemplo n.º 4
0
 private static void DefineReportColumns(ColumnReport Report)
 {
     Report.AddColDefn("Row");
     Report.AddColDefn("Col");
     Report.AddColDefn("Section");
     Report.AddColDefn("Item name");
     Report.AddColDefn("Item type");
     Report.AddColDefn("Value text", 40);
 }
Exemplo n.º 5
0
        public static ColumnReport Report(this ISectionHeader Defn, string Title = null)
        {
            var report = new ColumnReport();

            // write the title line.
            if (Title.IsNullOrEmpty( ) == false)
            {
                report.WriteTextLine(Title);
                report.WriteGapLine();
            }

            report.AddColDefn("ItemName", 15, WhichSide.Left);
            report.AddColDefn("Type", 7);
            report.AddColDefn("Row/Col", 7);
            report.AddColDefn("Lgth", 5);
            report.AddColDefn("Usage", 6);
            report.AddColDefn("Dspatr", 6);
            report.AddColDefn("Text", 50);

            report.WriteColumnHeading(true);

            foreach (var item in Defn.Items)
            {
                var valueList = new string[]
                {
                    item.ItemName,
                    item.ItemType.ToString( ),
                    item.ScreenLoc.ToText( ),
                    item.GetLength( ),
                    item.GetUsage( ).ToString( ),
                    item.GetDsplyAttr( ).ToDsplyAttrText( ),
                    item.GetValue( )
                };

                report.WriteDetail(valueList);

                if (item is IScreenSection)
                {
                    var sectReport =
                        (item as ISectionHeader)
                        .Report("Items of section " + item.ItemName);
                    report.WriteGapLine();
                    report.WriteTextLines(sectReport, 5);
                    report.WriteGapLine();
                }
            }

            return(report);
        }
        public IEnumerable <string> DefnToColumnReport( )
        {
            var report = new ColumnReport();

            report.AddColDefn("Control Char1", 0, WhichSide.Left);
            report.AddColDefn("Control Char2");
            report.AddColDefn("Number orders");

            report.WriteColumnHeading();
            var valueList = new string[]
            {
                this.ControlChars[0].ToHex( ),
                this.ControlChars[1].ToHex( ),
                this.OrderList.Count.ToString( )
            };

            report.WriteDetail(valueList);
            return(report);
        }
Exemplo n.º 7
0
        public static IEnumerable <string> ToColumnReport(
            this ILogList LogList, string Title = null)
        {
            var report = new ColumnReport();

            if (Title != null)
            {
                report.WriteTextLine(Title);
            }
            else
            {
                var title = LogList.GetListTitle();
                if (title.IsNullOrEmpty() == false)
                {
                    report.WriteTextLine(title);
                }
            }

            report.AddColDefn("LogTime", 12, WhichSide.Left);
            report.AddColDefn("Source");
            report.AddColDefn("Message text", -1);

            report.WriteColumnHeading();

            foreach (var item in LogList.LogItems())
            {
                var valueList = new string[]
                {
                    item.LogTime.ToString("HH:mm:ss.fff"),
                    item.MergeName,
                    item.LogText
                };

                if (item.NewGroup == true)
                {
                    Array.Clear(valueList, 0, valueList.Length);
                }

                report.WriteDetail(valueList);
            }

            return(report);
        }
Exemplo n.º 8
0
        public IEnumerable <string> ToColumnReport(string Title = null)
        {
            var report = new ColumnReport(this.ReportTitle, 60);

            DefineReportColumns(report);

            // report.WriteColumnHeading();

            foreach (var item in this.ContentItems( ))
            {
                var valueList = new List <string>();
                valueList.Add(item.RowCol.RowNum.ToString());
                valueList.Add(item.RowCol.ColNum.ToString());
                valueList.Add(item.GetItemLength(this).ToString());
                valueList.Add(item.GetShowText(this));

                report.WriteDetail(valueList.ToArray());
            }

            return(report.ToLines());
        }
Exemplo n.º 9
0
        public IEnumerable <string> ToColumnReport(string Title = null)
        {
            var report = new ColumnReport();

            report.AddColDefn("RowNum");
            report.AddColDefn("ColNum");
            report.AddColDefn("TypeCode");
            report.AddColDefn("Length");
            report.AddColDefn("Class", 30);

            var title = Title;

            if (title == null)
            {
                title = ReportTitle;
            }
            if (title != null)
            {
                report.WriteTextLine(title);
            }
            report.WriteColumnHeading(true);

            foreach (var item in this)
            {
                var      itemRowCol   = item.ItemRowCol;
                var      className    = item.GetType().ToString();
                var      iMore        = item as IVisualItemMore;
                string[] columnValues = new string[]
                {
                    itemRowCol.RowNum.ToString( ),
                         itemRowCol.ColNum.ToString( ),
                         iMore.TypeCode( ),
                         item.ShowLength.ToString( ),
                         className.LastSplit(".")
                };
                report.WriteDetail(columnValues);
            }

            return(report);
        }
Exemplo n.º 10
0
        public IEnumerable <string> ToColumnReport(ScreenContent Content, string Title = null)
        {
            var report = new ColumnReport("Content Dictionary", 60);

            DefineReportColumns(report);

            // report.WriteColumnHeading();

            foreach (var item in this)
            {
                var rowkey  = item.Key;
                var content = item.Value;

                var valueList = new List <string>();
                valueList.Add(rowkey.RowNum.ToString());
                valueList.Add(rowkey.ColNum.ToString());
                valueList.Add(content.GetItemLength(Content).ToString());
                valueList.Add(content.GetShowText(Content));

                report.WriteDetail(valueList.ToArray());
            }

            return(report.ToLines());
        }