private ObservableCollection <LightItem> CreateLightItems() { HueCommunicationService hcs = new HueCommunicationService(); List <LightItem> availableLights = hcs.GetAvailableLights(); ObservableCollection <LightItem> observableLights = new ObservableCollection <LightItem>(); foreach (var light in availableLights) { observableLights.Add(light); } return(observableLights); }
public int testScene() { HueCommunicationService hcs = new HueCommunicationService(); ObservableCollection <LightItem> lightItems = GetInstance().GetLightItems(); foreach (var lightItem in lightItems) { ColorDTO nextColor = ColorDTO.GetRandomColor(); hcs.CycleLightColor(nextColor, lightItem.LightNumber); } return(0); }
public void DoScene() { if (colorCycleFunc != null) { colorCycleFunc(); } else { HueCommunicationService hcs = new HueCommunicationService(); foreach (var key in sceneMappings.Keys) { hcs.ChangeLightColor(sceneMappings[key], key); } } }