Beispiel #1
0
        //public void ShowMsg(int param)
        //{
        //    Console.WriteLine("Display:当前温度{0}度", param);
        //}
        public void ShowMsg(Object sender, Heater.BoiledEventArgs e)
        {
            Heater heater = (Heater)sender;

            Console.WriteLine("Display {0} - {1}", heater.type, heater.area);
            Console.WriteLine("Display :当前温度{0}度", e.temperature);
            Console.WriteLine();
        }
Beispiel #2
0
        //public void MakeAlert(int param)
        //{
        //    Console.WriteLine("alarm 水已经{0}度了", param);
        //}
        public void MakeAlert(Object sender, Heater.BoiledEventArgs e)
        {
            Heater heater = (Heater)sender;

            Console.WriteLine("alarm {0} - {1}", heater.type, heater.area);
            Console.WriteLine("alarm 水已经{0}度了", e.temperature);
            Console.WriteLine();
        }