Esempio n. 1
0
        static void Main(string[] args)
        {
            GoFFlashlight Goffl = new GoFFlashlight(new consoleFlashlight());


            while (true)
            {
                Console.ReadLine();
                Goffl.Power();
            }
        }
Esempio n. 2
0
        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();
                }
            }
        }