コード例 #1
0
        static void Main(string[] args)
        {
            GoFFlashlight Goffl = new GoFFlashlight(new consoleFlashlight());


            while (true)
            {
                Console.ReadLine();
                Goffl.Power();
            }
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: jonathan93sh/SWD
        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();
                }
            }
        }