Пример #1
0
 public void BoilWater()
 {
     for (int i = 1; i <= 100; i++)
     {
         temperature = i;
         if (i > 95)
         {
             BoiledEventArgs e = new BoiledEventArgs(i);
             OnTemperatrueWarning(e);
           
         }
     }
 }
Пример #2
0
 public void MakeAlert(object sender, BoiledEventArgs e)
 {
     Console.WriteLine("Alarm:嘀嘀嘀,水已经 {0} 度了:", e.temperature);
 }