Fixed spelling error in code + updated change log

git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@323 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
niksedk 2011-02-08 17:07:51 +00:00
parent ec45ae0363
commit 7bbcfefe41
17 changed files with 2145 additions and 219 deletions

View File

@ -32,6 +32,7 @@ Subtitle Edit Changelog
* Start/display time changes are now undo-able (thx Luis)
* Subtitle preview on video player now more precise (thx hawk) + uses font from Settings + bold (thx Leszek)
* "Point sync" can now also sync using only one sync point (thx tttoan)
* VLC media player - mouse click now toggles play/pause
* FIXED:
* Wave form: Fixed unprecise (out of sync) wave form data for some sample rates
* Fixed crash with wave form track bar (thx Christian)
@ -44,6 +45,7 @@ Subtitle Edit Changelog
* OCR Fix Engine: Lines after "..." will no longer be changed to start with uppercase
* Fixed bug in reading of SSA files (',' was removed) - thx Péter
* Fixed line breaking bug in mpl format - thx Przemek
* Fixed shortcuts for adjust commands Ctrl+Space/Shift+Space/F9/F10
3.0 (18th November 2010)
* NEW:

View File

@ -178,7 +178,7 @@ namespace Nikse.SubtitleEdit.Controls
void SubtitleTextBox_MouseClick(object sender, MouseEventArgs e)
{
TooglePlayPause();
TogglePlayPause();
}
private static string RemoveSubStationAlphaFormatting(string s)
@ -272,7 +272,7 @@ namespace Nikse.SubtitleEdit.Controls
void PanelPlayer_MouseDown(object sender, MouseEventArgs e)
{
TooglePlayPause();
TogglePlayPause();
}
public void InitializeVolume(double defaultVolume)
@ -565,6 +565,32 @@ namespace Nikse.SubtitleEdit.Controls
}
#region PlayPauseButtons
public void RefreshPlayPauseButtons()
{
if (VideoPlayer != null)
{
if (VideoPlayer.IsPlaying)
{
if (!_pictureBoxPause.Visible && !_pictureBoxPauseDown.Visible && !_pictureBoxPauseOver.Visible)
{
HideAllPauseImages();
HideAllPlayImages();
_pictureBoxPause.Visible = true;
}
}
else
{
if (!_pictureBoxPlay.Visible && !_pictureBoxPlayOver.Visible && !_pictureBoxPlayDown.Visible)
{
HideAllPauseImages();
HideAllPlayImages();
_pictureBoxPlay.Visible = true;
}
}
}
}
private void HideAllPlayImages()
{
_pictureBoxPlayOver.Visible = false;
@ -888,6 +914,8 @@ namespace Nikse.SubtitleEdit.Controls
TimeSpan span = TimeSpan.FromSeconds(pos);
string displayTime = string.Format("{0:00}:{1:00}:{2:00},{3:000}", span.Hours, span.Minutes, span.Seconds, span.Milliseconds);
_labelTimeCode.Text = displayTime + _totalPositionString;
RefreshPlayPauseButtons();
}
}
@ -972,7 +1000,7 @@ namespace Nikse.SubtitleEdit.Controls
}
}
public void TooglePlayPause()
public void TogglePlayPause()
{
if (VideoPlayer != null)
{

View File

@ -56,6 +56,7 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonRefreshFixes = new System.Windows.Forms.Button();
this.buttonFixesSelectAll = new System.Windows.Forms.Button();
this.buttonFixesInverse = new System.Windows.Forms.Button();
this.subtitleListView1 = new Nikse.SubtitleEdit.Controls.SubtitleListView();
this.contextMenuStripListview = new System.Windows.Forms.ContextMenuStrip(this.components);
this.toolStripMenuItemDelete = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
@ -67,6 +68,7 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonAutoBreak = new System.Windows.Forms.Button();
this.labelStartTimeWarning = new System.Windows.Forms.Label();
this.labelDurationWarning = new System.Windows.Forms.Label();
this.timeUpDownStartTime = new Nikse.SubtitleEdit.Controls.TimeUpDown();
this.numericUpDownDuration = new System.Windows.Forms.NumericUpDown();
this.labelDuration = new System.Windows.Forms.Label();
this.labelStartTime = new System.Windows.Forms.Label();
@ -76,8 +78,6 @@ namespace Nikse.SubtitleEdit.Forms
this.tabPageLog = new System.Windows.Forms.TabPage();
this.textBoxFixedIssues = new System.Windows.Forms.TextBox();
this.labelNumberOfImportantLogMessages = new System.Windows.Forms.Label();
this.subtitleListView1 = new Nikse.SubtitleEdit.Controls.SubtitleListView();
this.timeUpDownStartTime = new Nikse.SubtitleEdit.Controls.TimeUpDown();
this.groupBoxStep1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.tabControl1.SuspendLayout();
@ -368,6 +368,25 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonFixesInverse.UseVisualStyleBackColor = true;
this.buttonFixesInverse.Click += new System.EventHandler(this.ButtonFixesInverseClick);
//
// subtitleListView1
//
this.subtitleListView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.subtitleListView1.ContextMenuStrip = this.contextMenuStripListview;
this.subtitleListView1.FirstVisibleIndex = -1;
this.subtitleListView1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.subtitleListView1.FullRowSelect = true;
this.subtitleListView1.GridLines = true;
this.subtitleListView1.HideSelection = false;
this.subtitleListView1.Location = new System.Drawing.Point(3, 5);
this.subtitleListView1.Name = "subtitleListView1";
this.subtitleListView1.Size = new System.Drawing.Size(785, 145);
this.subtitleListView1.TabIndex = 110;
this.subtitleListView1.UseCompatibleStateImageBehavior = false;
this.subtitleListView1.View = System.Windows.Forms.View.Details;
this.subtitleListView1.SelectedIndexChanged += new System.EventHandler(this.SubtitleListView1SelectedIndexChanged);
//
// contextMenuStripListview
//
this.contextMenuStripListview.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -483,6 +502,16 @@ namespace Nikse.SubtitleEdit.Forms
this.labelDurationWarning.TabIndex = 31;
this.labelDurationWarning.Text = "labelDurationWarning";
//
// timeUpDownStartTime
//
this.timeUpDownStartTime.AutoSize = true;
this.timeUpDownStartTime.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.timeUpDownStartTime.Location = new System.Drawing.Point(8, 27);
this.timeUpDownStartTime.Margin = new System.Windows.Forms.Padding(4);
this.timeUpDownStartTime.Name = "timeUpDownStartTime";
this.timeUpDownStartTime.Size = new System.Drawing.Size(92, 25);
this.timeUpDownStartTime.TabIndex = 112;
//
// numericUpDownDuration
//
this.numericUpDownDuration.DecimalPlaces = 3;
@ -503,7 +532,7 @@ namespace Nikse.SubtitleEdit.Forms
0,
-2147483648});
this.numericUpDownDuration.Name = "numericUpDownDuration";
this.numericUpDownDuration.Size = new System.Drawing.Size(54, 21);
this.numericUpDownDuration.Size = new System.Drawing.Size(56, 21);
this.numericUpDownDuration.TabIndex = 114;
this.numericUpDownDuration.ValueChanged += new System.EventHandler(this.NumericUpDownDurationValueChanged);
//
@ -593,35 +622,6 @@ namespace Nikse.SubtitleEdit.Forms
this.labelNumberOfImportantLogMessages.TabIndex = 11;
this.labelNumberOfImportantLogMessages.Text = "labelNumberOfImportantLogMessages";
//
// subtitleListView1
//
this.subtitleListView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.subtitleListView1.ContextMenuStrip = this.contextMenuStripListview;
this.subtitleListView1.FirstVisibleIndex = -1;
this.subtitleListView1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.subtitleListView1.FullRowSelect = true;
this.subtitleListView1.GridLines = true;
this.subtitleListView1.HideSelection = false;
this.subtitleListView1.Location = new System.Drawing.Point(3, 5);
this.subtitleListView1.Name = "subtitleListView1";
this.subtitleListView1.Size = new System.Drawing.Size(785, 145);
this.subtitleListView1.TabIndex = 110;
this.subtitleListView1.UseCompatibleStateImageBehavior = false;
this.subtitleListView1.View = System.Windows.Forms.View.Details;
this.subtitleListView1.SelectedIndexChanged += new System.EventHandler(this.SubtitleListView1SelectedIndexChanged);
//
// timeUpDownStartTime
//
this.timeUpDownStartTime.AutoSize = true;
this.timeUpDownStartTime.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.timeUpDownStartTime.Location = new System.Drawing.Point(8, 27);
this.timeUpDownStartTime.Margin = new System.Windows.Forms.Padding(4);
this.timeUpDownStartTime.Name = "timeUpDownStartTime";
this.timeUpDownStartTime.Size = new System.Drawing.Size(92, 25);
this.timeUpDownStartTime.TabIndex = 112;
//
// FixCommonErrors
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);

