Пример #1
0
 /// <summary>
 /// Add title row on top of table
 /// </summary>
 /// <param name="builder"></param>
 /// <param name="title"></param>
 /// <returns></returns>
 public static ConsoleTableBuilder WithTitle(this ConsoleTableBuilder builder, string title, TextAligntment titleAligntment = TextAligntment.Center)
 {
     builder.TableTitle = title;
     builder.TableTitleTextAlignment = titleAligntment;
     return(builder);
 }
Пример #2
0
 /// <summary>
 /// Add title row on top of table
 /// </summary>
 /// <param name="builder"></param>
 /// <param name="title"></param>
 /// <param name="foregroundColor">text color</param>
 /// <param name="backgroundColor">background color</param>
 /// <returns></returns>
 public static ConsoleTableBuilder WithTitle(this ConsoleTableBuilder builder, string title, ConsoleColor foregroundColor, ConsoleColor backgroundColor, TextAligntment titleAligntment = TextAligntment.Center)
 {
     builder.TableTitle              = title;
     builder.TableTitleColor         = new ConsoleColorNullable(foregroundColor, backgroundColor);
     builder.TableTitleTextAlignment = titleAligntment;
     return(builder);
 }