void PlayAlert(AudioAlertType alertType) { if (!IsActive) { AudioAlert.Instance.Play(alertType); } }
public void Stop(AudioAlertType alertType) { SoundPlayer player; if (sounds.TryGetValue(alertType, out player)) { player.Stop(); } }
public void Play(AudioAlertType alertType) { SoundPlayer player; if (Enabled && sounds.TryGetValue(alertType, out player)) { player.Play(); } }
void LoadSound(AudioAlertType alertType) { var folder = Path.Combine(AppInfo.Location, "Sounds"); string soundName = alertType.ToString() + ".wav"; string soundLocation = Path.Combine(folder, soundName); if (File.Exists(soundLocation)) { var player = new SoundPlayer(soundLocation); sounds[alertType] = player; } }
void PlayAlert(AudioAlertType alertType) { if (IsGroupChat) { if (!IsActive && !ignore) { AudioAlert.Instance.Play(alertType); } } else { if (!IsActive && !PrimaryBuddy.IsIgnored) { AudioAlert.Instance.Play(alertType); } } }
internal AudioAlertEventArgs(AudioAlertType alertType) { AlertType = alertType; }