View File

@ -49,8 +49,8 @@
this.toolStripSeparatorHelp = new System.Windows.Forms.ToolStripSeparator();
this.toolStripButtonHelp = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator13 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripButtonToogleWaveForm = new System.Windows.Forms.ToolStripButton();
this.toolStripButtonToogleVideo = new System.Windows.Forms.ToolStripButton();
this.toolStripButtonToggleWaveForm = new System.Windows.Forms.ToolStripButton();
this.toolStripButtonToggleVideo = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripLabelSubtitleFormat = new System.Windows.Forms.ToolStripLabel();
this.comboBoxSubtitleFormats = new System.Windows.Forms.ToolStripComboBox();
@ -434,8 +434,8 @@
this.toolStripSeparatorHelp,
this.toolStripButtonHelp,
this.toolStripSeparator13,
this.toolStripButtonToogleWaveForm,
this.toolStripButtonToogleVideo,
this.toolStripButtonToggleWaveForm,
this.toolStripButtonToggleVideo,
this.toolStripSeparator6,
this.toolStripLabelSubtitleFormat,
this.comboBoxSubtitleFormats,
@ -597,31 +597,31 @@
this.toolStripSeparator13.Name = "toolStripSeparator13";
this.toolStripSeparator13.Size = new System.Drawing.Size(6, 40);
//
// toolStripButtonToogleWaveForm
// toolStripButtonToggleWaveForm
//
this.toolStripButtonToogleWaveForm.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButtonToogleWaveForm.Font = new System.Drawing.Font("Tahoma", 8.25F);
this.toolStripButtonToogleWaveForm.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonToogleWaveForm.Image")));
this.toolStripButtonToogleWaveForm.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
this.toolStripButtonToogleWaveForm.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButtonToogleWaveForm.Name = "toolStripButtonToogleWaveForm";
this.toolStripButtonToogleWaveForm.Size = new System.Drawing.Size(36, 37);
this.toolStripButtonToogleWaveForm.Text = "Show/hide wave form";
this.toolStripButtonToogleWaveForm.Click += new System.EventHandler(this.toolStripButtonToogleWaveForm_Click);
this.toolStripButtonToggleWaveForm.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButtonToggleWaveForm.Font = new System.Drawing.Font("Tahoma", 8.25F);
this.toolStripButtonToggleWaveForm.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonToggleWaveForm.Image")));
this.toolStripButtonToggleWaveForm.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
this.toolStripButtonToggleWaveForm.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButtonToggleWaveForm.Name = "toolStripButtonToggleWaveForm";
this.toolStripButtonToggleWaveForm.Size = new System.Drawing.Size(36, 37);
this.toolStripButtonToggleWaveForm.Text = "Show/hide wave form";
this.toolStripButtonToggleWaveForm.Click += new System.EventHandler(this.toolStripButtonToggleWaveForm_Click);
//
// toolStripButtonToogleVideo
// toolStripButtonToggleVideo
//
this.toolStripButtonToogleVideo.Checked = true;
this.toolStripButtonToogleVideo.CheckState = System.Windows.Forms.CheckState.Checked;
this.toolStripButtonToogleVideo.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButtonToogleVideo.Font = new System.Drawing.Font("Tahoma", 8.25F);
this.toolStripButtonToogleVideo.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonToogleVideo.Image")));
this.toolStripButtonToogleVideo.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
this.toolStripButtonToogleVideo.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButtonToogleVideo.Name = "toolStripButtonToogleVideo";
this.toolStripButtonToogleVideo.Size = new System.Drawing.Size(36, 37);
this.toolStripButtonToogleVideo.Text = "Show/hide video";
this.toolStripButtonToogleVideo.Click += new System.EventHandler(this.toolStripButtonToogleVideo_Click);
this.toolStripButtonToggleVideo.Checked = true;
this.toolStripButtonToggleVideo.CheckState = System.Windows.Forms.CheckState.Checked;
this.toolStripButtonToggleVideo.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButtonToggleVideo.Font = new System.Drawing.Font("Tahoma", 8.25F);
this.toolStripButtonToggleVideo.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButtonToggleVideo.Image")));
this.toolStripButtonToggleVideo.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
this.toolStripButtonToggleVideo.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButtonToggleVideo.Name = "toolStripButtonToggleVideo";
this.toolStripButtonToggleVideo.Size = new System.Drawing.Size(36, 37);
this.toolStripButtonToggleVideo.Text = "Show/hide video";
this.toolStripButtonToggleVideo.Click += new System.EventHandler(this.toolStripButtonToggleVideo_Click);
//
// toolStripSeparator6
//
@ -1246,7 +1246,7 @@
this.showhideVideoToolStripMenuItem.Name = "showhideVideoToolStripMenuItem";
this.showhideVideoToolStripMenuItem.Size = new System.Drawing.Size(199, 22);
this.showhideVideoToolStripMenuItem.Text = "Show/hide video";
this.showhideVideoToolStripMenuItem.Click += new System.EventHandler(this.toolStripButtonToogleVideo_Click);
this.showhideVideoToolStripMenuItem.Click += new System.EventHandler(this.toolStripButtonToggleVideo_Click);
//
// toolStripSeparator19
//
@ -3179,7 +3179,7 @@
0,
-2147483648});
this.numericUpDownDuration.Name = "numericUpDownDuration";
this.numericUpDownDuration.Size = new System.Drawing.Size(57, 21);
this.numericUpDownDuration.Size = new System.Drawing.Size(56, 21);
this.numericUpDownDuration.TabIndex = 1;
this.numericUpDownDuration.ValueChanged += new System.EventHandler(this.NumericUpDownDurationValueChanged);
//
@ -3581,7 +3581,7 @@
private System.Windows.Forms.ToolStripLabel toolStripLabelSubtitleFormat;
private System.Windows.Forms.ToolStripLabel toolStripLabelEncoding;
private System.Windows.Forms.ToolStripComboBox comboBoxEncoding;
private System.Windows.Forms.ToolStripButton toolStripButtonToogleVideo;
private System.Windows.Forms.ToolStripButton toolStripButtonToggleVideo;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator15;
private System.Windows.Forms.ToolStripSeparator toolStripSeparatorFrameRate;
private System.Windows.Forms.ToolStripLabel toolStripLabelFrameRate;
@ -3661,7 +3661,7 @@
private System.Windows.Forms.Label labelCreateF9;
private System.Windows.Forms.Label labelAdjustTip;
private System.Windows.Forms.ToolStripMenuItem translatepoweredByMicrosoftToolStripMenuItem;
private System.Windows.Forms.ToolStripButton toolStripButtonToogleWaveForm;
private System.Windows.Forms.ToolStripButton toolStripButtonToggleWaveForm;
private Controls.VideoPlayerContainer mediaPlayer;
private System.Windows.Forms.Panel panelVideoPlayer;
private Controls.WaveForm AudioWaveForm;

