Beispiel #1
0
 public void Undo()
 {
     if (prevSpeed == CeilingFan.HIGH)
     {
         ceilingFan.High();
     }
     else if (prevSpeed == CeilingFan.MEDIUM)
     {
         ceilingFan.Medium();
     }
     else if (prevSpeed == CeilingFan.LOW)
     {
         ceilingFan.Low();
     }
     else if (prevSpeed == CeilingFan.OFF)
     {
         ceilingFan.Off();
     }
 }
Beispiel #2
0
 public void Execute()
 {
     prevSpeed = ceilingFan.GetSpeed();
     ceilingFan.High();
 }