Beispiel #1
0
        public static void DisplayTemperature(object sender, BoildEventArgs e)
        {
            StandardEvent heater = (StandardEvent)sender;

            Console.WriteLine($"温度{heater.temperature}");
            Console.WriteLine("{0},{1}", heater.type, heater.name);
        }
Beispiel #2
0
        public void MakeAlert(object sender, BoildEventArgs e)
        {
            StandardEvent heater = (StandardEvent)sender;

            Console.WriteLine($"滴滴滴滴,温度超过{heater.temperature}");
            Console.WriteLine("{0},{1}", heater.type, heater.name);
        }