View File

@ -210,8 +210,8 @@ namespace Nikse.SubtitleEdit.Forms
AudioWaveForm.Visible = Configuration.Settings.General.ShowWaveForm;
panelWaveFormControls.Visible = Configuration.Settings.General.ShowWaveForm;
trackBarWaveFormPosition.Visible = Configuration.Settings.General.ShowWaveForm;
toolStripButtonToogleWaveForm.Checked = Configuration.Settings.General.ShowWaveForm;
toolStripButtonToogleVideo.Checked = Configuration.Settings.General.ShowVideoPlayer;
toolStripButtonToggleWaveForm.Checked = Configuration.Settings.General.ShowWaveForm;
toolStripButtonToggleVideo.Checked = Configuration.Settings.General.ShowVideoPlayer;
string fileName = string.Empty;
string[] args = Environment.GetCommandLineArgs();
@ -306,7 +306,7 @@ namespace Nikse.SubtitleEdit.Forms
{
if (paragraph == null)
{
mediaPlayer.TooglePlayPause();
mediaPlayer.TogglePlayPause();
}
else
{
@ -615,8 +615,8 @@ namespace Nikse.SubtitleEdit.Forms
toolStripButtonSpellCheck.ToolTipText = _language.Menu.ToolBar.SpellCheck;
toolStripButtonSettings.ToolTipText = _language.Menu.ToolBar.Settings;
toolStripButtonHelp.ToolTipText = _language.Menu.ToolBar.Help;
toolStripButtonToogleWaveForm.ToolTipText = _language.Menu.ToolBar.ShowHideWaveForm;
toolStripButtonToogleVideo.ToolTipText = _language.Menu.ToolBar.ShowHideVideo;
toolStripButtonToggleWaveForm.ToolTipText = _language.Menu.ToolBar.ShowHideWaveForm;
toolStripButtonToggleVideo.ToolTipText = _language.Menu.ToolBar.ShowHideVideo;
toolStripMenuItemDelete.Text = _language.Menu.ContextMenu.Delete;
insertLineToolStripMenuItem.Text = _language.Menu.ContextMenu.InsertFirstLine;
@ -1081,7 +1081,7 @@ namespace Nikse.SubtitleEdit.Forms
{
OpenVideo(videoFileName);
}
else if (!string.IsNullOrEmpty(fileName) && (toolStripButtonToogleVideo.Checked || toolStripButtonToogleWaveForm.Checked))
else if (!string.IsNullOrEmpty(fileName) && (toolStripButtonToggleVideo.Checked || toolStripButtonToggleWaveForm.Checked))
{
TryToFindAndOpenVideoFile(Path.Combine(Path.GetDirectoryName(fileName), Path.GetFileNameWithoutExtension(fileName)));
}
@ -1722,8 +1722,8 @@ namespace Nikse.SubtitleEdit.Forms
TryLoadIcon(toolStripButtonSpellCheck, "SpellCheck");
TryLoadIcon(toolStripButtonHelp, "Help");
TryLoadIcon(toolStripButtonToogleVideo, "VideoToogle");
TryLoadIcon(toolStripButtonToogleWaveForm, "WaveFormToogle");
TryLoadIcon(toolStripButtonToggleVideo, "VideoToggle");
TryLoadIcon(toolStripButtonToggleWaveForm, "WaveFormToggle");
toolStripButtonFileNew.Visible = gs.ShowToolbarNew;
toolStripButtonFileOpen.Visible = gs.ShowToolbarOpen;
@ -3221,20 +3221,20 @@ namespace Nikse.SubtitleEdit.Forms
private void BoldToolStripMenuItemClick(object sender, EventArgs e)
{
ListViewToogleTag("b");
ListViewToggleTag("b");
}
private void ItalicToolStripMenuItemClick(object sender, EventArgs e)
{
ListViewToogleTag("i");
ListViewToggleTag("i");
}
private void UnderlineToolStripMenuItemClick(object sender, EventArgs e)
{
ListViewToogleTag("u");
ListViewToggleTag("u");
}
private void ListViewToogleTag(string tag)
private void ListViewToggleTag(string tag)
{
if (_subtitle.Paragraphs.Count > 0 && SubtitleListview1.SelectedItems.Count > 0)
{
@ -3362,9 +3362,7 @@ namespace Nikse.SubtitleEdit.Forms
private void ToolStripMenuItemInsertBeforeClick(object sender, EventArgs e)
{
if (_subtitle.Paragraphs.Count > 0)
{
InsertBefore();
}
}
private void InsertBefore()
@ -3378,12 +3376,25 @@ namespace Nikse.SubtitleEdit.Forms
if (SubtitleListview1.SelectedItems.Count > 0)
firstSelectedIndex = SubtitleListview1.SelectedItems[0].Index;
int addMilliseconds = Configuration.Settings.General.MininumMillisecondsBetweenLines +1;
if (addMilliseconds < 1)
addMilliseconds = 1;
var newParagraph = new Paragraph();
Paragraph prev = _subtitle.GetParagraphOrDefault(firstSelectedIndex - 1);
Paragraph next = _subtitle.GetParagraphOrDefault(firstSelectedIndex);
if (prev != null)
if (prev != null && next != null)
{
newParagraph.StartTime.TotalMilliseconds = prev.EndTime.TotalMilliseconds + 200;
newParagraph.EndTime.TotalMilliseconds = next.StartTime.TotalMilliseconds - addMilliseconds;
newParagraph.StartTime.TotalMilliseconds = newParagraph.EndTime.TotalMilliseconds - 2000;
if (newParagraph.StartTime.TotalMilliseconds <= prev.EndTime.TotalMilliseconds)
newParagraph.StartTime.TotalMilliseconds = prev.EndTime.TotalMilliseconds + 1;
if (newParagraph.Duration.TotalMilliseconds < 100)
newParagraph.EndTime.TotalMilliseconds += 100;
}
else if (prev != null)
{
newParagraph.StartTime.TotalMilliseconds = prev.EndTime.TotalMilliseconds + addMilliseconds;
newParagraph.EndTime.TotalMilliseconds = newParagraph.StartTime.TotalMilliseconds + 1200;
if (next != null && newParagraph.EndTime.TotalMilliseconds > next.StartTime.TotalMilliseconds)
newParagraph.EndTime.TotalMilliseconds = next.StartTime.TotalMilliseconds - 1;
@ -3449,7 +3460,11 @@ namespace Nikse.SubtitleEdit.Forms
Paragraph next = _subtitle.GetParagraphOrDefault(firstSelectedIndex);
if (prev != null)
{
newParagraph.StartTime.TotalMilliseconds = prev.EndTime.TotalMilliseconds + 200;
int addMilliseconds = Configuration.Settings.General.MininumMillisecondsBetweenLines;
if (addMilliseconds < 1)
addMilliseconds = 1;
newParagraph.StartTime.TotalMilliseconds = prev.EndTime.TotalMilliseconds + addMilliseconds;
newParagraph.EndTime.TotalMilliseconds = newParagraph.StartTime.TotalMilliseconds + 1200;
if (next != null && newParagraph.EndTime.TotalMilliseconds > next.StartTime.TotalMilliseconds)
newParagraph.EndTime.TotalMilliseconds = next.StartTime.TotalMilliseconds - 1;
@ -3780,7 +3795,7 @@ namespace Nikse.SubtitleEdit.Forms
}
else
{
TextBoxListViewToogleTag("i");
TextBoxListViewToggleTag("i");
}
}
if (e.Modifiers == Keys.Control && e.KeyCode == Keys.D)
@ -5211,7 +5226,17 @@ namespace Nikse.SubtitleEdit.Forms
internal void Main_KeyDown(object sender, KeyEventArgs e)
{
if (e.Modifiers == Keys.Control && e.KeyCode == Keys.Z)
if (e.Modifiers == Keys.Alt && e.KeyCode == Keys.Insert)
{
InsertAfter();
e.SuppressKeyPress = true;
}
else if (e.Shift && e.KeyCode == Keys.Insert)
{
InsertBefore();
e.SuppressKeyPress = true;
}
else if (e.Modifiers == Keys.Control && e.KeyCode == Keys.Z)
{
ShowHistoryforUndoToolStripMenuItemClick(null, null);
e.SuppressKeyPress = true;
@ -5296,7 +5321,7 @@ namespace Nikse.SubtitleEdit.Forms
}
}
else if (e.Modifiers == Keys.Control && e.KeyCode == Keys.U)
{ // toogle translator mode
{ // toggle translator mode
EditToolStripMenuItemDropDownOpening(null, null);
toolStripMenuItemTranslationMode_Click(null, null);
}
@ -5305,7 +5330,7 @@ namespace Nikse.SubtitleEdit.Forms
if (mediaPlayer.VideoPlayer != null)
{
_endSeconds = -1;
mediaPlayer.TooglePlayPause();
mediaPlayer.TogglePlayPause();
e.SuppressKeyPress = true;
}
}
@ -5329,7 +5354,7 @@ namespace Nikse.SubtitleEdit.Forms
{
if (!textBoxListViewText.Focused && !textBoxListViewTextAlternate.Focused && !textBoxSource.Focused && mediaPlayer.VideoPlayer != null)
{
mediaPlayer.TooglePlayPause();
mediaPlayer.TogglePlayPause();
e.SuppressKeyPress = true;
}
}
@ -5435,23 +5460,72 @@ namespace Nikse.SubtitleEdit.Forms
{
if (mediaPlayer.VideoPlayer != null)
{
mediaPlayer.TooglePlayPause();
mediaPlayer.TogglePlayPause();
e.SuppressKeyPress = true;
}
}
else if (e.Modifiers == (Keys.Control | Keys.Alt | Keys.Shift) && e.KeyCode == Keys.W) // watermak
{
if (comboBoxEncoding.Text.StartsWith("ANSI - "))
{
MessageBox.Show("Watermark only works with unicode file encoding");
}
else
{
Watermark watermarkForm = new Watermark();
watermarkForm.Initialize(_subtitle, FirstSelectedIndex);
if (watermarkForm.ShowDialog(this) == DialogResult.OK)
{
watermarkForm.AddOrRemove(_subtitle);
RefreshSelectedParagraph();
}
}
}
else if (e.KeyCode == Keys.Escape)
{
_cancelWordSpellCheck = true;
}
else if (e.Modifiers == (Keys.Control | Keys.Shift) && e.KeyCode == Keys.U) // Ctrl+Shift+U = switch original/current
{
if (_subtitleAlternate != null && _subtitleAlternate.Paragraphs.Count > 0 && _networkSession == null)
{
Subtitle temp = _subtitle;
_subtitle = _subtitleAlternate;
_subtitleAlternate = temp;
string tempName = _fileName;
_fileName = _subtitleAlternateFileName;
_subtitleAlternateFileName = tempName;
bool tempChange = _change;
_change = _changeAlternate;
_changeAlternate = tempChange;
SubtitleListview1.Fill(_subtitle, _subtitleAlternate);
RefreshSelectedParagraph();
SetTitle();
_fileDateTime = new DateTime();
}
}
// TABS - MUST BE LAST
else if (tabControlButtons.SelectedTab == tabPageAdjust && mediaPlayer.VideoPlayer != null)
{
if ((e.Modifiers == Keys.Control && e.KeyCode == Keys.Space))
{
buttonSetStartAndOffsetRest_Click(null, null);
ButtonSetStartAndOffsetRestClick(null, null);
e.SuppressKeyPress = true;
}
else if (e.Modifiers == Keys.Shift && e.KeyCode == Keys.Space)
{
buttonSetEndAndGoToNext_Click(null, null);
e.SuppressKeyPress = true;
}
else if (e.Modifiers == Keys.None && e.KeyCode == Keys.F9)
{
buttonSetStartAndOffsetRest_Click(null, null);
ButtonSetStartAndOffsetRestClick(null, null);
e.SuppressKeyPress = true;
}
else if (e.Modifiers == Keys.None && e.KeyCode == Keys.F10)
@ -5495,61 +5569,7 @@ namespace Nikse.SubtitleEdit.Forms
e.SuppressKeyPress = true;
}
}
else if (e.Modifiers == (Keys.Control | Keys.Alt | Keys.Shift) && e.KeyCode == Keys.W) // watermak
{
if (comboBoxEncoding.Text.StartsWith("ANSI - "))
{
MessageBox.Show("Watermark only works with unicode file encoding");
}
else
{
Watermark watermarkForm = new Watermark();
watermarkForm.Initialize(_subtitle, FirstSelectedIndex);
if (watermarkForm.ShowDialog(this) == DialogResult.OK)
{
watermarkForm.AddOrRemove(_subtitle);
RefreshSelectedParagraph();
}
}
}
else if (e.Modifiers == Keys.Shift && e.KeyCode == Keys.Insert)
{
InsertBefore();
e.SuppressKeyPress = true;
}
else if (e.Modifiers == Keys.Alt && e.KeyCode == Keys.Insert)
{
InsertAfter();
e.SuppressKeyPress = true;
}
else if (e.KeyCode == Keys.Escape)
{
_cancelWordSpellCheck = true;
}
else if (e.Modifiers == (Keys.Control | Keys.Shift) && e.KeyCode == Keys.U) // Ctrl+Shift+U = switch original/current
{
if (_subtitleAlternate != null && _subtitleAlternate.Paragraphs.Count > 0 && _networkSession == null)
{
Subtitle temp = _subtitle;
_subtitle = _subtitleAlternate;
_subtitleAlternate = temp;
string tempName = _fileName;
_fileName = _subtitleAlternateFileName;
_subtitleAlternateFileName = tempName;
bool tempChange = _change;
_change = _changeAlternate;
_changeAlternate = tempChange;
SubtitleListview1.Fill(_subtitle, _subtitleAlternate);
RefreshSelectedParagraph();
SetTitle();
_fileDateTime = new DateTime();
}
}
// put new entries above tabs
}
private void SetTitle()
@ -6500,7 +6520,7 @@ namespace Nikse.SubtitleEdit.Forms
}
else
{
if (toolStripButtonToogleVideo.Checked && toolStripButtonToogleWaveForm.Checked)
if (toolStripButtonToggleVideo.Checked && toolStripButtonToggleWaveForm.Checked)
{
splitContainer1.Panel2Collapsed = false;
MoveVideoUp();
@ -6512,7 +6532,7 @@ namespace Nikse.SubtitleEdit.Forms
}
splitContainerMain.Panel2Collapsed = false;
if (toolStripButtonToogleVideo.Checked)
if (toolStripButtonToggleVideo.Checked)
{
if (AudioWaveForm.Visible)
{
@ -6545,7 +6565,7 @@ namespace Nikse.SubtitleEdit.Forms
if (_videoPlayerUnDocked == null || _videoPlayerUnDocked.IsDisposed)
UnDockVideoPlayer();
_videoPlayerUnDocked.Visible = false;
if (toolStripButtonToogleVideo.Checked)
if (toolStripButtonToggleVideo.Checked)
{
_videoPlayerUnDocked.Show(this);
if (_videoPlayerUnDocked.WindowState == FormWindowState.Minimized)
@ -6555,14 +6575,14 @@ namespace Nikse.SubtitleEdit.Forms
if (_waveFormUnDocked == null || _waveFormUnDocked.IsDisposed)
UnDockWaveForm();
_waveFormUnDocked.Visible = false;
if (toolStripButtonToogleWaveForm.Checked)
if (toolStripButtonToggleWaveForm.Checked)
{
_waveFormUnDocked.Show(this);
if (_waveFormUnDocked.WindowState == FormWindowState.Minimized)
_waveFormUnDocked.WindowState = FormWindowState.Normal;
}
if (toolStripButtonToogleVideo.Checked || toolStripButtonToogleWaveForm.Checked)
if (toolStripButtonToggleVideo.Checked || toolStripButtonToggleWaveForm.Checked)
{
if (_videoControlsUnDocked == null || _videoControlsUnDocked.IsDisposed)
UnDockVideoButtons();
@ -6820,23 +6840,6 @@ namespace Nikse.SubtitleEdit.Forms
}
}
private void buttonSetStartAndOffsetRest_Click(object sender, EventArgs e)
{
if (SubtitleListview1.SelectedItems.Count == 1)
{
int index = SubtitleListview1.SelectedItems[0].Index;
double videoPosition = mediaPlayer.CurrentPosition;
var tc = new TimeCode(TimeSpan.FromSeconds(videoPosition));
double offset = _subtitle.Paragraphs[index].StartTime.TotalMilliseconds - tc.TotalMilliseconds;
for (int i = index; i < SubtitleListview1.Items.Count; i++)
{
_subtitle.Paragraphs[i].StartTime = new TimeCode(TimeSpan.FromMilliseconds(_subtitle.Paragraphs[i].StartTime.TotalMilliseconds - offset));
_subtitle.Paragraphs[i].EndTime = new TimeCode(TimeSpan.FromMilliseconds(_subtitle.Paragraphs[i].EndTime.TotalMilliseconds - offset));
SubtitleListview1.SetStartTime(i, _subtitle.Paragraphs[i]);
}
}
}
private void buttonSetEnd_Click(object sender, EventArgs e)
{
if (SubtitleListview1.SelectedItems.Count == 1)
@ -6961,13 +6964,13 @@ namespace Nikse.SubtitleEdit.Forms
}
}
private void toolStripButtonToogleVideo_Click(object sender, EventArgs e)
private void toolStripButtonToggleVideo_Click(object sender, EventArgs e)
{
toolStripButtonToogleVideo.Checked = !toolStripButtonToogleVideo.Checked;
panelVideoPlayer.Visible = toolStripButtonToogleVideo.Checked;
toolStripButtonToggleVideo.Checked = !toolStripButtonToggleVideo.Checked;
panelVideoPlayer.Visible = toolStripButtonToggleVideo.Checked;
mediaPlayer.BringToFront();
// labelSubtitle.BringToFront();
if (!toolStripButtonToogleVideo.Checked && !toolStripButtonToogleWaveForm.Checked)
if (!toolStripButtonToggleVideo.Checked && !toolStripButtonToggleWaveForm.Checked)
{
if (_isVideoControlsUnDocked)
ShowHideUnDockedVideoControls();
@ -6978,17 +6981,17 @@ namespace Nikse.SubtitleEdit.Forms
{
ShowVideoPlayer();
}
Configuration.Settings.General.ShowVideoPlayer = toolStripButtonToogleVideo.Checked;
Configuration.Settings.General.ShowVideoPlayer = toolStripButtonToggleVideo.Checked;
Refresh();
}
private void toolStripButtonToogleWaveForm_Click(object sender, EventArgs e)
private void toolStripButtonToggleWaveForm_Click(object sender, EventArgs e)
{
toolStripButtonToogleWaveForm.Checked = !toolStripButtonToogleWaveForm.Checked;
AudioWaveForm.Visible = toolStripButtonToogleWaveForm.Checked;
trackBarWaveFormPosition.Visible = toolStripButtonToogleWaveForm.Checked;
panelWaveFormControls.Visible = toolStripButtonToogleWaveForm.Checked;
if (!toolStripButtonToogleWaveForm.Checked && !toolStripButtonToogleVideo.Checked)
toolStripButtonToggleWaveForm.Checked = !toolStripButtonToggleWaveForm.Checked;
AudioWaveForm.Visible = toolStripButtonToggleWaveForm.Checked;
trackBarWaveFormPosition.Visible = toolStripButtonToggleWaveForm.Checked;
panelWaveFormControls.Visible = toolStripButtonToggleWaveForm.Checked;
if (!toolStripButtonToggleWaveForm.Checked && !toolStripButtonToggleVideo.Checked)
{
if (_isVideoControlsUnDocked)
ShowHideUnDockedVideoControls();
@ -6999,7 +7002,7 @@ namespace Nikse.SubtitleEdit.Forms
{
ShowVideoPlayer();
}
Configuration.Settings.General.ShowWaveForm = toolStripButtonToogleWaveForm.Checked;
Configuration.Settings.General.ShowWaveForm = toolStripButtonToggleWaveForm.Checked;
Refresh();
}
@ -7297,9 +7300,9 @@ namespace Nikse.SubtitleEdit.Forms
if (!_isVideoControlsUnDocked)
{
if (toolStripButtonToogleWaveForm.Checked)
if (toolStripButtonToggleWaveForm.Checked)
AudioWaveForm.Left = tabControlButtons.Left + tabControlButtons.Width + 5;
if (!toolStripButtonToogleWaveForm.Checked && toolStripButtonToogleVideo.Checked)
if (!toolStripButtonToggleWaveForm.Checked && toolStripButtonToggleVideo.Checked)
{
panelVideoPlayer.Left = tabControlButtons.Left + tabControlButtons.Width + 5;
panelVideoPlayer.Width = groupBoxVideo.Width - (panelVideoPlayer.Left + 10);
@ -7407,8 +7410,8 @@ namespace Nikse.SubtitleEdit.Forms
private void Main_Shown(object sender, EventArgs e)
{
toolStripButtonToogleVideo.Checked = !Configuration.Settings.General.ShowVideoPlayer;
toolStripButtonToogleVideo_Click(null, null);
toolStripButtonToggleVideo.Checked = !Configuration.Settings.General.ShowVideoPlayer;
toolStripButtonToggleVideo_Click(null, null);
_timerAutoSave.Tick += TimerAutoSaveTick;
if (Configuration.Settings.General.AutoBackupSeconds > 0)
@ -7791,7 +7794,7 @@ namespace Nikse.SubtitleEdit.Forms
private void showhideWaveFormToolStripMenuItem_Click(object sender, EventArgs e)
{
toolStripButtonToogleWaveForm_Click(null, null);
toolStripButtonToggleWaveForm_Click(null, null);
}
private void AudioWaveForm_DragEnter(object sender, DragEventArgs e)
@ -7947,7 +7950,7 @@ namespace Nikse.SubtitleEdit.Forms
tb.SelectionLength = text.Length;
}
private void TextBoxListViewToogleTag(string tag)
private void TextBoxListViewToggleTag(string tag)
{
TextBox tb;
if (textBoxListViewTextAlternate.Focused)
@ -7975,17 +7978,17 @@ namespace Nikse.SubtitleEdit.Forms
private void boldToolStripMenuItem1_Click(object sender, EventArgs e)
{
TextBoxListViewToogleTag("b");
TextBoxListViewToggleTag("b");
}
private void italicToolStripMenuItem1_Click(object sender, EventArgs e)
{
TextBoxListViewToogleTag("i");
TextBoxListViewToggleTag("i");
}
private void underlineToolStripMenuItem1_Click(object sender, EventArgs e)
{
TextBoxListViewToogleTag("u");
TextBoxListViewToggleTag("u");
}
private void colorToolStripMenuItem1_Click(object sender, EventArgs e)
@ -8632,11 +8635,11 @@ namespace Nikse.SubtitleEdit.Forms
private void undockVideoControlsToolStripMenuItem_Click(object sender, EventArgs e)
{
UnDockVideoPlayer();
if (toolStripButtonToogleVideo.Checked)
if (toolStripButtonToggleVideo.Checked)
_videoPlayerUnDocked.Show(this);
UnDockWaveForm();
if (toolStripButtonToogleWaveForm.Checked)
if (toolStripButtonToggleWaveForm.Checked)
_waveFormUnDocked.Show(this);
UnDockVideoButtons();
@ -8689,10 +8692,10 @@ namespace Nikse.SubtitleEdit.Forms
_videoControlsUnDocked = null;
ShowVideoPlayer();
AudioWaveForm.Visible = toolStripButtonToogleWaveForm.Checked;
trackBarWaveFormPosition.Visible = toolStripButtonToogleWaveForm.Checked;
panelWaveFormControls.Visible = toolStripButtonToogleWaveForm.Checked;
if (!toolStripButtonToogleVideo.Checked)
AudioWaveForm.Visible = toolStripButtonToggleWaveForm.Checked;
trackBarWaveFormPosition.Visible = toolStripButtonToggleWaveForm.Checked;
panelWaveFormControls.Visible = toolStripButtonToggleWaveForm.Checked;
if (!toolStripButtonToggleVideo.Checked)
HideVideoPlayer();
mediaPlayer.Invalidate();
@ -8702,14 +8705,14 @@ namespace Nikse.SubtitleEdit.Forms
redockVideoControlsToolStripMenuItem.Visible = false;
}
internal void SetWaveFormToogleOff()
internal void SetWaveFormToggleOff()
{
toolStripButtonToogleWaveForm.Checked = false;
toolStripButtonToggleWaveForm.Checked = false;
}
internal void SetVideoPlayerToogleOff()
internal void SetVideoPlayerToggleOff()
{
toolStripButtonToogleVideo.Checked = false;
toolStripButtonToggleVideo.Checked = false;
}
private void toolStripMenuItemInsertSubtitle_Click(object sender, EventArgs e)
@ -8906,7 +8909,7 @@ namespace Nikse.SubtitleEdit.Forms
}
else
{
TextBoxListViewToogleTag("i");
TextBoxListViewToggleTag("i");
}
}
if (e.Modifiers == Keys.Control && e.KeyCode == Keys.D)

View File

@ -465,7 +465,7 @@
AABJRU5ErkJggg==
</value>
</data>
<data name="toolStripButtonToogleWaveForm.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<data name="toolStripButtonToggleWaveForm.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAf2SURBVFhH7Zd5TNTpHcaHpNkeAko8uQRUBBZnuAfm4JiB
@ -505,7 +505,7 @@
mMlsSRzpJ6QxpAmkZFLKWxJ7M4NZzIz7J9IxAuVcwHzYAAAAAElFTkSuQmCC
</value>
</data>
<data name="toolStripButtonToogleVideo.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<data name="toolStripButtonToggleVideo.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAWRSURBVFhH7ZZLSFZbFMcDkS5paeaj8pGa7zQr7W1p+X6/
@ -580,9 +580,6 @@
<metadata name="toolStripWaveControls.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>208, 56</value>
</metadata>
<metadata name="toolStripWaveControls.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>208, 56</value>
</metadata>
<data name="toolStripButtonWaveFormZoomOut.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
@ -687,7 +684,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD2
CAAAAk1TRnQBSQFMAgEBAgEAAWABAgFgAQIBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
CAAAAk1TRnQBSQFMAgEBAgEAAYABAgGAAQIBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA

View File

@ -84,7 +84,7 @@
0,
0});
this.numericUpDownMinMillisecondsBetweenLines.Name = "numericUpDownMinMillisecondsBetweenLines";
this.numericUpDownMinMillisecondsBetweenLines.Size = new System.Drawing.Size(64, 24);
this.numericUpDownMinMillisecondsBetweenLines.Size = new System.Drawing.Size(64, 21);
this.numericUpDownMinMillisecondsBetweenLines.TabIndex = 34;
this.numericUpDownMinMillisecondsBetweenLines.Value = new decimal(new int[] {
50,
@ -92,13 +92,14 @@
0,
0});
this.numericUpDownMinMillisecondsBetweenLines.ValueChanged += new System.EventHandler(this.numericUpDownMinMillisecondsBetweenLines_ValueChanged);
this.numericUpDownMinMillisecondsBetweenLines.KeyUp += new System.Windows.Forms.KeyEventHandler(this.numericUpDownMinMillisecondsBetweenLines_KeyUp);
//
// labelMaxMillisecondsBetweenLines
//
this.labelMaxMillisecondsBetweenLines.AutoSize = true;
this.labelMaxMillisecondsBetweenLines.Location = new System.Drawing.Point(15, 18);
this.labelMaxMillisecondsBetweenLines.Name = "labelMaxMillisecondsBetweenLines";
this.labelMaxMillisecondsBetweenLines.Size = new System.Drawing.Size(217, 17);
this.labelMaxMillisecondsBetweenLines.Size = new System.Drawing.Size(172, 13);
this.labelMaxMillisecondsBetweenLines.TabIndex = 35;
this.labelMaxMillisecondsBetweenLines.Text = "Mininum milliseconds between lines";
//
@ -129,9 +130,9 @@
//
this.checkBoxShowOnlyChangedLines.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.checkBoxShowOnlyChangedLines.AutoSize = true;
this.checkBoxShowOnlyChangedLines.Location = new System.Drawing.Point(18, 444);
this.checkBoxShowOnlyChangedLines.Location = new System.Drawing.Point(18, 448);
this.checkBoxShowOnlyChangedLines.Name = "checkBoxShowOnlyChangedLines";
this.checkBoxShowOnlyChangedLines.Size = new System.Drawing.Size(178, 21);
this.checkBoxShowOnlyChangedLines.Size = new System.Drawing.Size(142, 17);
this.checkBoxShowOnlyChangedLines.TabIndex = 38;
this.checkBoxShowOnlyChangedLines.Text = "Show only modified lines";
this.checkBoxShowOnlyChangedLines.UseVisualStyleBackColor = true;
@ -139,7 +140,7 @@
//
// SetMinimumDisplayTimeBetweenParagraphs
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 17F);
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(754, 480);
this.Controls.Add(this.checkBoxShowOnlyChangedLines);

View File

@ -47,8 +47,8 @@ namespace Nikse.SubtitleEdit.Forms
public void Initialize(Subtitle subtitle)
{
_subtitle = subtitle;
GeneratePreview();
numericUpDownMinMillisecondsBetweenLines.Value = Configuration.Settings.General.MininumMillisecondsBetweenLines;
// GeneratePreview();
}
private void GeneratePreview()
@ -87,6 +87,8 @@ namespace Nikse.SubtitleEdit.Forms
}
SubtitleListview1.EndUpdate();
FixCount = fixes.Count;
groupBoxLinesFound.Text = minumumMillisecondsBetweenLines.ToString();
}
private void buttonOK_Click(object sender, EventArgs e)
@ -111,12 +113,22 @@ namespace Nikse.SubtitleEdit.Forms
private void numericUpDownMinMillisecondsBetweenLines_ValueChanged(object sender, EventArgs e)
{
GeneratePreview();
Configuration.Settings.General.MininumMillisecondsBetweenLines = (int)numericUpDownMinMillisecondsBetweenLines.Value;
}
private void checkBoxShowOnlyChangedLines_CheckedChanged(object sender, EventArgs e)
{
GeneratePreview();
}
private void numericUpDownMinMillisecondsBetweenLines_KeyUp(object sender, KeyEventArgs e)
{
numericUpDownMinMillisecondsBetweenLines.ValueChanged -= numericUpDownMinMillisecondsBetweenLines_ValueChanged;
GeneratePreview();
numericUpDownMinMillisecondsBetweenLines.ValueChanged += numericUpDownMinMillisecondsBetweenLines_ValueChanged;
Configuration.Settings.General.MininumMillisecondsBetweenLines = (int)numericUpDownMinMillisecondsBetweenLines.Value;
}
}
}

