mirror of
				https://github.com/nsnail/spectre.console.git
				synced 2025-10-31 00:59:26 +08:00 
			
		
		
		
	 450d87f5d3
			
		
	
	450d87f5d3
	
	
	
		
			
			* Fixes a bug with `SelectionPrompt` and page size. * Allow `IAnsiConsoleInput` to return `null`.
		
			
				
	
	
		
			21 lines
		
	
	
		
			713 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			713 B
		
	
	
	
		
			C#
		
	
	
	
	
	
| using Spectre.Console;
 | |
| 
 | |
| namespace Generator.Commands.Samples
 | |
| {
 | |
|     internal class RuleSample : BaseSample
 | |
|     {
 | |
|         public override (int Cols, int Rows) ConsoleSize => (82, 10);
 | |
| 
 | |
|         public override void Run(IAnsiConsole console)
 | |
|         {
 | |
|             console.Write(new Rule());
 | |
|             console.WriteLine();
 | |
|             console.Write(new Rule("[blue]Left aligned[/]").LeftAligned().RuleStyle("red"));
 | |
|             console.WriteLine();
 | |
|             console.Write(new Rule("[green]Centered[/]").Centered().RuleStyle("green"));
 | |
|             console.WriteLine();
 | |
|             console.Write(new Rule("[red]Right aligned[/]").RightAligned().RuleStyle("blue"));
 | |
|             console.WriteLine();
 | |
|         }
 | |
|     }
 | |
| } |