Exemplo n.º 1
0
        public RemoteControl()
        {
            numberOfSlots = 7;

            OnCommands  = new Command[numberOfSlots];
            OffCommands = new Command[numberOfSlots];

            Command noCommand = new NoCommand();

            for (int i = 0; i < numberOfSlots; i++)
            {
                OnCommands[i]  = noCommand;
                OffCommands[i] = noCommand;
            }
        }
Exemplo n.º 2
0
        public RemoteControlWithUndo()
        {
            numberOfSlots = 7;

            onCommands  = new ICommand[numberOfSlots];
            offCommands = new ICommand[numberOfSlots];

            ICommand noCommand = new NoCommand();

            for (int i = 0; i < numberOfSlots; i++)
            {
                onCommands[i]  = noCommand;
                offCommands[i] = noCommand;
            }

            undoCommand = noCommand;
        }