示例#1
0
        private string PrintListType(List <int> ColumnsMaxLengths)
        {
            StringBuilder toPrint = new StringBuilder();

            toPrint.Append(EliteConsole.PrintInfo(Spacer));
            for (int i = 0; i < Columns.Count; i++)
            {
                toPrint.Append(EliteConsole.PrintInfo(Columns[i]));
                toPrint.Append(EliteConsole.PrintInfo(new String(' ', ColumnsMaxLengths[i] - Columns[i].Length + 1)));
            }
            toPrint.Append(EliteConsole.PrintInfoLine());
            toPrint.Append(EliteConsole.PrintInfo(Spacer));
            for (int i = 0; i < Columns.Count; i++)
            {
                toPrint.Append(EliteConsole.PrintInfo(new String('-', Columns[i].Length)));
                toPrint.Append(EliteConsole.PrintInfo(new String(' ', ColumnsMaxLengths[i] - Columns[i].Length + 1)));
            }
            toPrint.Append(EliteConsole.PrintInfoLine());
            foreach (List <string> row in Rows)
            {
                toPrint.Append(EliteConsole.PrintInfo(Spacer));
                for (int i = 0; i < row.Count; i++)
                {
                    toPrint.Append(EliteConsole.PrintInfo(row[i]));
                    toPrint.Append(EliteConsole.PrintInfo(new String(' ', ColumnsMaxLengths[i] - row[i].Length + 1)));
                }
                toPrint.Append(EliteConsole.PrintInfoLine());
            }
            return(toPrint.ToString());
        }
示例#2
0
        private string PrintParameterType(List <int> ColumnsMaxLengths)
        {
            StringBuilder toPrint = new StringBuilder();

            toPrint.Append(EliteConsole.PrintInfo(Spacer));
            toPrint.Append(EliteConsole.PrintHighlightLine(this.Title));
            toPrint.Append(EliteConsole.PrintInfo(Spacer));
            toPrint.Append(EliteConsole.PrintInfoLine(new String('=', ColumnsMaxLengths.Sum() + Columns.Count - 1)));
            foreach (List <string> row in Rows)
            {
                toPrint.Append(EliteConsole.PrintInfo(Spacer));
                for (int i = 0; i < row.Count; i++)
                {
                    toPrint.Append(EliteConsole.PrintInfo(row[i]));
                    toPrint.Append(EliteConsole.PrintInfo(new String(' ', ColumnsMaxLengths[i] - row[i].Length + 1)));
                }
                toPrint.Append(EliteConsole.PrintInfoLine());
            }
            return(toPrint.ToString());
        }