public RemoteControl()
 {
     for (int i = 0; i < NUMBER_OF_SLOTS; i++)
     {
         _commands[i] = new NoCommand();
     }
 }
Example #2
0
 public RemoteControl()
 {
     for (int i = 0; i < onCommands.Length; i++)
     {
         onCommands[i]  = new NoCommand();
         offCommands[i] = new NoCommand();
     }
 }
Example #3
0
 internal TVRemoteControl(int buttonsCount)
 {
     this.buttons = new ICommand[buttonsCount];
     for (int i = 0; i < buttons.Length; i++)
     {
         buttons[i] = new NoCommand();
     }
 }
        public RemoteControl()
        {
            _onCommands  = new ICommand[7];
            _offCommands = new ICommand[7];
            ICommand noCommand = new NoCommand();

            for (var i = 0; i < 7; i++)
            {
                _onCommands[i]  = noCommand;
                _offCommands[i] = noCommand;
            }
        }
        public RemoteControl()
        {
            onCommands  = new Command[5];
            offCommands = new Command[5];
            Command noCommand = new NoCommand();

            for (int i = 0; i < 5; i++)
            {
                onCommands[i]  = noCommand;
                offCommands[i] = noCommand;
            }
        }
        public RemoteControl()
        {
            onCommands  = new Action[7];
            offCommands = new Action[7];
            undoCommand = null;

            for (int i = 0; i < 7; i++)
            {
                onCommands[i]  = new NoCommand().Execute;
                offCommands[i] = new NoCommand().Execute;
            }
        }
        public RemoteControlWithUndo()
        {
            onCommands = new command[7];
            offCommands = new command[7];

            command noCommand = new NoCommand();
            for (int i = 0; i < 7; i++)
            {
                onCommands[i] = noCommand;
                offCommands[i] = noCommand;
            }
            undoCommand = noCommand;
        }
Example #8
0
        public RemoteControl()
        {
            onCommands  = new ICommand[7];
            offCommands = new ICommand[7];

            ICommand noCommand = new NoCommand();

            for (int i = 0; i < onCommands.Length; i++)
            {
                onCommands[i]  = noCommand;
                offCommands[i] = noCommand;
            }
        }
        public RemoteControlWithUndo()
        {
            onCommands  = new Command[7];
            offCommands = new Command[7];

            Command noCommand = new NoCommand();

            for (int i = 0; i < 7; i++)
            {
                onCommands[i]  = noCommand;
                offCommands[i] = noCommand;
            }
            undoCommand = noCommand;
        }
Example #10
0
        public RemoteControl()
        {
            onCommands  = new ICommand[numberOfSlots];
            offCommands = new ICommand[numberOfSlots];
            NoCommand noCommand = new NoCommand();

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

            undoCommand = noCommand;
        }
Example #11
0
            public SimpleRemoteControl()
            {
                OnSlots  = new Command[2];
                OffSlots = new Command[2];

                for (int i = 0; i < OnSlots.Length; i++)
                {
                    OnSlots[i] = new NoCommand();
                }

                for (int i = 0; i < OffSlots.Length; i++)
                {
                    OffSlots[i] = new NoCommand();
                }
            }
        public RemoteControl()
        {
            _onCommands  = new ICommand[7];
            _offCommands = new ICommand[7];

            var noCommand = new NoCommand();

            for (int i = 0; i < 7; i++)
            {
                _onCommands[i]  = noCommand;
                _offCommands[i] = noCommand;
            }

            _undoCommand = noCommand;
        }
Example #13
0
        public RemoteControl(int slotsOnRemote)
        {
            // Example use of exception where parameter is an invalid value
            if (slotsOnRemote < 1)
            {
                throw new System.ArgumentException("RemoteControl Parameter cannot be less than 1", "slotsOnRemote");
            }

            // Create array of command slots/keys on remote
            _onCommand  = new Command[slotsOnRemote];
            _offCommand = new Command[slotsOnRemote];

            // Fill all slots with NoCommand
            for (int i = 0; i < slotsOnRemote; i++)
            {
                _onCommand[i]  = new NoCommand();
                _offCommand[i] = new NoCommand();
            }
        }