protected void DisplayHeader(IPage page) { // todo: able to change header Console.Clear(); // todo: clear without flicker? cc.Line(ConsoleColor.DarkGray); cc.WriteLineDark($"{page.Name.ToUpper()}"); cc.Line(ConsoleColor.DarkGray); cc.Space(); }
private static void WhatsYourName() { var cc = new ConsoleCompanion(); string name = cc.AskForStringRegex("What's your name? ", @"[a-z A-ZåäöÅÄÖ]{2,}"); int age = cc.AskForInteger("How old are you? ", 0, 100); cc.Space(); cc.WriteLineDark($"Your name is {name} and you are {age} years old"); }
private static void DisplayNumber() { cc.WriteLineDark($"Number is now {number}\n"); }