public void Run() { var cc = new ConsoleCompanion(2); cc.WriteLineCyan(@" =*=== "); cc.WriteLineCyan(@" $$- - $$$ "); cc.WriteLineCyan(@" $ < D$$ "); cc.WriteLineCyan(@" $ - $$$ "); cc.WriteLineCyan(@" , $$$$ | "); cc.WriteLineCyan(@"///; ,---' _ |----. "); cc.WriteLineCyan(@" \ )( / ) "); cc.WriteLineCyan(@" | \/ \. ' _.| \ $ "); cc.WriteLineCyan(@" | \ /( / /\_ \ $$$$$ "); cc.WriteLineCyan(@" \ / ( / / ) $$$ $$$ "); cc.WriteLineCyan(@" ( , /_/ ,`_,-----.,$$ $$$ "); cc.WriteLineCyan(@" | <----| \---## \ $$ "); cc.WriteLineCyan(@" / \\\ | $ "); cc.WriteLineCyan(@" ' ' | "); cc.WriteLineCyan(@" | \ / "); cc.WriteLineCyan(@" / \_| /______,/ / "); cc.WriteLineCyan(@" / / | / | | / "); cc.WriteLineCyan(@" ( /--| /. \ (\ (_ "); cc.WriteLineCyan(@" `----,( ( _\ \ / / ,/ "); cc.WriteLineCyan(@" | / /,_/,/ "); cc.WriteLineCyan(@" _|/ / / ( "); cc.WriteLineCyan(@" / ( ^-/, | "); cc.WriteLine("Press 'y' to go to main menu"); cc.AskForKey(new char[] { 'y', 'Y' }); NextPage = new MainMenuPage(); }
public void Run() { var cc = new ConsoleCompanion(2); cc.WriteLineRed(@" /\ /\ "); cc.WriteLineRed(@" ( \\ // ) "); cc.WriteLineRed(@" \ \\ // / "); cc.WriteLineRed(@" \_\\||||//_/ "); cc.WriteLineRed(@" \/ _ _ \ "); cc.WriteLineRed(@" \/|(O)(O)| "); cc.WriteLineRed(@" \/ | | "); cc.WriteLineRed(@" ___________________\/ \ / "); cc.WriteLineRed(@" // // |____| "); cc.WriteLineRed(@" // || / \ "); cc.WriteLineRed(@" //| \| \ 0 0 / "); cc.WriteLineRed(@" // \ ) V / \____/ "); cc.WriteLineRed(@" // \ / ( / "); cc.WriteLineRed(@" "" \ /_________| |_/ "); cc.WriteLineRed(@" / /\ / | || "); cc.WriteLineRed(@" / / / / \ || "); cc.WriteLineRed(@" | | | | | || "); cc.WriteLineRed(@" | | | | | || "); cc.WriteLineRed(@" |_| |_| |_|| "); cc.WriteLineRed(@" \_\ \_\ \_\\ "); cc.Space(); cc.WriteLine("Press 'y' to go to main menu"); cc.AskForKey(new char[] { 'y', 'Y' }); NextPage = new MainMenuPage(); }
public void Run() { var cc = new ConsoleCompanion(2); while (true) { double num1 = cc.AskForNumber("Number 1: "); double num2 = cc.AskForNumber("Number 2: "); cc.Space(); cc.Write($"Product of the number is "); cc.WriteLineCyan(num1 * num2); cc.Space(); cc.WriteLine("(A)gain of go back to (C)alculator?"); char answer = cc.AskForKey(new[] { 'a', 'c', 'A', 'C' }); if (answer.ToString().ToUpper() == "C") { break; } cc.Space(); } NextPage = new CalculatorPage(); }
public void Run() { // todo: get "cc" from a central place (using DI?) var cc = new ConsoleCompanion(2); while (true) { double num1 = cc.AskForNumber("Number 1: "); double num2 = cc.AskForNumber("Number 2: "); cc.Space(); cc.Write($"Sum of the number is "); cc.WriteCyan(num1 + num2 + "\n"); cc.Space(); cc.WriteLine("(A)gain of go back to (C)alculator?"); char answer = cc.AskForKey(new[] { 'a', 'c', 'A', 'C' }); if (answer.ToString().ToUpper() == "C") { break; } cc.Space(); } NextPage = new CalculatorPage(); }