Exemple #1
0
        public void Run()
        {
            Console.Write("Enter your alert message: ");
            string message = Console.ReadLine();

            // Ask for how many seconds to wait
            Console.Write("How many seconds to wait? ");
            int seconds = Convert.ToInt32(Console.ReadLine());

            // Create the clock class
            CountDownClock cdc = new CountDownClock(message, seconds);

            // Create the observer class
            CountDownTimerDisplay display = new CountDownTimerDisplay(cdc);

            cdc.Run();
        }
Exemple #2
0
        public void Run()
        {
            Console.Write("Enter your alert message: ");
            string message = Console.ReadLine();

            // Ask for how many seconds to wait
            Console.Write("How many seconds to wait? ");
            int seconds = Convert.ToInt32(Console.ReadLine());

            // Create the clock class
            CountDownClock cdc = new CountDownClock(message, seconds);

            // Create the observer class
            CountDownTimerDisplay display = new CountDownTimerDisplay(cdc);
            cdc.Run();
        }