private static void ShowExampleTables() { Table table = new Table("One", "Two", "Three"); table.AddRow("1", "2", "3"); table.AddRow("Short", "item", "Here"); table.AddRow("Longer items go here", "stuff stuff", "stuff"); table.Config = TableConfiguration.Default(); string test = String.Empty.PadRight(Console.WindowWidth, '-'); Console.Write(test); Console.SetCursorPosition(0, 0); Console.Write(table.ToString()); Console.WriteLine(); table.Config = TableConfiguration.Markdown(); Console.Write(table.ToString()); Console.WriteLine(); table.Config = TableConfiguration.MySql(); Console.Write(table.ToString()); Console.WriteLine(); table.Config = TableConfiguration.MySqlSimple(); Console.Write(table.ToString()); Console.WriteLine(); table.Config = TableConfiguration.Unicode(); Console.Write(table.ToString()); Console.WriteLine(); table.Config = TableConfiguration.UnicodeAlt(); Console.Write(table.ToString()); Console.WriteLine(); }
private static void ShowExampleTables() { ShowAlignedTables(); Console.WriteLine(); Table table = new Table("One", "Two", "Three"); table.AddRow("1", "2", "3"); table.AddRow("Short", "item", "Here"); table.AddRow("Longer items go here", "stuff stuff", "stuff"); table.Config = TableConfiguration.Default(); Console.Write(table.ToString()); Console.WriteLine(); table.Config = TableConfiguration.Markdown(); Console.Write(table.ToString()); Console.WriteLine(); table.Config = TableConfiguration.MySql(); Console.Write(table.ToString()); Console.WriteLine(); table.Config = TableConfiguration.MySqlSimple(); Console.Write(table.ToString()); Console.WriteLine(); table.Config = TableConfiguration.Unicode(); Console.Write(table.ToString()); Console.WriteLine(); table.Config = TableConfiguration.UnicodeAlt(); Console.Write(table.ToString()); Console.WriteLine(); }
private static void ShowExampleGeneratedTable() { DataStuff[] objects = new DataStuff[10]; Random random = new Random(); for (int i = 0; i < 10; i++) { objects[i] = new DataStuff(random); } Table table = new Table(TableConfiguration.MySql()); table.From <DataStuff>(objects); Console.Write(table.ToString()); }