private void SetupSmartThings() { for (int i = 0; i < _commands.Count; i++) { _controlPanel.BindCommand(CommandFactory.CreateCommand(_commands[i])); } }
private void InitializeSmartButtons() { SmartHomeButton smartHomeButton; for (int i = 0; i < _commands.Count; i++) { smartHomeButton = _commands[i].receiver as SmartHomeButton; smartHomeButton.CommandType = _commands[i].commandType; smartHomeButton.OnSmartButtonClickAsObservable().Subscribe(commandType => OnCommandSend(commandType)); _controlPanel.BindCommand(CommandFactory.CreateCommand(_commands[i])); } }