private void toolStripMenuItemAdjustAllTimes_Click(object sender, EventArgs e) { if (SubtitleListview1.SelectedItems.Count > 1) { ShowSelectedLinesEarlierlaterToolStripMenuItemClick(null, null); return; } if (!IsSubtitleLoaded) { DisplaySubtitleNotLoadedMessage(); return; } mediaPlayer.Pause(); if (_showEarlierOrLater != null && !_showEarlierOrLater.IsDisposed) { _showEarlierOrLater.WindowState = FormWindowState.Normal; _showEarlierOrLater.Focus(); return; } _showEarlierOrLater = new ShowEarlierLater(); if (!_showEarlierOrLater.IsPositionAndSizeSaved) { _showEarlierOrLater.Top = Top + 100; _showEarlierOrLater.Left = Left + Width / 2 - _showEarlierOrLater.Width / 3; } SaveSubtitleListviewIndices(); _showEarlierOrLater.Initialize(ShowEarlierOrLater, false); _showEarlierOrLater.Show(this); }
private void toolStripMenuItemAdjustAllTimes_Click(object sender, EventArgs e) { if (SubtitleListview1.SelectedItems.Count > 1) { ShowSelectedLinesEarlierlaterToolStripMenuItemClick(null, null); } else { if (IsSubtitleLoaded) { mediaPlayer.Pause(); if (_showEarlierOrLater != null && !_showEarlierOrLater.IsDisposed) { _showEarlierOrLater.WindowState = FormWindowState.Normal; _showEarlierOrLater.Focus(); return; } _showEarlierOrLater = new ShowEarlierLater(); if (!_formPositionsAndSizes.SetPositionAndSize(_showEarlierOrLater)) { _showEarlierOrLater.Top = this.Top + 100; _showEarlierOrLater.Left = this.Left + (this.Width /2) - (_showEarlierOrLater.Width / 3); } SaveSubtitleListviewIndexes(); _showEarlierOrLater.Initialize(ShowEarlierOrLater, _formPositionsAndSizes, false); _showEarlierOrLater.Show(this); } else { MessageBox.Show(_language.NoSubtitleLoaded, Title, MessageBoxButtons.OK, MessageBoxIcon.Warning); } } }
private void ShowSelectedLinesEarlierlaterToolStripMenuItemClick(object sender, EventArgs e) { if (!IsSubtitleLoaded) { DisplaySubtitleNotLoadedMessage(); return; } if (_showEarlierOrLater != null && !_showEarlierOrLater.IsDisposed) { _showEarlierOrLater.WindowState = FormWindowState.Normal; _showEarlierOrLater.Focus(); return; } bool waveformEnabled = timerWaveform.Enabled; timerWaveform.Stop(); timer1.Stop(); _showEarlierOrLater = new ShowEarlierLater(); if (!_showEarlierOrLater.IsPositionAndSizeSaved) { _showEarlierOrLater.Top = Top + 100; _showEarlierOrLater.Left = Left + (Width / 2) - (_showEarlierOrLater.Width / 3); } _showEarlierOrLater.Initialize(ShowEarlierOrLater, true); MakeHistoryForUndo(_language.BeforeShowSelectedLinesEarlierLater); _showEarlierOrLater.Show(this); timerWaveform.Enabled = waveformEnabled; timer1.Start(); RefreshSelectedParagraph(); }
private void ShowSelectedLinesEarlierlaterToolStripMenuItemClick(object sender, EventArgs e) { if (IsSubtitleLoaded) { if (_showEarlierOrLater != null && !_showEarlierOrLater.IsDisposed) { _showEarlierOrLater.WindowState = FormWindowState.Normal; _showEarlierOrLater.Focus(); return; } bool waveFormEnabled = timerWaveForm.Enabled; timerWaveForm.Stop(); timer1.Stop(); _showEarlierOrLater = new ShowEarlierLater(); if (!_formPositionsAndSizes.SetPositionAndSize(_showEarlierOrLater)) { _showEarlierOrLater.Top = this.Top + 100; _showEarlierOrLater.Left = this.Left + (this.Width / 2) - (_showEarlierOrLater.Width / 3); } _showEarlierOrLater.Initialize(ShowEarlierOrLater, _formPositionsAndSizes, true); MakeHistoryForUndo(_language.BeforeShowSelectedLinesEarlierLater); _showEarlierOrLater.Show(this); timerWaveForm.Enabled = waveFormEnabled; timer1.Start(); RefreshSelectedParagraph(); } else { MessageBox.Show(_language.NoSubtitleLoaded, Title, MessageBoxButtons.OK, MessageBoxIcon.Warning); } }