mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-06-19 13:28:16 +08:00

committed by
Patrik Svensson

parent
9f8ca6d648
commit
7471e9d38c
@ -4,7 +4,7 @@ namespace ColorExample
|
||||
{
|
||||
public static class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
public static void Main()
|
||||
{
|
||||
if (AnsiConsole.Capabilities.ColorSystem == ColorSystem.NoColors)
|
||||
{
|
||||
|
@ -3,9 +3,9 @@ using Spectre.Console;
|
||||
|
||||
namespace Diagnostic
|
||||
{
|
||||
public class Program
|
||||
public static class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
public static void Main()
|
||||
{
|
||||
AnsiConsole.MarkupLine("Color system: [bold]{0}[/]", AnsiConsole.Capabilities.ColorSystem);
|
||||
AnsiConsole.MarkupLine("Supports ansi? [bold]{0}[/]", AnsiConsole.Capabilities.SupportsAnsi);
|
||||
|
@ -2,9 +2,9 @@ using Spectre.Console;
|
||||
|
||||
namespace GridExample
|
||||
{
|
||||
public sealed class Program
|
||||
public static class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
public static void Main()
|
||||
{
|
||||
AnsiConsole.WriteLine();
|
||||
AnsiConsole.MarkupLine("Usage: [grey]dotnet [blue]run[/] [[options]] [[[[--]] <additional arguments>...]]]][/]");
|
||||
|
@ -2,9 +2,9 @@ using Spectre.Console;
|
||||
|
||||
namespace PanelExample
|
||||
{
|
||||
class Program
|
||||
public static class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
public static void Main()
|
||||
{
|
||||
var content = new Markup(
|
||||
"[underline]I[/] heard [underline on blue]you[/] like panels\n\n\n\n" +
|
||||
@ -14,7 +14,7 @@ namespace PanelExample
|
||||
new Panel(
|
||||
new Panel(content)
|
||||
{
|
||||
Border = BorderKind.Rounded
|
||||
Border = BorderKind.Rounded,
|
||||
}));
|
||||
|
||||
// Left adjusted panel with text
|
||||
@ -22,6 +22,7 @@ namespace PanelExample
|
||||
new Text("Left adjusted\nLeft").LeftAligned())
|
||||
{
|
||||
Expand = true,
|
||||
Header = new Header("Left", new Style(foreground: Color.Red)).LeftAligned(),
|
||||
});
|
||||
|
||||
// Centered ASCII panel with text
|
||||
@ -30,6 +31,7 @@ namespace PanelExample
|
||||
{
|
||||
Expand = true,
|
||||
Border = BorderKind.Ascii,
|
||||
Header = new Header("Center", new Style(foreground: Color.Green)).Centered(),
|
||||
});
|
||||
|
||||
// Right adjusted, rounded panel with text
|
||||
@ -38,6 +40,7 @@ namespace PanelExample
|
||||
{
|
||||
Expand = true,
|
||||
Border = BorderKind.Rounded,
|
||||
Header = new Header("Right", new Style(foreground: Color.Blue)).RightAligned(),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ namespace TableExample
|
||||
{
|
||||
public static class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
public static void Main()
|
||||
{
|
||||
// A simple table
|
||||
RenderSimpleTable();
|
||||
|
Reference in New Issue
Block a user