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 Undo()
 {
     if (_prevSpeed == CeilingFanSpeed.HIGH)
     {
         _ceilingFan.High();
     }
     else if (_prevSpeed == CeilingFanSpeed.MEDIUM)
     {
         _ceilingFan.Medium();
     }
     else if (_prevSpeed == CeilingFanSpeed.LOW)
     {
         _ceilingFan.Low();
     }
     else
     {
         _ceilingFan.Off();
     }
 }
 public void Undo()
 {
     if (previousSpeed == CeilingFan.HIGH)
     {
         ceilingFan.High();
     }
     else if (previousSpeed == CeilingFan.LOW)
     {
         ceilingFan.Low();
     }
     else if (previousSpeed == CeilingFan.MEDIUM)
     {
         ceilingFan.Medium();
     }
     else if (previousSpeed == CeilingFan.OFF)
     {
         ceilingFan.Off();
     }
 }
Beispiel #4
0
        public void Undo()
        {
            switch (_previousSpeed)
            {
            case CeilingFanSpeed.Low:
                _ceilingFan.Low();
                break;

            case CeilingFanSpeed.Medium:
                _ceilingFan.Medium();
                break;

            case CeilingFanSpeed.High:
                _ceilingFan.High();
                break;

            case CeilingFanSpeed.Off:
                _ceilingFan.Off();
                break;
            }
        }
Beispiel #5
0
 public void Execute()
 {
     _prevSpeed = _ceilingFan.Speed;
     _ceilingFan.High();
 }
Beispiel #6
0
 public void Execute()
 {
     prevSpeed = fan.GetSpeed();
     fan.High();
 }
 public void Execute()
 {
     previousSpeed = ceilingFan.GetCurrentSpeed();
     ceilingFan.High();
 }
Beispiel #8
0
 public void execute()
 {
     prevSpeed = ceilingFan.getSpeed();
     ceilingFan.High();
 }
 public void Excecute()
 {
     prevspeed = ceilingFan.GetSpeed();
     ceilingFan.High();
 }