예제 #1
0
파일: Main.cs 프로젝트: m1croN/subtitleedit
        private void toolStripMenuItemDurationBridgeGaps_Click(object sender, EventArgs e)
        {
            if (!IsSubtitleLoaded)
            {
                DisplaySubtitleNotLoadedMessage();
                return;
            }

            using (var form = new DurationsBridgeGaps(_subtitle))
            {
                if (form.ShowDialog(this) == DialogResult.OK)
                {
                    int index = FirstSelectedIndex;
                    if (index < 0)
                        index = 0;
                    MakeHistoryForUndo(_language.BeforeDurationsBridgeGap);
                    _subtitle.Paragraphs.Clear();
                    foreach (var p in form.FixedSubtitle.Paragraphs)
                        _subtitle.Paragraphs.Add(p);

                    SubtitleListview1.Fill(_subtitle, _subtitleAlternate);
                    SubtitleListview1.SelectIndexAndEnsureVisible(index);
                }
            }
        }
예제 #2
0
        private void toolStripMenuItemDurationBridgeGaps_Click(object sender, EventArgs e)
        {
            var form = new DurationsBridgeGaps(_subtitle);
            _formPositionsAndSizes.SetPositionAndSize(form);
            if (form.ShowDialog(this) == DialogResult.OK)
            {
                int index = FirstSelectedIndex;
                if (index < 0)
                    index = 0;
                MakeHistoryForUndo("Before bridge small gaps"); //TODO: Fix text in SE 3.4
                _subtitle.Paragraphs.Clear();
                foreach (Paragraph p in form.FixedSubtitle.Paragraphs)
                    _subtitle.Paragraphs.Add(p);

                SubtitleListview1.Fill(_subtitle, _subtitleAlternate);
                SubtitleListview1.SelectIndexAndEnsureVisible(index);
            }
            _formPositionsAndSizes.SavePositionAndSize(form);
        }