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); }
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; }
private static void RemovePlayer(UserAudioPlayerWPF player) { AudioPlayers.Remove(player); player.Dispose(); }
private static void RemovePlayer(UserAudioPlayerWPF player) { AudioPlayers.Remove(player); player.Dispose(); }