Show msg box modal when SE window not focused - thx

jupester :)
Fix #8198
This commit is contained in:
Nikolaj Olsson 2024-04-16 17:37:14 +02:00
parent 0139ec0a75
commit 1171be7919
3 changed files with 11 additions and 3 deletions

View File

@ -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;

View File

@ -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))