public static Speaker SynchronizedAdd(SpeakerCollection speakers, Speaker s)
        {
            var found = speakers.FirstOrDefault(sp => sp.DBID == s.DBID);

            if (found == null)
            {
                speakers.Add(s);
            }
            else
            {
                if (found.Synchronized < s.Synchronized)
                {
                    speakers.Remove(found);
                    speakers.Add(s);
                    return(found);
                }
            }

            return(null);
        }
Ejemplo n.º 2
0
        public static Speaker SynchronizedAdd(SpeakerCollection speakers, Speaker s)
        {
            var found = speakers.FirstOrDefault(sp=>sp.DBID == s.DBID);

            if (found == null)
            {
                speakers.Add(s);

            }
            else
            {
                if(found.Synchronized < s.Synchronized)
                {
                    speakers.Remove(found);
                    speakers.Add(s);
                    return found;
                }
            }

            return null;
        }
Ejemplo n.º 3
0
 internal void AddLocalSpeaker(Speaker sp)
 {
     _local.Add(sp);
     _allSpeakers.Add(new SpeakerContainer(_local, sp));
     Refresh();
 }