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(); }); }
private async System.Threading.Tasks.Task SetEventForActionAsync(IDEEventType iDEEventType) { await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); string actionName = IDEEventTypeMapper.IDEEventTypeToVSAction(iDEEventType); Command cmdobj = _commands.Item(actionName, 0); var commandEvent = _events.CommandEvents[cmdobj.Guid, cmdobj.ID]; commandEvent.BeforeExecute += (string Guid, int ID, object CustomIn, object CustomOut, ref bool CancelDefault) => { DamnGoodPlayer.Instance.PlaySound(iDEEventType); }; _actionCommandEvents.Add(actionName, commandEvent); }
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(); } } }