Esempio n. 1
0
        }                                             //rgb value of the color for the button

        public HueLamp(bool isOn, int brightness, int hue, int saturation, int ct, bool reachable, string name, string modelId, string swVersion, string uniqueId, int number, Bridge bridge)
        {
            IsOn       = isOn;
            Brightness = brightness;
            Hue        = hue;
            Saturation = saturation;
            Xy         = new[] { 0.0f, 0.0f };
            Ct         = ct;
            Reachable  = reachable;
            Name       = name;
            ModelId    = modelId;
            SwVersion  = swVersion;
            UniqueId   = uniqueId;
            Bridge     = bridge;
            Number     = number;
            if (isOn)
            {
                RgbColor = new SolidColorBrush(ColorUtil.HsvToRgb(hue, saturation, brightness));
            }
            else
            {
                RgbColor = new SolidColorBrush(new Color());
            }
        }