예제 #1
0
 public void RisingTemperature(Kettle k)
 {
     if (k.Temperature > 100)
     {
         k.LED = Color.Green;
     }
 }
예제 #2
0
 public void IncresedLiquidTemperature(WarningLED warning, Kettle k)
 {
     if (k.KettelOn)
     {
         k.Temperature += 10;
     }
     IncreasernTemperature += warning.RisingTemperature;
     IncreasernTemperature.Invoke(k);
 }
예제 #3
0
 public void PressedPowerButton(WarningLED warning, Kettle k)
 {
     KettlePowerOn += warning.TurnKettleOn;
     if (!k.KettelOn)
     {
         KettlePowerOn.Invoke(k);
     }
     else
     {
         k.KettelOn    = false;
         k.LED         = Color.Off;
         k.Temperature = 15;
     }
 }
예제 #4
0
 public void TurnKettleOn(Kettle k)
 {
     k.KettelOn = true;
     k.LED      = Color.Red;
 }