Example #1
0
        public List <string> SetColor(string switchFriendlyName, string red, string green, string blue)
        {
            try
            {
                byte byteRed   = byte.Parse(red);
                byte byteGreen = byte.Parse(green);
                byte byteBlue  = byte.Parse(blue);

                System.Drawing.Color color = System.Drawing.Color.FromArgb(byteRed, byteGreen, byteBlue);

                controller.SetColor(switchFriendlyName, color);

                return(new List <string>()
                {
                    ""
                });
            }
            catch (Exception e)
            {
                logger.Log("Got exception in SetColor ({0}, {1}, {2}, {3}): {4}", switchFriendlyName, red, green, blue, e.ToString());
                return(new List <string>()
                {
                    e.Message
                });
            }
        }