mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-04-16 00:42:51 +08:00
22 lines
662 B
C#
22 lines
662 B
C#
using System.Threading;
|
|
using Spectre.Console;
|
|
|
|
namespace Generator.Commands.Samples
|
|
{
|
|
public class ColumnsSample : BaseSample
|
|
{
|
|
public override void Run(IAnsiConsole console)
|
|
{
|
|
for (var i = 0; i <= 10; i++)
|
|
{
|
|
var n = 3 * i + 1;
|
|
console.Write(new Columns(
|
|
new Text($"Item {n}", new Style(Color.Red, Color.Black)),
|
|
new Text($"Item {n+1}", new Style(Color.Green, Color.Black)),
|
|
new Text($"Item {n+2}", new Style(Color.Blue, Color.Black))
|
|
));
|
|
Thread.Sleep(200);
|
|
}
|
|
}
|
|
}
|
|
} |