static void Main(string[] args) { GoFFlashlight Goffl = new GoFFlashlight(new consoleFlashlight()); while (true) { Console.ReadLine(); Goffl.Power(); } }
static void Main(string[] args) { IuserFlashligth Goffl = new GoFFlashlight(new consoleFlashlight()); while (true) { int key = Console.Read(); if ((char)key == 'p') { Goffl.Power(); } else if ((char)key == 'e') { Goffl.onEnter(); } } }