Esempio n. 1
0
        public void Undo()
        {
            switch (_prevSpeed)
            {
            case CeilingFanSpeed.High: _ceilingFan.high(); break;

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

            case CeilingFanSpeed.Low: _ceilingFan.low(); break;

            case CeilingFanSpeed.Off: _ceilingFan.Off(); break;
            }
        }
Esempio n. 2
0
 public void Execute()
 {
     _prevSpeed = _ceilingFan.Speed;
     _ceilingFan.high();
 }