private void SetMinimalDisplayTimeDifferenceToolStripMenuItemClick(object sender, EventArgs e) { if (!IsSubtitleLoaded) { DisplaySubtitleNotLoadedMessage(); return; } using (var setMinDisplayDiff = new SetMinimumDisplayTimeBetweenParagraphs()) { setMinDisplayDiff.Initialize(_subtitle); if (setMinDisplayDiff.ShowDialog() == DialogResult.OK && setMinDisplayDiff.FixCount > 0) { MakeHistoryForUndo(_language.BeforeSetMinimumDisplayTimeBetweenParagraphs); _subtitle.Paragraphs.Clear(); foreach (var p in setMinDisplayDiff.FixedSubtitle.Paragraphs) _subtitle.Paragraphs.Add(p); _subtitle.CalculateFrameNumbersFromTimeCodesNoCheck(CurrentFrameRate); ShowStatus(string.Format(_language.XMinimumDisplayTimeBetweenParagraphsChanged, setMinDisplayDiff.FixCount)); SaveSubtitleListviewIndices(); ShowSource(); SubtitleListview1.Fill(_subtitle, _subtitleAlternate); RestoreSubtitleListviewIndices(); } } }
private void SetMinimalDisplayTimeDifferenceToolStripMenuItemClick(object sender, EventArgs e) { var setMinDisplayDiff = new SetMinimumDisplayTimeBetweenParagraphs(); _formPositionsAndSizes.SetPositionAndSize(setMinDisplayDiff); setMinDisplayDiff.Initialize(_subtitle); if (setMinDisplayDiff.ShowDialog() == DialogResult.OK && setMinDisplayDiff.FixCount > 0) { MakeHistoryForUndo(_language.BeforeSetMinimumDisplayTimeBetweenParagraphs); _subtitle.Paragraphs.Clear(); foreach (Paragraph p in setMinDisplayDiff.FixedSubtitle.Paragraphs) _subtitle.Paragraphs.Add(p); _subtitle.CalculateFrameNumbersFromTimeCodesNoCheck(CurrentFrameRate); ShowStatus(string.Format(_language.XMinimumDisplayTimeBetweenParagraphsChanged, setMinDisplayDiff.FixCount)); SaveSubtitleListviewIndexes(); ShowSource(); SubtitleListview1.Fill(_subtitle, _subtitleAlternate); RestoreSubtitleListviewIndexes(); } _formPositionsAndSizes.SavePositionAndSize(setMinDisplayDiff); }