View File

@ -33,7 +33,7 @@ namespace Nikse.SubtitleEdit.Forms
var control = panelContainer.Controls[0];
panelContainer.Controls.Clear();
_mainForm.ReDockVideoPlayer(control);
_mainForm.SetVideoPlayerToogleOff();
_mainForm.SetVideoPlayerToggleOff();
}
_positionsAndSizes.SavePositionAndSize(this);
}

View File

@ -58,6 +58,7 @@ namespace Nikse.SubtitleEdit.Forms
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.timer2 = new System.Windows.Forms.Timer(this.components);
this.labelTip = new System.Windows.Forms.Label();
this.timerProgressBarRefresh = new System.Windows.Forms.Timer(this.components);
this.groupBoxStartScene.SuspendLayout();
this.panelControlsStart.SuspendLayout();
this.groupBoxEndScene.SuspendLayout();
@ -352,6 +353,10 @@ namespace Nikse.SubtitleEdit.Forms
this.labelTip.TabIndex = 15;
this.labelTip.Text = "Tip: Use <ctrl+arrow left/right> keys to move 100 ms back/forward";
//
// timerProgressBarRefresh
//
this.timerProgressBarRefresh.Tick += new System.EventHandler(this.timerProgressBarRefresh_Tick);
//
// VisualSync
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -417,5 +422,6 @@ namespace Nikse.SubtitleEdit.Forms
private Nikse.SubtitleEdit.Controls.VideoPlayerContainer MediaPlayerEnd;
private System.Windows.Forms.Timer timer2;
private System.Windows.Forms.Label labelTip;
private System.Windows.Forms.Timer timerProgressBarRefresh;
}
}

