예제 #1
0
        public void SendEnvColor(byte type, string hex)
        {
            ColorDesc c;

            if (Colors.TryParseHex(hex, out c))
            {
                Send(Packet.EnvColor(type, c.R, c.G, c.B));
            }
            else
            {
                Send(Packet.EnvColor(type, -1, -1, -1));
            }
        }
예제 #2
0
        public void SendEnvColor(byte type, string hex)
        {
            if (String.IsNullOrEmpty(hex))
            {
                Send(Packet.EnvColor(type, -1, -1, -1)); return;
            }

            try {
                CustomColor c = Colors.ParseHex(hex);
                Send(Packet.EnvColor(type, c.R, c.G, c.B));
            } catch (ArgumentException) {
                Send(Packet.EnvColor(type, -1, -1, -1));
            }
        }