public void Undo()
 {
     if (PrevSpeed == Speed.HIGH)
     {
         CeilingFan.High();
     }
     else if (PrevSpeed == Speed.MEDIUM)
     {
         CeilingFan.Medium();
     }
     else if (PrevSpeed == Speed.LOW)
     {
         CeilingFan.Low();
     }
     else if (PrevSpeed == Speed.OFF)
     {
         CeilingFan.Off();
     }
 }
Exemple #2
0
 public void Execute()
 {
     PrevSpeed = CeilingFan.GetSpeed();
     CeilingFan.High();
 }