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);
        }
Exemple #2
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);
        }
Exemple #4
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);
        }
Exemple #5
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);
        }