Пример #1
0
        private UserAudioPlayerWPF GetOrCreateUserPlayer(Guid userID)
        {
            UserAudioPlayerWPF toReturn;

            if (!AudioPlayers.Any(m => m.UserID == userID))
            {
                toReturn = new UserAudioPlayerWPF(userID, this, UseWaveEvent);
                UIUpdateTimer.Elapsed += toReturn.UIUpdateTimer_Elapsed;
                AudioPlayers.Add(toReturn);
            }
            else
            {
                toReturn = AudioPlayers.Single(m => m.UserID == userID);
            }
            return(toReturn);
        }
Пример #2
0
        private UserAudioPlayerWPF GetOrCreateUserPlayer(Guid userID)
        {
            UserAudioPlayerWPF toReturn;

            if (!AudioPlayers.Any(m => m.UserID == userID))
            {
                toReturn = new UserAudioPlayerWPF(userID, this, UseWaveEvent);
                UIUpdateTimer.Elapsed += toReturn.UIUpdateTimer_Elapsed;
                AudioPlayers.Add(toReturn);
            }
            else
                toReturn = AudioPlayers.Single(m => m.UserID == userID);
            return toReturn;
        }
Пример #3
0
 private static void RemovePlayer(UserAudioPlayerWPF player)
 {
     AudioPlayers.Remove(player);
     player.Dispose();
 }
Пример #4
0
 private static void RemovePlayer(UserAudioPlayerWPF player)
 {
     AudioPlayers.Remove(player);
     player.Dispose();
 }