Beispiel #1
0
        public static void ShowMsg(Object sender, Heater.BoiledEventArgs e)
        {
            Heater heater = (Heater)sender;

            Console.WriteLine("Display: {0} - {1}: ", heater.area, heater.type);
            Console.WriteLine("Display: water would be boiled, the temperature is : {0}", e.temperature);
            Console.WriteLine();
        }
Beispiel #2
0
        public void MakeAlert(Object sender, Heater.BoiledEventArgs e)
        {
            Heater heater = (Heater)sender;

            Console.WriteLine("Alarm:{0} - {1}", heater.area, heater.type);
            Console.WriteLine("Alarm:DI DI DI,the water is {0} temperature", e.temperature);
            Console.WriteLine();
        }