Esempio n. 1
0
 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();
 }
Esempio n. 2
0
        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");
        }
Esempio n. 3
0
 private static void DisplayNumber()
 {
     cc.WriteLineDark($"Number is now {number}\n");
 }