mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-06-19 05:18:16 +08:00
Initial work on TextPath widget
This commit is contained in:

committed by
Phil Scott

parent
d6cdd1fbda
commit
66fc949e2a
15
examples/Console/Paths/Paths.csproj
Normal file
15
examples/Console/Paths/Paths.csproj
Normal file
@ -0,0 +1,15 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ExampleTitle>Paths</ExampleTitle>
|
||||
<ExampleDescription>Demonstrates how to write paths.</ExampleDescription>
|
||||
<ExampleGroup>Widgets</ExampleGroup>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Shared\Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
20
examples/Console/Paths/Program.cs
Normal file
20
examples/Console/Paths/Program.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using Spectre.Console;
|
||||
|
||||
namespace Live;
|
||||
|
||||
public static class Program
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
AnsiConsole.WriteLine();
|
||||
AnsiConsole.Write(new TextPath(@"C:\Users\Patrik\Source\github\patriksvensson-forks\spectre.console\examples\Console\Paths"));
|
||||
AnsiConsole.WriteLine();
|
||||
|
||||
var table = new Table().BorderColor(Color.Grey);
|
||||
table.AddColumns("[grey]Index[/]", "[yellow]Path[/]");
|
||||
table.AddRow(new Text("1"), new TextPath(@"C:\Users\Patrik\Source\github\patriksvensson-forks\spectre.console\examples\Console\Paths"));
|
||||
AnsiConsole.Write(table);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user