コード例 #1
0
        public void Undo()
        {
            switch (prevSpeed)
            {
            case CeilingFan.Speed.HIGH:
                fan.High();
                break;

            case CeilingFan.Speed.MEDIUM:
                fan.Medium();
                break;

            case CeilingFan.Speed.LOW:
                fan.Low();
                break;

            case CeilingFan.Speed.OFF:
                fan.Off();
                break;
            }
        }
コード例 #2
0
 public void Execute()
 {
     fan.High();
 }