// Error handling private void Device_AudioSourceError(object sender, AudioSourceErrorEventArgs e) { if (videoPlayer.InvokeRequired) { videoPlayer.BeginInvoke((Action)((() => Device_AudioSourceError(sender, e)))); return; } StopRecording(); IAudioSource source = sender as IAudioSource; source.SignalToStop(); string msg = String.Format( // TODO: Move the message box code to the view CultureInfo.CurrentCulture, Resources.Error_Audio_Source, source.Source); MessageBox.Show(msg, source.Source, MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, videoPlayer.RightToLeft == RightToLeft.Yes ? MessageBoxOptions.RtlReading | MessageBoxOptions.RightAlign : 0); }