diff --git a/src/Controls/AudioVisualizer.cs b/src/Controls/AudioVisualizer.cs index b6af49573..21b9a3526 100644 --- a/src/Controls/AudioVisualizer.cs +++ b/src/Controls/AudioVisualizer.cs @@ -333,7 +333,7 @@ namespace Nikse.SubtitleEdit.Controls List selectedParagraphs = new List(); foreach (int index in _selectedIndices) { - Paragraph p = _subtitle.GetParagraphOrDefault(index); + Paragraph p = _subtitle.GetParagraphOrDefault(index); if (p != null) { p = new Paragraph(p); diff --git a/src/Forms/Main.cs b/src/Forms/Main.cs index c5feec454..00ab90e65 100644 --- a/src/Forms/Main.cs +++ b/src/Forms/Main.cs @@ -3135,7 +3135,7 @@ namespace Nikse.SubtitleEdit.Forms Utilities.InitializeSubtitleFont(textBoxListViewText); Utilities.InitializeSubtitleFont(textBoxListViewTextAlternate); Utilities.InitializeSubtitleFont(SubtitleListview1); - InitializeToolbar(); + InitializeToolbar(); } catch (Exception exception) { @@ -4275,7 +4275,7 @@ namespace Nikse.SubtitleEdit.Forms else { _subtitle.Paragraphs[index] = p; - } + } i++; } deletes.Reverse(); @@ -7727,7 +7727,7 @@ namespace Nikse.SubtitleEdit.Forms _subtitle.Header = _subtitle.Header.Trim() + Environment.NewLine + Environment.NewLine + "[Events]" + Environment.NewLine + - "Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text" + Environment.NewLine; + "Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text" + Environment.NewLine; } else { @@ -7758,7 +7758,7 @@ namespace Nikse.SubtitleEdit.Forms idx = text.IndexOf(','); text = text.Insert(idx, "," + start + "," + end); lines.Add(text); - } + } } format.LoadSubtitle(_subtitle, lines, fileName); } @@ -13568,7 +13568,7 @@ namespace Nikse.SubtitleEdit.Forms try { updates = _networkSession.GetUpdates(out message, out numberOfLines); - numberOfRetries = 0; + numberOfRetries = 0; } catch (Exception exception) { @@ -15263,7 +15263,7 @@ namespace Nikse.SubtitleEdit.Forms int lineBreakPos = textBox.Text.IndexOf(Environment.NewLine); int pos = textBox.SelectionStart; var s = Utilities.RemoveHtmlTags(textBox.Text, true).Replace(Environment.NewLine, string.Empty); // we don't count new line in total length... correct? - int totalLength = s.Length; + int totalLength = s.Length; string totalL = " " + string.Format(_languageGeneral.TotalLengthX, totalLength); if (lineBreakPos == -1 || pos <= lineBreakPos) { @@ -15777,7 +15777,7 @@ namespace Nikse.SubtitleEdit.Forms _subtitle.Header = styles.Header; var styleList = AdvancedSubStationAlpha.GetStylesFromHeader(_subtitle.Header); if (styleList.Count > 0) - { + { for (int i=0; i<_subtitle.Paragraphs.Count; i++) { Paragraph p = _subtitle.Paragraphs[i]; @@ -15787,7 +15787,7 @@ namespace Nikse.SubtitleEdit.Forms SubtitleListview1.SetExtraText(i, p.Extra, SubtitleListview1.ForeColor); } } - + } } diff --git a/src/Forms/ModifySelection.cs b/src/Forms/ModifySelection.cs index c4c3f4210..886e6b98e 100644 --- a/src/Forms/ModifySelection.cs +++ b/src/Forms/ModifySelection.cs @@ -109,7 +109,7 @@ namespace Nikse.SubtitleEdit.Forms { for (int i = 0; i < _subtitle.Paragraphs.Count; i++) { - if ((radioButtonSubtractFromSelection.Checked || radioButtonIntersect.Checked) && _subtitleListView.Items[i].Selected || + if ((radioButtonSubtractFromSelection.Checked || radioButtonIntersect.Checked) && _subtitleListView.Items[i].Selected || !radioButtonSubtractFromSelection.Checked && !radioButtonIntersect.Checked) { Paragraph p = _subtitle.Paragraphs[i]; diff --git a/src/Forms/VobSubOcr.cs b/src/Forms/VobSubOcr.cs index e0345d55c..4ad6927ad 100644 --- a/src/Forms/VobSubOcr.cs +++ b/src/Forms/VobSubOcr.cs @@ -399,7 +399,7 @@ namespace Nikse.SubtitleEdit.Forms _bluRaySubtitlesOriginal = subtitles; - groupBoxImagePalette.Visible = false; + groupBoxImagePalette.Visible = false; Text = Configuration.Settings.Language.VobSubOcr.TitleBluRay; if (!string.IsNullOrEmpty(fileName)) @@ -1995,10 +1995,10 @@ namespace Nikse.SubtitleEdit.Forms Bitmap unItaliced = new Bitmap(bmp.Width + left + 4, bmp.Height); Point[] destinationPoints = { - new Point(0, 0), // destination for upper-left point of original - new Point(bmp.Width, 0), // destination for upper-right point of original + new Point(0, 0), // destination for upper-left point of original + new Point(bmp.Width, 0), // destination for upper-right point of original new Point(left, bmp.Height) // destination for lower-left point of original - }; + }; using (var g = Graphics.FromImage(unItaliced)) { @@ -4011,7 +4011,7 @@ namespace Nikse.SubtitleEdit.Forms { var form = new VobSubOcrSetItalicFactor(GetSubtitleBitmap(_selectedIndex), _unItalicFactor); form.ShowDialog(this); - _unItalicFactor = form.GetUnItalicFactor(); + _unItalicFactor = form.GetUnItalicFactor(); } } diff --git a/src/Forms/VobSubOcrSetItalicFactor.cs b/src/Forms/VobSubOcrSetItalicFactor.cs index c8550cf37..4684352b3 100644 --- a/src/Forms/VobSubOcrSetItalicFactor.cs +++ b/src/Forms/VobSubOcrSetItalicFactor.cs @@ -21,7 +21,7 @@ namespace Nikse.SubtitleEdit.Forms private void numericUpDown1_ValueChanged(object sender, EventArgs e) { pictureBoxSubtitleImage.Image = VobSubOcr.UnItalic(_bmp, (double)numericUpDown1.Value); - } + } internal double GetUnItalicFactor() { diff --git a/src/Logic/Settings.cs b/src/Logic/Settings.cs index 30d27fabb..28cfbef58 100644 --- a/src/Logic/Settings.cs +++ b/src/Logic/Settings.cs @@ -2288,7 +2288,7 @@ namespace Nikse.SubtitleEdit.Logic textWriter.WriteElementString("MainToolsBeamer", settings.Shortcuts.MainToolsBeamer); textWriter.WriteElementString("MainToolsToggleTranslationOriginalInPreviews", settings.Shortcuts.MainEditToggleTranslationOriginalInPreviews); textWriter.WriteElementString("MainEditInverseSelection", settings.Shortcuts.MainEditInverseSelection); - textWriter.WriteElementString("MainEditModifySelection", settings.Shortcuts.MainEditModifySelection); + textWriter.WriteElementString("MainEditModifySelection", settings.Shortcuts.MainEditModifySelection); textWriter.WriteElementString("MainVideoPause", settings.Shortcuts.MainVideoPause); textWriter.WriteElementString("MainVideoPlayPauseToggle", settings.Shortcuts.MainVideoPlayPauseToggle); textWriter.WriteElementString("MainVideoShowHideVideo", settings.Shortcuts.MainVideoShowHideVideo); diff --git a/src/Logic/SubtitleFormats/UnknownSubtitle46.cs b/src/Logic/SubtitleFormats/UnknownSubtitle46.cs index f4874bfbe..308b04100 100644 --- a/src/Logic/SubtitleFormats/UnknownSubtitle46.cs +++ b/src/Logic/SubtitleFormats/UnknownSubtitle46.cs @@ -58,7 +58,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats string[] arr = line.Split(); var timeCode = arr[arr.Length - 1]; if (regexTimeCodesAM.Match(timeCode).Success || regexTimeCodesPM.Match(timeCode).Success) - { + { try { arr = timeCode.Substring(0, 10).Split(':'); @@ -71,7 +71,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats p = new Paragraph(); p.StartTime = new TimeCode(hours, minutes, seconds, FramesToMillisecondsMax999(frames)); p.Text = s.Substring(0, s.IndexOf(timeCode)).Trim(); - subtitle.Paragraphs.Add(p); + subtitle.Paragraphs.Add(p); } } catch diff --git a/src/Logic/SubtitleFormats/WebVTT.cs b/src/Logic/SubtitleFormats/WebVTT.cs index 9c18c10b1..319b4da4c 100644 --- a/src/Logic/SubtitleFormats/WebVTT.cs +++ b/src/Logic/SubtitleFormats/WebVTT.cs @@ -112,7 +112,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats public override void RemoveNativeFormatting(Subtitle subtitle) { foreach (Paragraph p in subtitle.Paragraphs) - { + { if (p.Text.IndexOf("<") >= 0) { string text = p.Text; @@ -167,7 +167,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats text = text.Remove(indexOfTag, indexOfEnd - indexOfTag + 1); text = text.Replace("", string.Empty); } - + } return text; } diff --git a/src/Logic/Utilities.cs b/src/Logic/Utilities.cs index 67e2100e0..1999d965e 100644 --- a/src/Logic/Utilities.cs +++ b/src/Logic/Utilities.cs @@ -705,7 +705,7 @@ namespace Nikse.SubtitleEdit.Logic control.ForeColor = gs.SubtitleFontColor; } catch - { + { } }