public void AudioFilesHaveCorrectNames() { Enum.GetValues(typeof(IDEEventType)).Cast <IDEEventType>().Where(x => x != IDEEventType.Unknown).ToList().ForEach(x => { Assert.IsTrue(File.Exists(IDEEventTypeMapper.IDEEventTypeToSoundPath(x))); }); }
public void PauseIsWorking() { Enum.GetValues(typeof(IDEEventType)).Cast <IDEEventType>().Where(x => x != IDEEventType.Unknown).ToList().ForEach(x => { Assert.IsTrue(File.Exists(IDEEventTypeMapper.IDEEventTypeToSoundPath(x))); }); }
public void CheckAudioFiles() { Enum.GetValues(typeof(IDEEventType)).Cast <IDEEventType>().Where(x => x != IDEEventType.Unknown).ToList().ForEach(x => { SoundPlayer player = new SoundPlayer(IDEEventTypeMapper.IDEEventTypeToSoundPath(x)); player.Play(); }); }
public void PlaySound(IDEEventType iDEEventType, bool loop = false) { var path = IDEEventTypeMapper.IDEEventTypeToSoundPath(iDEEventType); _player.Stop(); _player.SoundLocation = path; if (MakeTheSoundEventCatcher.Instance.OptionsPage.IsAudioActive(iDEEventType)) { if (loop) { _player.PlayLooping(); } else { _player.Play(); } } }