private static void DisplayApplicationHeader() { TextBlock title = new TextBlock { Text = "ConsoleTools Demo - HorizontalLine", ForegroundColor = CustomConsole.EmphasizedColor }; HorizontalLine horizontalLine = new HorizontalLine { Character = '=', ForegroundColor = CustomConsole.EmphasizedColor, Margin = 0 }; TextBlock description = new TextBlock { Text = "This demo shows the usage of the HorizontalLine controls.", Margin = "0 1" }; title.Display(); horizontalLine.Display(); description.Display(); }
public void Display() { OnBeforeDisplay(); titleBlock.Display(); horizontalLine.Display(); }
protected override void DoExecute() { HorizontalLine horizontalLine = new HorizontalLine { ForegroundColor = ConsoleColor.Magenta }; horizontalLine.Display(); }
protected override void DoExecute() { HorizontalLine horizontalLine = new HorizontalLine { Width = 50 }; horizontalLine.Display(); }
protected override void DoExecute() { HorizontalLine horizontalLine = new HorizontalLine { Character = '*' }; horizontalLine.Display(); }
protected override void DoExecute() { HorizontalLine horizontalLine = new HorizontalLine { BackgroundColor = ConsoleColor.Blue }; horizontalLine.Display(); }
protected override void DoExecute() { HorizontalLine horizontalLine = new HorizontalLine { Padding = 3, BackgroundColor = ConsoleColor.DarkGray // Added to easyer see the paddings. }; horizontalLine.Display(); }
protected override void DoExecute() { HorizontalLine horizontalLine = new HorizontalLine { Width = 50, HorizontalAlignment = HorizontalAlignment.Center }; horizontalLine.Display(); }
private static void DisplayApplicationHeader() { CustomConsole.WriteLineEmphasized("ConsoleTools Demo - Progress spinner"); HorizontalLine horizontalLine1 = new HorizontalLine { Character = '=', Margin = "0 0 0 1" }; horizontalLine1.Display(); CustomConsole.WriteLine("Step 1: Select a template for the spinner."); CustomConsole.WriteLine("Step 2: The application will simulate some work and display the spinner until work is finish."); HorizontalLine horizontalLine2 = new HorizontalLine { Character = '-', Margin = "0 0 0 1" }; horizontalLine2.Display(); }
private static void HandleMenuBeforeDisplay(object sender, EventArgs args) { HorizontalLine horizontalLine = new HorizontalLine(); horizontalLine.Display(); }