internal void HandleReceiveData(Object sender, GroupDataReceivedEventArgs Data) { ushort red = 0; ushort green = 0; ushort blue = 0; if (float.Parse(Data.XY[0]) > 0) { ColourConverter.Point point = new ColourConverter.Point(double.Parse(Data.XY[0]), double.Parse(Data.XY[1])); ColourConverter.RGBColour RGB = ColourConverter.XYtoRGB(point, "LCT001"); red = Convert.ToUInt16(RGB.red * 255); green = Convert.ToUInt16(RGB.green * 255); blue = Convert.ToUInt16(RGB.blue * 255); } newGroupInfo(Data.Name, Data.Type, Data.AllOn.ToString(), Data.AnyOn.ToString(), Data.On.ToString(), Data.Bri, Data.Hue, Data.Sat, red, green, blue); ID = Data.ID; }
internal void FireOnGroupDataChange(GroupDataReceivedEventArgs e) { _OnGroupDataReceived(null, e); }