private void RulesEnginePlayWindowsAudio(object sender, PlayWindowsAudioEventArgs args) { // note: not doing an invoke because so far this code doesn't require the UI thread _soundService.Play(args.Location); }
private void RulesEnginePlayWindowsAudio(object sender, PlayWindowsAudioEventArgs args) { // note: not doing an invoke because so far this code doesn't require the UI thread System.Reflection.Assembly a = System.Reflection.Assembly.GetExecutingAssembly(); Stream s = a.GetManifestResourceStream(args.Location); SoundPlayer player = new SoundPlayer(s); player.Play(); }