예제 #1
0
        public void undo()
        {
            switch (_prevSpeed)
            {
            case CeilingFan.eSpeed.OFF:
                _ceilingFan.Off();
                break;

            case CeilingFan.eSpeed.LOW:
                _ceilingFan.Low();
                break;

            case CeilingFan.eSpeed.MEDIUM:
                _ceilingFan.Medium();
                break;

            case CeilingFan.eSpeed.HIGH:
                _ceilingFan.High();
                break;

            default:
                break;
            }
            _prevSpeed = _ceilingFan.speed;
        }
예제 #2
0
 public void execute()
 {
     _prevSpeed = _ceilingFan.speed;
     _ceilingFan.Off();
 }
 public void execute()
 {
     _ceilingFan.Off();
 }