View File

@ -180,6 +180,7 @@ namespace Nikse.SubtitleEdit.Forms
Utilities.InitializeVideoPlayerAndContainer(MediaPlayerStart.VideoPlayer.VideoFileName, null, MediaPlayerEnd, VideoEndLoaded, VideoEndEnded);
}
timer1.Start();
timerProgressBarRefresh.Start();
if (AudioTrackNumber > -1 && MediaPlayerStart.VideoPlayer is Nikse.SubtitleEdit.Logic.VideoPlayers.LibVlc11xDynamic)
{
@ -262,7 +263,7 @@ namespace Nikse.SubtitleEdit.Forms
private void FormVisualSync_FormClosing(object sender, FormClosingEventArgs e)
{
timer1.Stop();
timerProgressBarRefresh.Stop();
if (MediaPlayerStart != null)
MediaPlayerStart.Pause();
if (MediaPlayerEnd != null)
@ -295,6 +296,7 @@ namespace Nikse.SubtitleEdit.Forms
{
e.Cancel = true;
timer1.Start();
timerProgressBarRefresh.Start();
}
else if (dr == DialogResult.Yes)
{
@ -591,12 +593,12 @@ namespace Nikse.SubtitleEdit.Forms
if (_isStartSceneActive)
{
_startStopPosition = -1;
MediaPlayerStart.TooglePlayPause();
MediaPlayerStart.TogglePlayPause();
}
else
{
_endStopPosition = -1;
MediaPlayerStart.TooglePlayPause();
MediaPlayerStart.TogglePlayPause();
}
}
else if (e.Modifiers == Keys.Alt && e.KeyCode == Keys.Left)
@ -650,9 +652,9 @@ namespace Nikse.SubtitleEdit.Forms
else if (e.Modifiers == Keys.None && e.KeyCode == Keys.Space)
{
if (_isStartSceneActive)
MediaPlayerStart.TooglePlayPause();
MediaPlayerStart.TogglePlayPause();
else
MediaPlayerEnd.TooglePlayPause();
MediaPlayerEnd.TogglePlayPause();
e.SuppressKeyPress = true;
}
}
@ -724,5 +726,17 @@ namespace Nikse.SubtitleEdit.Forms
OKPressed = true;
}
private void timerProgressBarRefresh_Tick(object sender, EventArgs e)
{
if (MediaPlayerStart.VideoPlayer != null) // && MediaPlayerStart.VideoPlayer.GetType() == typeof(Nikse.SubtitleEdit.Logic.VideoPlayers.QuartsPlayer))
{
MediaPlayerStart.RefreshProgressBar();
}
if (MediaPlayerEnd.VideoPlayer != null) // && MediaPlayerEnd.VideoPlayer.GetType() == typeof(Nikse.SubtitleEdit.Logic.VideoPlayers.QuartsPlayer))
{
MediaPlayerEnd.RefreshProgressBar();
}
}
}
}

