Ejemplo n.º 1
0
        private void FetchHueObject()
        {
            if (_objectypeindex == -1)
            {
                ListHueObject = null;
                return;
            }

            HelperResult hr;

            switch (_objectypeindex)
            {
            case 0:
                hr = HueObjectHelper.GetBridgeLights(BridgeStore.SelectedBridge);
                break;

            case 1:
                hr = HueObjectHelper.GetBridgeGroups(BridgeStore.SelectedBridge);
                break;

            case 2:
                hr = HueObjectHelper.GetBridgeScenes(BridgeStore.SelectedBridge);
                break;

            default:
                hr = new HelperResult()
                {
                    Success = false
                };
                break;
            }

            if (hr.Success)
            {
                ListHueObject = (List <HueObject>)hr.Hrobject;
            }
        }
Ejemplo n.º 2
0
        private void FetchHueObject()
        {
            switch (_objectypeindex)
            {
            case -1:
                ListHueObject = null;
                break;

            case 0:
                ListHueObject = HueObjectHelper.GetBridgeLights(_bridge);
                break;

            case 1:
                ListHueObject = HueObjectHelper.GetBridgeGroups(_bridge);
                break;

            case 2:
                ListHueObject = HueObjectHelper.GetBridgeScenes(_bridge);
                break;

            default:
                break;
            }
        }