diff --git a/src/libse/Common/Settings.cs b/src/libse/Common/Settings.cs index a8cd9e62d..15d0d49cd 100644 --- a/src/libse/Common/Settings.cs +++ b/src/libse/Common/Settings.cs @@ -1552,6 +1552,7 @@ $HorzAlign = Center public string Company { get; set; } public bool MoveVideo100Or500MsPlaySmallSample { get; set; } public bool DisableVideoAutoLoading { get; set; } + public bool DisableShowingLoadErrors { get; set; } public bool AllowVolumeBoost { get; set; } public int NewEmptyDefaultMs { get; set; } public bool NewEmptyUseAutoDuration { get; set; } @@ -4695,6 +4696,12 @@ $HorzAlign = Center settings.General.DisableVideoAutoLoading = Convert.ToBoolean(subNode.InnerText.Trim()); } + subNode = node.SelectSingleNode("DisableShowingLoadErrors"); + if (subNode != null) + { + settings.General.DisableShowingLoadErrors = Convert.ToBoolean(subNode.InnerText.Trim()); + } + subNode = node.SelectSingleNode("AllowVolumeBoost"); if (subNode != null) { @@ -11848,6 +11855,7 @@ $HorzAlign = Center textWriter.WriteElementString("Company", settings.General.Company); textWriter.WriteElementString("MoveVideo100Or500MsPlaySmallSample", settings.General.MoveVideo100Or500MsPlaySmallSample.ToString(CultureInfo.InvariantCulture)); textWriter.WriteElementString("DisableVideoAutoLoading", settings.General.DisableVideoAutoLoading.ToString(CultureInfo.InvariantCulture)); + textWriter.WriteElementString("DisableShowingLoadErrors", settings.General.DisableShowingLoadErrors.ToString(CultureInfo.InvariantCulture)); textWriter.WriteElementString("AllowVolumeBoost", settings.General.AllowVolumeBoost.ToString(CultureInfo.InvariantCulture)); textWriter.WriteElementString("NewEmptyUseAutoDuration", settings.General.NewEmptyUseAutoDuration.ToString(CultureInfo.InvariantCulture)); textWriter.WriteElementString("RightToLeftMode", settings.General.RightToLeftMode.ToString(CultureInfo.InvariantCulture)); diff --git a/src/ui/Forms/Main.cs b/src/ui/Forms/Main.cs index 39038fd31..a2e94a07b 100644 --- a/src/ui/Forms/Main.cs +++ b/src/ui/Forms/Main.cs @@ -4039,13 +4039,13 @@ namespace Nikse.SubtitleEdit.Forms if (formatType == typeof(SubStationAlpha)) { string errors = AdvancedSubStationAlpha.CheckForErrors(_subtitle.Header); - if (!string.IsNullOrEmpty(errors)) + if (!Configuration.Settings.General.DisableShowingLoadErrors && !string.IsNullOrEmpty(errors)) { MessageBox.Show(this, errors, Title, MessageBoxButtons.OK, MessageBoxIcon.Warning); } errors = (format as SubStationAlpha).Errors; - if (!string.IsNullOrEmpty(errors)) + if (!Configuration.Settings.General.DisableShowingLoadErrors && !string.IsNullOrEmpty(errors)) { MessageBox.Show(this, errors, Title, MessageBoxButtons.OK, MessageBoxIcon.Warning); } @@ -4053,13 +4053,13 @@ namespace Nikse.SubtitleEdit.Forms else if (formatType == typeof(AdvancedSubStationAlpha)) { string errors = AdvancedSubStationAlpha.CheckForErrors(_subtitle.Header); - if (!string.IsNullOrEmpty(errors)) + if (!Configuration.Settings.General.DisableShowingLoadErrors && !string.IsNullOrEmpty(errors)) { MessageBox.Show(this, errors, Title, MessageBoxButtons.OK, MessageBoxIcon.Warning); } errors = (format as AdvancedSubStationAlpha).Errors; - if (!string.IsNullOrEmpty(errors)) + if (!Configuration.Settings.General.DisableShowingLoadErrors && !string.IsNullOrEmpty(errors)) { MessageBox.Show(this, errors, Title, MessageBoxButtons.OK, MessageBoxIcon.Warning); } @@ -4067,7 +4067,7 @@ namespace Nikse.SubtitleEdit.Forms else if (formatType == typeof(SubRip)) { string errors = (format as SubRip).Errors; - if (!string.IsNullOrEmpty(errors)) + if (!Configuration.Settings.General.DisableShowingLoadErrors && !string.IsNullOrEmpty(errors)) { MessageBox.Show(this, errors, Title, MessageBoxButtons.OK, MessageBoxIcon.Warning); } @@ -4075,7 +4075,7 @@ namespace Nikse.SubtitleEdit.Forms else if (formatType == typeof(MicroDvd)) { string errors = (format as MicroDvd).Errors; - if (!string.IsNullOrEmpty(errors)) + if (!Configuration.Settings.General.DisableShowingLoadErrors && !string.IsNullOrEmpty(errors)) { MessageBox.Show(this, errors, Title, MessageBoxButtons.OK, MessageBoxIcon.Warning); } @@ -4084,7 +4084,7 @@ namespace Nikse.SubtitleEdit.Forms { format.ToText(_subtitle, string.Empty); string errors = (format as DCinemaSmpte2007).Errors; - if (!string.IsNullOrEmpty(errors)) + if (!Configuration.Settings.General.DisableShowingLoadErrors && !string.IsNullOrEmpty(errors)) { MessageBox.Show(errors, Title, MessageBoxButtons.OK, MessageBoxIcon.Warning); } @@ -4093,7 +4093,7 @@ namespace Nikse.SubtitleEdit.Forms { format.ToText(_subtitle, string.Empty); string errors = (format as DCinemaSmpte2010).Errors; - if (!string.IsNullOrEmpty(errors)) + if (!Configuration.Settings.General.DisableShowingLoadErrors && !string.IsNullOrEmpty(errors)) { MessageBox.Show(errors, Title, MessageBoxButtons.OK, MessageBoxIcon.Warning); } @@ -4102,7 +4102,7 @@ namespace Nikse.SubtitleEdit.Forms { format.ToText(_subtitle, string.Empty); string errors = (format as DCinemaSmpte2014).Errors; - if (!string.IsNullOrEmpty(errors)) + if (!Configuration.Settings.General.DisableShowingLoadErrors && !string.IsNullOrEmpty(errors)) { MessageBox.Show(errors, Title, MessageBoxButtons.OK, MessageBoxIcon.Warning); }