Пример #1
0
        public void send(ApplicationIcon toSend)
        {
            toSend.id = AudioSession.getCode(toSend.id);
            string data = tag + JSONManager.serialize(toSend);

            connection.send(data);
        }
        public void send(string tag, AudioSession toSend)
        {
            toSend        = toSend.toCodeId();
            toSend.volume = (float)Math.Round(toSend.volume, 2);
            string data = tag + JSONManager.serialize(toSend);

            conn.send(data);
        }
        public void send(AudioSession[] toSend)
        {
            AudioSession[] finalSend = new AudioSession[toSend.Length];
            for (int i = 0; i < toSend.Length; i++)
            {
                toSend[i].volume = (float)Math.Round(toSend[i].volume, 2);
                finalSend[i]     = toSend[i].toCodeId();
            }

            string data = tag + JSONManager.serialize(finalSend);

            conn.send(data);
        }