View File

@ -126,4 +126,7 @@
<metadata name="timer2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>240, 17</value>
</metadata>
<metadata name="timerProgressBarRefresh.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>327, 17</value>
</metadata>
</root>

View File

@ -39,7 +39,7 @@ namespace Nikse.SubtitleEdit.Forms
var controlTrackBar = panelContainer.Controls[2];
panelContainer.Controls.Clear();
_mainForm.ReDockWaveForm(controlWaveForm, controlButtons, controlTrackBar);
_mainForm.SetWaveFormToogleOff();
_mainForm.SetWaveFormToggleOff();
}
_positionsAndSizes.SavePositionAndSize(this);
}

View File

@ -230,6 +230,7 @@ namespace Nikse.SubtitleEdit.Logic
public bool StartInSourceView { get; set; }
public bool RemoveBlankLinesWhenOpening { get; set; }
public int SubtitleLineMaximumLength { get; set; }
public int MininumMillisecondsBetweenLines { get; set; }
public bool AutoWrapLineWhileTyping { get; set; }
public int SubtitleMaximumCharactersPerSeconds { get; set; }
public string SpellCheckLanguage { get; set; }
@ -280,6 +281,7 @@ namespace Nikse.SubtitleEdit.Logic
StartLoadLastFile = true;
StartRememberPositionAndSize = true;
SubtitleLineMaximumLength = 43;
MininumMillisecondsBetweenLines = 25;
AutoWrapLineWhileTyping = true;
SubtitleMaximumCharactersPerSeconds = 25;
SpellCheckLanguage = null;
@ -606,6 +608,9 @@ namespace Nikse.SubtitleEdit.Logic
subNode = node.SelectSingleNode("SubtitleLineMaximumLength");
if (subNode != null)
settings.General.SubtitleLineMaximumLength = Convert.ToInt32(subNode.InnerText);
subNode = node.SelectSingleNode("SubtitleLineMaximumLength");
if (subNode != null)
settings.General.SubtitleLineMaximumLength = Convert.ToInt32(subNode.InnerText);
subNode = node.SelectSingleNode("AutoWrapLineWhileTyping");
if (subNode != null)
settings.General.AutoWrapLineWhileTyping = Convert.ToBoolean(subNode.InnerText);
@ -957,6 +962,7 @@ namespace Nikse.SubtitleEdit.Logic
textWriter.WriteElementString("StartInSourceView", settings.General.StartInSourceView.ToString());
textWriter.WriteElementString("RemoveBlankLinesWhenOpening", settings.General.RemoveBlankLinesWhenOpening.ToString());
textWriter.WriteElementString("SubtitleLineMaximumLength", settings.General.SubtitleLineMaximumLength.ToString());
textWriter.WriteElementString("SubtitleLineMaximumLength", settings.General.MininumMillisecondsBetweenLines.ToString());
textWriter.WriteElementString("AutoWrapLineWhileTyping", settings.General.AutoWrapLineWhileTyping.ToString());
textWriter.WriteElementString("SubtitleMaximumCharactersPerSeconds", settings.General.SubtitleMaximumCharactersPerSeconds.ToString());
textWriter.WriteElementString("SpellCheckLanguage", settings.General.SpellCheckLanguage);

1852
src/Resources/fa-IR.xml Normal file

File diff suppressed because it is too large Load Diff

BIN
src/Resources/fa-IR.xml.zip Normal file

Binary file not shown.

View File

@ -802,6 +802,7 @@
<EmbeddedResource Include="Resources\fr-FR.xml.zip" />
<EmbeddedResource Include="Resources\OpenOfficeDictionaries.xml.zip" />
<EmbeddedResource Include="Resources\hu-HU.xml.zip" />
<EmbeddedResource Include="Resources\fa-IR.xml.zip" />
<None Include="Resources\pl-PL.xml">
<SubType>Designer</SubType>
</None>
@ -853,6 +854,7 @@
</None>
</ItemGroup>
<ItemGroup>
<Content Include="Resources\fa-IR.xml" />
<Content Include="Resources\zh-CHS.xml" />
<None Include="Web References\SeNetworkService\SeService.disco" />
<None Include="DLLs\Interop.QuartzTypeLib.dll" />