diff --git a/src/ui/Forms/AudioToText/VoskAudioToText.cs b/src/ui/Forms/AudioToText/VoskAudioToText.cs index a62cc870b..57bd6dc0c 100644 --- a/src/ui/Forms/AudioToText/VoskAudioToText.cs +++ b/src/ui/Forms/AudioToText/VoskAudioToText.cs @@ -234,11 +234,11 @@ namespace Nikse.SubtitleEdit.Forms.AudioToText if (errors.Length > 0) { - MessageBox.Show($"{errorCount} error(s)!{Environment.NewLine}{errors}"); + MessageBox.Show(this, $"{errorCount} error(s)!{Environment.NewLine}{errors}"); } var fileList = Environment.NewLine + Environment.NewLine + string.Join(Environment.NewLine, _outputBatchFileNames); - MessageBox.Show(string.Format(LanguageSettings.Current.AudioToText.XFilesSavedToVideoSourceFolder, listViewInputFiles.Items.Count - errorCount) + fileList); + MessageBox.Show(this, string.Format(LanguageSettings.Current.AudioToText.XFilesSavedToVideoSourceFolder, listViewInputFiles.Items.Count - errorCount) + fileList); groupBoxInputFiles.Enabled = true; buttonGenerate.Enabled = true; diff --git a/src/ui/Forms/AudioToText/WhisperAudioToText.cs b/src/ui/Forms/AudioToText/WhisperAudioToText.cs index 71c54cfdb..4bac683e8 100644 --- a/src/ui/Forms/AudioToText/WhisperAudioToText.cs +++ b/src/ui/Forms/AudioToText/WhisperAudioToText.cs @@ -386,7 +386,7 @@ namespace Nikse.SubtitleEdit.Forms.AudioToText _languageCode = GetLanguage(comboBoxLanguages.Text); - if (comboBoxModels.Items[comboBoxModels.SelectedIndex] is WhisperModel model && + if (comboBoxModels.Items[comboBoxModels.SelectedIndex] is WhisperModel model && _languageCode != "en" && IsModelEnglishOnly(model)) { var result = MessageBox.Show("English model should only be used with English language." + Environment.NewLine + diff --git a/src/ui/Forms/SeMsgBox/MessageBox.cs b/src/ui/Forms/SeMsgBox/MessageBox.cs index c5dc26eee..8249f1016 100644 --- a/src/ui/Forms/SeMsgBox/MessageBox.cs +++ b/src/ui/Forms/SeMsgBox/MessageBox.cs @@ -28,6 +28,14 @@ namespace Nikse.SubtitleEdit.Forms.SeMsgBox } } + public static DialogResult Show(Form form, string text) + { + using (var msgBox = new MessageBoxForm(text, string.Empty, MessageBoxButtons.OK)) + { + return msgBox.ShowDialog(form); + } + } + public static DialogResult Show(string text, string caption, MessageBoxButtons buttons) { using (var msgBox = new MessageBoxForm(text, caption, buttons))