Exemple #1
0
        public void MakeAlert(object sender, Heater.BoiledEventArgs e)
        {
            var heater = (Heater)sender;

            Console.WriteLine("Alarm:{0} - {1}: ", heater.Area, heater.Type);
            Console.WriteLine("Alarm: 嘀嘀嘀,水已经 {0} 度了:", e.Temperature);
            Console.WriteLine();
        }
Exemple #2
0
        public static void ShowMsg(object sender, Heater.BoiledEventArgs e)
        {
            var heater = (Heater)sender;

            Console.WriteLine("Display:{0} - {1}: ", heater.Area, heater.Type);
            Console.WriteLine("Display:水快烧开了,当前温度:{0}度。", e.Temperature);
            Console.WriteLine();
        }