Applied white space removal pathc - thx XhmikosR :)

git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@698 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
niksedk 2011-10-06 19:22:35 +00:00
parent afafd149b0
commit fd1a90c72a
239 changed files with 5747 additions and 5747 deletions

View File

@ -2,12 +2,12 @@
{
partial class AudioVisualizer
{
/// <summary>
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
@ -22,16 +22,16 @@
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.SuspendLayout();
//
//
// WaveForm
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Black;

View File

@ -11,7 +11,7 @@ namespace Nikse.SubtitleEdit.Controls
public partial class AudioVisualizer : UserControl
{
private enum MouseDownParagraphType
{
{
None,
Start,
Whole,
@ -128,16 +128,16 @@ namespace Nikse.SubtitleEdit.Controls
public bool Locked { get; set; }
public double EndPositionSeconds
public double EndPositionSeconds
{
get
{
return XPositionToSeconds(Width);
}
}
public WavePeakGenerator WavePeaks
{
public WavePeakGenerator WavePeaks
{
get
{
return _wavePeaks;
@ -222,7 +222,7 @@ namespace Nikse.SubtitleEdit.Controls
else
{
for (int i = 0; i < subtitle.Paragraphs.Count; i++)
{
{
Paragraph p = subtitle.Paragraphs[i];
if (p.EndTime.TotalMilliseconds > positionMilliseconds)
{
@ -282,7 +282,7 @@ namespace Nikse.SubtitleEdit.Controls
_subtitle = subtitle;
_currentVideoPositionSeconds = currentVideoPositionSeconds;
_selectedParagraph = _subtitle.GetParagraphOrDefault(subtitleIndex);
NearestSubtitles(subtitle, currentVideoPositionSeconds, subtitleIndex);
NearestSubtitles(subtitle, currentVideoPositionSeconds, subtitleIndex);
Invalidate();
}
@ -302,11 +302,11 @@ namespace Nikse.SubtitleEdit.Controls
if (XPositionToSeconds(Width) > _wavePeaks.Header.LengthInSeconds)
StartPositionSeconds = _wavePeaks.Header.LengthInSeconds - ((((double)Width) / (double)_wavePeaks.Header.SampleRate) / _zoomFactor);
Graphics graphics = e.Graphics;
int begin = SecondsToXPosition(StartPositionSeconds);
int beginNoZoomFactor = (int)Math.Round(StartPositionSeconds * _wavePeaks.Header.SampleRate); // do not use zoom factor here!
int start = -1;
int end = -1;
if (_selectedParagraph != null)
@ -396,7 +396,7 @@ namespace Nikse.SubtitleEdit.Controls
// current selection
if (NewSelectionParagraph != null)
{
{
int currentRegionLeft = SecondsToXPosition(NewSelectionParagraph.StartTime.TotalSeconds - StartPositionSeconds);
int currentRegionRight = SecondsToXPosition(NewSelectionParagraph.EndTime.TotalSeconds - StartPositionSeconds);
@ -459,7 +459,7 @@ namespace Nikse.SubtitleEdit.Controls
Pen pen = new Pen(TextColor);
SolidBrush textBrush = new SolidBrush(TextColor);
Font textFont = new Font(Font.FontFamily, 7);
while (position < Width)
while (position < Width)
{
if (_zoomFactor > 0.3 || (int)Math.Round(StartPositionSeconds + seconds) % 5 == 0)
{
@ -599,7 +599,7 @@ namespace Nikse.SubtitleEdit.Controls
if (e.Button == MouseButtons.Right)
{
double seconds = XPositionToSeconds(e.X);
int milliseconds = (int)(seconds * 1000.0);
int milliseconds = (int)(seconds * 1000.0);
double currentRegionLeft = Math.Min(_mouseMoveStartX, _mouseMoveEndX);
double currentRegionRight = Math.Max(_mouseMoveStartX, _mouseMoveEndX);
@ -622,7 +622,7 @@ namespace Nikse.SubtitleEdit.Controls
}
}
}
else
else
{
Paragraph p = GetParagraphAtMilliseconds(milliseconds);
RightClickedParagraph = p;
@ -651,10 +651,10 @@ namespace Nikse.SubtitleEdit.Controls
private bool SetParagrapBorderHit(int milliseconds, List<Paragraph> paragraphs)
{
foreach (Paragraph p in paragraphs)
{
{
bool hit = SetParagrapBorderHit(milliseconds, p);
if (hit)
return true;
return true;
}
return false;
}
@ -793,7 +793,7 @@ namespace Nikse.SubtitleEdit.Controls
else if (_mouseDownParagraphType == MouseDownParagraphType.End)
{
if (milliseconds - _mouseDownParagraph.StartTime.TotalMilliseconds > MininumSelectionMilliseconds)
{
{
_mouseDownParagraph.EndTime.TotalMilliseconds = milliseconds;
if (NewSelectionParagraph != null)
{
@ -808,7 +808,7 @@ namespace Nikse.SubtitleEdit.Controls
}
}
else if (_mouseDownParagraphType == MouseDownParagraphType.Whole)
{
{
double durationMilliseconds = _mouseDownParagraph.Duration.TotalMilliseconds;
_mouseDownParagraph.StartTime.TotalMilliseconds = milliseconds - _moveWholeStartDifferenceMilliseconds;
_mouseDownParagraph.EndTime.TotalMilliseconds = _mouseDownParagraph.StartTime.TotalMilliseconds + durationMilliseconds;
@ -830,7 +830,7 @@ namespace Nikse.SubtitleEdit.Controls
int start = Math.Min(_mouseMoveStartX, _mouseMoveEndX);
int end = Math.Max(_mouseMoveStartX, _mouseMoveEndX);
NewSelectionParagraph.StartTime.TotalSeconds = XPositionToSeconds(start);
NewSelectionParagraph.EndTime.TotalSeconds = XPositionToSeconds(end);
NewSelectionParagraph.EndTime.TotalSeconds = XPositionToSeconds(end);
}
}
Invalidate();
@ -855,7 +855,7 @@ namespace Nikse.SubtitleEdit.Controls
return false;
return Math.Abs(milliseconds - paragraph.StartTime.TotalMilliseconds) <= ClosenessForBorderSelection ||
Math.Abs(milliseconds - paragraph.EndTime.TotalMilliseconds) <= ClosenessForBorderSelection;
Math.Abs(milliseconds - paragraph.EndTime.TotalMilliseconds) <= ClosenessForBorderSelection;
}
private void WaveForm_MouseUp(object sender, MouseEventArgs e)
@ -961,7 +961,7 @@ namespace Nikse.SubtitleEdit.Controls
}
if (OnDoubleClickNonParagraph != null)
OnDoubleClickNonParagraph.Invoke(seconds, p);
OnDoubleClickNonParagraph.Invoke(seconds, p);
}
}
@ -1142,7 +1142,7 @@ namespace Nikse.SubtitleEdit.Controls
string fileName = System.IO.Path.Combine(_spectrogramDirectory, count + ".gif");
while (System.IO.File.Exists(System.IO.Path.Combine(_spectrogramDirectory, count + ".gif")))
{
using (var ms = new MemoryStream(File.ReadAllBytes(fileName)))
using (var ms = new MemoryStream(File.ReadAllBytes(fileName)))
{
_spectrogramBitmaps.Add((Bitmap)Bitmap.FromStream(ms));
}

View File

@ -40,6 +40,6 @@ namespace Nikse.SubtitleEdit.Controls
if (selectionLength > 0)
this.OnMouseMove(null);
}
}
}

View File

@ -37,7 +37,7 @@ namespace Nikse.SubtitleEdit.Controls
Columns[ColumnIndexStart].Text = general.StartTime;
Columns[ColumnIndexEnd].Text = general.EndTime;
Columns[ColumnIndexDuration].Text = general.Duration;
Columns[ColumnIndexText].Text = general.Text;
Columns[ColumnIndexText].Text = general.Text;
if (settings.General.ListViewLineSeparatorString != null)
_lineSeparatorString = settings.General.ListViewLineSeparatorString;
@ -65,13 +65,13 @@ namespace Nikse.SubtitleEdit.Controls
public SubtitleListView()
{
Font = new Font("Tahoma", 8.25F, FontStyle.Regular, GraphicsUnit.Point, 0);
Columns.AddRange(new[]
Columns.AddRange(new[]
{
new ColumnHeader { Text="#", Width=55 },
new ColumnHeader { Width = 80 },
new ColumnHeader { Width = 80 },
new ColumnHeader { Width= 55 },
new ColumnHeader { Width = -2 } // -2 = as rest of space (300)
new ColumnHeader { Text="#", Width=55 },
new ColumnHeader { Width = 80 },
new ColumnHeader { Width = 80 },
new ColumnHeader { Width= 55 },
new ColumnHeader { Width = -2 } // -2 = as rest of space (300)
});
SubtitleListView_Resize(this, null);
@ -125,7 +125,7 @@ namespace Nikse.SubtitleEdit.Controls
{
if (!IsAlternateTextColumnVisible)
{
ColumnIndexExtra = ColumnIndexTextAlternate + 1;
ColumnIndexExtra = ColumnIndexTextAlternate + 1;
if (IsExtraColumnVisible)
{
Columns.Insert(ColumnIndexTextAlternate, new ColumnHeader { Text = text, Width = -2 });
@ -206,10 +206,10 @@ namespace Nikse.SubtitleEdit.Controls
internal void Fill(Subtitle subtitle, Subtitle subtitleAlternate)
{
Fill(subtitle.Paragraphs, subtitleAlternate.Paragraphs);
}
}
internal void Fill(List<Paragraph> paragraphs)
{
{
SaveFirstVisibleIndex();
BeginUpdate();
Items.Clear();
@ -255,7 +255,7 @@ namespace Nikse.SubtitleEdit.Controls
if (FirstVisibleIndex == 0)
FirstVisibleIndex = -1;
}
}
private void Add(Paragraph paragraph, string tag)
{
@ -299,9 +299,9 @@ namespace Nikse.SubtitleEdit.Controls
RestoreFirstVisibleIndex();
if (!ClientRectangle.Contains(new Rectangle(item.Bounds.Left, item.Bounds.Top-5, item.Bounds.Height+ 10, 10)))
if (!ClientRectangle.Contains(new Rectangle(item.Bounds.Left, item.Bounds.Top-5, item.Bounds.Height+ 10, 10)))
item.EnsureVisible();
FocusedItem = item;
FocusedItem = item;
}
}
@ -446,7 +446,7 @@ namespace Nikse.SubtitleEdit.Controls
Items[index].SubItems.Add(new ListViewItem.ListViewSubItem());
Items[index].SubItems[ColumnIndexExtra].Text = text;
Items[index].UseItemStyleForSubItems = false;
Items[index].SubItems[ColumnIndexExtra].BackColor = Color.AntiqueWhite;
Items[index].SubItems[ColumnIndexExtra].ForeColor = color;
@ -566,7 +566,7 @@ namespace Nikse.SubtitleEdit.Controls
{
Columns[ColumnIndexText].Width = -2;
}
}
}
}
}

View File

@ -2,12 +2,12 @@
{
partial class TimeUpDown
{
/// <summary>
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
@ -22,8 +22,8 @@
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
@ -32,9 +32,9 @@
this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
this.SuspendLayout();
//
//
// maskedTextBox1
//
//
this.maskedTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.maskedTextBox1.InsertKeyMode = System.Windows.Forms.InsertKeyMode.Overwrite;
this.maskedTextBox1.Location = new System.Drawing.Point(4, 4);
@ -43,17 +43,17 @@
this.maskedTextBox1.Size = new System.Drawing.Size(67, 13);
this.maskedTextBox1.TabIndex = 21;
this.maskedTextBox1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.MaskedTextBox1KeyDown);
//
//
// numericUpDown1
//
//
this.numericUpDown1.Location = new System.Drawing.Point(2, 1);
this.numericUpDown1.Name = "numericUpDown1";
this.numericUpDown1.Size = new System.Drawing.Size(87, 20);
this.numericUpDown1.TabIndex = 20;
this.numericUpDown1.TabStop = false;
//
//
// TimeUpDown
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.AutoSize = true;

View File

@ -66,7 +66,7 @@ namespace Nikse.SubtitleEdit.Controls
public TimeCode TimeCode
{
get
{
{
string startTime = maskedTextBox1.Text;
startTime.Replace(' ', '0');
if (startTime.EndsWith("."))

View File

@ -28,7 +28,7 @@ namespace Nikse.SubtitleEdit.Controls
if (m.Msg == 0x204) return; // WM_RBUTTONDOWN
if (m.Msg == 0x205) return; // WM_RBUTTONUP
base.WndProc(ref m);
}
}
}
public event EventHandler OnButtonClicked;
@ -51,7 +51,7 @@ namespace Nikse.SubtitleEdit.Controls
private readonly System.ComponentModel.ComponentResourceManager _resources;
private const int ControlsHeight = 47;
private const int SubtitlesHeight = 57;
private readonly Color _backgroundColor = Color.FromArgb(18, 18, 18);
private readonly Color _backgroundColor = Color.FromArgb(18, 18, 18);
private Panel _panelcontrols;
private PictureBox _pictureBoxBackground;
@ -96,8 +96,8 @@ namespace Nikse.SubtitleEdit.Controls
HideAllStopImages();
}
}
}
}
public VideoPlayerContainer()
{
BorderStyle = System.Windows.Forms.BorderStyle.None;
@ -165,7 +165,7 @@ namespace Nikse.SubtitleEdit.Controls
_subtitleTextBox.BackColor = _backgroundColor;
_subtitleTextBox.ForeColor = Color.White;
_subtitleTextBox.Dock = DockStyle.Fill;
SetSubtitleFont();
SetSubtitleFont();
_subtitleTextBox.MouseClick += SubtitleTextBox_MouseClick;
return _panelSubtitle;
}
@ -176,7 +176,7 @@ namespace Nikse.SubtitleEdit.Controls
if (string.IsNullOrEmpty(gs.SubtitleFontName))
gs.SubtitleFontName = "Tahoma";
_subtitleTextBox.Font = new Font(gs.SubtitleFontName, gs.VideoPlayerPreviewFontSize, FontStyle.Bold);
}
}
void SubtitleTextBox_MouseClick(object sender, MouseEventArgs e)
{
@ -247,7 +247,7 @@ namespace Nikse.SubtitleEdit.Controls
{
sb.Append(text.Substring(i, 1));
}
else
else
{
sb.Append(text.Substring(i, 1));
letterCount++;
@ -301,7 +301,7 @@ namespace Nikse.SubtitleEdit.Controls
Size = new Size(200, 45),
SizeMode = PictureBoxSizeMode.StretchImage,
TabStop = false
};
};
_panelcontrols.Controls.Add(_pictureBoxBackground);
_pictureBoxPlay = new PictureBox
@ -769,7 +769,7 @@ namespace Nikse.SubtitleEdit.Controls
private void PictureBoxMuteOverMouseUp(object sender, MouseEventArgs e)
{
HideAllMuteImages();
HideAllMuteImages();
Mute = true;
_pictureBoxMuteDown.Visible = true;
}
@ -820,7 +820,7 @@ namespace Nikse.SubtitleEdit.Controls
private void PictureBoxReverseOverMouseUp(object sender, MouseEventArgs e)
{
HideAllReverseImages();
HideAllReverseImages();
_pictureBoxReverse.Visible = true;
}
@ -916,7 +916,7 @@ namespace Nikse.SubtitleEdit.Controls
pos = 0;
var span = TimeSpan.FromSeconds(pos);
var dur = TimeSpan.FromSeconds(Duration);
_labelTimeCode.Text = string.Format("{0:00}:{1:00}:{2:00},{3:000} / {4:00}:{5:00}:{6:00},{7:000}", span.Hours, span.Minutes, span.Seconds, span.Milliseconds,
_labelTimeCode.Text = string.Format("{0:00}:{1:00}:{2:00},{3:000} / {4:00}:{5:00}:{6:00},{7:000}", span.Hours, span.Minutes, span.Seconds, span.Milliseconds,
dur.Hours, dur.Minutes, dur.Seconds, dur.Milliseconds);
RefreshPlayPauseButtons();
@ -1035,7 +1035,7 @@ namespace Nikse.SubtitleEdit.Controls
if (VideoPlayer != null)
return VideoPlayer.Volume;
return 0;
}
}
set
{
if (VideoPlayer != null)
@ -1094,7 +1094,7 @@ namespace Nikse.SubtitleEdit.Controls
{
if (VideoPlayer != null)
{
return _isMuted;
return _isMuted;
}
return false;
}
@ -1116,6 +1116,6 @@ namespace Nikse.SubtitleEdit.Controls
}
}
#endregion
}
}

View File

@ -36,9 +36,9 @@
this.buttonDonate = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
//
// okButton
//
//
this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.okButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.okButton.Location = new System.Drawing.Point(355, 342);
@ -47,9 +47,9 @@
this.okButton.TabIndex = 0;
this.okButton.Text = "&OK";
this.okButton.Click += new System.EventHandler(this.OkButtonClick);
//
//
// labelProduct
//
//
this.labelProduct.AutoSize = true;
this.labelProduct.Font = new System.Drawing.Font("Tahoma", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelProduct.Location = new System.Drawing.Point(11, 16);
@ -57,19 +57,19 @@
this.labelProduct.Size = new System.Drawing.Size(140, 19);
this.labelProduct.TabIndex = 26;
this.labelProduct.Text = "Subtitle Edit 3.0";
//
//
// pictureBox1
//
//
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(368, 14);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(70, 64);
this.pictureBox1.TabIndex = 27;
this.pictureBox1.TabStop = false;
//
//
// richTextBoxAbout1
//
this.richTextBoxAbout1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
//
this.richTextBoxAbout1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.richTextBoxAbout1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.richTextBoxAbout1.Location = new System.Drawing.Point(16, 43);
@ -81,9 +81,9 @@
this.richTextBoxAbout1.TabStop = false;
this.richTextBoxAbout1.Text = "About...";
this.richTextBoxAbout1.LinkClicked += new System.Windows.Forms.LinkClickedEventHandler(this.RichTextBoxAbout1LinkClicked);
//
//
// labelFindHeight
//
//
this.labelFindHeight.AutoSize = true;
this.labelFindHeight.Location = new System.Drawing.Point(187, 24);
this.labelFindHeight.Name = "labelFindHeight";
@ -91,9 +91,9 @@
this.labelFindHeight.TabIndex = 41;
this.labelFindHeight.Text = "labelFindHeight";
this.labelFindHeight.Visible = false;
//
//
// buttonDonate
//
//
this.buttonDonate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.buttonDonate.AutoSize = true;
this.buttonDonate.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
@ -107,9 +107,9 @@
this.buttonDonate.TabIndex = 42;
this.buttonDonate.UseVisualStyleBackColor = false;
this.buttonDonate.Click += new System.EventHandler(this.buttonDonate_Click);
//
//
// About
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(457, 372);

View File

@ -49,7 +49,7 @@ namespace Nikse.SubtitleEdit.Forms
Process.Start(e.LinkText);
}
catch
{
{
MessageBox.Show("Unable to start link: " + e.LinkText, Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}

View File

@ -24,9 +24,9 @@
this.textBoxAddName = new System.Windows.Forms.TextBox();
this.labelDescription = new System.Windows.Forms.Label();
this.SuspendLayout();
//
//
// buttonOK
//
//
this.buttonOK.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonOK.Location = new System.Drawing.Point(80, 56);
this.buttonOK.Name = "buttonOK";
@ -35,9 +35,9 @@
this.buttonOK.Text = "&OK";
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.ButtonOkClick);
//
//
// buttonCancel
//
//
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonCancel.Location = new System.Drawing.Point(161, 56);
@ -46,25 +46,25 @@
this.buttonCancel.TabIndex = 16;
this.buttonCancel.Text = "C&ancel";
this.buttonCancel.UseVisualStyleBackColor = true;
//
//
// textBoxAddName
//
//
this.textBoxAddName.Location = new System.Drawing.Point(15, 26);
this.textBoxAddName.Name = "textBoxAddName";
this.textBoxAddName.Size = new System.Drawing.Size(221, 27);
this.textBoxAddName.TabIndex = 15;
//
//
// labelDescription
//
//
this.labelDescription.AutoSize = true;
this.labelDescription.Location = new System.Drawing.Point(12, 8);
this.labelDescription.Name = "labelDescription";
this.labelDescription.Size = new System.Drawing.Size(309, 21);
this.labelDescription.TabIndex = 14;
this.labelDescription.Text = "Add to names/noise list (case sensitive)";
//
//
// AddToNamesList
//
//
this.AcceptButton = this.buttonOK;
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 21F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;

View File

@ -36,7 +36,7 @@ namespace Nikse.SubtitleEdit.Forms
Utilities.SetButtonHeight(this, newButtonHeight, 1);
}
}
public void Initialize(Subtitle subtitle, string text)
{
_subtitle = subtitle;
@ -56,7 +56,7 @@ namespace Nikse.SubtitleEdit.Forms
NewName = textBoxAddName.Text.Trim();
string languageName = null;
_language = Configuration.Settings.Language.Main;
if (!string.IsNullOrEmpty(Configuration.Settings.General.SpellCheckLanguage))
{
languageName = Configuration.Settings.General.SpellCheckLanguage;

View File

@ -37,29 +37,29 @@
this.labelVideoFileName = new System.Windows.Forms.Label();
this.buttonCancel = new System.Windows.Forms.Button();
this.SuspendLayout();
//
//
// labelPleaseWait
//
//
this.labelPleaseWait.AutoSize = true;
this.labelPleaseWait.Location = new System.Drawing.Point(176, 59);
this.labelPleaseWait.Name = "labelPleaseWait";
this.labelPleaseWait.Size = new System.Drawing.Size(203, 13);
this.labelPleaseWait.TabIndex = 14;
this.labelPleaseWait.Text = "This may take a few minutes - please wait";
//
//
// progressBar1
//
//
this.progressBar1.Location = new System.Drawing.Point(12, 80);
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(522, 23);
this.progressBar1.TabIndex = 12;
//
//
// openFileDialog1
//
//
this.openFileDialog1.FileName = "openFileDialog1";
//
//
// buttonRipWave
//
//
this.buttonRipWave.Location = new System.Drawing.Point(12, 54);
this.buttonRipWave.Name = "buttonRipWave";
this.buttonRipWave.Size = new System.Drawing.Size(158, 23);
@ -67,36 +67,36 @@
this.buttonRipWave.Text = "Generate wave form data";
this.buttonRipWave.UseVisualStyleBackColor = true;
this.buttonRipWave.Click += new System.EventHandler(this.buttonRipWave_Click);
//
//
// labelProgress
//
//
this.labelProgress.AutoSize = true;
this.labelProgress.Location = new System.Drawing.Point(12, 106);
this.labelProgress.Name = "labelProgress";
this.labelProgress.Size = new System.Drawing.Size(70, 13);
this.labelProgress.TabIndex = 9;
this.labelProgress.Text = "labelProgress";
//
//
// labelSourcevideoFile
//
//
this.labelSourcevideoFile.AutoSize = true;
this.labelSourcevideoFile.Location = new System.Drawing.Point(14, 9);
this.labelSourcevideoFile.Name = "labelSourcevideoFile";
this.labelSourcevideoFile.Size = new System.Drawing.Size(89, 13);
this.labelSourcevideoFile.TabIndex = 15;
this.labelSourcevideoFile.Text = "Source video file:";
//
//
// labelVideoFileName
//
//
this.labelVideoFileName.AutoSize = true;
this.labelVideoFileName.Location = new System.Drawing.Point(12, 26);
this.labelVideoFileName.Name = "labelVideoFileName";
this.labelVideoFileName.Size = new System.Drawing.Size(100, 13);
this.labelVideoFileName.TabIndex = 16;
this.labelVideoFileName.Text = "labelVideoFileName";
//
//
// buttonCancel
//
//
this.buttonCancel.Location = new System.Drawing.Point(442, 109);
this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.Size = new System.Drawing.Size(92, 23);
@ -104,9 +104,9 @@
this.buttonCancel.Text = "C&ancel";
this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
//
//
// AddWareForm
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(550, 138);

View File

@ -52,12 +52,12 @@ namespace Nikse.SubtitleEdit.Forms
// vlcPath = Logic.VideoPlayers.MPlayer.GetMPlayerFileName;
// parameters = "-ao pcm:fast:file=\"" + targetFile + "\" -vo null -vc null \"" + SourceVideoFileName + "\"";
//}
//else
//else
if (Utilities.IsRunningOnLinux() || Utilities.IsRunningOnMac())
{
vlcPath = "cvlc";
parameters = "-vvv --no-sout-video --sout '#transcode{acodec=s16l}:std{mux=wav,access=file,dst=" + targetFile +"}' \"" + SourceVideoFileName + "\" vlc://quit";
}
}
else // windows
{
vlcPath = Nikse.SubtitleEdit.Logic.VideoPlayers.LibVlc11xDynamic.GetVlcPath("vlc.exe");
@ -136,7 +136,7 @@ namespace Nikse.SubtitleEdit.Forms
return;
}
ReadWaveFile(targetFile);
@ -155,7 +155,7 @@ namespace Nikse.SubtitleEdit.Forms
labelProgress.Text = Configuration.Settings.Language.AddWaveForm.GeneratingPeakFile;
this.Refresh();
waveFile.GeneratePeakSamples(sampleRate); // samples per second - SampleRate
waveFile.GeneratePeakSamples(sampleRate); // samples per second - SampleRate
if (Configuration.Settings.VideoControls.GenerateSpectrogram)
{
@ -196,7 +196,7 @@ namespace Nikse.SubtitleEdit.Forms
internal void InitializeViaWaveFile(string fileName)
{
_wavFileName = fileName;
_wavFileName = fileName;
}
private void FixWaveOnly()

View File

@ -41,9 +41,9 @@
this.buttonOK = new System.Windows.Forms.Button();
this.groupBoxAdjustVia.SuspendLayout();
this.SuspendLayout();
//
//
// radioButtonPercent
//
//
this.radioButtonPercent.AutoSize = true;
this.radioButtonPercent.Location = new System.Drawing.Point(171, 21);
this.radioButtonPercent.Name = "radioButtonPercent";
@ -52,9 +52,9 @@
this.radioButtonPercent.Text = "Percent";
this.radioButtonPercent.UseVisualStyleBackColor = true;
this.radioButtonPercent.CheckedChanged += new System.EventHandler(this.RadioButtonPercentCheckedChanged);
//
//
// radioButtonSeconds
//
//
this.radioButtonSeconds.AutoSize = true;
this.radioButtonSeconds.Checked = true;
this.radioButtonSeconds.Location = new System.Drawing.Point(11, 21);
@ -65,9 +65,9 @@
this.radioButtonSeconds.Text = "Seconds";
this.radioButtonSeconds.UseVisualStyleBackColor = true;
this.radioButtonSeconds.CheckedChanged += new System.EventHandler(this.RadioButtonSecondsCheckedChanged);
//
//
// groupBoxAdjustVia
//
//
this.groupBoxAdjustVia.Controls.Add(this.radioButtonPercent);
this.groupBoxAdjustVia.Controls.Add(this.radioButtonSeconds);
this.groupBoxAdjustVia.Location = new System.Drawing.Point(13, 13);
@ -76,9 +76,9 @@
this.groupBoxAdjustVia.TabIndex = 2;
this.groupBoxAdjustVia.TabStop = false;
this.groupBoxAdjustVia.Text = "Adjust via";
//
//
// comboBoxPercent
//
//
this.comboBoxPercent.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxPercent.Enabled = false;
this.comboBoxPercent.FormattingEnabled = true;
@ -123,9 +123,9 @@
this.comboBoxPercent.Name = "comboBoxPercent";
this.comboBoxPercent.Size = new System.Drawing.Size(141, 29);
this.comboBoxPercent.TabIndex = 3;
//
//
// comboBoxSeconds
//
//
this.comboBoxSeconds.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxSeconds.FormattingEnabled = true;
this.comboBoxSeconds.Items.AddRange(new object[] {
@ -149,36 +149,36 @@
this.comboBoxSeconds.Name = "comboBoxSeconds";
this.comboBoxSeconds.Size = new System.Drawing.Size(141, 29);
this.comboBoxSeconds.TabIndex = 4;
//
//
// labelNote
//
//
this.labelNote.AutoSize = true;
this.labelNote.Location = new System.Drawing.Point(10, 135);
this.labelNote.Name = "labelNote";
this.labelNote.Size = new System.Drawing.Size(434, 21);
this.labelNote.TabIndex = 5;
this.labelNote.Text = "Note: Display time will not overlap start time of next text";
//
//
// labelAddInPercent
//
//
this.labelAddInPercent.AutoSize = true;
this.labelAddInPercent.Location = new System.Drawing.Point(179, 70);
this.labelAddInPercent.Name = "labelAddInPercent";
this.labelAddInPercent.Size = new System.Drawing.Size(137, 21);
this.labelAddInPercent.TabIndex = 6;
this.labelAddInPercent.Text = "Adjust in percent";
//
//
// labelAddSeconds
//
//
this.labelAddSeconds.AutoSize = true;
this.labelAddSeconds.Location = new System.Drawing.Point(10, 70);
this.labelAddSeconds.Name = "labelAddSeconds";
this.labelAddSeconds.Size = new System.Drawing.Size(104, 21);
this.labelAddSeconds.TabIndex = 7;
this.labelAddSeconds.Text = "Add seconds";
//
//
// buttonCancel
//
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.ImeMode = System.Windows.Forms.ImeMode.NoControl;
@ -188,9 +188,9 @@
this.buttonCancel.TabIndex = 9;
this.buttonCancel.Text = "C&ancel";
this.buttonCancel.UseVisualStyleBackColor = true;
//
//
// buttonOK
//
//
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonOK.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonOK.Location = new System.Drawing.Point(222, 169);
@ -200,9 +200,9 @@
this.buttonOK.Text = "&OK";
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.ButtonOkClick);
//
//
// AdjustDisplayDuration
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 21F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(390, 206);

View File

@ -2,7 +2,7 @@
using System.Globalization;
using System.Windows.Forms;
using Nikse.SubtitleEdit.Logic;
using System.Drawing;
using System.Drawing;
namespace Nikse.SubtitleEdit.Forms
{

View File

@ -40,9 +40,9 @@
this.labelCondition = new System.Windows.Forms.Label();
this.groupBoxLinesFound.SuspendLayout();
this.SuspendLayout();
//
//
// listViewFixes
//
//
this.listViewFixes.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)));
@ -59,29 +59,29 @@
this.listViewFixes.TabIndex = 9;
this.listViewFixes.UseCompatibleStateImageBehavior = false;
this.listViewFixes.View = System.Windows.Forms.View.Details;
//
//
// columnHeader4
//
//
this.columnHeader4.Text = "Apply";
this.columnHeader4.Width = 45;
//
//
// columnHeader5
//
//
this.columnHeader5.Text = "Line#";
this.columnHeader5.Width = 61;
//
//
// columnHeader7
//
//
this.columnHeader7.Text = "Before";
this.columnHeader7.Width = 292;
//
//
// columnHeader8
//
//
this.columnHeader8.Text = "After";
this.columnHeader8.Width = 292;
//
//
// groupBoxLinesFound
//
//
this.groupBoxLinesFound.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)));
@ -92,9 +92,9 @@
this.groupBoxLinesFound.TabIndex = 7;
this.groupBoxLinesFound.TabStop = false;
this.groupBoxLinesFound.Text = "Lines found: {0}";
//
//
// buttonOK
//
//
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonOK.Location = new System.Drawing.Point(606, 425);
this.buttonOK.Name = "buttonOK";
@ -103,9 +103,9 @@
this.buttonOK.Text = "&OK";
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.ButtonOkClick);
//
//
// buttonCancel
//
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.Location = new System.Drawing.Point(687, 425);
@ -114,9 +114,9 @@
this.buttonCancel.TabIndex = 6;
this.buttonCancel.Text = "C&ancel";
this.buttonCancel.UseVisualStyleBackColor = true;
//
//
// comboBoxConditions
//
//
this.comboBoxConditions.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxConditions.FormattingEnabled = true;
this.comboBoxConditions.Location = new System.Drawing.Point(12, 30);
@ -124,18 +124,18 @@
this.comboBoxConditions.Size = new System.Drawing.Size(150, 25);
this.comboBoxConditions.TabIndex = 8;
this.comboBoxConditions.SelectedIndexChanged += new System.EventHandler(this.comboBoxConditions_SelectedIndexChanged);
//
//
// labelCondition
//
//
this.labelCondition.AutoSize = true;
this.labelCondition.Location = new System.Drawing.Point(13, 13);
this.labelCondition.Name = "labelCondition";
this.labelCondition.Size = new System.Drawing.Size(177, 17);
this.labelCondition.TabIndex = 9;
this.labelCondition.Text = "Only break lines longer than";
//
//
// AutoBreakUnbreakLines
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(774, 454);

View File

@ -30,7 +30,7 @@ namespace Nikse.SubtitleEdit.Forms
listViewFixes.Columns[0].Text = Configuration.Settings.Language.General.Apply;
listViewFixes.Columns[1].Text = Configuration.Settings.Language.AutoBreakUnbreakLines.LineNumber;
listViewFixes.Columns[2].Text = Configuration.Settings.Language.AutoBreakUnbreakLines.Before;
listViewFixes.Columns[3].Text = Configuration.Settings.Language.AutoBreakUnbreakLines.After;
listViewFixes.Columns[3].Text = Configuration.Settings.Language.AutoBreakUnbreakLines.After;
buttonOK.Text = Configuration.Settings.Language.General.OK;
buttonCancel.Text = Configuration.Settings.Language.General.Cancel;
FixLargeFonts();
@ -57,12 +57,12 @@ namespace Nikse.SubtitleEdit.Forms
if (autoBalance)
{
labelCondition.Text = Configuration.Settings.Language.AutoBreakUnbreakLines.OnlyBreakLinesLongerThan;
labelCondition.Text = Configuration.Settings.Language.AutoBreakUnbreakLines.OnlyBreakLinesLongerThan;
const int start = 10;
const int max = 60;
for (int i = start; i <= max; i++)
comboBoxConditions.Items.Add(i.ToString());
int index = Configuration.Settings.Tools.MergeLinesShorterThan - (start +1);
if (index > 0 && index < max)
comboBoxConditions.SelectedIndex = index;
@ -165,7 +165,7 @@ namespace Nikse.SubtitleEdit.Forms
{
Paragraph p = _paragraphs[i];
if (!IsFixAllowed(p))
_paragraphs.Remove(p);
_paragraphs.Remove(p);
}
DialogResult = DialogResult.OK;
}

View File

@ -48,10 +48,10 @@
this.groupBoxImageSettings.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
//
// groupBoxImageSettings
//
this.groupBoxImageSettings.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
//
this.groupBoxImageSettings.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBoxImageSettings.Controls.Add(this.checkBoxAntiAlias);
this.groupBoxImageSettings.Controls.Add(this.labelSubtitleFontSize);
@ -70,9 +70,9 @@
this.groupBoxImageSettings.TabIndex = 23;
this.groupBoxImageSettings.TabStop = false;
this.groupBoxImageSettings.Text = "Image settings";
//
//
// checkBoxAntiAlias
//
//
this.checkBoxAntiAlias.AutoSize = true;
this.checkBoxAntiAlias.Checked = true;
this.checkBoxAntiAlias.CheckState = System.Windows.Forms.CheckState.Checked;
@ -83,18 +83,18 @@
this.checkBoxAntiAlias.Text = "AntiAlias";
this.checkBoxAntiAlias.UseVisualStyleBackColor = true;
this.checkBoxAntiAlias.CheckedChanged += new System.EventHandler(this.checkBoxAntiAlias_CheckedChanged);
//
//
// labelSubtitleFontSize
//
//
this.labelSubtitleFontSize.AutoSize = true;
this.labelSubtitleFontSize.Location = new System.Drawing.Point(10, 54);
this.labelSubtitleFontSize.Name = "labelSubtitleFontSize";
this.labelSubtitleFontSize.Size = new System.Drawing.Size(84, 13);
this.labelSubtitleFontSize.TabIndex = 20;
this.labelSubtitleFontSize.Text = "Subtitle font size";
//
//
// comboBoxSubtitleFont
//
//
this.comboBoxSubtitleFont.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxSubtitleFont.FormattingEnabled = true;
this.comboBoxSubtitleFont.Location = new System.Drawing.Point(100, 24);
@ -102,9 +102,9 @@
this.comboBoxSubtitleFont.Size = new System.Drawing.Size(121, 21);
this.comboBoxSubtitleFont.TabIndex = 17;
this.comboBoxSubtitleFont.SelectedIndexChanged += new System.EventHandler(this.comboBoxSubtitleFont_SelectedValueChanged);
//
//
// comboBoxSubtitleFontSize
//
//
this.comboBoxSubtitleFontSize.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxSubtitleFontSize.FormattingEnabled = true;
this.comboBoxSubtitleFontSize.Items.AddRange(new object[] {
@ -183,18 +183,18 @@
this.comboBoxSubtitleFontSize.Size = new System.Drawing.Size(121, 21);
this.comboBoxSubtitleFontSize.TabIndex = 18;
this.comboBoxSubtitleFontSize.SelectedIndexChanged += new System.EventHandler(this.comboBoxSubtitleFontSize_SelectedIndexChanged);
//
//
// labelSubtitleFont
//
//
this.labelSubtitleFont.AutoSize = true;
this.labelSubtitleFont.Location = new System.Drawing.Point(10, 27);
this.labelSubtitleFont.Name = "labelSubtitleFont";
this.labelSubtitleFont.Size = new System.Drawing.Size(63, 13);
this.labelSubtitleFont.TabIndex = 19;
this.labelSubtitleFont.Text = "Subtitle font";
//
//
// labelBorderWidth
//
//
this.labelBorderWidth.Location = new System.Drawing.Point(426, 56);
this.labelBorderWidth.Name = "labelBorderWidth";
this.labelBorderWidth.RightToLeft = System.Windows.Forms.RightToLeft.No;
@ -202,9 +202,9 @@
this.labelBorderWidth.TabIndex = 16;
this.labelBorderWidth.Text = "Border width";
this.labelBorderWidth.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
//
// comboBoxBorderWidth
//
//
this.comboBoxBorderWidth.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxBorderWidth.FormattingEnabled = true;
this.comboBoxBorderWidth.Items.AddRange(new object[] {
@ -219,18 +219,18 @@
this.comboBoxBorderWidth.Size = new System.Drawing.Size(121, 21);
this.comboBoxBorderWidth.TabIndex = 15;
this.comboBoxBorderWidth.SelectedIndexChanged += new System.EventHandler(this.comboBoxBorderWidth_SelectedIndexChanged);
//
//
// panelBorderColor
//
//
this.panelBorderColor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panelBorderColor.Location = new System.Drawing.Point(664, 25);
this.panelBorderColor.Name = "panelBorderColor";
this.panelBorderColor.Size = new System.Drawing.Size(21, 20);
this.panelBorderColor.TabIndex = 14;
this.panelBorderColor.Click += new System.EventHandler(this.buttonBorderColor_Click);
//
//
// buttonBorderColor
//
//
this.buttonBorderColor.Location = new System.Drawing.Point(537, 24);
this.buttonBorderColor.Name = "buttonBorderColor";
this.buttonBorderColor.Size = new System.Drawing.Size(121, 21);
@ -238,18 +238,18 @@
this.buttonBorderColor.Text = "Border color";
this.buttonBorderColor.UseVisualStyleBackColor = true;
this.buttonBorderColor.Click += new System.EventHandler(this.buttonBorderColor_Click);
//
//
// panelColor
//
//
this.panelColor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panelColor.Location = new System.Drawing.Point(403, 25);
this.panelColor.Name = "panelColor";
this.panelColor.Size = new System.Drawing.Size(21, 20);
this.panelColor.TabIndex = 12;
this.panelColor.Click += new System.EventHandler(this.buttonColor_Click);
//
//
// buttonColor
//
//
this.buttonColor.Location = new System.Drawing.Point(276, 24);
this.buttonColor.Name = "buttonColor";
this.buttonColor.Size = new System.Drawing.Size(121, 21);
@ -257,17 +257,17 @@
this.buttonColor.Text = "Color";
this.buttonColor.UseVisualStyleBackColor = true;
this.buttonColor.Click += new System.EventHandler(this.buttonColor_Click);
//
//
// pictureBox1
//
//
this.pictureBox1.Location = new System.Drawing.Point(3, 99);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(855, 198);
this.pictureBox1.TabIndex = 22;
this.pictureBox1.TabStop = false;
//
//
// buttonStart
//
//
this.buttonStart.Location = new System.Drawing.Point(4, 303);
this.buttonStart.Name = "buttonStart";
this.buttonStart.Size = new System.Drawing.Size(121, 21);
@ -275,14 +275,14 @@
this.buttonStart.Text = "&Start";
this.buttonStart.UseVisualStyleBackColor = true;
this.buttonStart.Click += new System.EventHandler(this.buttonStart_Click);
//
//
// timer1
//
//
this.timer1.Interval = 25;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
//
// Beamer
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(862, 336);

View File

@ -158,7 +158,7 @@ namespace Nikse.SubtitleEdit.Forms
pictureBox1.Image = bmp;
pictureBox1.Height = bmp.Height;
pictureBox1.Width = bmp.Width;
_showIndex = -2;
_showIndex = -2;
}
}
@ -208,7 +208,7 @@ namespace Nikse.SubtitleEdit.Forms
textSize = g.MeasureString(text, font);
g.Dispose();
bmp.Dispose();
bmp = new Bitmap((int)(textSize.Width * 0.8), (int)(textSize.Height * 0.7) + 10);
bmp = new Bitmap((int)(textSize.Width * 0.8), (int)(textSize.Height * 0.7) + 10);
g = Graphics.FromImage(bmp);
g.FillRectangle(new SolidBrush(Color.Black), 0, 0, bmp.Width, bmp.Height); // background color
if (checkBoxAntiAlias.Checked)
@ -218,7 +218,7 @@ namespace Nikse.SubtitleEdit.Forms
}
StringFormat sf = new StringFormat();
sf.Alignment = StringAlignment.Near;
sf.LineAlignment = StringAlignment.Near;// draw the text to a path
sf.LineAlignment = StringAlignment.Near;// draw the text to a path
System.Drawing.Drawing2D.GraphicsPath path = new System.Drawing.Drawing2D.GraphicsPath();
// display italic
@ -345,7 +345,7 @@ namespace Nikse.SubtitleEdit.Forms
{
_seconds = _subtitle.Paragraphs[_index].StartTime.TotalSeconds;
_videoStartTick = DateTime.Now.Ticks- ((long) (_subtitle.Paragraphs[_index].StartTime.TotalMilliseconds) * 10000); //10,000 ticks = 1 millisecond
}
}
groupBoxImageSettings.Hide();
buttonStart.Hide();

View File

@ -39,9 +39,9 @@
this.radioButtonNormal = new System.Windows.Forms.RadioButton();
this.groupBoxChangeCasing.SuspendLayout();
this.SuspendLayout();
//
//
// buttonCancel
//
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.ImeMode = System.Windows.Forms.ImeMode.NoControl;
@ -51,9 +51,9 @@
this.buttonCancel.TabIndex = 14;
this.buttonCancel.Text = "C&ancel";
this.buttonCancel.UseVisualStyleBackColor = true;
//
//
// buttonOK
//
//
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK;
this.buttonOK.ImeMode = System.Windows.Forms.ImeMode.NoControl;
@ -63,9 +63,9 @@
this.buttonOK.TabIndex = 12;
this.buttonOK.Text = "&OK";
this.buttonOK.UseVisualStyleBackColor = true;
//
//
// groupBoxChangeCasing
//
//
this.groupBoxChangeCasing.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)));
@ -81,9 +81,9 @@
this.groupBoxChangeCasing.TabIndex = 12;
this.groupBoxChangeCasing.TabStop = false;
this.groupBoxChangeCasing.Text = "Change casing to";
//
//
// radioButtonFixOnlyNames
//
//
this.radioButtonFixOnlyNames.AutoSize = true;
this.radioButtonFixOnlyNames.Location = new System.Drawing.Point(11, 88);
this.radioButtonFixOnlyNames.Name = "radioButtonFixOnlyNames";
@ -91,9 +91,9 @@
this.radioButtonFixOnlyNames.TabIndex = 6;
this.radioButtonFixOnlyNames.Text = "Fix only names casing (via Dictionaries\\NamesEtc.xml)";
this.radioButtonFixOnlyNames.UseVisualStyleBackColor = true;
//
//
// checkBoxFixNames
//
//
this.checkBoxFixNames.AutoSize = true;
this.checkBoxFixNames.Checked = true;
this.checkBoxFixNames.CheckState = System.Windows.Forms.CheckState.Checked;
@ -103,9 +103,9 @@
this.checkBoxFixNames.TabIndex = 2;
this.checkBoxFixNames.Text = "Fix names casing (via Dictionaries\\NamesEtc.xml)";
this.checkBoxFixNames.UseVisualStyleBackColor = true;
//
//
// checkBoxOnlyAllUpper
//
//
this.checkBoxOnlyAllUpper.AutoSize = true;
this.checkBoxOnlyAllUpper.Location = new System.Drawing.Point(23, 62);
this.checkBoxOnlyAllUpper.Name = "checkBoxOnlyAllUpper";
@ -113,9 +113,9 @@
this.checkBoxOnlyAllUpper.TabIndex = 4;
this.checkBoxOnlyAllUpper.Text = "Only change all upper case lines.";
this.checkBoxOnlyAllUpper.UseVisualStyleBackColor = true;
//
//
// radioButtonLowercase
//
//
this.radioButtonLowercase.AutoSize = true;
this.radioButtonLowercase.Location = new System.Drawing.Point(11, 142);
this.radioButtonLowercase.Name = "radioButtonLowercase";
@ -123,9 +123,9 @@
this.radioButtonLowercase.TabIndex = 10;
this.radioButtonLowercase.Text = "all lowercase";
this.radioButtonLowercase.UseVisualStyleBackColor = true;
//
//
// radioButtonUppercase
//
//
this.radioButtonUppercase.AutoSize = true;
this.radioButtonUppercase.Location = new System.Drawing.Point(11, 116);
this.radioButtonUppercase.Name = "radioButtonUppercase";
@ -133,9 +133,9 @@
this.radioButtonUppercase.TabIndex = 8;
this.radioButtonUppercase.Text = "ALL UPPERCASE";
this.radioButtonUppercase.UseVisualStyleBackColor = true;
//
//
// radioButtonNormal
//
//
this.radioButtonNormal.AutoSize = true;
this.radioButtonNormal.Checked = true;
this.radioButtonNormal.Location = new System.Drawing.Point(11, 18);
@ -145,9 +145,9 @@
this.radioButtonNormal.TabStop = true;
this.radioButtonNormal.Text = "Normal casing. Sentences begin with uppercase letter.";
this.radioButtonNormal.UseVisualStyleBackColor = true;
//
//
// ChangeCasing
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 21F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(404, 228);

View File

@ -43,9 +43,9 @@
this.groupBoxNames.SuspendLayout();
this.groupBoxLinesFound.SuspendLayout();
this.SuspendLayout();
//
//
// buttonOK
//
//
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonOK.Location = new System.Drawing.Point(570, 559);
this.buttonOK.Name = "buttonOK";
@ -54,9 +54,9 @@
this.buttonOK.Text = "&OK";
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.ButtonOkClick);
//
//
// buttonCancel
//
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.Location = new System.Drawing.Point(651, 559);
@ -65,9 +65,9 @@
this.buttonCancel.TabIndex = 15;
this.buttonCancel.Text = "C&ancel";
this.buttonCancel.UseVisualStyleBackColor = true;
//
//
// groupBoxNames
//
//
this.groupBoxNames.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBoxNames.Controls.Add(this.listViewNames);
@ -77,9 +77,9 @@
this.groupBoxNames.TabIndex = 12;
this.groupBoxNames.TabStop = false;
this.groupBoxNames.Text = "Names found in subtitle";
//
//
// listViewNames
//
//
this.listViewNames.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.listViewNames.CheckBoxes = true;
@ -96,19 +96,19 @@
this.listViewNames.UseCompatibleStateImageBehavior = false;
this.listViewNames.View = System.Windows.Forms.View.Details;
this.listViewNames.SelectedIndexChanged += new System.EventHandler(this.ListViewNamesSelectedIndexChanged);
//
//
// columnHeader1
//
//
this.columnHeader1.Text = "Enabled";
this.columnHeader1.Width = 70;
//
//
// columnHeader2
//
//
this.columnHeader2.Text = "Name";
this.columnHeader2.Width = 620;
//
//
// groupBoxLinesFound
//
//
this.groupBoxLinesFound.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)));
@ -119,9 +119,9 @@
this.groupBoxLinesFound.TabIndex = 13;
this.groupBoxLinesFound.TabStop = false;
this.groupBoxLinesFound.Text = "Lines found: {0}";
//
//
// listViewFixes
//
//
this.listViewFixes.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)));
@ -139,29 +139,29 @@
this.listViewFixes.TabIndex = 9;
this.listViewFixes.UseCompatibleStateImageBehavior = false;
this.listViewFixes.View = System.Windows.Forms.View.Details;
//
//
// columnHeader4
//
//
this.columnHeader4.Text = "Apply";
this.columnHeader4.Width = 45;
//
//
// columnHeader5
//
//
this.columnHeader5.Text = "Line#";
this.columnHeader5.Width = 61;
//
//
// columnHeader7
//
//
this.columnHeader7.Text = "Before";
this.columnHeader7.Width = 292;
//
//
// columnHeader8
//
//
this.columnHeader8.Text = "After";
this.columnHeader8.Width = 292;
//
//
// ChangeCasingNames
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(736, 589);

View File

@ -62,7 +62,7 @@ namespace Nikse.SubtitleEdit.Forms
_subtitle = subtitle;
FindAllNames();
GeneratePreview();
GeneratePreview();
}
private void GeneratePreview()
@ -191,7 +191,7 @@ namespace Nikse.SubtitleEdit.Forms
int start = lower.IndexOf(name.ToLower());
if (start >= 0)
{
bool startOk = (start == 0) || (lower[start - 1] == ' ') || (lower[start - 1] == '-') || (lower[start - 1] == '"') ||
bool startOk = (start == 0) || (lower[start - 1] == ' ') || (lower[start - 1] == '-') || (lower[start - 1] == '"') ||
(lower[start - 1] == '\'') || (lower[start - 1] == '>') || (Environment.NewLine.EndsWith(lower[start - 1].ToString()));
if (startOk)

View File

@ -39,9 +39,9 @@
this.buttonGetFrameRateTo = new System.Windows.Forms.Button();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.SuspendLayout();
//
//
// buttonCancel
//
//
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonCancel.Location = new System.Drawing.Point(195, 115);
@ -50,9 +50,9 @@
this.buttonCancel.TabIndex = 5;
this.buttonCancel.Text = "C&ancel";
this.buttonCancel.UseVisualStyleBackColor = true;
//
//
// buttonOK
//
//
this.buttonOK.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonOK.Location = new System.Drawing.Point(114, 115);
this.buttonOK.Name = "buttonOK";
@ -61,9 +61,9 @@
this.buttonOK.Text = "&OK";
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.ButtonOkClick);
//
//
// labelInfo
//
//
this.labelInfo.AutoSize = true;
this.labelInfo.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.labelInfo.Location = new System.Drawing.Point(37, 9);
@ -71,43 +71,43 @@
this.labelInfo.Size = new System.Drawing.Size(229, 21);
this.labelInfo.TabIndex = 3;
this.labelInfo.Text = "Convert frame rate of subtitle";
//
//
// comboBoxFrameRateFrom
//
//
this.comboBoxFrameRateFrom.FormattingEnabled = true;
this.comboBoxFrameRateFrom.Location = new System.Drawing.Point(119, 45);
this.comboBoxFrameRateFrom.Name = "comboBoxFrameRateFrom";
this.comboBoxFrameRateFrom.Size = new System.Drawing.Size(121, 29);
this.comboBoxFrameRateFrom.TabIndex = 7;
//
//
// labelFromFrameRate
//
//
this.labelFromFrameRate.Location = new System.Drawing.Point(4, 48);
this.labelFromFrameRate.Name = "labelFromFrameRate";
this.labelFromFrameRate.Size = new System.Drawing.Size(112, 19);
this.labelFromFrameRate.TabIndex = 6;
this.labelFromFrameRate.Text = "From frame rate";
this.labelFromFrameRate.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
//
// comboBoxFrameRateTo
//
//
this.comboBoxFrameRateTo.FormattingEnabled = true;
this.comboBoxFrameRateTo.Location = new System.Drawing.Point(119, 74);
this.comboBoxFrameRateTo.Name = "comboBoxFrameRateTo";
this.comboBoxFrameRateTo.Size = new System.Drawing.Size(121, 29);
this.comboBoxFrameRateTo.TabIndex = 9;
//
//
// labelToFrameRate
//
//
this.labelToFrameRate.Location = new System.Drawing.Point(4, 77);
this.labelToFrameRate.Name = "labelToFrameRate";
this.labelToFrameRate.Size = new System.Drawing.Size(109, 22);
this.labelToFrameRate.TabIndex = 8;
this.labelToFrameRate.Text = "To frame rate";
this.labelToFrameRate.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
//
// buttonGetFrameRateFrom
//
//
this.buttonGetFrameRateFrom.Location = new System.Drawing.Point(246, 45);
this.buttonGetFrameRateFrom.Name = "buttonGetFrameRateFrom";
this.buttonGetFrameRateFrom.Size = new System.Drawing.Size(24, 22);
@ -115,9 +115,9 @@
this.buttonGetFrameRateFrom.Text = "...";
this.buttonGetFrameRateFrom.UseVisualStyleBackColor = true;
this.buttonGetFrameRateFrom.Click += new System.EventHandler(this.ButtonGetFrameRateFromClick);
//
//
// buttonGetFrameRateTo
//
//
this.buttonGetFrameRateTo.Location = new System.Drawing.Point(246, 72);
this.buttonGetFrameRateTo.Name = "buttonGetFrameRateTo";
this.buttonGetFrameRateTo.Size = new System.Drawing.Size(24, 22);
@ -125,13 +125,13 @@
this.buttonGetFrameRateTo.Text = "...";
this.buttonGetFrameRateTo.UseVisualStyleBackColor = true;
this.buttonGetFrameRateTo.Click += new System.EventHandler(this.ButtonGetFrameRateToClick);
//
//
// openFileDialog1
//
//
this.openFileDialog1.FileName = "openFileDialog1";
//
//
// ChangeFrameRate
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 21F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(295, 148);

View File

@ -113,6 +113,6 @@ namespace Nikse.SubtitleEdit.Forms
return double.Parse(comboBoxFrameRateTo.Text);
}
}
}
}

View File

@ -37,9 +37,9 @@
this.textBoxPreview = new System.Windows.Forms.TextBox();
this.LabelPreview = new System.Windows.Forms.Label();
this.SuspendLayout();
//
//
// buttonCancel
//
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.Location = new System.Drawing.Point(542, 473);
@ -48,9 +48,9 @@
this.buttonCancel.TabIndex = 7;
this.buttonCancel.Text = "C&ancel";
this.buttonCancel.UseVisualStyleBackColor = true;
//
//
// buttonOK
//
//
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonOK.Location = new System.Drawing.Point(461, 473);
this.buttonOK.Name = "buttonOK";
@ -59,9 +59,9 @@
this.buttonOK.Text = "&OK";
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.ButtonOkClick);
//
//
// listView1
//
//
this.listView1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
@ -80,24 +80,24 @@
this.listView1.View = System.Windows.Forms.View.Details;
this.listView1.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.listView1_ColumnClick);
this.listView1.SelectedIndexChanged += new System.EventHandler(this.listView1_SelectedIndexChanged);
//
//
// columnHeader1
//
//
this.columnHeader1.Text = "Codepage";
this.columnHeader1.Width = 75;
//
//
// columnHeader2
//
//
this.columnHeader2.Text = "Name";
this.columnHeader2.Width = 124;
//
//
// columnHeader3
//
//
this.columnHeader3.Text = "DisplayName";
this.columnHeader3.Width = 384;
//
//
// textBoxPreview
//
//
this.textBoxPreview.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)));
@ -107,18 +107,18 @@
this.textBoxPreview.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.textBoxPreview.Size = new System.Drawing.Size(604, 156);
this.textBoxPreview.TabIndex = 9;
//
//
// LabelPreview
//
//
this.LabelPreview.AutoSize = true;
this.LabelPreview.Location = new System.Drawing.Point(12, 284);
this.LabelPreview.Name = "LabelPreview";
this.LabelPreview.Size = new System.Drawing.Size(55, 17);
this.LabelPreview.TabIndex = 10;
this.LabelPreview.Text = "Preview";
//
//
// ChooseEncoding
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(629, 503);

View File

@ -41,7 +41,7 @@ namespace Nikse.SubtitleEdit.Forms
public int ColumnNumber { get; set; }
public bool IsNumber { get; set; }
public bool Descending { get; set; }
}
}

View File

@ -33,9 +33,9 @@
this.labelLanguage = new System.Windows.Forms.Label();
this.comboBoxLanguages = new System.Windows.Forms.ComboBox();
this.SuspendLayout();
//
//
// buttonCancel
//
//
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonCancel.Location = new System.Drawing.Point(203, 72);
@ -44,9 +44,9 @@
this.buttonCancel.TabIndex = 2;
this.buttonCancel.Text = "C&ancel";
this.buttonCancel.UseVisualStyleBackColor = true;
//
//
// buttonOK
//
//
this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK;
this.buttonOK.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonOK.Location = new System.Drawing.Point(122, 72);
@ -55,27 +55,27 @@
this.buttonOK.TabIndex = 1;
this.buttonOK.Text = "&OK";
this.buttonOK.UseVisualStyleBackColor = true;
//
//
// labelLanguage
//
//
this.labelLanguage.AutoSize = true;
this.labelLanguage.Location = new System.Drawing.Point(12, 14);
this.labelLanguage.Name = "labelLanguage";
this.labelLanguage.Size = new System.Drawing.Size(68, 17);
this.labelLanguage.TabIndex = 15;
this.labelLanguage.Text = "Language";
//
//
// comboBoxLanguages
//
//
this.comboBoxLanguages.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxLanguages.FormattingEnabled = true;
this.comboBoxLanguages.Location = new System.Drawing.Point(12, 31);
this.comboBoxLanguages.Name = "comboBoxLanguages";
this.comboBoxLanguages.Size = new System.Drawing.Size(266, 25);
this.comboBoxLanguages.TabIndex = 0;
//
//
// ChooseLanguage
//
//
this.AcceptButton = this.buttonOK;
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;

View File

@ -32,8 +32,8 @@ namespace Nikse.SubtitleEdit.Forms
public string CultureName
{
get
{
get
{
int index = comboBoxLanguages.SelectedIndex;
if (index == -1)
return "en-US";
@ -73,7 +73,7 @@ namespace Nikse.SubtitleEdit.Forms
System.Diagnostics.Debug.WriteLine(cultureName + " is not a valid culture");
}
}
int index = 0;
for (int i=0; i< comboBoxLanguages.Items.Count; i++)
{

View File

@ -48,9 +48,9 @@ namespace Nikse.SubtitleEdit.Forms
this.subtitleListView2 = new Nikse.SubtitleEdit.Controls.SubtitleListView();
this.subtitleListView1 = new Nikse.SubtitleEdit.Controls.SubtitleListView();
this.SuspendLayout();
//
//
// buttonOK
//
//
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonOK.Location = new System.Drawing.Point(884, 539);
this.buttonOK.Name = "buttonOK";
@ -59,27 +59,27 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonOK.Text = "&Close";
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.ButtonOkClick);
//
//
// labelSubtitle2
//
//
this.labelSubtitle2.AutoSize = true;
this.labelSubtitle2.Location = new System.Drawing.Point(492, 31);
this.labelSubtitle2.Name = "labelSubtitle2";
this.labelSubtitle2.Size = new System.Drawing.Size(38, 17);
this.labelSubtitle2.TabIndex = 10;
this.labelSubtitle2.Text = "sub2";
//
//
// labelSubtitle1
//
//
this.labelSubtitle1.AutoSize = true;
this.labelSubtitle1.Location = new System.Drawing.Point(9, 32);
this.labelSubtitle1.Name = "labelSubtitle1";
this.labelSubtitle1.Size = new System.Drawing.Size(38, 17);
this.labelSubtitle1.TabIndex = 8;
this.labelSubtitle1.Text = "sub1";
//
//
// buttonOpenSubtitle1
//
//
this.buttonOpenSubtitle1.Location = new System.Drawing.Point(9, 8);
this.buttonOpenSubtitle1.Name = "buttonOpenSubtitle1";
this.buttonOpenSubtitle1.Size = new System.Drawing.Size(24, 21);
@ -87,9 +87,9 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonOpenSubtitle1.Text = "...";
this.buttonOpenSubtitle1.UseVisualStyleBackColor = true;
this.buttonOpenSubtitle1.Click += new System.EventHandler(this.ButtonOpenSubtitle1Click);
//
//
// buttonOpenSubtitle2
//
//
this.buttonOpenSubtitle2.Location = new System.Drawing.Point(491, 8);
this.buttonOpenSubtitle2.Name = "buttonOpenSubtitle2";
this.buttonOpenSubtitle2.Size = new System.Drawing.Size(24, 21);
@ -97,13 +97,13 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonOpenSubtitle2.Text = "...";
this.buttonOpenSubtitle2.UseVisualStyleBackColor = true;
this.buttonOpenSubtitle2.Click += new System.EventHandler(this.ButtonOpenSubtitle2Click);
//
//
// openFileDialog1
//
//
this.openFileDialog1.FileName = "openFileDialog1";
//
//
// buttonNextDifference
//
//
this.buttonNextDifference.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.buttonNextDifference.Enabled = false;
this.buttonNextDifference.Location = new System.Drawing.Point(167, 539);
@ -113,9 +113,9 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonNextDifference.Text = "&Next difference";
this.buttonNextDifference.UseVisualStyleBackColor = true;
this.buttonNextDifference.Click += new System.EventHandler(this.ButtonNextDifferenceClick);
//
//
// buttonPreviousDifference
//
//
this.buttonPreviousDifference.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.buttonPreviousDifference.Enabled = false;
this.buttonPreviousDifference.Location = new System.Drawing.Point(5, 539);
@ -125,9 +125,9 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonPreviousDifference.Text = "&Previous difference";
this.buttonPreviousDifference.UseVisualStyleBackColor = true;
this.buttonPreviousDifference.Click += new System.EventHandler(this.ButtonPreviousDifferenceClick);
//
//
// labelStatus
//
//
this.labelStatus.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.labelStatus.AutoSize = true;
this.labelStatus.Location = new System.Drawing.Point(4, 560);
@ -135,13 +135,13 @@ namespace Nikse.SubtitleEdit.Forms
this.labelStatus.Size = new System.Drawing.Size(45, 17);
this.labelStatus.TabIndex = 17;
this.labelStatus.Text = "status";
//
//
// timer1
//
//
this.timer1.Tick += new System.EventHandler(this.Timer1Tick);
//
//
// richTextBox1
//
//
this.richTextBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.richTextBox1.BackColor = System.Drawing.SystemColors.Control;
this.richTextBox1.Location = new System.Drawing.Point(8, 490);
@ -150,9 +150,9 @@ namespace Nikse.SubtitleEdit.Forms
this.richTextBox1.Size = new System.Drawing.Size(476, 43);
this.richTextBox1.TabIndex = 18;
this.richTextBox1.Text = "";
//
//
// richTextBox2
//
//
this.richTextBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.richTextBox2.BackColor = System.Drawing.SystemColors.Control;
this.richTextBox2.Location = new System.Drawing.Point(490, 489);
@ -161,9 +161,9 @@ namespace Nikse.SubtitleEdit.Forms
this.richTextBox2.Size = new System.Drawing.Size(478, 43);
this.richTextBox2.TabIndex = 19;
this.richTextBox2.Text = "";
//
//
// checkBoxShowOnlyDifferences
//
//
this.checkBoxShowOnlyDifferences.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.checkBoxShowOnlyDifferences.AutoSize = true;
this.checkBoxShowOnlyDifferences.Location = new System.Drawing.Point(330, 538);
@ -173,9 +173,9 @@ namespace Nikse.SubtitleEdit.Forms
this.checkBoxShowOnlyDifferences.Text = "Show only differences";
this.checkBoxShowOnlyDifferences.UseVisualStyleBackColor = true;
this.checkBoxShowOnlyDifferences.CheckedChanged += new System.EventHandler(this.checkBoxShowOnlyDifferences_CheckedChanged);
//
//
// checkBoxOnlyListDifferencesInText
//
//
this.checkBoxOnlyListDifferencesInText.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.checkBoxOnlyListDifferencesInText.AutoSize = true;
this.checkBoxOnlyListDifferencesInText.Location = new System.Drawing.Point(330, 556);
@ -185,9 +185,9 @@ namespace Nikse.SubtitleEdit.Forms
this.checkBoxOnlyListDifferencesInText.Text = "Only look for differences in the text";
this.checkBoxOnlyListDifferencesInText.UseVisualStyleBackColor = true;
this.checkBoxOnlyListDifferencesInText.CheckedChanged += new System.EventHandler(this.checkBoxOnlyListDifferencesInText_CheckedChanged);
//
//
// subtitleListView2
//
//
this.subtitleListView2.FirstVisibleIndex = -1;
this.subtitleListView2.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.subtitleListView2.FullRowSelect = true;
@ -202,9 +202,9 @@ namespace Nikse.SubtitleEdit.Forms
this.subtitleListView2.SelectedIndexChanged += new System.EventHandler(this.SubtitleListView2SelectedIndexChanged);
this.subtitleListView2.Enter += new System.EventHandler(this.SubtitleListView2Enter);
this.subtitleListView2.Leave += new System.EventHandler(this.SubtitleListView2Leave);
//
//
// subtitleListView1
//
//
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;
@ -217,9 +217,9 @@ namespace Nikse.SubtitleEdit.Forms
this.subtitleListView1.UseCompatibleStateImageBehavior = false;
this.subtitleListView1.View = System.Windows.Forms.View.Details;
this.subtitleListView1.SelectedIndexChanged += new System.EventHandler(this.SubtitleListView1SelectedIndexChanged);
//
//
// Compare
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(974, 582);

View File

@ -29,7 +29,7 @@ namespace Nikse.SubtitleEdit.Forms
checkBoxOnlyListDifferencesInText.Text = Configuration.Settings.Language.CompareSubtitles.OnlyLookForDifferencesInText;
else
checkBoxOnlyListDifferencesInText.Visible = false;
buttonOK.Text = Configuration.Settings.Language.General.OK;
buttonOK.Text = Configuration.Settings.Language.General.OK;
subtitleListView1.InitializeLanguage(Configuration.Settings.Language.General, Configuration.Settings);
subtitleListView2.InitializeLanguage(Configuration.Settings.Language.General, Configuration.Settings);
FixLargeFonts();
@ -64,7 +64,7 @@ namespace Nikse.SubtitleEdit.Forms
{
openFileDialog1.InitialDirectory = Path.GetDirectoryName(subtitleFileName1);
}
catch
catch
{
}
}
@ -139,8 +139,8 @@ namespace Nikse.SubtitleEdit.Forms
if (p1.ToString() == p2.ToString())
{
}
else
{
else
{
if (GetColumnsEqualExceptNumber(p1, p2) == 0)
{
int oldIndex = index;
@ -310,7 +310,7 @@ namespace Nikse.SubtitleEdit.Forms
if (max != _differences.Count)
{
for (index = Math.Max(subtitleListView1.Items.Count, subtitleListView2.Items.Count); index >= 0; index--)
{
{
if (!_differences.Contains(index))
{
if (subtitleListView1.Items.Count > index)
@ -404,7 +404,7 @@ namespace Nikse.SubtitleEdit.Forms
private void ShowTextDifference()
{
// from start
int minLength = Math.Min(richTextBox1.Text.Length, richTextBox2.Text.Length);
@ -518,7 +518,7 @@ namespace Nikse.SubtitleEdit.Forms
{
buttonPreviousDifference.Enabled = false;
buttonNextDifference.Enabled = false;
}
}
}
private void SubtitleListView2SelectedIndexChanged(object sender, EventArgs e)

View File

@ -52,9 +52,9 @@
this.groupBoxLanguages.SuspendLayout();
this.groupBoxPalNtsc.SuspendLayout();
this.SuspendLayout();
//
//
// buttonOpenIfo
//
//
this.buttonOpenIfo.Location = new System.Drawing.Point(447, 32);
this.buttonOpenIfo.Name = "buttonOpenIfo";
this.buttonOpenIfo.Size = new System.Drawing.Size(25, 23);
@ -62,9 +62,9 @@
this.buttonOpenIfo.Text = "...";
this.buttonOpenIfo.UseVisualStyleBackColor = true;
this.buttonOpenIfo.Click += new System.EventHandler(this.ButtonOpenIfoClick);
//
//
// textBoxIfoFileName
//
//
this.textBoxIfoFileName.AllowDrop = true;
this.textBoxIfoFileName.Location = new System.Drawing.Point(6, 34);
this.textBoxIfoFileName.Name = "textBoxIfoFileName";
@ -73,18 +73,18 @@
this.textBoxIfoFileName.TabIndex = 0;
this.textBoxIfoFileName.DragDrop += new System.Windows.Forms.DragEventHandler(this.TextBoxIfoFileNameDragDrop);
this.textBoxIfoFileName.DragEnter += new System.Windows.Forms.DragEventHandler(this.TextBoxIfoFileNameDragEnter);
//
//
// labelIfoFile
//
//
this.labelIfoFile.AutoSize = true;
this.labelIfoFile.Location = new System.Drawing.Point(6, 17);
this.labelIfoFile.Name = "labelIfoFile";
this.labelIfoFile.Size = new System.Drawing.Size(48, 17);
this.labelIfoFile.TabIndex = 2;
this.labelIfoFile.Text = "IFO file";
//
//
// groupBoxDvd
//
//
this.groupBoxDvd.Controls.Add(this.buttonClear);
this.groupBoxDvd.Controls.Add(this.groupBoxLanguages);
this.groupBoxDvd.Controls.Add(this.groupBoxPalNtsc);
@ -103,9 +103,9 @@
this.groupBoxDvd.TabIndex = 3;
this.groupBoxDvd.TabStop = false;
this.groupBoxDvd.Text = "DVD files/info";
//
//
// buttonClear
//
//
this.buttonClear.Location = new System.Drawing.Point(446, 131);
this.buttonClear.Name = "buttonClear";
this.buttonClear.Size = new System.Drawing.Size(74, 21);
@ -113,9 +113,9 @@
this.buttonClear.Text = "Clear";
this.buttonClear.UseVisualStyleBackColor = true;
this.buttonClear.Click += new System.EventHandler(this.ButtonClearClick);
//
//
// groupBoxLanguages
//
//
this.groupBoxLanguages.Controls.Add(this.comboBoxLanguages);
this.groupBoxLanguages.Location = new System.Drawing.Point(6, 206);
this.groupBoxLanguages.Name = "groupBoxLanguages";
@ -123,18 +123,18 @@
this.groupBoxLanguages.TabIndex = 14;
this.groupBoxLanguages.TabStop = false;
this.groupBoxLanguages.Text = "Languages";
//
//
// comboBoxLanguages
//
//
this.comboBoxLanguages.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxLanguages.FormattingEnabled = true;
this.comboBoxLanguages.Location = new System.Drawing.Point(6, 18);
this.comboBoxLanguages.Name = "comboBoxLanguages";
this.comboBoxLanguages.Size = new System.Drawing.Size(230, 25);
this.comboBoxLanguages.TabIndex = 14;
//
//
// groupBoxPalNtsc
//
//
this.groupBoxPalNtsc.Controls.Add(this.radioButtonNtsc);
this.groupBoxPalNtsc.Controls.Add(this.radioButtonPal);
this.groupBoxPalNtsc.Location = new System.Drawing.Point(254, 212);
@ -143,9 +143,9 @@
this.groupBoxPalNtsc.TabIndex = 20;
this.groupBoxPalNtsc.TabStop = false;
this.groupBoxPalNtsc.Text = "PAL/NTSC";
//
//
// radioButtonNtsc
//
//
this.radioButtonNtsc.AutoSize = true;
this.radioButtonNtsc.Location = new System.Drawing.Point(104, 18);
this.radioButtonNtsc.Name = "radioButtonNtsc";
@ -154,9 +154,9 @@
this.radioButtonNtsc.TabStop = true;
this.radioButtonNtsc.Text = "NTSC (30fps)";
this.radioButtonNtsc.UseVisualStyleBackColor = true;
//
//
// radioButtonPal
//
//
this.radioButtonPal.AutoSize = true;
this.radioButtonPal.Checked = true;
this.radioButtonPal.Location = new System.Drawing.Point(6, 19);
@ -166,9 +166,9 @@
this.radioButtonPal.TabStop = true;
this.radioButtonPal.Text = "PAL (25fps)";
this.radioButtonPal.UseVisualStyleBackColor = true;
//
//
// ButtonRemoveVob
//
//
this.ButtonRemoveVob.Location = new System.Drawing.Point(447, 104);
this.ButtonRemoveVob.Name = "ButtonRemoveVob";
this.ButtonRemoveVob.Size = new System.Drawing.Size(74, 21);
@ -176,9 +176,9 @@
this.ButtonRemoveVob.Text = "Remove";
this.ButtonRemoveVob.UseVisualStyleBackColor = true;
this.ButtonRemoveVob.Click += new System.EventHandler(this.ButtonRemoveVob_Click);
//
//
// ButtonMoveVobDown
//
//
this.ButtonMoveVobDown.Location = new System.Drawing.Point(446, 185);
this.ButtonMoveVobDown.Name = "ButtonMoveVobDown";
this.ButtonMoveVobDown.Size = new System.Drawing.Size(74, 21);
@ -186,9 +186,9 @@
this.ButtonMoveVobDown.Text = "Move down";
this.ButtonMoveVobDown.UseVisualStyleBackColor = true;
this.ButtonMoveVobDown.Click += new System.EventHandler(this.ButtonMoveVobDown_Click);
//
//
// ButtonMoveVobUp
//
//
this.ButtonMoveVobUp.Location = new System.Drawing.Point(447, 158);
this.ButtonMoveVobUp.Name = "ButtonMoveVobUp";
this.ButtonMoveVobUp.Size = new System.Drawing.Size(74, 21);
@ -196,9 +196,9 @@
this.ButtonMoveVobUp.Text = "Move up";
this.ButtonMoveVobUp.UseVisualStyleBackColor = true;
this.ButtonMoveVobUp.Click += new System.EventHandler(this.ButtonMoveVobUp_Click);
//
//
// buttonAddVobFile
//
//
this.buttonAddVobFile.Location = new System.Drawing.Point(447, 77);
this.buttonAddVobFile.Name = "buttonAddVobFile";
this.buttonAddVobFile.Size = new System.Drawing.Size(73, 21);
@ -206,18 +206,18 @@
this.buttonAddVobFile.Text = "Add...";
this.buttonAddVobFile.UseVisualStyleBackColor = true;
this.buttonAddVobFile.Click += new System.EventHandler(this.ButtonAddVobFileClick);
//
//
// labelVobFiles
//
//
this.labelVobFiles.AutoSize = true;
this.labelVobFiles.Location = new System.Drawing.Point(6, 60);
this.labelVobFiles.Name = "labelVobFiles";
this.labelVobFiles.Size = new System.Drawing.Size(59, 17);
this.labelVobFiles.TabIndex = 4;
this.labelVobFiles.Text = "VOB files";
//
//
// listBoxVobFiles
//
//
this.listBoxVobFiles.AllowDrop = true;
this.listBoxVobFiles.FormattingEnabled = true;
this.listBoxVobFiles.ItemHeight = 17;
@ -227,30 +227,30 @@
this.listBoxVobFiles.TabIndex = 3;
this.listBoxVobFiles.DragDrop += new System.Windows.Forms.DragEventHandler(this.ListBoxVobFilesDragDrop);
this.listBoxVobFiles.DragEnter += new System.Windows.Forms.DragEventHandler(this.ListBoxVobFilesDragEnter);
//
//
// openFileDialog1
//
//
this.openFileDialog1.FileName = "openFileDialog1";
//
//
// progressBarRip
//
//
this.progressBarRip.Location = new System.Drawing.Point(117, 290);
this.progressBarRip.Name = "progressBarRip";
this.progressBarRip.Size = new System.Drawing.Size(414, 14);
this.progressBarRip.TabIndex = 4;
this.progressBarRip.Visible = false;
//
//
// labelStatus
//
//
this.labelStatus.AutoSize = true;
this.labelStatus.Location = new System.Drawing.Point(117, 273);
this.labelStatus.Name = "labelStatus";
this.labelStatus.Size = new System.Drawing.Size(47, 17);
this.labelStatus.TabIndex = 5;
this.labelStatus.Text = "Status";
//
//
// buttonStartRipping
//
//
this.buttonStartRipping.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.buttonStartRipping.Location = new System.Drawing.Point(4, 273);
this.buttonStartRipping.Name = "buttonStartRipping";
@ -259,9 +259,9 @@
this.buttonStartRipping.Text = "Start ripping";
this.buttonStartRipping.UseVisualStyleBackColor = true;
this.buttonStartRipping.Click += new System.EventHandler(this.ButtonStartRippingClick);
//
//
// DvdSubRip
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(536, 310);

View File

@ -23,7 +23,7 @@ namespace Nikse.SubtitleEdit.Forms
public TimeSpan LastPresentationTimeStamp
{
get
{
{
if (radioButtonPal.Checked)
{
float ticksPerMillisecond = 90.000F;
@ -32,7 +32,7 @@ namespace Nikse.SubtitleEdit.Forms
else
{
float ticksPerMillisecond = 90.090F;
return TimeSpan.FromMilliseconds(Convert.ToDouble(_lastPresentationTimeStamp / ticksPerMillisecond));
return TimeSpan.FromMilliseconds(Convert.ToDouble(_lastPresentationTimeStamp / ticksPerMillisecond));
}
}
}
@ -40,17 +40,17 @@ namespace Nikse.SubtitleEdit.Forms
public double FrameRate
{
get
{
{
if (radioButtonPal.Checked)
return 25.0;
else
return 30.0;
return 30.0;
}
}
public string SelectedLanguage
{
get
public string SelectedLanguage
{
get
{
if (comboBoxLanguages.SelectedIndex >= 0)
return string.Format("{0} (0x{1:x})", comboBoxLanguages.Items[comboBoxLanguages.SelectedIndex], comboBoxLanguages.SelectedIndex + 32);
@ -182,7 +182,7 @@ namespace Nikse.SubtitleEdit.Forms
_lastPresentationTimeStamp = 0;
_lastVobPresentationTimeStamp = 0;
_lastNavEndPts = 0;
_accumulatedPresentationTimeStamp = 0;
_accumulatedPresentationTimeStamp = 0;
progressBarRip.Visible = true;
var ms = new MemoryStream();
@ -214,7 +214,7 @@ namespace Nikse.SubtitleEdit.Forms
vobSub.Open(ms);
ms.Close();
labelStatus.Text = string.Empty;
MergedVobSubPacks = vobSub.MergeVobSubPacks(); // Merge splitted-packs to whole-packs
Languages = new List<string>();
for (int k = 0; k < comboBoxLanguages.Items.Count; k++)
@ -257,7 +257,7 @@ namespace Nikse.SubtitleEdit.Forms
{
int bytesRead = 0;
// Reading and test for IO errors... and allow abort/retry/ignore
// Reading and test for IO errors... and allow abort/retry/ignore
tryAgain = true;
while (tryAgain && position < fs.Length)
{
@ -281,8 +281,8 @@ namespace Nikse.SubtitleEdit.Forms
}
}
}
if (VobSubParser.IsMpeg2PackHeader(buffer))
if (VobSubParser.IsMpeg2PackHeader(buffer))
{
VobSubPack vsp = new VobSubPack(buffer, null);
if (IsSubtitlePack(buffer))
@ -313,7 +313,7 @@ namespace Nikse.SubtitleEdit.Forms
{
_accumulatedPresentationTimeStamp += _lastNavEndPts - vobu_s_ptm;
}
else if (_lastNavEndPts > vobu_e_ptm)
else if (_lastNavEndPts > vobu_e_ptm)
{
_accumulatedPresentationTimeStamp += _lastNavEndPts - vobu_s_ptm;
}
@ -395,7 +395,7 @@ namespace Nikse.SubtitleEdit.Forms
{
foreach (var fileName in openFileDialog1.FileNames)
{
listBoxVobFiles.Items.Add(fileName);
listBoxVobFiles.Items.Add(fileName);
}
}
buttonStartRipping.Enabled = listBoxVobFiles.Items.Count > 0;
@ -404,7 +404,7 @@ namespace Nikse.SubtitleEdit.Forms
private void ButtonMoveVobUp_Click(object sender, EventArgs e)
{
if (listBoxVobFiles.SelectedIndex > -1 && listBoxVobFiles.SelectedIndex > 0)
{
{
int index = listBoxVobFiles.SelectedIndex;
string old = listBoxVobFiles.Items[index].ToString();
listBoxVobFiles.Items.RemoveAt(index);
@ -516,6 +516,6 @@ namespace Nikse.SubtitleEdit.Forms
}
}
}
}
}

View File

@ -38,9 +38,9 @@
((System.ComponentModel.ISupportInitialize)(this.pictureBoxImage)).BeginInit();
this.groupBoxImage.SuspendLayout();
this.SuspendLayout();
//
//
// listBox1
//
//
this.listBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.listBox1.FormattingEnabled = true;
@ -49,9 +49,9 @@
this.listBox1.Size = new System.Drawing.Size(298, 212);
this.listBox1.TabIndex = 2;
this.listBox1.SelectedIndexChanged += new System.EventHandler(this.ListBox1SelectedIndexChanged);
//
//
// pictureBoxImage
//
//
this.pictureBoxImage.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)));
@ -60,27 +60,27 @@
this.pictureBoxImage.Size = new System.Drawing.Size(452, 214);
this.pictureBoxImage.TabIndex = 1;
this.pictureBoxImage.TabStop = false;
//
//
// comboBoxLanguages
//
//
this.comboBoxLanguages.FormattingEnabled = true;
this.comboBoxLanguages.Location = new System.Drawing.Point(6, 30);
this.comboBoxLanguages.Name = "comboBoxLanguages";
this.comboBoxLanguages.Size = new System.Drawing.Size(297, 21);
this.comboBoxLanguages.TabIndex = 1;
this.comboBoxLanguages.SelectedIndexChanged += new System.EventHandler(this.ComboBoxLanguagesSelectedIndexChanged);
//
//
// labelChooseLanguage
//
//
this.labelChooseLanguage.AutoSize = true;
this.labelChooseLanguage.Location = new System.Drawing.Point(6, 11);
this.labelChooseLanguage.Name = "labelChooseLanguage";
this.labelChooseLanguage.Size = new System.Drawing.Size(146, 13);
this.labelChooseLanguage.TabIndex = 3;
this.labelChooseLanguage.Text = "Choose language (stream-id)";
//
//
// buttonCancel
//
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.ImeMode = System.Windows.Forms.ImeMode.NoControl;
@ -91,9 +91,9 @@
this.buttonCancel.Text = "C&ancel";
this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.ButtonCancelClick);
//
//
// buttonOK
//
//
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK;
this.buttonOK.ImeMode = System.Windows.Forms.ImeMode.NoControl;
@ -104,9 +104,9 @@
this.buttonOK.Text = "&OK";
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.ButtonOkClick);
//
//
// groupBoxImage
//
//
this.groupBoxImage.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)));
@ -117,9 +117,9 @@
this.groupBoxImage.TabIndex = 14;
this.groupBoxImage.TabStop = false;
this.groupBoxImage.Text = "Subtitle image";
//
//
// DvdSubRipChooseLanguage
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(779, 314);

View File

@ -31,7 +31,7 @@ namespace Nikse.SubtitleEdit.Forms
public List<VobSubMergedPack> SelectedVobSubMergedPacks { get; private set; }
public string SelectedLanguageString { get; private set; }
public DvdSubRipChooseLanguage()
{
InitializeComponent();

View File

@ -90,9 +90,9 @@
this.tabPageTextAndTiming.SuspendLayout();
this.tabPageErrors.SuspendLayout();
this.SuspendLayout();
//
//
// buttonOK
//
//
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonOK.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonOK.Location = new System.Drawing.Point(607, 445);
@ -102,9 +102,9 @@
this.buttonOK.Text = "Save";
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
//
//
// buttonCancel
//
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.ImeMode = System.Windows.Forms.ImeMode.NoControl;
@ -115,15 +115,15 @@
this.buttonCancel.Text = "C&ancel";
this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
//
//
// openFileDialog1
//
//
this.openFileDialog1.FileName = "openFileDialog1";
//
//
// tabControl1
//
this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
//
this.tabControl1.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.tabControl1.Controls.Add(this.tabPageHeader);
this.tabControl1.Controls.Add(this.tabPageTextAndTiming);
@ -133,9 +133,9 @@
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(758, 422);
this.tabControl1.TabIndex = 32;
//
//
// tabPageHeader
//
//
this.tabPageHeader.Controls.Add(this.textBoxCountryOfOrigin);
this.tabPageHeader.Controls.Add(this.labelCountryOfOrigin);
this.tabPageHeader.Controls.Add(this.textBoxCodePageNumber);
@ -176,35 +176,35 @@
this.tabPageHeader.TabIndex = 0;
this.tabPageHeader.Text = "General subtitle information";
this.tabPageHeader.UseVisualStyleBackColor = true;
//
//
// textBoxCountryOfOrigin
//
//
this.textBoxCountryOfOrigin.Location = new System.Drawing.Point(147, 280);
this.textBoxCountryOfOrigin.MaxLength = 3;
this.textBoxCountryOfOrigin.Name = "textBoxCountryOfOrigin";
this.textBoxCountryOfOrigin.Size = new System.Drawing.Size(219, 20);
this.textBoxCountryOfOrigin.TabIndex = 62;
//
//
// labelCountryOfOrigin
//
//
this.labelCountryOfOrigin.AutoSize = true;
this.labelCountryOfOrigin.Location = new System.Drawing.Point(6, 283);
this.labelCountryOfOrigin.Name = "labelCountryOfOrigin";
this.labelCountryOfOrigin.Size = new System.Drawing.Size(83, 13);
this.labelCountryOfOrigin.TabIndex = 63;
this.labelCountryOfOrigin.Text = "Country of origin";
//
//
// textBoxCodePageNumber
//
//
this.textBoxCodePageNumber.ContextMenuStrip = this.contextMenuStripCodeTable;
this.textBoxCodePageNumber.Location = new System.Drawing.Point(147, 12);
this.textBoxCodePageNumber.MaxLength = 3;
this.textBoxCodePageNumber.Name = "textBoxCodePageNumber";
this.textBoxCodePageNumber.Size = new System.Drawing.Size(219, 20);
this.textBoxCodePageNumber.TabIndex = 61;
//
//
// contextMenuStripCodeTable
//
//
this.contextMenuStripCodeTable.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.unitedStatesToolStripMenuItem,
this.multilingualToolStripMenuItem,
@ -213,44 +213,44 @@
this.nordicToolStripMenuItem});
this.contextMenuStripCodeTable.Name = "contextMenuStripCodeTable";
this.contextMenuStripCodeTable.Size = new System.Drawing.Size(185, 114);
//
//
// unitedStatesToolStripMenuItem
//
//
this.unitedStatesToolStripMenuItem.Name = "unitedStatesToolStripMenuItem";
this.unitedStatesToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
this.unitedStatesToolStripMenuItem.Text = "United States (437)";
this.unitedStatesToolStripMenuItem.Click += new System.EventHandler(this.unitedStatesToolStripMenuItem_Click);
//
//
// multilingualToolStripMenuItem
//
//
this.multilingualToolStripMenuItem.Name = "multilingualToolStripMenuItem";
this.multilingualToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
this.multilingualToolStripMenuItem.Text = "Multilingual (850)";
this.multilingualToolStripMenuItem.Click += new System.EventHandler(this.multilingualToolStripMenuItem_Click);
//
//
// portugalToolStripMenuItem
//
//
this.portugalToolStripMenuItem.Name = "portugalToolStripMenuItem";
this.portugalToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
this.portugalToolStripMenuItem.Text = "Portugal (860)";
this.portugalToolStripMenuItem.Click += new System.EventHandler(this.portugalToolStripMenuItem_Click);
//
//
// canadaFrenchToolStripMenuItem
//
//
this.canadaFrenchToolStripMenuItem.Name = "canadaFrenchToolStripMenuItem";
this.canadaFrenchToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
this.canadaFrenchToolStripMenuItem.Text = "Canada-French (863)";
this.canadaFrenchToolStripMenuItem.Click += new System.EventHandler(this.canadaFrenchToolStripMenuItem_Click);
//
//
// nordicToolStripMenuItem
//
//
this.nordicToolStripMenuItem.Name = "nordicToolStripMenuItem";
this.nordicToolStripMenuItem.Size = new System.Drawing.Size(184, 22);
this.nordicToolStripMenuItem.Text = "Nordic (865)";
this.nordicToolStripMenuItem.Click += new System.EventHandler(this.nordicToolStripMenuItem_Click);
//
//
// numericUpDownMaxRows
//
//
this.numericUpDownMaxRows.Location = new System.Drawing.Point(613, 224);
this.numericUpDownMaxRows.Maximum = new decimal(new int[] {
99,
@ -260,18 +260,18 @@
this.numericUpDownMaxRows.Name = "numericUpDownMaxRows";
this.numericUpDownMaxRows.Size = new System.Drawing.Size(120, 20);
this.numericUpDownMaxRows.TabIndex = 12;
//
//
// labelMaxNumberOfDisplayableRows
//
//
this.labelMaxNumberOfDisplayableRows.AutoSize = true;
this.labelMaxNumberOfDisplayableRows.Location = new System.Drawing.Point(473, 226);
this.labelMaxNumberOfDisplayableRows.Name = "labelMaxNumberOfDisplayableRows";
this.labelMaxNumberOfDisplayableRows.Size = new System.Drawing.Size(126, 13);
this.labelMaxNumberOfDisplayableRows.TabIndex = 60;
this.labelMaxNumberOfDisplayableRows.Text = "Max# of displayable rows";
//
//
// comboBoxDiscFormatCode
//
//
this.comboBoxDiscFormatCode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxDiscFormatCode.FormattingEnabled = true;
this.comboBoxDiscFormatCode.Items.AddRange(new object[] {
@ -281,44 +281,44 @@
this.comboBoxDiscFormatCode.Name = "comboBoxDiscFormatCode";
this.comboBoxDiscFormatCode.Size = new System.Drawing.Size(219, 21);
this.comboBoxDiscFormatCode.TabIndex = 1;
//
//
// labelDiskFormatCode
//
//
this.labelDiskFormatCode.AutoSize = true;
this.labelDiskFormatCode.Location = new System.Drawing.Point(6, 42);
this.labelDiskFormatCode.Name = "labelDiskFormatCode";
this.labelDiskFormatCode.Size = new System.Drawing.Size(87, 13);
this.labelDiskFormatCode.TabIndex = 58;
this.labelDiskFormatCode.Text = "Disk format code";
//
//
// labelCodePageNumber
//
//
this.labelCodePageNumber.AutoSize = true;
this.labelCodePageNumber.Location = new System.Drawing.Point(6, 15);
this.labelCodePageNumber.Name = "labelCodePageNumber";
this.labelCodePageNumber.Size = new System.Drawing.Size(97, 13);
this.labelCodePageNumber.TabIndex = 56;
this.labelCodePageNumber.Text = "Code page number";
//
//
// textBoxLanguageCode
//
//
this.textBoxLanguageCode.Location = new System.Drawing.Point(147, 94);
this.textBoxLanguageCode.MaxLength = 32;
this.textBoxLanguageCode.Name = "textBoxLanguageCode";
this.textBoxLanguageCode.Size = new System.Drawing.Size(219, 20);
this.textBoxLanguageCode.TabIndex = 3;
//
//
// labelLanguageCode
//
//
this.labelLanguageCode.AutoSize = true;
this.labelLanguageCode.Location = new System.Drawing.Point(6, 97);
this.labelLanguageCode.Name = "labelLanguageCode";
this.labelLanguageCode.Size = new System.Drawing.Size(82, 13);
this.labelLanguageCode.TabIndex = 54;
this.labelLanguageCode.Text = "Language code";
//
//
// numericUpDownMaxCharacters
//
//
this.numericUpDownMaxCharacters.Location = new System.Drawing.Point(613, 198);
this.numericUpDownMaxCharacters.Maximum = new decimal(new int[] {
99,
@ -329,18 +329,18 @@
this.numericUpDownMaxCharacters.Size = new System.Drawing.Size(120, 20);
this.numericUpDownMaxCharacters.TabIndex = 11;
this.numericUpDownMaxCharacters.ValueChanged += new System.EventHandler(this.numericUpDownMaxCharacters_ValueChanged);
//
//
// labelMaxNoOfDisplayableChars
//
//
this.labelMaxNoOfDisplayableChars.AutoSize = true;
this.labelMaxNoOfDisplayableChars.Location = new System.Drawing.Point(473, 200);
this.labelMaxNoOfDisplayableChars.Name = "labelMaxNoOfDisplayableChars";
this.labelMaxNoOfDisplayableChars.Size = new System.Drawing.Size(133, 13);
this.labelMaxNoOfDisplayableChars.TabIndex = 51;
this.labelMaxNoOfDisplayableChars.Text = "Max# of displayable chars ";
//
//
// numericUpDownDiskSequenceNumber
//
//
this.numericUpDownDiskSequenceNumber.Location = new System.Drawing.Point(613, 250);
this.numericUpDownDiskSequenceNumber.Maximum = new decimal(new int[] {
9,
@ -350,9 +350,9 @@
this.numericUpDownDiskSequenceNumber.Name = "numericUpDownDiskSequenceNumber";
this.numericUpDownDiskSequenceNumber.Size = new System.Drawing.Size(120, 20);
this.numericUpDownDiskSequenceNumber.TabIndex = 13;
//
//
// numericUpDownTotalNumberOfDiscs
//
//
this.numericUpDownTotalNumberOfDiscs.Location = new System.Drawing.Point(613, 276);
this.numericUpDownTotalNumberOfDiscs.Maximum = new decimal(new int[] {
9,
@ -362,9 +362,9 @@
this.numericUpDownTotalNumberOfDiscs.Name = "numericUpDownTotalNumberOfDiscs";
this.numericUpDownTotalNumberOfDiscs.Size = new System.Drawing.Size(120, 20);
this.numericUpDownTotalNumberOfDiscs.TabIndex = 14;
//
//
// numericUpDownRevisionNumber
//
//
this.numericUpDownRevisionNumber.Location = new System.Drawing.Point(613, 172);
this.numericUpDownRevisionNumber.Maximum = new decimal(new int[] {
99,
@ -374,70 +374,70 @@
this.numericUpDownRevisionNumber.Name = "numericUpDownRevisionNumber";
this.numericUpDownRevisionNumber.Size = new System.Drawing.Size(120, 20);
this.numericUpDownRevisionNumber.TabIndex = 10;
//
//
// labelDiskSequenceNumber
//
//
this.labelDiskSequenceNumber.AutoSize = true;
this.labelDiskSequenceNumber.Location = new System.Drawing.Point(473, 252);
this.labelDiskSequenceNumber.Name = "labelDiskSequenceNumber";
this.labelDiskSequenceNumber.Size = new System.Drawing.Size(116, 13);
this.labelDiskSequenceNumber.TabIndex = 49;
this.labelDiskSequenceNumber.Text = "Disk sequence number";
//
//
// labelTotalNumberOfDisks
//
//
this.labelTotalNumberOfDisks.AutoSize = true;
this.labelTotalNumberOfDisks.Location = new System.Drawing.Point(473, 278);
this.labelTotalNumberOfDisks.Name = "labelTotalNumberOfDisks";
this.labelTotalNumberOfDisks.Size = new System.Drawing.Size(108, 13);
this.labelTotalNumberOfDisks.TabIndex = 48;
this.labelTotalNumberOfDisks.Text = "Total number of disks";
//
//
// labelRevisionNumber
//
//
this.labelRevisionNumber.AutoSize = true;
this.labelRevisionNumber.Location = new System.Drawing.Point(473, 174);
this.labelRevisionNumber.Name = "labelRevisionNumber";
this.labelRevisionNumber.Size = new System.Drawing.Size(86, 13);
this.labelRevisionNumber.TabIndex = 47;
this.labelRevisionNumber.Text = "Revision number";
//
//
// textBoxTranslatorsName
//
//
this.textBoxTranslatorsName.Location = new System.Drawing.Point(147, 224);
this.textBoxTranslatorsName.MaxLength = 32;
this.textBoxTranslatorsName.Name = "textBoxTranslatorsName";
this.textBoxTranslatorsName.Size = new System.Drawing.Size(219, 20);
this.textBoxTranslatorsName.TabIndex = 8;
//
//
// labelTranslatorsName
//
//
this.labelTranslatorsName.AutoSize = true;
this.labelTranslatorsName.Location = new System.Drawing.Point(6, 227);
this.labelTranslatorsName.Name = "labelTranslatorsName";
this.labelTranslatorsName.Size = new System.Drawing.Size(90, 13);
this.labelTranslatorsName.TabIndex = 45;
this.labelTranslatorsName.Text = "Translator\'s name";
//
//
// textBoxSubtitleListReferenceCode
//
//
this.textBoxSubtitleListReferenceCode.Location = new System.Drawing.Point(147, 254);
this.textBoxSubtitleListReferenceCode.MaxLength = 16;
this.textBoxSubtitleListReferenceCode.Name = "textBoxSubtitleListReferenceCode";
this.textBoxSubtitleListReferenceCode.Size = new System.Drawing.Size(219, 20);
this.textBoxSubtitleListReferenceCode.TabIndex = 9;
//
//
// labelSubtitleListReferenceCode
//
//
this.labelSubtitleListReferenceCode.AutoSize = true;
this.labelSubtitleListReferenceCode.Location = new System.Drawing.Point(6, 257);
this.labelSubtitleListReferenceCode.Name = "labelSubtitleListReferenceCode";
this.labelSubtitleListReferenceCode.Size = new System.Drawing.Size(132, 13);
this.labelSubtitleListReferenceCode.TabIndex = 43;
this.labelSubtitleListReferenceCode.Text = "Subtitle list reference code";
//
//
// comboBoxCharacterCodeTable
//
//
this.comboBoxCharacterCodeTable.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxCharacterCodeTable.FormattingEnabled = true;
this.comboBoxCharacterCodeTable.Items.AddRange(new object[] {
@ -450,9 +450,9 @@
this.comboBoxCharacterCodeTable.Name = "comboBoxCharacterCodeTable";
this.comboBoxCharacterCodeTable.Size = new System.Drawing.Size(219, 21);
this.comboBoxCharacterCodeTable.TabIndex = 2;
//
//
// buttonImport
//
//
this.buttonImport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonImport.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonImport.Location = new System.Drawing.Point(613, 6);
@ -462,86 +462,86 @@
this.buttonImport.Text = "Import...";
this.buttonImport.UseVisualStyleBackColor = true;
this.buttonImport.Click += new System.EventHandler(this.buttonImport_Click);
//
//
// labelCharacterCodeTable
//
//
this.labelCharacterCodeTable.AutoSize = true;
this.labelCharacterCodeTable.Location = new System.Drawing.Point(6, 69);
this.labelCharacterCodeTable.Name = "labelCharacterCodeTable";
this.labelCharacterCodeTable.Size = new System.Drawing.Size(106, 13);
this.labelCharacterCodeTable.TabIndex = 40;
this.labelCharacterCodeTable.Text = "Character code table";
//
//
// textBoxTranslatedProgramTitle
//
//
this.textBoxTranslatedProgramTitle.Location = new System.Drawing.Point(147, 172);
this.textBoxTranslatedProgramTitle.MaxLength = 32;
this.textBoxTranslatedProgramTitle.Name = "textBoxTranslatedProgramTitle";
this.textBoxTranslatedProgramTitle.Size = new System.Drawing.Size(219, 20);
this.textBoxTranslatedProgramTitle.TabIndex = 6;
//
//
// textBoxTranslatedEpisodeTitle
//
//
this.textBoxTranslatedEpisodeTitle.Location = new System.Drawing.Point(147, 198);
this.textBoxTranslatedEpisodeTitle.MaxLength = 32;
this.textBoxTranslatedEpisodeTitle.Name = "textBoxTranslatedEpisodeTitle";
this.textBoxTranslatedEpisodeTitle.Size = new System.Drawing.Size(219, 20);
this.textBoxTranslatedEpisodeTitle.TabIndex = 7;
//
//
// textBoxOriginalEpisodeTitle
//
//
this.textBoxOriginalEpisodeTitle.Location = new System.Drawing.Point(147, 146);
this.textBoxOriginalEpisodeTitle.MaxLength = 32;
this.textBoxOriginalEpisodeTitle.Name = "textBoxOriginalEpisodeTitle";
this.textBoxOriginalEpisodeTitle.Size = new System.Drawing.Size(219, 20);
this.textBoxOriginalEpisodeTitle.TabIndex = 5;
//
//
// labelTranslatedEpisodeTitle
//
//
this.labelTranslatedEpisodeTitle.AutoSize = true;
this.labelTranslatedEpisodeTitle.Location = new System.Drawing.Point(6, 201);
this.labelTranslatedEpisodeTitle.Name = "labelTranslatedEpisodeTitle";
this.labelTranslatedEpisodeTitle.Size = new System.Drawing.Size(116, 13);
this.labelTranslatedEpisodeTitle.TabIndex = 36;
this.labelTranslatedEpisodeTitle.Text = "Translated episode title";
//
//
// labelTranslatedProgramTitle
//
//
this.labelTranslatedProgramTitle.AutoSize = true;
this.labelTranslatedProgramTitle.Location = new System.Drawing.Point(6, 175);
this.labelTranslatedProgramTitle.Name = "labelTranslatedProgramTitle";
this.labelTranslatedProgramTitle.Size = new System.Drawing.Size(117, 13);
this.labelTranslatedProgramTitle.TabIndex = 35;
this.labelTranslatedProgramTitle.Text = "Translated program title";
//
//
// labelOriginalEpisodeTitle
//
//
this.labelOriginalEpisodeTitle.AutoSize = true;
this.labelOriginalEpisodeTitle.Location = new System.Drawing.Point(6, 149);
this.labelOriginalEpisodeTitle.Name = "labelOriginalEpisodeTitle";
this.labelOriginalEpisodeTitle.Size = new System.Drawing.Size(101, 13);
this.labelOriginalEpisodeTitle.TabIndex = 34;
this.labelOriginalEpisodeTitle.Text = "Original episode title";
//
//
// textBoxOriginalProgramTitle
//
//
this.textBoxOriginalProgramTitle.Location = new System.Drawing.Point(147, 120);
this.textBoxOriginalProgramTitle.MaxLength = 32;
this.textBoxOriginalProgramTitle.Name = "textBoxOriginalProgramTitle";
this.textBoxOriginalProgramTitle.Size = new System.Drawing.Size(219, 20);
this.textBoxOriginalProgramTitle.TabIndex = 4;
//
//
// labelOriginalProgramTitle
//
//
this.labelOriginalProgramTitle.AutoSize = true;
this.labelOriginalProgramTitle.Location = new System.Drawing.Point(6, 123);
this.labelOriginalProgramTitle.Name = "labelOriginalProgramTitle";
this.labelOriginalProgramTitle.Size = new System.Drawing.Size(102, 13);
this.labelOriginalProgramTitle.TabIndex = 32;
this.labelOriginalProgramTitle.Text = "Original program title";
//
//
// tabPageTextAndTiming
//
//
this.tabPageTextAndTiming.Controls.Add(this.comboBoxJustificationCode);
this.tabPageTextAndTiming.Controls.Add(this.labelJustificationCode);
this.tabPageTextAndTiming.Location = new System.Drawing.Point(4, 22);
@ -550,9 +550,9 @@
this.tabPageTextAndTiming.TabIndex = 2;
this.tabPageTextAndTiming.Text = "Text and timing information";
this.tabPageTextAndTiming.UseVisualStyleBackColor = true;
//
//
// comboBoxJustificationCode
//
//
this.comboBoxJustificationCode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxJustificationCode.FormattingEnabled = true;
this.comboBoxJustificationCode.Items.AddRange(new object[] {
@ -564,18 +564,18 @@
this.comboBoxJustificationCode.Name = "comboBoxJustificationCode";
this.comboBoxJustificationCode.Size = new System.Drawing.Size(219, 21);
this.comboBoxJustificationCode.TabIndex = 43;
//
//
// labelJustificationCode
//
//
this.labelJustificationCode.AutoSize = true;
this.labelJustificationCode.Location = new System.Drawing.Point(6, 14);
this.labelJustificationCode.Name = "labelJustificationCode";
this.labelJustificationCode.Size = new System.Drawing.Size(89, 13);
this.labelJustificationCode.TabIndex = 44;
this.labelJustificationCode.Text = "Justification code";
//
//
// tabPageErrors
//
//
this.tabPageErrors.Controls.Add(this.textBoxErrors);
this.tabPageErrors.Controls.Add(this.labelErrors);
this.tabPageErrors.Location = new System.Drawing.Point(4, 22);
@ -585,11 +585,11 @@
this.tabPageErrors.TabIndex = 1;
this.tabPageErrors.Text = "Errors";
this.tabPageErrors.UseVisualStyleBackColor = true;
//
//
// textBoxErrors
//
this.textBoxErrors.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
//
this.textBoxErrors.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.textBoxErrors.Location = new System.Drawing.Point(6, 26);
this.textBoxErrors.Multiline = true;
@ -597,18 +597,18 @@
this.textBoxErrors.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.textBoxErrors.Size = new System.Drawing.Size(909, 344);
this.textBoxErrors.TabIndex = 13;
//
//
// labelErrors
//
//
this.labelErrors.AutoSize = true;
this.labelErrors.Location = new System.Drawing.Point(3, 10);
this.labelErrors.Name = "labelErrors";
this.labelErrors.Size = new System.Drawing.Size(34, 13);
this.labelErrors.TabIndex = 12;
this.labelErrors.Text = "Errors";
//
//
// EbuSaveOptions
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(775, 477);

View File

@ -125,7 +125,7 @@ namespace Nikse.SubtitleEdit.Forms
textBoxTranslatorsName.Text = header.TranslatorsName.TrimEnd();
textBoxSubtitleListReferenceCode.Text = header.SubtitleListReferenceCode.TrimEnd();
textBoxCountryOfOrigin.Text = header.CountryOfOrigin;
int number;
if (int.TryParse(header.RevisionNumber, out number))
numericUpDownRevisionNumber.Value = number;
@ -146,7 +146,7 @@ namespace Nikse.SubtitleEdit.Forms
if (int.TryParse(header.TotalNumberOfDisks, out number))
numericUpDownTotalNumberOfDiscs.Value = number;
else
numericUpDownTotalNumberOfDiscs.Value = 1;
numericUpDownTotalNumberOfDiscs.Value = 1;
}
private void buttonOK_Click(object sender, EventArgs e)
@ -157,13 +157,13 @@ namespace Nikse.SubtitleEdit.Forms
_header.DiskFormatCode = "STL30.01";
else
_header.DiskFormatCode = "STL25.01";
_header.CharacterCodeTableNumber = "0" + comboBoxCharacterCodeTable.SelectedIndex.ToString();
_header.OriginalProgrammeTitle = textBoxOriginalProgramTitle.Text.PadRight(32, ' ');
_header.OriginalEpisodeTitle = textBoxOriginalEpisodeTitle.Text.PadRight(32, ' ');
_header.TranslatedProgrammeTitle = textBoxTranslatedProgramTitle.Text.PadRight(32, ' ');
_header.TranslatedEpisodeTitle = textBoxTranslatedEpisodeTitle.Text.PadRight(32, ' ');
_header.TranslatorsName = textBoxTranslatorsName.Text.PadRight(32, ' ');
_header.OriginalEpisodeTitle = textBoxOriginalEpisodeTitle.Text.PadRight(32, ' ');
_header.TranslatedProgrammeTitle = textBoxTranslatedProgramTitle.Text.PadRight(32, ' ');
_header.TranslatedEpisodeTitle = textBoxTranslatedEpisodeTitle.Text.PadRight(32, ' ');
_header.TranslatorsName = textBoxTranslatorsName.Text.PadRight(32, ' ');
_header.SubtitleListReferenceCode = textBoxSubtitleListReferenceCode.Text.PadRight(16, ' ');
_header.CountryOfOrigin = textBoxCountryOfOrigin.Text;
if (_header.CountryOfOrigin.Length != 3)

View File

@ -45,27 +45,27 @@
this.richTextBoxPreview = new System.Windows.Forms.RichTextBox();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownDelay)).BeginInit();
this.SuspendLayout();
//
//
// labelTotalMillisecs
//
//
this.labelTotalMillisecs.AutoSize = true;
this.labelTotalMillisecs.Location = new System.Drawing.Point(159, 52);
this.labelTotalMillisecs.Name = "labelTotalMillisecs";
this.labelTotalMillisecs.Size = new System.Drawing.Size(90, 13);
this.labelTotalMillisecs.TabIndex = 49;
this.labelTotalMillisecs.Text = "labelTotalMillisecs";
//
//
// labelTM
//
//
this.labelTM.Location = new System.Drawing.Point(16, 52);
this.labelTM.Name = "labelTM";
this.labelTM.Size = new System.Drawing.Size(140, 13);
this.labelTM.TabIndex = 48;
this.labelTM.Text = "Total millisecs.:";
this.labelTM.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
//
// numericUpDownDelay
//
//
this.numericUpDownDelay.DecimalPlaces = 3;
this.numericUpDownDelay.Increment = new decimal(new int[] {
1,
@ -86,27 +86,27 @@
this.numericUpDownDelay.Name = "numericUpDownDelay";
this.numericUpDownDelay.Size = new System.Drawing.Size(54, 21);
this.numericUpDownDelay.TabIndex = 47;
//
//
// labelColor
//
//
this.labelColor.AutoSize = true;
this.labelColor.Location = new System.Drawing.Point(218, 22);
this.labelColor.Name = "labelColor";
this.labelColor.Size = new System.Drawing.Size(32, 13);
this.labelColor.TabIndex = 46;
this.labelColor.Text = "Color";
//
//
// labelEndDelay
//
//
this.labelEndDelay.Location = new System.Drawing.Point(16, 76);
this.labelEndDelay.Name = "labelEndDelay";
this.labelEndDelay.Size = new System.Drawing.Size(140, 13);
this.labelEndDelay.TabIndex = 45;
this.labelEndDelay.Text = "End delay in millisecs.:";
this.labelEndDelay.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
//
// buttonCancel
//
//
this.buttonCancel.BackColor = System.Drawing.SystemColors.Control;
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.Location = new System.Drawing.Point(353, 181);
@ -115,9 +115,9 @@
this.buttonCancel.TabIndex = 44;
this.buttonCancel.Text = "C&ancel";
this.buttonCancel.UseVisualStyleBackColor = false;
//
//
// buttonOK
//
//
this.buttonOK.Location = new System.Drawing.Point(272, 181);
this.buttonOK.Name = "buttonOK";
this.buttonOK.Size = new System.Drawing.Size(75, 21);
@ -125,9 +125,9 @@
this.buttonOK.Text = "OK";
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.ButtonOkClick);
//
//
// buttonChooseColor
//
//
this.buttonChooseColor.Location = new System.Drawing.Point(159, 17);
this.buttonChooseColor.Name = "buttonChooseColor";
this.buttonChooseColor.Size = new System.Drawing.Size(27, 23);
@ -135,25 +135,25 @@
this.buttonChooseColor.Text = "...";
this.buttonChooseColor.UseVisualStyleBackColor = true;
this.buttonChooseColor.Click += new System.EventHandler(this.ButtonChooseColorClick);
//
//
// panelColor
//
//
this.panelColor.Location = new System.Drawing.Point(192, 19);
this.panelColor.Name = "panelColor";
this.panelColor.Size = new System.Drawing.Size(20, 20);
this.panelColor.TabIndex = 41;
//
//
// labelChooseColor
//
//
this.labelChooseColor.Location = new System.Drawing.Point(16, 22);
this.labelChooseColor.Name = "labelChooseColor";
this.labelChooseColor.Size = new System.Drawing.Size(140, 13);
this.labelChooseColor.TabIndex = 40;
this.labelChooseColor.Text = "Choose color:";
this.labelChooseColor.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
//
// buttonPreview
//
//
this.buttonPreview.Location = new System.Drawing.Point(12, 154);
this.buttonPreview.Name = "buttonPreview";
this.buttonPreview.Size = new System.Drawing.Size(100, 21);
@ -161,13 +161,13 @@
this.buttonPreview.Text = "Preview";
this.buttonPreview.UseVisualStyleBackColor = true;
this.buttonPreview.Click += new System.EventHandler(this.ButtonPreviewClick);
//
//
// timer1
//
//
this.timer1.Tick += new System.EventHandler(this.Timer1Tick);
//
//
// richTextBoxPreview
//
//
this.richTextBoxPreview.BackColor = System.Drawing.Color.Black;
this.richTextBoxPreview.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.richTextBoxPreview.DetectUrls = false;
@ -178,9 +178,9 @@
this.richTextBoxPreview.TabIndex = 50;
this.richTextBoxPreview.TabStop = false;
this.richTextBoxPreview.Text = "";
//
//
// EffectKaraoke
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(440, 208);

View File

@ -17,7 +17,7 @@ namespace Nikse.SubtitleEdit.Forms
{
InitializeComponent();
Text = Configuration.Settings.Language.EffectKaraoke.Title;
Text = Configuration.Settings.Language.EffectKaraoke.Title;
labelChooseColor.Text = Configuration.Settings.Language.EffectKaraoke.ChooseColor;
labelTM.Text = Configuration.Settings.Language.EffectKaraoke.TotalMilliseconds;
labelEndDelay.Text = Configuration.Settings.Language.EffectKaraoke.EndDelayInMilliseconds;
@ -65,7 +65,7 @@ namespace Nikse.SubtitleEdit.Forms
private void AddToPreview(RichTextBox rtb, string text)
{
richTextBoxPreview.ForeColor = Color.White;
int bold = 0;
int underline = 0;
int italic = 0;
@ -122,7 +122,7 @@ namespace Nikse.SubtitleEdit.Forms
}
if (!string.IsNullOrEmpty(currentColor))
fontColors.Push(currentColor);
currentColor = tempColor;
currentColor = tempColor;
}
}
}
@ -168,7 +168,7 @@ namespace Nikse.SubtitleEdit.Forms
{
StringBuilder sb = new StringBuilder();
for (int i = 0; i < text.Length; i++)
{
{
sb.Append(text[i]);
if (text[i] == '>')
return sb.ToString();

View File

@ -40,9 +40,9 @@
this.labelTotalMillisecs = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownDelay)).BeginInit();
this.SuspendLayout();
//
//
// labelPreview
//
//
this.labelPreview.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.labelPreview.BackColor = System.Drawing.Color.Black;
@ -54,9 +54,9 @@
this.labelPreview.TabIndex = 25;
this.labelPreview.Text = "labelPreview";
this.labelPreview.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
//
// buttonPreview
//
//
this.buttonPreview.Location = new System.Drawing.Point(12, 119);
this.buttonPreview.Name = "buttonPreview";
this.buttonPreview.Size = new System.Drawing.Size(100, 21);
@ -64,9 +64,9 @@
this.buttonPreview.Text = "Preview";
this.buttonPreview.UseVisualStyleBackColor = true;
this.buttonPreview.Click += new System.EventHandler(this.ButtonPreviewClick);
//
//
// buttonOK
//
//
this.buttonOK.Location = new System.Drawing.Point(265, 148);
this.buttonOK.Name = "buttonOK";
this.buttonOK.Size = new System.Drawing.Size(75, 21);
@ -74,9 +74,9 @@
this.buttonOK.Text = "OK";
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.ButtonOkClick);
//
//
// buttonCancel
//
//
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.Location = new System.Drawing.Point(346, 148);
this.buttonCancel.Name = "buttonCancel";
@ -84,22 +84,22 @@
this.buttonCancel.TabIndex = 31;
this.buttonCancel.Text = "C&ancel";
this.buttonCancel.UseVisualStyleBackColor = true;
//
//
// timer1
//
//
this.timer1.Tick += new System.EventHandler(this.Timer1Tick);
//
//
// labelEndDelay
//
//
this.labelEndDelay.Location = new System.Drawing.Point(16, 45);
this.labelEndDelay.Name = "labelEndDelay";
this.labelEndDelay.Size = new System.Drawing.Size(140, 13);
this.labelEndDelay.TabIndex = 32;
this.labelEndDelay.Text = "End delay in millisecs.:";
this.labelEndDelay.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
//
// numericUpDownDelay
//
//
this.numericUpDownDelay.DecimalPlaces = 3;
this.numericUpDownDelay.Increment = new decimal(new int[] {
1,
@ -120,27 +120,27 @@
this.numericUpDownDelay.Name = "numericUpDownDelay";
this.numericUpDownDelay.Size = new System.Drawing.Size(54, 21);
this.numericUpDownDelay.TabIndex = 35;
//
//
// labelTM
//
//
this.labelTM.Location = new System.Drawing.Point(16, 23);
this.labelTM.Name = "labelTM";
this.labelTM.Size = new System.Drawing.Size(140, 13);
this.labelTM.TabIndex = 36;
this.labelTM.Text = "Total millisecs.:";
this.labelTM.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
//
// labelTotalMillisecs
//
//
this.labelTotalMillisecs.AutoSize = true;
this.labelTotalMillisecs.Location = new System.Drawing.Point(159, 23);
this.labelTotalMillisecs.Name = "labelTotalMillisecs";
this.labelTotalMillisecs.Size = new System.Drawing.Size(90, 13);
this.labelTotalMillisecs.TabIndex = 37;
this.labelTotalMillisecs.Text = "labelTotalMillisecs";
//
//
// EffectTypewriter
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(433, 179);

View File

@ -81,7 +81,7 @@ namespace Nikse.SubtitleEdit.Forms
}
private void MakeAnimation()
{
{
_animation = new List<Paragraph>();
double duration = _paragraph.Duration.TotalMilliseconds - ((double)numericUpDownDelay.Value * 1000.0);
double stepsLength = CalculateStepLength(_paragraph.Text, duration);
@ -89,7 +89,7 @@ namespace Nikse.SubtitleEdit.Forms
double startMilliseconds;
double endMilliseconds;
TimeSpan start;
TimeSpan end;
TimeSpan end;
int index = 0;
string text = string.Empty;
bool tagOn = false;
@ -124,7 +124,7 @@ namespace Nikse.SubtitleEdit.Forms
i++;
}
text += tag;
}
}
startMilliseconds = index * stepsLength;
startMilliseconds += _paragraph.StartTime.TotalMilliseconds;
@ -135,7 +135,7 @@ namespace Nikse.SubtitleEdit.Forms
_animation.Add(new Paragraph(new TimeCode(start), new TimeCode(end), text));
index++;
}
i++;
i++;
}
if (numericUpDownDelay.Value > 0)

View File

@ -51,20 +51,20 @@
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.groupBoxImageSettings.SuspendLayout();
this.SuspendLayout();
//
//
// pictureBox1
//
this.pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
//
this.pictureBox1.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.pictureBox1.Location = new System.Drawing.Point(12, 243);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(698, 132);
this.pictureBox1.TabIndex = 1;
this.pictureBox1.TabStop = false;
//
//
// buttonExport
//
//
this.buttonExport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonExport.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonExport.Location = new System.Drawing.Point(503, 381);
@ -74,9 +74,9 @@
this.buttonExport.Text = "Export all lines...";
this.buttonExport.UseVisualStyleBackColor = true;
this.buttonExport.Click += new System.EventHandler(this.buttonExport_Click);
//
//
// buttonCancel
//
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.ImeMode = System.Windows.Forms.ImeMode.NoControl;
@ -86,20 +86,20 @@
this.buttonCancel.TabIndex = 18;
this.buttonCancel.Text = "C&ancel";
this.buttonCancel.UseVisualStyleBackColor = true;
//
//
// progressBar1
//
this.progressBar1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
//
this.progressBar1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.progressBar1.Location = new System.Drawing.Point(12, 381);
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(485, 21);
this.progressBar1.TabIndex = 20;
this.progressBar1.Visible = false;
//
//
// groupBoxImageSettings
//
this.groupBoxImageSettings.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
//
this.groupBoxImageSettings.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBoxImageSettings.Controls.Add(this.checkBoxAntiAlias);
this.groupBoxImageSettings.Controls.Add(this.labelSubtitleFontSize);
@ -118,9 +118,9 @@
this.groupBoxImageSettings.TabIndex = 21;
this.groupBoxImageSettings.TabStop = false;
this.groupBoxImageSettings.Text = "Image settings";
//
//
// checkBoxAntiAlias
//
//
this.checkBoxAntiAlias.AutoSize = true;
this.checkBoxAntiAlias.Checked = true;
this.checkBoxAntiAlias.CheckState = System.Windows.Forms.CheckState.Checked;
@ -131,18 +131,18 @@
this.checkBoxAntiAlias.Text = "AntiAlias";
this.checkBoxAntiAlias.UseVisualStyleBackColor = true;
this.checkBoxAntiAlias.CheckedChanged += new System.EventHandler(this.checkBoxAntiAlias_CheckedChanged);
//
//
// labelSubtitleFontSize
//
//
this.labelSubtitleFontSize.AutoSize = true;
this.labelSubtitleFontSize.Location = new System.Drawing.Point(10, 54);
this.labelSubtitleFontSize.Name = "labelSubtitleFontSize";
this.labelSubtitleFontSize.Size = new System.Drawing.Size(84, 13);
this.labelSubtitleFontSize.TabIndex = 20;
this.labelSubtitleFontSize.Text = "Subtitle font size";
//
//
// comboBoxSubtitleFont
//
//
this.comboBoxSubtitleFont.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxSubtitleFont.FormattingEnabled = true;
this.comboBoxSubtitleFont.Location = new System.Drawing.Point(100, 24);
@ -150,9 +150,9 @@
this.comboBoxSubtitleFont.Size = new System.Drawing.Size(121, 21);
this.comboBoxSubtitleFont.TabIndex = 17;
this.comboBoxSubtitleFont.SelectedValueChanged += new System.EventHandler(this.comboBoxSubtitleFont_SelectedValueChanged);
//
//
// comboBoxSubtitleFontSize
//
//
this.comboBoxSubtitleFontSize.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxSubtitleFontSize.FormattingEnabled = true;
this.comboBoxSubtitleFontSize.Items.AddRange(new object[] {
@ -226,18 +226,18 @@
this.comboBoxSubtitleFontSize.Size = new System.Drawing.Size(121, 21);
this.comboBoxSubtitleFontSize.TabIndex = 18;
this.comboBoxSubtitleFontSize.SelectedIndexChanged += new System.EventHandler(this.comboBoxSubtitleFontSize_SelectedIndexChanged);
//
//
// labelSubtitleFont
//
//
this.labelSubtitleFont.AutoSize = true;
this.labelSubtitleFont.Location = new System.Drawing.Point(10, 27);
this.labelSubtitleFont.Name = "labelSubtitleFont";
this.labelSubtitleFont.Size = new System.Drawing.Size(63, 13);
this.labelSubtitleFont.TabIndex = 19;
this.labelSubtitleFont.Text = "Subtitle font";
//
//
// labelBorderWidth
//
//
this.labelBorderWidth.Location = new System.Drawing.Point(426, 56);
this.labelBorderWidth.Name = "labelBorderWidth";
this.labelBorderWidth.RightToLeft = System.Windows.Forms.RightToLeft.No;
@ -245,9 +245,9 @@
this.labelBorderWidth.TabIndex = 16;
this.labelBorderWidth.Text = "Border width";
this.labelBorderWidth.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
//
// comboBoxBorderWidth
//
//
this.comboBoxBorderWidth.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxBorderWidth.FormattingEnabled = true;
this.comboBoxBorderWidth.Items.AddRange(new object[] {
@ -262,18 +262,18 @@
this.comboBoxBorderWidth.Size = new System.Drawing.Size(121, 21);
this.comboBoxBorderWidth.TabIndex = 15;
this.comboBoxBorderWidth.SelectedIndexChanged += new System.EventHandler(this.comboBoxBorderWidth_SelectedIndexChanged);
//
//
// panelBorderColor
//
//
this.panelBorderColor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panelBorderColor.Location = new System.Drawing.Point(664, 25);
this.panelBorderColor.Name = "panelBorderColor";
this.panelBorderColor.Size = new System.Drawing.Size(21, 20);
this.panelBorderColor.TabIndex = 14;
this.panelBorderColor.MouseClick += new System.Windows.Forms.MouseEventHandler(this.panelBorderColor_MouseClick);
//
//
// buttonBorderColor
//
//
this.buttonBorderColor.Location = new System.Drawing.Point(537, 24);
this.buttonBorderColor.Name = "buttonBorderColor";
this.buttonBorderColor.Size = new System.Drawing.Size(121, 21);
@ -281,18 +281,18 @@
this.buttonBorderColor.Text = "Border color";
this.buttonBorderColor.UseVisualStyleBackColor = true;
this.buttonBorderColor.Click += new System.EventHandler(this.buttonBorderColor_Click);
//
//
// panelColor
//
//
this.panelColor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panelColor.Location = new System.Drawing.Point(403, 25);
this.panelColor.Name = "panelColor";
this.panelColor.Size = new System.Drawing.Size(21, 20);
this.panelColor.TabIndex = 12;
this.panelColor.MouseClick += new System.Windows.Forms.MouseEventHandler(this.panelColor_MouseClick);
//
//
// buttonColor
//
//
this.buttonColor.Location = new System.Drawing.Point(276, 24);
this.buttonColor.Name = "buttonColor";
this.buttonColor.Size = new System.Drawing.Size(121, 21);
@ -300,9 +300,9 @@
this.buttonColor.Text = "Color";
this.buttonColor.UseVisualStyleBackColor = true;
this.buttonColor.Click += new System.EventHandler(this.buttonColor_Click);
//
//
// labelImageResolution
//
//
this.labelImageResolution.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.labelImageResolution.BackColor = System.Drawing.Color.Transparent;
this.labelImageResolution.Location = new System.Drawing.Point(635, 238);
@ -311,10 +311,10 @@
this.labelImageResolution.TabIndex = 22;
this.labelImageResolution.Text = "320x240";
this.labelImageResolution.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
//
// subtitleListView1
//
this.subtitleListView1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
//
this.subtitleListView1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.subtitleListView1.FirstVisibleIndex = -1;
this.subtitleListView1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
@ -327,9 +327,9 @@
this.subtitleListView1.UseCompatibleStateImageBehavior = false;
this.subtitleListView1.View = System.Windows.Forms.View.Details;
this.subtitleListView1.SelectedIndexChanged += new System.EventHandler(this.subtitleListView1_SelectedIndexChanged);
//
//
// ExportPngXml
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(716, 407);

View File

@ -13,7 +13,7 @@ namespace Nikse.SubtitleEdit.Forms
public sealed partial class ExportPngXml : Form
{
Subtitle _subtitle;
Color _subtitleColor = Color.White;
Color _subtitleColor = Color.White;
string _subtitleFontName = "Verdana";
float _subtitleFontSize = 75.0f;
Color _borderColor = Color.Black;
@ -34,7 +34,7 @@ namespace Nikse.SubtitleEdit.Forms
private void buttonExport_Click(object sender, EventArgs e)
{
SetupImageParameters();
if (folderBrowserDialog1.ShowDialog(this) == DialogResult.OK)
{
progressBar1.Value = 0;
@ -46,7 +46,7 @@ namespace Nikse.SubtitleEdit.Forms
int imagesSavedCount = 0;
StringBuilder sb = new StringBuilder();
for (int i = 0; i < _subtitle.Paragraphs.Count; i++)
{
{
Bitmap bmp = GenerateImageFromTextWithStyle(_subtitle.Paragraphs[i].Text);
string numberString = string.Format("{0:0000}", i + 1);
if (bmp != null)
@ -139,7 +139,7 @@ namespace Nikse.SubtitleEdit.Forms
}
StringFormat sf = new StringFormat();
sf.Alignment = StringAlignment.Near;
sf.LineAlignment = StringAlignment.Near;// draw the text to a path
sf.LineAlignment = StringAlignment.Near;// draw the text to a path
System.Drawing.Drawing2D.GraphicsPath path = new System.Drawing.Drawing2D.GraphicsPath();
// display italic

View File

@ -35,17 +35,17 @@
this.radioButtonCaseSensitive = new System.Windows.Forms.RadioButton();
this.radioButtonRegEx = new System.Windows.Forms.RadioButton();
this.SuspendLayout();
//
//
// textBoxFind
//
//
this.textBoxFind.Location = new System.Drawing.Point(12, 12);
this.textBoxFind.Name = "textBoxFind";
this.textBoxFind.Size = new System.Drawing.Size(189, 21);
this.textBoxFind.TabIndex = 0;
this.textBoxFind.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TextBoxFindKeyDown);
//
//
// buttonFind
//
//
this.buttonFind.Location = new System.Drawing.Point(207, 11);
this.buttonFind.Name = "buttonFind";
this.buttonFind.Size = new System.Drawing.Size(75, 21);
@ -53,9 +53,9 @@
this.buttonFind.Text = "Find";
this.buttonFind.UseVisualStyleBackColor = true;
this.buttonFind.Click += new System.EventHandler(this.ButtonFindClick);
//
//
// buttonCancel
//
//
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.Location = new System.Drawing.Point(207, 36);
this.buttonCancel.Name = "buttonCancel";
@ -63,9 +63,9 @@
this.buttonCancel.TabIndex = 3;
this.buttonCancel.Text = "C&ancel";
this.buttonCancel.UseVisualStyleBackColor = true;
//
//
// radioButtonNormal
//
//
this.radioButtonNormal.AutoSize = true;
this.radioButtonNormal.Checked = true;
this.radioButtonNormal.Location = new System.Drawing.Point(12, 63);
@ -76,9 +76,9 @@
this.radioButtonNormal.Text = "Normal";
this.radioButtonNormal.UseVisualStyleBackColor = true;
this.radioButtonNormal.CheckedChanged += new System.EventHandler(this.RadioButtonCheckedChanged);
//
//
// radioButtonCaseSensitive
//
//
this.radioButtonCaseSensitive.AutoSize = true;
this.radioButtonCaseSensitive.Location = new System.Drawing.Point(12, 86);
this.radioButtonCaseSensitive.Name = "radioButtonCaseSensitive";
@ -87,9 +87,9 @@
this.radioButtonCaseSensitive.Text = "Case sensitive";
this.radioButtonCaseSensitive.UseVisualStyleBackColor = true;
this.radioButtonCaseSensitive.CheckedChanged += new System.EventHandler(this.RadioButtonCheckedChanged);
//
//
// radioButtonRegEx
//
//
this.radioButtonRegEx.AutoSize = true;
this.radioButtonRegEx.Location = new System.Drawing.Point(12, 109);
this.radioButtonRegEx.Name = "radioButtonRegEx";
@ -98,9 +98,9 @@
this.radioButtonRegEx.Text = "RegEx";
this.radioButtonRegEx.UseVisualStyleBackColor = true;
this.radioButtonRegEx.CheckedChanged += new System.EventHandler(this.RadioButtonCheckedChanged);
//
//
// FindDialog
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(298, 135);

View File

@ -57,7 +57,7 @@ namespace Nikse.SubtitleEdit.Forms
{
if (e.KeyCode == Keys.Escape)
{
DialogResult = DialogResult.Cancel;
DialogResult = DialogResult.Cancel;
}
}
@ -118,7 +118,7 @@ namespace Nikse.SubtitleEdit.Forms
else if (findHelper.FindType == FindType.CaseSensitive)
radioButtonCaseSensitive.Checked = true;
else
radioButtonNormal.Checked = true;
radioButtonNormal.Checked = true;
}
}

View File

@ -38,9 +38,9 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonFindNext = new System.Windows.Forms.Button();
this.subtitleListView1 = new Nikse.SubtitleEdit.Controls.SubtitleListView();
this.SuspendLayout();
//
//
// buttonOK
//
//
this.buttonOK.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK;
this.buttonOK.Location = new System.Drawing.Point(428, 315);
@ -50,9 +50,9 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonOK.Text = "&OK";
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.ButtonOkClick);
//
//
// buttonCancel
//
//
this.buttonCancel.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.Location = new System.Drawing.Point(509, 315);
@ -62,9 +62,9 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonCancel.Text = "C&ancel";
this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.ButtonCancelClick);
//
//
// buttonFind
//
//
this.buttonFind.Location = new System.Drawing.Point(196, 32);
this.buttonFind.Name = "buttonFind";
this.buttonFind.Size = new System.Drawing.Size(75, 21);
@ -72,18 +72,18 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonFind.Text = "Find";
this.buttonFind.UseVisualStyleBackColor = true;
this.buttonFind.Click += new System.EventHandler(this.ButtonFindClick);
//
//
// textBoxFindText
//
//
this.textBoxFindText.Location = new System.Drawing.Point(12, 32);
this.textBoxFindText.Name = "textBoxFindText";
this.textBoxFindText.Size = new System.Drawing.Size(178, 21);
this.textBoxFindText.TabIndex = 0;
this.textBoxFindText.TextChanged += new System.EventHandler(this.TextBoxFindTextTextChanged);
this.textBoxFindText.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TextBoxFindTextKeyDown);
//
//
// buttonFindNext
//
//
this.buttonFindNext.Location = new System.Drawing.Point(277, 32);
this.buttonFindNext.Name = "buttonFindNext";
this.buttonFindNext.Size = new System.Drawing.Size(75, 21);
@ -91,9 +91,9 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonFindNext.Text = "Find next";
this.buttonFindNext.UseVisualStyleBackColor = true;
this.buttonFindNext.Click += new System.EventHandler(this.ButtonFindNextClick);
//
//
// 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)));
@ -109,9 +109,9 @@ namespace Nikse.SubtitleEdit.Forms
this.subtitleListView1.UseCompatibleStateImageBehavior = false;
this.subtitleListView1.View = System.Windows.Forms.View.Details;
this.subtitleListView1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.SubtitleListView1MouseDoubleClick);
//
//
// FindSubtitleLine
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(596, 345);

View File

@ -90,9 +90,9 @@ namespace Nikse.SubtitleEdit.Forms
((System.ComponentModel.ISupportInitialize)(this.numericUpDownDuration)).BeginInit();
this.tabPageLog.SuspendLayout();
this.SuspendLayout();
//
//
// buttonCancel
//
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.ImeMode = System.Windows.Forms.ImeMode.NoControl;
@ -103,9 +103,9 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonCancel.Text = "C&ancel";
this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.ButtonCancelClick);
//
//
// buttonNextFinish
//
//
this.buttonNextFinish.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonNextFinish.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonNextFinish.Location = new System.Drawing.Point(678, 559);
@ -115,9 +115,9 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonNextFinish.Text = "&Next >";
this.buttonNextFinish.UseVisualStyleBackColor = true;
this.buttonNextFinish.Click += new System.EventHandler(this.ButtonFixClick);
//
//
// labelStatus
//
//
this.labelStatus.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.labelStatus.AutoSize = true;
this.labelStatus.Location = new System.Drawing.Point(12, 561);
@ -125,9 +125,9 @@ namespace Nikse.SubtitleEdit.Forms
this.labelStatus.Size = new System.Drawing.Size(60, 13);
this.labelStatus.TabIndex = 5;
this.labelStatus.Text = "labelStatus";
//
//
// buttonBack
//
//
this.buttonBack.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonBack.Enabled = false;
this.buttonBack.ImeMode = System.Windows.Forms.ImeMode.NoControl;
@ -138,11 +138,11 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonBack.Text = "< &Back";
this.buttonBack.UseVisualStyleBackColor = true;
this.buttonBack.Click += new System.EventHandler(this.ButtonBackClick);
//
//
// groupBoxStep1
//
this.groupBoxStep1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
//
this.groupBoxStep1.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.groupBoxStep1.Controls.Add(this.buttonInverseSelection);
this.groupBoxStep1.Controls.Add(this.buttonSelectAll);
@ -153,9 +153,9 @@ namespace Nikse.SubtitleEdit.Forms
this.groupBoxStep1.TabIndex = 9;
this.groupBoxStep1.TabStop = false;
this.groupBoxStep1.Text = "Step 1/2 - Choose which errors to fix";
//
//
// buttonInverseSelection
//
//
this.buttonInverseSelection.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.buttonInverseSelection.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonInverseSelection.Location = new System.Drawing.Point(87, 514);
@ -165,9 +165,9 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonInverseSelection.Text = "Inverse selection";
this.buttonInverseSelection.UseVisualStyleBackColor = true;
this.buttonInverseSelection.Click += new System.EventHandler(this.ButtonInverseSelectionClick);
//
//
// buttonSelectAll
//
//
this.buttonSelectAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.buttonSelectAll.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonSelectAll.Location = new System.Drawing.Point(6, 514);
@ -177,11 +177,11 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonSelectAll.Text = "Select all";
this.buttonSelectAll.UseVisualStyleBackColor = true;
this.buttonSelectAll.Click += new System.EventHandler(this.ButtonSelectAllClick);
//
//
// listView1
//
this.listView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
//
this.listView1.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.listView1.CheckBoxes = true;
this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
@ -195,26 +195,26 @@ namespace Nikse.SubtitleEdit.Forms
this.listView1.TabIndex = 3;
this.listView1.UseCompatibleStateImageBehavior = false;
this.listView1.View = System.Windows.Forms.View.Details;
//
//
// columnHeader1
//
//
this.columnHeader1.Text = "Apply";
this.columnHeader1.Width = 53;
//
//
// columnHeader2
//
//
this.columnHeader2.Text = "What to fix";
this.columnHeader2.Width = 99;
//
//
// columnHeader3
//
//
this.columnHeader3.Text = "Example";
this.columnHeader3.Width = 158;
//
//
// groupBox2
//
this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
//
this.groupBox2.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.groupBox2.Controls.Add(this.tabControl1);
this.groupBox2.Location = new System.Drawing.Point(12, 12);
@ -223,11 +223,11 @@ namespace Nikse.SubtitleEdit.Forms
this.groupBox2.TabIndex = 10;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Step 2/2 - Verify fixes";
//
//
// tabControl1
//
this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
//
this.tabControl1.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.tabControl1.Controls.Add(this.tabPageFixes);
this.tabControl1.Controls.Add(this.tabPageLog);
@ -236,9 +236,9 @@ namespace Nikse.SubtitleEdit.Forms
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(810, 516);
this.tabControl1.TabIndex = 7;
//
//
// tabPageFixes
//
//
this.tabPageFixes.Controls.Add(this.splitContainerStep2);
this.tabPageFixes.Location = new System.Drawing.Point(4, 22);
this.tabPageFixes.Name = "tabPageFixes";
@ -247,34 +247,34 @@ namespace Nikse.SubtitleEdit.Forms
this.tabPageFixes.TabIndex = 1;
this.tabPageFixes.Text = "Fixes";
this.tabPageFixes.UseVisualStyleBackColor = true;
//
//
// splitContainerStep2
//
//
this.splitContainerStep2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainerStep2.Location = new System.Drawing.Point(3, 3);
this.splitContainerStep2.Name = "splitContainerStep2";
this.splitContainerStep2.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
//
// splitContainerStep2.Panel1
//
//
this.splitContainerStep2.Panel1.Controls.Add(this.listViewFixes);
this.splitContainerStep2.Panel1.Controls.Add(this.buttonFixesApply);
this.splitContainerStep2.Panel1.Controls.Add(this.buttonRefreshFixes);
this.splitContainerStep2.Panel1.Controls.Add(this.buttonFixesSelectAll);
this.splitContainerStep2.Panel1.Controls.Add(this.buttonFixesInverse);
//
//
// splitContainerStep2.Panel2
//
//
this.splitContainerStep2.Panel2.Controls.Add(this.subtitleListView1);
this.splitContainerStep2.Panel2.Controls.Add(this.groupBoxEditPanel);
this.splitContainerStep2.Size = new System.Drawing.Size(796, 484);
this.splitContainerStep2.SplitterDistance = 225;
this.splitContainerStep2.TabIndex = 112;
//
//
// listViewFixes
//
this.listViewFixes.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
//
this.listViewFixes.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.listViewFixes.CheckBoxes = true;
this.listViewFixes.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
@ -293,34 +293,34 @@ namespace Nikse.SubtitleEdit.Forms
this.listViewFixes.View = System.Windows.Forms.View.Details;
this.listViewFixes.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.ListViewFixesColumnClick);
this.listViewFixes.SelectedIndexChanged += new System.EventHandler(this.ListViewFixesSelectedIndexChanged);
//
//
// columnHeader4
//
//
this.columnHeader4.Text = "Apply";
this.columnHeader4.Width = 50;
//
//
// columnHeader5
//
//
this.columnHeader5.Text = "Line#";
this.columnHeader5.Width = 61;
//
//
// columnHeader6
//
//
this.columnHeader6.Text = "Function";
this.columnHeader6.Width = 134;
//
//
// columnHeader7
//
//
this.columnHeader7.Text = "Before";
this.columnHeader7.Width = 281;
//
//
// columnHeader8
//
//
this.columnHeader8.Text = "After";
this.columnHeader8.Width = 244;
//
//
// buttonFixesApply
//
//
this.buttonFixesApply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonFixesApply.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.buttonFixesApply.ImeMode = System.Windows.Forms.ImeMode.NoControl;
@ -331,9 +331,9 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonFixesApply.Text = "Apply &selected fixes";
this.buttonFixesApply.UseVisualStyleBackColor = true;
this.buttonFixesApply.Click += new System.EventHandler(this.ButtonFixesApplyClick);
//
//
// buttonRefreshFixes
//
//
this.buttonRefreshFixes.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonRefreshFixes.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonRefreshFixes.Location = new System.Drawing.Point(457, 200);
@ -343,9 +343,9 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonRefreshFixes.Text = "&Refresh available fixes";
this.buttonRefreshFixes.UseVisualStyleBackColor = true;
this.buttonRefreshFixes.Click += new System.EventHandler(this.ButtonRefreshFixesClick);
//
//
// buttonFixesSelectAll
//
//
this.buttonFixesSelectAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.buttonFixesSelectAll.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonFixesSelectAll.Location = new System.Drawing.Point(3, 200);
@ -355,9 +355,9 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonFixesSelectAll.Text = "Select &all";
this.buttonFixesSelectAll.UseVisualStyleBackColor = true;
this.buttonFixesSelectAll.Click += new System.EventHandler(this.ButtonFixesSelectAllClick);
//
//
// buttonFixesInverse
//
//
this.buttonFixesInverse.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.buttonFixesInverse.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonFixesInverse.Location = new System.Drawing.Point(84, 200);
@ -367,11 +367,11 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonFixesInverse.Text = "&Inverse selection";
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)
//
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.DisplayExtraFromExtra = false;
@ -387,9 +387,9 @@ namespace Nikse.SubtitleEdit.Forms
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[] {
this.toolStripMenuItemDelete,
this.toolStripSeparator1,
@ -397,29 +397,29 @@ namespace Nikse.SubtitleEdit.Forms
this.contextMenuStripListview.Name = "contextMenuStripListview";
this.contextMenuStripListview.Size = new System.Drawing.Size(182, 54);
this.contextMenuStripListview.Opening += new System.ComponentModel.CancelEventHandler(this.ContextMenuStripListviewOpening);
//
//
// toolStripMenuItemDelete
//
//
this.toolStripMenuItemDelete.Name = "toolStripMenuItemDelete";
this.toolStripMenuItemDelete.Size = new System.Drawing.Size(181, 22);
this.toolStripMenuItemDelete.Text = "Delete";
this.toolStripMenuItemDelete.Click += new System.EventHandler(this.ToolStripMenuItemDeleteClick);
//
//
// toolStripSeparator1
//
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(178, 6);
//
//
// mergeSelectedLinesToolStripMenuItem
//
//
this.mergeSelectedLinesToolStripMenuItem.Name = "mergeSelectedLinesToolStripMenuItem";
this.mergeSelectedLinesToolStripMenuItem.Size = new System.Drawing.Size(181, 22);
this.mergeSelectedLinesToolStripMenuItem.Text = "Merge selected lines";
this.mergeSelectedLinesToolStripMenuItem.Click += new System.EventHandler(this.MergeSelectedLinesToolStripMenuItemClick);
//
//
// groupBoxEditPanel
//
this.groupBoxEditPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
//
this.groupBoxEditPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBoxEditPanel.Controls.Add(this.buttonSplitLine);
this.groupBoxEditPanel.Controls.Add(this.labelSingleLine);
@ -439,9 +439,9 @@ namespace Nikse.SubtitleEdit.Forms
this.groupBoxEditPanel.Size = new System.Drawing.Size(780, 85);
this.groupBoxEditPanel.TabIndex = 111;
this.groupBoxEditPanel.TabStop = false;
//
//
// buttonSplitLine
//
//
this.buttonSplitLine.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonSplitLine.ForeColor = System.Drawing.Color.Red;
this.buttonSplitLine.Location = new System.Drawing.Point(627, 60);
@ -451,18 +451,18 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonSplitLine.Text = "Split line";
this.buttonSplitLine.UseVisualStyleBackColor = true;
this.buttonSplitLine.Click += new System.EventHandler(this.buttonSplitLine_Click);
//
//
// labelSingleLine
//
//
this.labelSingleLine.AutoSize = true;
this.labelSingleLine.Location = new System.Drawing.Point(296, 65);
this.labelSingleLine.Name = "labelSingleLine";
this.labelSingleLine.Size = new System.Drawing.Size(23, 13);
this.labelSingleLine.TabIndex = 123;
this.labelSingleLine.Text = "1/1";
//
//
// buttonUnBreak
//
//
this.buttonUnBreak.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonUnBreak.Location = new System.Drawing.Point(627, 36);
this.buttonUnBreak.Name = "buttonUnBreak";
@ -471,9 +471,9 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonUnBreak.Text = "&Unbreak";
this.buttonUnBreak.UseVisualStyleBackColor = true;
this.buttonUnBreak.Click += new System.EventHandler(this.ButtonUnBreakClick);
//
//
// buttonAutoBreak
//
//
this.buttonAutoBreak.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonAutoBreak.Location = new System.Drawing.Point(627, 12);
this.buttonAutoBreak.Name = "buttonAutoBreak";
@ -482,9 +482,9 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonAutoBreak.Text = "Auto &br";
this.buttonAutoBreak.UseVisualStyleBackColor = true;
this.buttonAutoBreak.Click += new System.EventHandler(this.ButtonAutoBreakClick);
//
//
// labelStartTimeWarning
//
//
this.labelStartTimeWarning.AutoSize = true;
this.labelStartTimeWarning.ForeColor = System.Drawing.Color.Red;
this.labelStartTimeWarning.Location = new System.Drawing.Point(6, 51);
@ -492,9 +492,9 @@ namespace Nikse.SubtitleEdit.Forms
this.labelStartTimeWarning.Size = new System.Drawing.Size(115, 13);
this.labelStartTimeWarning.TabIndex = 32;
this.labelStartTimeWarning.Text = "labelStartTimeWarning";
//
//
// labelDurationWarning
//
//
this.labelDurationWarning.AutoSize = true;
this.labelDurationWarning.ForeColor = System.Drawing.Color.Red;
this.labelDurationWarning.Location = new System.Drawing.Point(57, 64);
@ -502,9 +502,9 @@ namespace Nikse.SubtitleEdit.Forms
this.labelDurationWarning.Size = new System.Drawing.Size(110, 13);
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);
@ -512,9 +512,9 @@ namespace Nikse.SubtitleEdit.Forms
this.timeUpDownStartTime.Name = "timeUpDownStartTime";
this.timeUpDownStartTime.Size = new System.Drawing.Size(92, 25);
this.timeUpDownStartTime.TabIndex = 112;
//
//
// numericUpDownDuration
//
//
this.numericUpDownDuration.DecimalPlaces = 3;
this.numericUpDownDuration.Increment = new decimal(new int[] {
1,
@ -536,27 +536,27 @@ namespace Nikse.SubtitleEdit.Forms
this.numericUpDownDuration.Size = new System.Drawing.Size(56, 21);
this.numericUpDownDuration.TabIndex = 114;
this.numericUpDownDuration.ValueChanged += new System.EventHandler(this.NumericUpDownDurationValueChanged);
//
//
// labelDuration
//
//
this.labelDuration.AutoSize = true;
this.labelDuration.Location = new System.Drawing.Point(97, 12);
this.labelDuration.Name = "labelDuration";
this.labelDuration.Size = new System.Drawing.Size(48, 13);
this.labelDuration.TabIndex = 28;
this.labelDuration.Text = "Duration";
//
//
// labelStartTime
//
//
this.labelStartTime.AutoSize = true;
this.labelStartTime.Location = new System.Drawing.Point(6, 12);
this.labelStartTime.Name = "labelStartTime";
this.labelStartTime.Size = new System.Drawing.Size(54, 13);
this.labelStartTime.TabIndex = 27;
this.labelStartTime.Text = "Start time";
//
//
// labelTextLineTotal
//
//
this.labelTextLineTotal.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.labelTextLineTotal.Location = new System.Drawing.Point(444, 65);
this.labelTextLineTotal.Name = "labelTextLineTotal";
@ -564,19 +564,19 @@ namespace Nikse.SubtitleEdit.Forms
this.labelTextLineTotal.TabIndex = 26;
this.labelTextLineTotal.Text = "labelTextLineTotal";
this.labelTextLineTotal.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
//
// labelTextLineLengths
//
//
this.labelTextLineLengths.AutoSize = true;
this.labelTextLineLengths.Location = new System.Drawing.Point(191, 65);
this.labelTextLineLengths.Name = "labelTextLineLengths";
this.labelTextLineLengths.Size = new System.Drawing.Size(108, 13);
this.labelTextLineLengths.TabIndex = 25;
this.labelTextLineLengths.Text = "labelTextLineLengths";
//
//
// textBoxListViewText
//
this.textBoxListViewText.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
//
this.textBoxListViewText.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.textBoxListViewText.HideSelection = false;
this.textBoxListViewText.Location = new System.Drawing.Point(194, 9);
@ -586,9 +586,9 @@ namespace Nikse.SubtitleEdit.Forms
this.textBoxListViewText.TabIndex = 118;
this.textBoxListViewText.TextChanged += new System.EventHandler(this.TextBoxListViewTextTextChanged);
this.textBoxListViewText.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBoxListViewText_KeyDown);
//
//
// tabPageLog
//
//
this.tabPageLog.Controls.Add(this.textBoxFixedIssues);
this.tabPageLog.Location = new System.Drawing.Point(4, 22);
this.tabPageLog.Name = "tabPageLog";
@ -596,11 +596,11 @@ namespace Nikse.SubtitleEdit.Forms
this.tabPageLog.TabIndex = 2;
this.tabPageLog.Text = "Log";
this.tabPageLog.UseVisualStyleBackColor = true;
//
//
// textBoxFixedIssues
//
this.textBoxFixedIssues.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
//
this.textBoxFixedIssues.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.textBoxFixedIssues.Location = new System.Drawing.Point(3, 3);
this.textBoxFixedIssues.MaxLength = 65767;
@ -611,9 +611,9 @@ namespace Nikse.SubtitleEdit.Forms
this.textBoxFixedIssues.Size = new System.Drawing.Size(796, 466);
this.textBoxFixedIssues.TabIndex = 5;
this.textBoxFixedIssues.WordWrap = false;
//
//
// labelNumberOfImportantLogMessages
//
//
this.labelNumberOfImportantLogMessages.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.labelNumberOfImportantLogMessages.AutoSize = true;
this.labelNumberOfImportantLogMessages.ForeColor = System.Drawing.Color.Red;
@ -622,9 +622,9 @@ namespace Nikse.SubtitleEdit.Forms
this.labelNumberOfImportantLogMessages.Size = new System.Drawing.Size(190, 13);
this.labelNumberOfImportantLogMessages.TabIndex = 11;
this.labelNumberOfImportantLogMessages.Text = "labelNumberOfImportantLogMessages";
//
//
// FixCommonErrors
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.buttonCancel;

View File

@ -98,7 +98,7 @@ namespace Nikse.SubtitleEdit.Forms
public int ColumnNumber { get; set; }
public bool IsNumber { get; set; }
public bool Descending { get; set; }
}
}
Subtitle _subtitle;
Subtitle _originalSubtitle;
@ -142,7 +142,7 @@ namespace Nikse.SubtitleEdit.Forms
_fixActions.Add(new FixItem(_language.RemoveLineBreaksAll, string.Empty, delegate { FixShortLinesAll(); }, ce.MergeShortLinesAllTicked));
_fixActions.Add(new FixItem(_language.FixUppercaseIInsindeLowercaseWords, _language.FixUppercaseIInsindeLowercaseWordsExample, delegate { FixUppercaseIInsideWords(); }, ce.UppercaseIInsideLowercaseWordTicked));
_fixActions.Add(new FixItem(_language.FixDoubleApostrophes, string.Empty, delegate { FixDoubleApostrophes(); }, ce.DoubleApostropheToQuoteTicked));
_fixActions.Add(new FixItem(_language.FixMusicNotation, _language.FixMusicNotationExample, delegate { FixMusicNotation(); }, ce.FixMusicNotationTicked));
_fixActions.Add(new FixItem(_language.FixMusicNotation, _language.FixMusicNotationExample, delegate { FixMusicNotation(); }, ce.FixMusicNotationTicked));
_fixActions.Add(new FixItem(_language.AddPeriods, string.Empty, delegate { FixMissingPeriodsAtEndOfLine(); }, ce.AddPeriodAfterParagraphTicked));
_fixActions.Add(new FixItem(_language.StartWithUppercaseLetterAfterParagraph, string.Empty, delegate { FixStartWithUppercaseLetterAfterParagraph(); }, ce.StartWithUppercaseLetterAfterParagraphTicked));
_fixActions.Add(new FixItem(_language.StartWithUppercaseLetterAfterPeriodInsideParagraph, string.Empty, delegate { FixStartWithUppercaseLetterAfterPeriodInsideParagraph(); }, ce.StartWithUppercaseLetterAfterPeriodInsideParagraphTicked));
@ -156,9 +156,9 @@ namespace Nikse.SubtitleEdit.Forms
_fixActions.Add(new FixItem(_language.FixLowercaseIToUppercaseI, _language.FixLowercaseIToUppercaseIExample, delegate { FixAloneLowercaseIToUppercaseI(); }, ce.AloneLowercaseIToUppercaseIEnglishTicked));
_fixActions.Add(new FixItem(_language.FixCommonOcrErrors, "D0n't -> Don't", delegate { FixOcrErrorsViaReplaceList(threeLetterISOLanguageName); }, ce.FixOcrErrorsViaReplaceListTicked));
_fixActions.Add(new FixItem(_language.RemoveSpaceBetweenNumber, "1 100 -> 1100", delegate { RemoveSpaceBetweenNumbers(); }, ce.RemoveSpaceBetweenNumberTicked));
_fixActions.Add(new FixItem(_language.FixDialogsOnOneLine, "Hi John! - Hi Ida! > Hi John!" + Configuration.Settings.General.ListViewLineSeparatorString + "- Hi Ida!", delegate { DialogsOnOneLine(); }, ce.FixDialogsOnOneLineTicked));
_fixActions.Add(new FixItem(_language.FixDialogsOnOneLine, "Hi John! - Hi Ida! > Hi John!" + Configuration.Settings.General.ListViewLineSeparatorString + "- Hi Ida!", delegate { DialogsOnOneLine(); }, ce.FixDialogsOnOneLineTicked));
if (_autoDetectGoogleLanguage == "da" || subtitle.Paragraphs.Count < 25) // && Thread.CurrentThread.CurrentCulture.Name == "da-DK" &&
if (_autoDetectGoogleLanguage == "da" || subtitle.Paragraphs.Count < 25) // && Thread.CurrentThread.CurrentCulture.Name == "da-DK" &&
{
_danishLetterIIndex = _fixActions.Count;
_fixActions.Add(new FixItem(_language.FixDanishLetterI, "Jeg synes i er søde. -> Jeg synes I er søde.", delegate { FixDanishLetterI(); }, ce.DanishLetterITicked));
@ -292,7 +292,7 @@ namespace Nikse.SubtitleEdit.Forms
public bool AllowFix(int lineNumber, string action)
{
//if (!buttonBack.Enabled)
if (_onlyListFixes)
return true;
@ -324,7 +324,7 @@ namespace Nikse.SubtitleEdit.Forms
public void LogStatus(string sender, string message)
{
if (!string.IsNullOrEmpty(message))
if (!string.IsNullOrEmpty(message))
{
message += Environment.NewLine;
if (_onlyListFixes)
@ -353,7 +353,7 @@ namespace Nikse.SubtitleEdit.Forms
if (p.Text.Trim().Length == 0)
{
}
else
else
{
string text = p.Text.Trim(' ');
if (text.StartsWith(Environment.NewLine))
@ -466,7 +466,7 @@ namespace Nikse.SubtitleEdit.Forms
}
}
// overlapping display time
// overlapping display time
for (int i = 1; i < _subtitle.Paragraphs.Count; i++ )
{
@ -525,7 +525,7 @@ namespace Nikse.SubtitleEdit.Forms
p.Text = "- " + p.Text.TrimStart();
prev.Text = prev.Text.Trim() + Environment.NewLine + p.Text;
p.Text = string.Empty;
p.Text = string.Empty;
_totalFixes++;
noOfOverlappingDisplayTimesFixed++;
AddFixToListView(p, i + 1, fixAction, oldCurrent, p.ToString());
@ -541,7 +541,7 @@ namespace Nikse.SubtitleEdit.Forms
LogStatus(_language.FixOverlappingDisplayTimes, string.Format(_language.UnableToFixTextXY, i + 1, Environment.NewLine + prev.Number + " " + prev + Environment.NewLine + p.Number + " " + p), true);
_totalErrors++;
}
}
}
}
@ -582,7 +582,7 @@ namespace Nikse.SubtitleEdit.Forms
if (noOfShortDisplayTimes > 0)
LogStatus(fixAction, string.Format(_language.XDisplayTimesProlonged, noOfShortDisplayTimes));
}
public void FixInvalidItalicTags()
{
const string beginTag = "<i>";
@ -688,7 +688,7 @@ namespace Nikse.SubtitleEdit.Forms
string s = Utilities.RemoveHtmlTags(p.Text);
if (s.Length < Configuration.Settings.Tools.MergeLinesShorterThan && p.Text.Contains(Environment.NewLine))
{
s = s.TrimEnd().TrimEnd(".?!:;".ToCharArray());
s = s.TrimEnd().TrimEnd(".?!:;".ToCharArray());
s = s.TrimStart('-');
if (!s.Contains(".") &&
!s.Contains("?") &&
@ -696,7 +696,7 @@ namespace Nikse.SubtitleEdit.Forms
!s.Contains(":") &&
!s.Contains(";") &&
!s.Contains("-") &&
p.Text != p.Text.ToUpper())
p.Text != p.Text.ToUpper())
{
if (AllowFix(i + 1, fixAction))
{
@ -710,7 +710,7 @@ namespace Nikse.SubtitleEdit.Forms
AddFixToListView(p, i + 1, fixAction, oldCurrent, p.Text);
}
}
}
}
}
if (noOfShortLines > 0)
LogStatus(_language.RemoveLineBreaks, string.Format(_language.XLinesUnbreaked, noOfShortLines));
@ -946,7 +946,7 @@ namespace Nikse.SubtitleEdit.Forms
Regex rePeriod = new Regex(@"[a-z][.][a-zA-Z]", RegexOptions.Compiled);
Regex reQuestionMark = new Regex(@"[^\s\d]\?[a-zA-Z]", RegexOptions.Compiled);
Regex reExclamation = new Regex(@"[^\s\d]\![a-zA-Z]", RegexOptions.Compiled);
Regex reColon = new Regex(@"[^\s\d]\:[a-zA-Z]", RegexOptions.Compiled);
Regex reColon = new Regex(@"[^\s\d]\:[a-zA-Z]", RegexOptions.Compiled);
Regex urlCom = new Regex(@"\w\.com\b", RegexOptions.Compiled);
Regex urlNet = new Regex(@"\w\.net\b", RegexOptions.Compiled);
@ -1061,7 +1061,7 @@ namespace Nikse.SubtitleEdit.Forms
{
while (match.Success)
{
if (!p.Text.ToLower().Contains("www.") &&
if (!p.Text.ToLower().Contains("www.") &&
!p.Text.ToLower().Contains("http://") &&
!urlCom.IsMatch(p.Text) &&
!urlNet.IsMatch(p.Text) &&
@ -1175,7 +1175,7 @@ namespace Nikse.SubtitleEdit.Forms
Utilities.CountTagInText(next.Text, "\"") == 2)
next = null; // seems to have valid quotes, so no spanning
}
Paragraph prev = _subtitle.GetParagraphOrDefault(i - 1);
if (prev != null)
{
@ -1183,7 +1183,7 @@ namespace Nikse.SubtitleEdit.Forms
if (betweenMilliseconds > 1500)
prev = null; // cannot be quote spanning several lines of more than 1.5 seconds between lines!
else if (prev.Text.Replace("<i>",string.Empty).TrimStart().TrimStart('-').TrimStart().StartsWith("\"") &&
prev.Text.Replace("</i>", string.Empty).TrimEnd().EndsWith("\"") &&
prev.Text.Replace("</i>", string.Empty).TrimEnd().EndsWith("\"") &&
Utilities.CountTagInText(prev.Text, "\"") == 2)
prev = null; // seems to have valid quotes, so no spanning
}
@ -1432,7 +1432,7 @@ namespace Nikse.SubtitleEdit.Forms
else if (match.Index > 1 && ((st.StrippedText[match.Index - 1] == '\"') || (st.StrippedText[match.Index - 1] == '>') || (st.StrippedText[match.Index - 1] == '-')))
{
}
else
else
{
string before = string.Empty;
string after = string.Empty;
@ -1477,7 +1477,7 @@ namespace Nikse.SubtitleEdit.Forms
if (uppercaseIsInsideLowercaseWords > 0)
LogStatus(_language.FixUppercaseIInsindeLowercaseWords, string.Format(_language.XUppercaseIsFoundInsideLowercaseWords, uppercaseIsInsideLowercaseWords));
}
public void FixDoubleApostrophes()
{
string fixAction = _language.FixDoubleApostrophes;
@ -1727,7 +1727,7 @@ namespace Nikse.SubtitleEdit.Forms
if (!text.StartsWith("www.") &&
firstLetter != firstLetter.ToUpper() &&
!"0123456789".Contains(firstLetter) &&
!"0123456789".Contains(firstLetter) &&
prevText.Length > 1 &&
!prevText.EndsWith("...") &&
(prevText.EndsWith(".") ||
@ -1787,7 +1787,7 @@ namespace Nikse.SubtitleEdit.Forms
firstLetter != firstLetter.ToUpper() &&
!prevText.EndsWith("...") &&
prevText.Length > 1 &&
!"0123456789".Contains(firstLetter) &&
!"0123456789".Contains(firstLetter) &&
(prevText.EndsWith(".") ||
prevText.EndsWith("!") ||
prevText.EndsWith("?") ||
@ -1862,7 +1862,7 @@ namespace Nikse.SubtitleEdit.Forms
while (start != -1 && start < text.Length)
{
if (start > 0 && Utilities.IsInteger(text[start - 1].ToString()))
{
{
// ignore periods after a number
}
else if (start + 4 < text.Length && text[start + 1] == ' ')
@ -1992,7 +1992,7 @@ namespace Nikse.SubtitleEdit.Forms
{
string[] parts = text.Replace(" - ", Environment.NewLine).Split(Environment.NewLine.ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
if (parts.Length == 2)
{
{
string part0 = Utilities.RemoveHtmlTags(parts[0]).Trim();
string part1 = Utilities.RemoveHtmlTags(parts[1]).Trim();
if (part0.Length > 1 && "!?.".Contains(part0.Substring(part0.Length - 1, 1)) &&
@ -2006,7 +2006,7 @@ namespace Nikse.SubtitleEdit.Forms
else
text = "- " + text;
}
}
}
}
if (oldText != text)
@ -2129,7 +2129,7 @@ namespace Nikse.SubtitleEdit.Forms
text.Contains(Environment.NewLine + "<I> -"))
{
Paragraph prev = _subtitle.GetParagraphOrDefault(i - 1);
if (prev == null || !Utilities.RemoveHtmlTags(prev.Text).Trim().EndsWith("-"))
{
if (Utilities.CountTagInText(text, "-") == 1)
@ -2267,8 +2267,8 @@ namespace Nikse.SubtitleEdit.Forms
{
text = text.Substring(0, text.Length - 1) + "...";
text = text.Replace(" ...", "...");
}
}
if (text != oldText && AllowFix(i + 1, fixAction))
{
p.Text = text;
@ -2417,29 +2417,29 @@ namespace Nikse.SubtitleEdit.Forms
MyRegEx(@", i ved nok\b"),
MyRegEx(@", i ved, "),
MyRegEx(@", i ved."),
MyRegEx(@", i ikke blev\b"),
MyRegEx(@"\b i føler at\b"),
MyRegEx(@"\badvarede i os\b"),
MyRegEx(@"\badvarede i dem\b"),
MyRegEx(@"\bat i aldrig\b"),
MyRegEx(@"\bat i alle bliver\b"),
MyRegEx(@"\bat i alle er\b"),
MyRegEx(@"\bat i alle forventer\b"),
MyRegEx(@"\bat i alle gør\b"),
MyRegEx(@"\bat i alle har\b"),
MyRegEx(@"\bat i alle ved\b"),
MyRegEx(@"\bat i alle vil\b"),
MyRegEx(@", i ikke blev\b"),
MyRegEx(@"\b i føler at\b"),
MyRegEx(@"\badvarede i os\b"),
MyRegEx(@"\badvarede i dem\b"),
MyRegEx(@"\bat i aldrig\b"),
MyRegEx(@"\bat i alle bliver\b"),
MyRegEx(@"\bat i alle er\b"),
MyRegEx(@"\bat i alle forventer\b"),
MyRegEx(@"\bat i alle gør\b"),
MyRegEx(@"\bat i alle har\b"),
MyRegEx(@"\bat i alle ved\b"),
MyRegEx(@"\bat i alle vil\b"),
MyRegEx(@"\bat i bare\b"),
MyRegEx(@"\bat i bager\b"),
MyRegEx(@"\bat i bruger\b"),
MyRegEx(@"\bat i dræber\b"),
MyRegEx(@"\bat i dræbte\b"),
MyRegEx(@"\bat i dræber\b"),
MyRegEx(@"\bat i dræbte\b"),
MyRegEx(@"\bat i fandt\b"),
MyRegEx(@"\bat i fik\b"),
MyRegEx(@"\bat i finder\b"),
MyRegEx(@"\bat i forstår\b"),
MyRegEx(@"\bat i får\b"),
MyRegEx(@"\b[Aa]t i hver især\b"),
MyRegEx(@"\b[Aa]t i hver især\b"),
MyRegEx(@"\bAt i ikke\b"),
MyRegEx(@"\bat i ikke\b"),
MyRegEx(@"\bat i kom\b"),
@ -2456,9 +2456,9 @@ namespace Nikse.SubtitleEdit.Forms
MyRegEx(@"\bat i også tror\b"),
MyRegEx(@"\bat i rev\b"),
MyRegEx(@"\bat i river\b"),
MyRegEx(@"\bat i samarbejder\b"),
MyRegEx(@"\bat i samarbejder\b"),
MyRegEx(@"\bat i snakkede\b"),
MyRegEx(@"\bat i scorer\b"),
MyRegEx(@"\bat i scorer\b"),
MyRegEx(@"\bat i siger\b"),
MyRegEx(@"\bat i skal\b"),
MyRegEx(@"\bat i skulle\b"),
@ -2470,119 +2470,119 @@ namespace Nikse.SubtitleEdit.Forms
MyRegEx(@"\bat i to skal\b"),
MyRegEx(@"\bat i to gør\b"),
MyRegEx(@"\bat i to får\b"),
MyRegEx(@"\bat i udnyttede\b"),
MyRegEx(@"\bat i udnytter\b"),
MyRegEx(@"\bat i vil\b"),
MyRegEx(@"\bat i ville\b"),
MyRegEx(@"\bBehandler i mig\b"),
MyRegEx(@"\bbehandler i mig\b"),
MyRegEx(@"\bbliver i rige\b"),
MyRegEx(@"\bat i udnyttede\b"),
MyRegEx(@"\bat i udnytter\b"),
MyRegEx(@"\bat i vil\b"),
MyRegEx(@"\bat i ville\b"),
MyRegEx(@"\bBehandler i mig\b"),
MyRegEx(@"\bbehandler i mig\b"),
MyRegEx(@"\bbliver i rige\b"),
MyRegEx(@"\bbliver i ikke\b"),
MyRegEx(@"\bbliver i indkvarteret\b"),
MyRegEx(@"\bbliver i indlogeret\b"),
MyRegEx(@"\bburde i gøre\b"),
MyRegEx(@"\bburde i ikke\b"),
MyRegEx(@"\bburde i købe\b"),
MyRegEx(@"\bburde i løbe\b"),
MyRegEx(@"\bburde i se\b"),
MyRegEx(@"\bburde i sige\b"),
MyRegEx(@"\bburde i tage\b"),
MyRegEx(@"\bDa i ankom\b"),
MyRegEx(@"\bda i ankom\b"),
MyRegEx(@"\bda i forlod\b"),
MyRegEx(@"\bDa i forlod\b"),
MyRegEx(@"\bda i fik\b"),
MyRegEx(@"\bDa i fik\b"),
MyRegEx(@"\bDa i gik\b"),
MyRegEx(@"\bda i gik\b"),
MyRegEx(@"\bda i kom\b"),
MyRegEx(@"\bDa i kom\b"),
MyRegEx(@"\bda i så "),
MyRegEx(@"\bDa i så "),
MyRegEx(@"\bdet får i\b"),
MyRegEx(@"\bDet får i\b"),
MyRegEx(@"\bDet har i\b"),
MyRegEx(@"\bdet har i\b"),
MyRegEx(@"\bDet må i "),
MyRegEx(@"\bdet må i "),
MyRegEx(@"\b[Dd]et Det kan i sgu"),
MyRegEx(@"\bend i aner\b"),
MyRegEx(@"\bend i tror\b"),
MyRegEx(@"\bend i ved\b"),
MyRegEx(@"\b, er i alle\b"),
MyRegEx(@"\bellers får i "),
MyRegEx(@"\bEr i alle\b"),
MyRegEx(@"\ber i allerede\b"),
MyRegEx(@"\bEr i allerede\b"),
MyRegEx(@"\ber i allesammen\b"),
MyRegEx(@"\bEr i allesammen\b"),
MyRegEx(@"\ber i der\b"),
MyRegEx(@"\bEr i der\b"),
MyRegEx(@"\bEr i fra\b"),
MyRegEx(@"\bEr i gennem\b"),
MyRegEx(@"\ber i gennem\b"),
MyRegEx(@"\ber i glade\b"),
MyRegEx(@"\bEr i glade\b"),
MyRegEx(@"\bEr i gået\b"),
MyRegEx(@"\ber i gået\b"),
MyRegEx(@"\ber i her\b"),
MyRegEx(@"\bEr i her\b"),
MyRegEx(@"\ber i imod\b"),
MyRegEx(@"\bEr i imod\b"),
MyRegEx(@"\ber i klar\b"),
MyRegEx(@"\bEr i klar\b"),
MyRegEx(@"\bEr i mætte\b"),
MyRegEx(@"\ber i mætte\b"),
MyRegEx(@"\bEr i med\b"),
MyRegEx(@"\ber i med\b"),
MyRegEx(@"\ber i mod\b"),
MyRegEx(@"\bEr i mod\b"),
MyRegEx(@"\ber i okay\b"),
MyRegEx(@"\bEr i okay\b"),
MyRegEx(@"\ber i på\b"),
MyRegEx(@"\bEr i på\b"),
MyRegEx(@"\bEr i parate\b"),
MyRegEx(@"\ber i parate\b"),
MyRegEx(@"\ber i sikker\b"),
MyRegEx(@"\bEr i sikker\b"),
MyRegEx(@"\bEr i sikre\b"),
MyRegEx(@"\ber i sikre\b"),
MyRegEx(@"\ber i skøre\b"),
MyRegEx(@"\bEr i skøre\b"),
MyRegEx(@"\ber i stadig\b"),
MyRegEx(@"\bEr i stadig\b"),
MyRegEx(@"\bEr i sultne\b"),
MyRegEx(@"\ber i sultne\b"),
MyRegEx(@"\bEr i tilfredse\b"),
MyRegEx(@"\ber i tilfredse\b"),
MyRegEx(@"\bEr i to\b"),
MyRegEx(@"\ber i ved at\b"),
MyRegEx(@"\ber i virkelig\b"),
MyRegEx(@"\bEr i virkelig\b"),
MyRegEx(@"\bEr i vågne\b"),
MyRegEx(@"\ber i vågne\b"),
MyRegEx(@"\bbliver i indkvarteret\b"),
MyRegEx(@"\bbliver i indlogeret\b"),
MyRegEx(@"\bburde i gøre\b"),
MyRegEx(@"\bburde i ikke\b"),
MyRegEx(@"\bburde i købe\b"),
MyRegEx(@"\bburde i løbe\b"),
MyRegEx(@"\bburde i se\b"),
MyRegEx(@"\bburde i sige\b"),
MyRegEx(@"\bburde i tage\b"),
MyRegEx(@"\bDa i ankom\b"),
MyRegEx(@"\bda i ankom\b"),
MyRegEx(@"\bda i forlod\b"),
MyRegEx(@"\bDa i forlod\b"),
MyRegEx(@"\bda i fik\b"),
MyRegEx(@"\bDa i fik\b"),
MyRegEx(@"\bDa i gik\b"),
MyRegEx(@"\bda i gik\b"),
MyRegEx(@"\bda i kom\b"),
MyRegEx(@"\bDa i kom\b"),
MyRegEx(@"\bda i så "),
MyRegEx(@"\bDa i så "),
MyRegEx(@"\bdet får i\b"),
MyRegEx(@"\bDet får i\b"),
MyRegEx(@"\bDet har i\b"),
MyRegEx(@"\bdet har i\b"),
MyRegEx(@"\bDet må i "),
MyRegEx(@"\bdet må i "),
MyRegEx(@"\b[Dd]et Det kan i sgu"),
MyRegEx(@"\bend i aner\b"),
MyRegEx(@"\bend i tror\b"),
MyRegEx(@"\bend i ved\b"),
MyRegEx(@"\b, er i alle\b"),
MyRegEx(@"\bellers får i "),
MyRegEx(@"\bEr i alle\b"),
MyRegEx(@"\ber i allerede\b"),
MyRegEx(@"\bEr i allerede\b"),
MyRegEx(@"\ber i allesammen\b"),
MyRegEx(@"\bEr i allesammen\b"),
MyRegEx(@"\ber i der\b"),
MyRegEx(@"\bEr i der\b"),
MyRegEx(@"\bEr i fra\b"),
MyRegEx(@"\bEr i gennem\b"),
MyRegEx(@"\ber i gennem\b"),
MyRegEx(@"\ber i glade\b"),
MyRegEx(@"\bEr i glade\b"),
MyRegEx(@"\bEr i gået\b"),
MyRegEx(@"\ber i gået\b"),
MyRegEx(@"\ber i her\b"),
MyRegEx(@"\bEr i her\b"),
MyRegEx(@"\ber i imod\b"),
MyRegEx(@"\bEr i imod\b"),
MyRegEx(@"\ber i klar\b"),
MyRegEx(@"\bEr i klar\b"),
MyRegEx(@"\bEr i mætte\b"),
MyRegEx(@"\ber i mætte\b"),
MyRegEx(@"\bEr i med\b"),
MyRegEx(@"\ber i med\b"),
MyRegEx(@"\ber i mod\b"),
MyRegEx(@"\bEr i mod\b"),
MyRegEx(@"\ber i okay\b"),
MyRegEx(@"\bEr i okay\b"),
MyRegEx(@"\ber i på\b"),
MyRegEx(@"\bEr i på\b"),
MyRegEx(@"\bEr i parate\b"),
MyRegEx(@"\ber i parate\b"),
MyRegEx(@"\ber i sikker\b"),
MyRegEx(@"\bEr i sikker\b"),
MyRegEx(@"\bEr i sikre\b"),
MyRegEx(@"\ber i sikre\b"),
MyRegEx(@"\ber i skøre\b"),
MyRegEx(@"\bEr i skøre\b"),
MyRegEx(@"\ber i stadig\b"),
MyRegEx(@"\bEr i stadig\b"),
MyRegEx(@"\bEr i sultne\b"),
MyRegEx(@"\ber i sultne\b"),
MyRegEx(@"\bEr i tilfredse\b"),
MyRegEx(@"\ber i tilfredse\b"),
MyRegEx(@"\bEr i to\b"),
MyRegEx(@"\ber i ved at\b"),
MyRegEx(@"\ber i virkelig\b"),
MyRegEx(@"\bEr i virkelig\b"),
MyRegEx(@"\bEr i vågne\b"),
MyRegEx(@"\ber i vågne\b"),
MyRegEx(@"\bfanden vil i?"),
MyRegEx(@"\bfor ser i\b"),
MyRegEx(@"\bFor ser i\b"),
MyRegEx(@"\bFordi i ventede\b"),
MyRegEx(@"\bfordi i ventede\b"),
MyRegEx(@"\bFordi i deltog\b"),
MyRegEx(@"\bfordi i deltog\b"),
MyRegEx(@"\bforhandler i stadig\b"),
MyRegEx(@"\bForhandler i stadig\b"),
MyRegEx(@"\bforstår i\b"),
MyRegEx(@"\bForstår i\b"),
MyRegEx(@"\bFør i får\b"),
MyRegEx(@"\bfør i får\b"),
MyRegEx(@"\bFør i kommer\b"),
MyRegEx(@"\bfør i kommer\b"),
MyRegEx(@"\bFør i tager\b"),
MyRegEx(@"\bfør i tager\b"),
MyRegEx(@"\bfår i alle\b"),
MyRegEx(@"\bfår i fratrukket\b"),
MyRegEx(@"\bfår i ikke\b"),
MyRegEx(@"\bfår i klø\b"),
MyRegEx(@"\bfår i point\b"),
MyRegEx(@"\bfor ser i\b"),
MyRegEx(@"\bFor ser i\b"),
MyRegEx(@"\bFordi i ventede\b"),
MyRegEx(@"\bfordi i ventede\b"),
MyRegEx(@"\bFordi i deltog\b"),
MyRegEx(@"\bfordi i deltog\b"),
MyRegEx(@"\bforhandler i stadig\b"),
MyRegEx(@"\bForhandler i stadig\b"),
MyRegEx(@"\bforstår i\b"),
MyRegEx(@"\bForstår i\b"),
MyRegEx(@"\bFør i får\b"),
MyRegEx(@"\bfør i får\b"),
MyRegEx(@"\bFør i kommer\b"),
MyRegEx(@"\bfør i kommer\b"),
MyRegEx(@"\bFør i tager\b"),
MyRegEx(@"\bfør i tager\b"),
MyRegEx(@"\bfår i alle\b"),
MyRegEx(@"\bfår i fratrukket\b"),
MyRegEx(@"\bfår i ikke\b"),
MyRegEx(@"\bfår i klø\b"),
MyRegEx(@"\bfår i point\b"),
MyRegEx(@"\bgider i at\b"),
MyRegEx(@"\bGider i at\b"),
MyRegEx(@"\bGider i ikke\b"),
@ -2624,10 +2624,10 @@ namespace Nikse.SubtitleEdit.Forms
MyRegEx(@"\bhar i nogen\b"),
MyRegEx(@"\bHar i nok\b"),
MyRegEx(@"\bhar i nok\b"),
MyRegEx(@"\bhar i ordnet\b"),
MyRegEx(@"\bHar i ordnet\b"),
MyRegEx(@"\bhar i spist\b"),
MyRegEx(@"\bHar i spist\b"),
MyRegEx(@"\bhar i ordnet\b"),
MyRegEx(@"\bHar i ordnet\b"),
MyRegEx(@"\bhar i spist\b"),
MyRegEx(@"\bHar i spist\b"),
MyRegEx(@"\bhar i tænkt\b"),
MyRegEx(@"\bhar i tabt\b"),
MyRegEx(@"\bhelvede vil i?"),
@ -2635,85 +2635,85 @@ namespace Nikse.SubtitleEdit.Forms
MyRegEx(@"\bher har i\b"),
MyRegEx(@"\b[Hh]older i fast\b"),
MyRegEx(@"\b[Hh]older i godt fast\b"),
MyRegEx(@"\bHvad fanden har i\b"),
MyRegEx(@"\bhvad fanden har i\b"),
MyRegEx(@"\bHvad fanden tror i\b"),
MyRegEx(@"\bhvad fanden tror i\b"),
MyRegEx(@"\bhvad fanden vil i\b"),
MyRegEx(@"\bHvad fanden vil i\b"),
MyRegEx(@"\bHvad gør i\b"),
MyRegEx(@"\bhvad gør i\b"),
MyRegEx(@"\bhvad har i\b"),
MyRegEx(@"\bHvad har i\b"),
MyRegEx(@"\bHvad i ikke\b"),
MyRegEx(@"\bhvad i ikke\b"),
MyRegEx(@"\b[Hh]vad laver i\b"),
MyRegEx(@"\b[Hh]vad lavede i\b"),
MyRegEx(@"\b[Hh]vad mener i\b"),
MyRegEx(@"\b[Hh]vad siger i\b"),
MyRegEx(@"\b[Hh]vad skal i\b"),
MyRegEx(@"\b[Hh]vad snakker i\b"),
MyRegEx(@"\b[Hh]vad sløver i\b"),
MyRegEx(@"\b[Hh]vad synes i\b"),
MyRegEx(@"\b[Hh]vad vil i\b"),
MyRegEx(@"\b[Hh]vem er i\b"),
MyRegEx(@"\b[Hh]vem fanden tror i\b"),
MyRegEx(@"\b[Hh]vem tror i\b"),
MyRegEx(@"\b[Hh]vilken slags mennesker er i?"),
MyRegEx(@"\b[Hh]vilken slags folk er i?"),
MyRegEx(@"\b[Hh]vis i altså\b"),
MyRegEx(@"\b[Hh]vis i bare\b"),
MyRegEx(@"\b[Hh]vis i forstår\b"),
MyRegEx(@"\b[Hh]vis i får\b"),
MyRegEx(@"\b[Hh]vis i går\b"),
MyRegEx(@"\b[Hh]vis i ikke\b"),
MyRegEx(@"\b[Hh]vis i lovede\b"),
MyRegEx(@"\b[Hh]vis i lover\b"),
MyRegEx(@"\b[Hh]vis i overholder\b"),
MyRegEx(@"\b[Hh]vis i overtræder\b"),
MyRegEx(@"\b[Hh]vis i slipper\b"),
MyRegEx(@"\b[Hh]vis i taber\b"),
MyRegEx(@"\b[Hh]vis i vandt\b"),
MyRegEx(@"\b[Hh]vis i vinder\b"),
MyRegEx(@"\b[Hh]vor er i\b"),
MyRegEx(@"\b[Hh]vor får i\b"),
MyRegEx(@"\b[Hh]vor gamle er i\b"),
MyRegEx(@"\b[Hh]vor i begyndte\b"),
MyRegEx(@"\b[Hh]vor i startede\b"),
MyRegEx(@"\b[Hh]vor skal i\b"),
MyRegEx(@"\b[Hh]vor var i\b"),
MyRegEx(@"\b[Hh]vordan har i\b"),
MyRegEx(@"\b[Hh]vordan hørte i\b"),
MyRegEx(@"\b[Hh]vordan i når\b"),
MyRegEx(@"\b[Hh]vordan i nåede\b"),
MyRegEx(@"\b[Hh]vordan kunne i\b"),
MyRegEx(@"\b[Hh]vorfor afleverer i det\b"),
MyRegEx(@"\b[Hh]vorfor gør i "),
MyRegEx(@"\b[Hh]vorfor gjorde i "),
MyRegEx(@"\b[Hh]vorfor græder i "),
MyRegEx(@"\b[Hh]vorfor har i "),
MyRegEx(@"\b[Hh]vorfor kom i "),
MyRegEx(@"\b[Hh]vorfor kommer i "),
MyRegEx(@"\b[Hh]vorfor løb i "),
MyRegEx(@"\b[Hh]vorfor lover i "),
MyRegEx(@"\b[Hh]vorfor lovede i "),
MyRegEx(@"\b[Hh]vorfor skal i\b"),
MyRegEx(@"\b[Hh]vorfor skulle i\b"),
MyRegEx(@"\b[Hh]vorfor sagde i\b"),
MyRegEx(@"\b[Hh]vorfor synes i\b"),
MyRegEx(@"\b[Hh]vornår gør i "),
MyRegEx(@"\bHvornår kom i\b"),
MyRegEx(@"\b[Hh]vornår ville i "),
MyRegEx(@"\b[Hh]vornår giver i "),
MyRegEx(@"\b[Hh]vornår gav i "),
MyRegEx(@"\b[Hh]vornår rejser i\b"),
MyRegEx(@"\b[Hh]vornår rejste i\b"),
MyRegEx(@"\b[Hh]vornår skal i "),
MyRegEx(@"\b[Hh]vornår skulle i "),
MyRegEx(@"\b[Hh]ører i på\b"),
MyRegEx(@"\b[Hh]ørte i på\b"),
MyRegEx(@"\b[Hh]ører i,\b"),
MyRegEx(@"\b[Hh]ører i ikke\b"),
MyRegEx(@"\bHvad fanden har i\b"),
MyRegEx(@"\bhvad fanden har i\b"),
MyRegEx(@"\bHvad fanden tror i\b"),
MyRegEx(@"\bhvad fanden tror i\b"),
MyRegEx(@"\bhvad fanden vil i\b"),
MyRegEx(@"\bHvad fanden vil i\b"),
MyRegEx(@"\bHvad gør i\b"),
MyRegEx(@"\bhvad gør i\b"),
MyRegEx(@"\bhvad har i\b"),
MyRegEx(@"\bHvad har i\b"),
MyRegEx(@"\bHvad i ikke\b"),
MyRegEx(@"\bhvad i ikke\b"),
MyRegEx(@"\b[Hh]vad laver i\b"),
MyRegEx(@"\b[Hh]vad lavede i\b"),
MyRegEx(@"\b[Hh]vad mener i\b"),
MyRegEx(@"\b[Hh]vad siger i\b"),
MyRegEx(@"\b[Hh]vad skal i\b"),
MyRegEx(@"\b[Hh]vad snakker i\b"),
MyRegEx(@"\b[Hh]vad sløver i\b"),
MyRegEx(@"\b[Hh]vad synes i\b"),
MyRegEx(@"\b[Hh]vad vil i\b"),
MyRegEx(@"\b[Hh]vem er i\b"),
MyRegEx(@"\b[Hh]vem fanden tror i\b"),
MyRegEx(@"\b[Hh]vem tror i\b"),
MyRegEx(@"\b[Hh]vilken slags mennesker er i?"),
MyRegEx(@"\b[Hh]vilken slags folk er i?"),
MyRegEx(@"\b[Hh]vis i altså\b"),
MyRegEx(@"\b[Hh]vis i bare\b"),
MyRegEx(@"\b[Hh]vis i forstår\b"),
MyRegEx(@"\b[Hh]vis i får\b"),
MyRegEx(@"\b[Hh]vis i går\b"),
MyRegEx(@"\b[Hh]vis i ikke\b"),
MyRegEx(@"\b[Hh]vis i lovede\b"),
MyRegEx(@"\b[Hh]vis i lover\b"),
MyRegEx(@"\b[Hh]vis i overholder\b"),
MyRegEx(@"\b[Hh]vis i overtræder\b"),
MyRegEx(@"\b[Hh]vis i slipper\b"),
MyRegEx(@"\b[Hh]vis i taber\b"),
MyRegEx(@"\b[Hh]vis i vandt\b"),
MyRegEx(@"\b[Hh]vis i vinder\b"),
MyRegEx(@"\b[Hh]vor er i\b"),
MyRegEx(@"\b[Hh]vor får i\b"),
MyRegEx(@"\b[Hh]vor gamle er i\b"),
MyRegEx(@"\b[Hh]vor i begyndte\b"),
MyRegEx(@"\b[Hh]vor i startede\b"),
MyRegEx(@"\b[Hh]vor skal i\b"),
MyRegEx(@"\b[Hh]vor var i\b"),
MyRegEx(@"\b[Hh]vordan har i\b"),
MyRegEx(@"\b[Hh]vordan hørte i\b"),
MyRegEx(@"\b[Hh]vordan i når\b"),
MyRegEx(@"\b[Hh]vordan i nåede\b"),
MyRegEx(@"\b[Hh]vordan kunne i\b"),
MyRegEx(@"\b[Hh]vorfor afleverer i det\b"),
MyRegEx(@"\b[Hh]vorfor gør i "),
MyRegEx(@"\b[Hh]vorfor gjorde i "),
MyRegEx(@"\b[Hh]vorfor græder i "),
MyRegEx(@"\b[Hh]vorfor har i "),
MyRegEx(@"\b[Hh]vorfor kom i "),
MyRegEx(@"\b[Hh]vorfor kommer i "),
MyRegEx(@"\b[Hh]vorfor løb i "),
MyRegEx(@"\b[Hh]vorfor lover i "),
MyRegEx(@"\b[Hh]vorfor lovede i "),
MyRegEx(@"\b[Hh]vorfor skal i\b"),
MyRegEx(@"\b[Hh]vorfor skulle i\b"),
MyRegEx(@"\b[Hh]vorfor sagde i\b"),
MyRegEx(@"\b[Hh]vorfor synes i\b"),
MyRegEx(@"\b[Hh]vornår gør i "),
MyRegEx(@"\bHvornår kom i\b"),
MyRegEx(@"\b[Hh]vornår ville i "),
MyRegEx(@"\b[Hh]vornår giver i "),
MyRegEx(@"\b[Hh]vornår gav i "),
MyRegEx(@"\b[Hh]vornår rejser i\b"),
MyRegEx(@"\b[Hh]vornår rejste i\b"),
MyRegEx(@"\b[Hh]vornår skal i "),
MyRegEx(@"\b[Hh]vornår skulle i "),
MyRegEx(@"\b[Hh]ører i på\b"),
MyRegEx(@"\b[Hh]ørte i på\b"),
MyRegEx(@"\b[Hh]ører i,\b"),
MyRegEx(@"\b[Hh]ører i ikke\b"),
MyRegEx(@"\bi altid\b"),
MyRegEx(@"\bi ankomme\b"),
MyRegEx(@"\bi ankommer\b"),
@ -2770,7 +2770,7 @@ namespace Nikse.SubtitleEdit.Forms
MyRegEx(@"\bi må give\b"),
MyRegEx(@"\bi må da\b"),
MyRegEx(@"\bi nåede\b"),
MyRegEx(@"\bi når\b"),
MyRegEx(@"\bi når\b"),
MyRegEx(@"\bi prøve\b"),
MyRegEx(@"\bi prøvede\b"),
MyRegEx(@"\bi prøver\b"),
@ -2785,7 +2785,7 @@ namespace Nikse.SubtitleEdit.Forms
MyRegEx(@"\bi sikkert ikke vil\b"),
MyRegEx(@"\bi skal\b"),
MyRegEx(@"\bi skulle\b"),
MyRegEx(@"\bi små stakler\b"),
MyRegEx(@"\bi små stakler\b"),
MyRegEx(@"\bi stopper\b"),
MyRegEx(@"\bi synes\b"),
MyRegEx(@"\bi troede\b"),
@ -2794,14 +2794,14 @@ namespace Nikse.SubtitleEdit.Forms
MyRegEx(@"\bi vel ikke\b"),
MyRegEx(@"\bi vil\b"),
MyRegEx(@"\bi ville\b"),
MyRegEx(@"\b[Kk]an i lugte\b"),
MyRegEx(@"\b[Kk]an i overleve\b"),
MyRegEx(@"\b[Kk]an i spise\b"),
MyRegEx(@"\b[Kk]an i se\b"),
MyRegEx(@"\b[Kk]an i smage\b"),
MyRegEx(@"\b[Kk]an i forstå\b"),
MyRegEx(@"\b[Kk]ørte i hele\b"),
MyRegEx(@"\b[Kk]ørte i ikke\b"),
MyRegEx(@"\b[Kk]an i lugte\b"),
MyRegEx(@"\b[Kk]an i overleve\b"),
MyRegEx(@"\b[Kk]an i spise\b"),
MyRegEx(@"\b[Kk]an i se\b"),
MyRegEx(@"\b[Kk]an i smage\b"),
MyRegEx(@"\b[Kk]an i forstå\b"),
MyRegEx(@"\b[Kk]ørte i hele\b"),
MyRegEx(@"\b[Kk]ørte i ikke\b"),
MyRegEx(@"\b[Kk]an i godt\b"),
MyRegEx(@"\b[Kk]an i gøre\b"),
MyRegEx(@"\b[Kk]an i huske\b"),
@ -2832,32 +2832,32 @@ namespace Nikse.SubtitleEdit.Forms
MyRegEx(@"\b[Kk]unne i give\b"),
MyRegEx(@"\b[Kk]unne i gøre\b"),
MyRegEx(@"\b[Kk]unne i ikke\b"),
MyRegEx(@"\b[Kk]unne i lide\b"),
MyRegEx(@"\b[Kk]unne i mødes\b"),
MyRegEx(@"\b[Kk]unne i se\b"),
MyRegEx(@"\b[Ll]eder i efter\b"),
MyRegEx(@"\b[Ll]aver i ikke\b"),
MyRegEx(@"\blaver i her\b"),
MyRegEx(@"\b[Ll]igner i far\b"),
MyRegEx(@"\b[Ll]igner i hinanden\b"),
MyRegEx(@"\b[Ll]igner i mor\b"),
MyRegEx(@"\bLover i\b"),
MyRegEx(@"\b[Ll]ykkes i med\b"),
MyRegEx(@"\b[Ll]ykkedes i med\b"),
MyRegEx(@"\b[Ll]øb i hellere\b"),
MyRegEx(@"\b[Kk]unne i lide\b"),
MyRegEx(@"\b[Kk]unne i mødes\b"),
MyRegEx(@"\b[Kk]unne i se\b"),
MyRegEx(@"\b[Ll]eder i efter\b"),
MyRegEx(@"\b[Ll]aver i ikke\b"),
MyRegEx(@"\blaver i her\b"),
MyRegEx(@"\b[Ll]igner i far\b"),
MyRegEx(@"\b[Ll]igner i hinanden\b"),
MyRegEx(@"\b[Ll]igner i mor\b"),
MyRegEx(@"\bLover i\b"),
MyRegEx(@"\b[Ll]ykkes i med\b"),
MyRegEx(@"\b[Ll]ykkedes i med\b"),
MyRegEx(@"\b[Ll]øb i hellere\b"),
MyRegEx(@"\b[Mm]ødte i "),
MyRegEx(@"\b[Mm]angler i en\b"),
MyRegEx(@"\b[Mm]angler i en\b"),
MyRegEx(@"\b[Mm]en i gutter\b"),
MyRegEx(@"\b[Mm]en i drenge\b"),
MyRegEx(@"\b[Mm]en i fyre\b"),
MyRegEx(@"\b[Mm]en i står\b"),
MyRegEx(@"\b[Mm]en i står\b"),
MyRegEx(@"\b[Mm]ener i at\b"),
MyRegEx(@"\b[Mm]ener i det\b"),
MyRegEx(@"\b[Mm]ener i virkelig\b"),
MyRegEx(@"\b[Mm]ens i sov\b"),
MyRegEx(@"\b[Mm]ens i stadig\b"),
MyRegEx(@"\b[Mm]ens i lå\b"),
MyRegEx(@"\b[Mm]ister i point\b"),
MyRegEx(@"\b[Mm]ister i point\b"),
MyRegEx(@"\b[Mm]orer i jer\b"),
MyRegEx(@"\b[Mm]å i alle"),
MyRegEx(@"\b[Mm]å i gerne"),
@ -2878,47 +2878,47 @@ namespace Nikse.SubtitleEdit.Forms
MyRegEx(@"\b[Pp]å at i ikke\b"),
MyRegEx(@"\b[Ss]agde i ikke\b"),
MyRegEx(@"\b[Ss]amlede i ham\b"),
MyRegEx(@"\bSer i\b"),
MyRegEx(@"\bSiger i\b"),
MyRegEx(@"\bSer i\b"),
MyRegEx(@"\bSiger i\b"),
MyRegEx(@"\b[Ss]ikker på i ikke\b"),
MyRegEx(@"\b[Ss]ikre på i ikke\b"),
MyRegEx(@"\b[Ss]kal i alle\b"),
MyRegEx(@"\b[Ss]kal i allesammen\b"),
MyRegEx(@"\b[Ss]kal i begge dø\b"),
MyRegEx(@"\b[Ss]kal i bare\b"),
MyRegEx(@"\b[Ss]kal i dele\b"),
MyRegEx(@"\b[Ss]kal i dø\b"),
MyRegEx(@"\b[Ss]kal i fordele\b"),
MyRegEx(@"\b[Ss]kal i fordeles\b"),
MyRegEx(@"\b[Ss]kal i fortælle\b"),
MyRegEx(@"\b[Ss]kal i gøre\b"),
MyRegEx(@"\b[Ss]kal i have\b"),
MyRegEx(@"\b[Ss]kal i ikke\b"),
MyRegEx(@"\b[Ss]kal i klare\b"),
MyRegEx(@"\b[Ss]kal i klatre\b"),
MyRegEx(@"\b[Ss]kal i larme\b"),
MyRegEx(@"\b[Ss]kal i lave\b"),
MyRegEx(@"\b[Ss]kal i løfte\b"),
MyRegEx(@"\b[Ss]kal i med\b"),
MyRegEx(@"\b[Ss]kal i på\b"),
MyRegEx(@"\b[Ss]kal i til\b"),
MyRegEx(@"\b[Ss]kal i ud\b"),
MyRegEx(@"\b[Ss]lap i ud\b"),
MyRegEx(@"\b[Ss]lap i væk\b"),
MyRegEx(@"\b[Ss]nart er i\b"),
MyRegEx(@"\b[Ss]kal i alle\b"),
MyRegEx(@"\b[Ss]kal i allesammen\b"),
MyRegEx(@"\b[Ss]kal i begge dø\b"),
MyRegEx(@"\b[Ss]kal i bare\b"),
MyRegEx(@"\b[Ss]kal i dele\b"),
MyRegEx(@"\b[Ss]kal i dø\b"),
MyRegEx(@"\b[Ss]kal i fordele\b"),
MyRegEx(@"\b[Ss]kal i fordeles\b"),
MyRegEx(@"\b[Ss]kal i fortælle\b"),
MyRegEx(@"\b[Ss]kal i gøre\b"),
MyRegEx(@"\b[Ss]kal i have\b"),
MyRegEx(@"\b[Ss]kal i ikke\b"),
MyRegEx(@"\b[Ss]kal i klare\b"),
MyRegEx(@"\b[Ss]kal i klatre\b"),
MyRegEx(@"\b[Ss]kal i larme\b"),
MyRegEx(@"\b[Ss]kal i lave\b"),
MyRegEx(@"\b[Ss]kal i løfte\b"),
MyRegEx(@"\b[Ss]kal i med\b"),
MyRegEx(@"\b[Ss]kal i på\b"),
MyRegEx(@"\b[Ss]kal i til\b"),
MyRegEx(@"\b[Ss]kal i ud\b"),
MyRegEx(@"\b[Ss]lap i ud\b"),
MyRegEx(@"\b[Ss]lap i væk\b"),
MyRegEx(@"\b[Ss]nart er i\b"),
MyRegEx(@"\b[Ss]om i måske\b"),
MyRegEx(@"\b[Ss]om i nok\b"),
MyRegEx(@"\b[Ss]om i ved\b"),
MyRegEx(@"\b[Ss]pis i bare\b"),
MyRegEx(@"\b[Ss]pis i dem\b"),
MyRegEx(@"\b[Ss]pis i bare\b"),
MyRegEx(@"\b[Ss]pis i dem\b"),
MyRegEx(@"\b[Ss]ynes i at\b"),
MyRegEx(@"\b[Ss]ynes i det\b"),
MyRegEx(@"\b[Ss]ynes i,"),
MyRegEx(@"\b[Ss]ætter i en\b"),
MyRegEx(@"\bSå i at\b"),
MyRegEx(@"\bSå i det\b"),
MyRegEx(@"\bSå i noget\b"),
MyRegEx(@"\b[Ss]å tager i\b"),
MyRegEx(@"\b[Ss]ynes i,"),
MyRegEx(@"\b[Ss]ætter i en\b"),
MyRegEx(@"\bSå i at\b"),
MyRegEx(@"\bSå i det\b"),
MyRegEx(@"\bSå i noget\b"),
MyRegEx(@"\b[Ss]å tager i\b"),
MyRegEx(@"\bTænder i på\b"),
MyRegEx(@"\btænder i på\b"),
MyRegEx(@"\btog i bilen\b"),
@ -2943,11 +2943,11 @@ namespace Nikse.SubtitleEdit.Forms
MyRegEx(@"\b[Vv]ed i allesammen\b"),
MyRegEx(@"\b[Vv]ed i er\b"),
MyRegEx(@"\b[Vv]ed i ikke\b"),
MyRegEx(@"\b[Vv]ed i hvad\b"),
MyRegEx(@"\b[Vv]ed i hvem\b"),
MyRegEx(@"\b[Vv]ed i hvor\b"),
MyRegEx(@"\b[Vv]ed i hvorfor\b"),
MyRegEx(@"\b[Vv]ed i hvordan\b"),
MyRegEx(@"\b[Vv]ed i hvad\b"),
MyRegEx(@"\b[Vv]ed i hvem\b"),
MyRegEx(@"\b[Vv]ed i hvor\b"),
MyRegEx(@"\b[Vv]ed i hvorfor\b"),
MyRegEx(@"\b[Vv]ed i hvordan\b"),
MyRegEx(@"\b[Vv]ed i var\b"),
MyRegEx(@"\b[Vv]ed i ville\b"),
MyRegEx(@"\b[Vv]ed i har\b"),
@ -2959,7 +2959,7 @@ namespace Nikse.SubtitleEdit.Forms
MyRegEx(@"\b[Vv]ed i tror\b"),
MyRegEx(@"\b[Vv]enter i på\b"),
MyRegEx(@"\b[Vv]il i besegle\b"),
MyRegEx(@"\b[Vv]il i dræbe\b"),
MyRegEx(@"\b[Vv]il i dræbe\b"),
MyRegEx(@"\b[Vv]il i fjerne\b"),
MyRegEx(@"\b[Vv]il i fortryde\b"),
MyRegEx(@"\b[Vv]il i gerne\b"),
@ -3004,9 +3004,9 @@ namespace Nikse.SubtitleEdit.Forms
MyRegEx(@"\bville i være\b"),
MyRegEx(@"\bville i være\b"),
MyRegEx(@"\b[Vv]iste i, at\b"),
MyRegEx(@"\b[Vv]iste i at\b"),
MyRegEx(@"\bvover i\b"),
MyRegEx(@"\b[Vv]iste i at\b"),
MyRegEx(@"\bvover i\b"),
};
Regex regExIDag = new Regex(@"\bidag\b", RegexOptions.Compiled);
@ -3082,17 +3082,17 @@ namespace Nikse.SubtitleEdit.Forms
/// Will try to fix issues with Spanish special letters ¿? and ¡!.
/// Sentences ending with "?" must start with "¿".
/// Sentences ending with "!" must start with "¡".
/// </summary>
/// </summary>
private void FixSpanishInvertedQuestionAndExclamationMarks()
{
string fixAction = _language.FixSpanishInvertedQuestionAndExclamationMarks;
{
string fixAction = _language.FixSpanishInvertedQuestionAndExclamationMarks;
int fixCount = 0;
for (int i = 0; i < _subtitle.Paragraphs.Count; i++)
{
Paragraph p = _subtitle.Paragraphs[i];
Paragraph last = _subtitle.GetParagraphOrDefault(i - 1);
bool wasLastLineClosed = last == null || last.Text.EndsWith("?") || last.Text.EndsWith("!") || last.Text.EndsWith(".") ||
bool wasLastLineClosed = last == null || last.Text.EndsWith("?") || last.Text.EndsWith("!") || last.Text.EndsWith(".") ||
last.Text.EndsWith(":") || last.Text.EndsWith(")") || last.Text.EndsWith("]");
string trimmedStart = p.Text.TrimStart(("- ").ToCharArray());
if (last != null && last.Text.EndsWith("...") && trimmedStart.Length > 0 && trimmedStart[0].ToString() == trimmedStart[0].ToString().ToLower())
@ -3146,8 +3146,8 @@ namespace Nikse.SubtitleEdit.Forms
j--;
while (j > startIndex &&
(p.Text[j] != '.' || IsSpanishAbbreviation(p.Text, j)) &&
p.Text[j] != '!' &&
(p.Text[j] != '.' || IsSpanishAbbreviation(p.Text, j)) &&
p.Text[j] != '!' &&
p.Text[j] != '?' &&
!(j > 3 && p.Text.Substring(j - 3, 3) == Environment.NewLine + "-") &&
!(j > 4 && p.Text.Substring(j - 4, 4) == Environment.NewLine + " -") &&
@ -3225,7 +3225,7 @@ namespace Nikse.SubtitleEdit.Forms
{
if (text[index] != '.')
return false;
if (index +3 < text.Length && text[index+2] == '.') // X
return true; // O.R.
@ -3358,7 +3358,7 @@ namespace Nikse.SubtitleEdit.Forms
ce.UppercaseIInsideLowercaseWordTicked = listView1.Items[IndexUppercaseIInsideLowercaseWord].Checked;
ce.DoubleApostropheToQuoteTicked = listView1.Items[IndexDoubleApostropheToQuote].Checked;
ce.FixMusicNotationTicked = listView1.Items[IndexFixMusicNotation].Checked;
ce.FixMusicNotationTicked = listView1.Items[IndexFixMusicNotation].Checked;
ce.AddPeriodAfterParagraphTicked = listView1.Items[IndexAddPeriodAfterParagraph].Checked;
ce.StartWithUppercaseLetterAfterParagraphTicked = listView1.Items[IndexStartWithUppercaseLetterAfterParagraph].Checked;
ce.StartWithUppercaseLetterAfterPeriodInsideParagraphTicked = listView1.Items[IndexStartWithUppercaseLetterAfterPeriodInsideParagraph].Checked;
@ -3378,8 +3378,8 @@ namespace Nikse.SubtitleEdit.Forms
if (_spanishInvertedQuestionAndExclamationMarksIndex > -1)
ce.SpanishInvertedQuestionAndExclamationMarksTicked = listView1.Items[_spanishInvertedQuestionAndExclamationMarksIndex].Checked;
Configuration.Settings.Save();
}
@ -3439,11 +3439,11 @@ namespace Nikse.SubtitleEdit.Forms
Paragraph p = (Paragraph) listViewFixes.SelectedItems[0].Tag;
for (int i = 0; i < p.Number; i++)
{
if (_deleteIndices.Contains(i))
{
if (_deleteIndices.Contains(i))
addNumber++;
}
p = _originalSubtitle.GetFirstParagraphByLineNumber(p.Number+addNumber);
if (p != null)
{
@ -3598,12 +3598,12 @@ namespace Nikse.SubtitleEdit.Forms
UpdateOverlapErrors();
// update _subtitle + listview
// update _subtitle + listview
_originalSubtitle.Paragraphs[_subtitleListViewIndex].EndTime.TotalMilliseconds +=
(startTime.TotalMilliseconds - _originalSubtitle.Paragraphs[_subtitleListViewIndex].StartTime.TotalMilliseconds);
_originalSubtitle.Paragraphs[_subtitleListViewIndex].StartTime = startTime;
subtitleListView1.SetStartTime(_subtitleListViewIndex, _originalSubtitle.Paragraphs[_subtitleListViewIndex]);
}
}
}
private void UpdateListViewTextInfo(string text)

View File

@ -37,9 +37,9 @@
this.labelChooseLanguageAndClickDownload = new System.Windows.Forms.Label();
this.labelPleaseWait = new System.Windows.Forms.Label();
this.SuspendLayout();
//
//
// buttonOK
//
//
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK;
this.buttonOK.Location = new System.Drawing.Point(356, 159);
@ -48,18 +48,18 @@
this.buttonOK.TabIndex = 20;
this.buttonOK.Text = "&OK";
this.buttonOK.UseVisualStyleBackColor = true;
//
//
// labelDescription2
//
//
this.labelDescription2.AutoSize = true;
this.labelDescription2.Location = new System.Drawing.Point(30, 34);
this.labelDescription2.Name = "labelDescription2";
this.labelDescription2.Size = new System.Drawing.Size(263, 13);
this.labelDescription2.TabIndex = 1;
this.labelDescription2.Text = "uses the spell checking dictionaries from Open Office.";
//
//
// linkLabelOpenDictionaryFolder
//
//
this.linkLabelOpenDictionaryFolder.AutoSize = true;
this.linkLabelOpenDictionaryFolder.Location = new System.Drawing.Point(30, 164);
this.linkLabelOpenDictionaryFolder.Name = "linkLabelOpenDictionaryFolder";
@ -68,18 +68,18 @@
this.linkLabelOpenDictionaryFolder.TabStop = true;
this.linkLabelOpenDictionaryFolder.Text = "Open \'Dictionaries\' folder";
this.linkLabelOpenDictionaryFolder.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LinkLabel4LinkClicked);
//
//
// labelDescription1
//
//
this.labelDescription1.AutoSize = true;
this.labelDescription1.Location = new System.Drawing.Point(30, 16);
this.labelDescription1.Name = "labelDescription1";
this.labelDescription1.Size = new System.Drawing.Size(316, 13);
this.labelDescription1.TabIndex = 8;
this.labelDescription1.Text = "Subtitle Edit\'s spell check is based on the NHunspell engine which";
//
//
// comboBoxDictionaries
//
//
this.comboBoxDictionaries.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.comboBoxDictionaries.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
@ -89,9 +89,9 @@
this.comboBoxDictionaries.Size = new System.Drawing.Size(317, 21);
this.comboBoxDictionaries.TabIndex = 0;
this.comboBoxDictionaries.SelectedIndexChanged += new System.EventHandler(this.comboBoxDictionaries_SelectedIndexChanged);
//
//
// buttonDownload
//
//
this.buttonDownload.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonDownload.Location = new System.Drawing.Point(356, 97);
this.buttonDownload.Name = "buttonDownload";
@ -100,27 +100,27 @@
this.buttonDownload.Text = "&Download";
this.buttonDownload.UseVisualStyleBackColor = true;
this.buttonDownload.Click += new System.EventHandler(this.buttonDownload_Click);
//
//
// labelChooseLanguageAndClickDownload
//
//
this.labelChooseLanguageAndClickDownload.AutoSize = true;
this.labelChooseLanguageAndClickDownload.Location = new System.Drawing.Point(30, 79);
this.labelChooseLanguageAndClickDownload.Name = "labelChooseLanguageAndClickDownload";
this.labelChooseLanguageAndClickDownload.Size = new System.Drawing.Size(201, 13);
this.labelChooseLanguageAndClickDownload.TabIndex = 11;
this.labelChooseLanguageAndClickDownload.Text = "Choose your languge and click download";
//
//
// labelPleaseWait
//
//
this.labelPleaseWait.AutoSize = true;
this.labelPleaseWait.Location = new System.Drawing.Point(30, 126);
this.labelPleaseWait.Name = "labelPleaseWait";
this.labelPleaseWait.Size = new System.Drawing.Size(73, 13);
this.labelPleaseWait.TabIndex = 12;
this.labelPleaseWait.Text = "Please wait...";
//
//
// GetDictionaries
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(472, 195);

View File

@ -39,7 +39,7 @@ namespace Nikse.SubtitleEdit.Forms
_descriptions = new List<string>();
_xmlName = xmlRessourceName;
System.Reflection.Assembly asm = System.Reflection.Assembly.GetExecutingAssembly();
Stream strm = asm.GetManifestResourceStream(_xmlName);
Stream strm = asm.GetManifestResourceStream(_xmlName);
if (strm != null)
{
comboBoxDictionaries.Items.Clear();
@ -100,7 +100,7 @@ namespace Nikse.SubtitleEdit.Forms
private void LinkLabel3LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
System.Diagnostics.Process.Start("http://nhunspell.sourceforge.net/");
System.Diagnostics.Process.Start("http://nhunspell.sourceforge.net/");
}
private void LinkLabel4LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
@ -109,7 +109,7 @@ namespace Nikse.SubtitleEdit.Forms
if (!Directory.Exists(dictionaryFolder))
Directory.CreateDirectory(dictionaryFolder);
System.Diagnostics.Process.Start(dictionaryFolder);
System.Diagnostics.Process.Start(dictionaryFolder);
}
private void buttonDownload_Click(object sender, System.EventArgs e)
@ -139,7 +139,7 @@ namespace Nikse.SubtitleEdit.Forms
comboBoxDictionaries.Enabled = true;
Cursor = Cursors.Default;
MessageBox.Show(exception.Message + Environment.NewLine + Environment.NewLine + exception.StackTrace);
}
}
}
void wc_DownloadDataCompleted(object sender, DownloadDataCompletedEventArgs e)
@ -167,7 +167,7 @@ namespace Nikse.SubtitleEdit.Forms
Directory.CreateDirectory(dictionaryFolder);
int index = comboBoxDictionaries.SelectedIndex;
var ms = new MemoryStream(e.Result);
ZipExtractor zip = ZipExtractor.Open(ms);
@ -200,13 +200,13 @@ namespace Nikse.SubtitleEdit.Forms
buttonOK.Enabled = true;
buttonDownload.Enabled = true;
comboBoxDictionaries.Enabled = true;
MessageBox.Show(string.Format(Configuration.Settings.Language.GetDictionaries.XDownloaded, comboBoxDictionaries.Items[index]));
MessageBox.Show(string.Format(Configuration.Settings.Language.GetDictionaries.XDownloaded, comboBoxDictionaries.Items[index]));
}
private void comboBoxDictionaries_SelectedIndexChanged(object sender, EventArgs e)
{
int index = comboBoxDictionaries.SelectedIndex;
labelPleaseWait.Text = _descriptions[index];
labelPleaseWait.Text = _descriptions[index];
}
}

View File

@ -34,34 +34,34 @@
this.textBox1 = new System.Windows.Forms.TextBox();
this.buttonCancel = new System.Windows.Forms.Button();
this.SuspendLayout();
//
//
// labelGoToLine
//
//
resources.ApplyResources(this.labelGoToLine, "labelGoToLine");
this.labelGoToLine.Name = "labelGoToLine";
//
//
// buttonOK
//
//
resources.ApplyResources(this.buttonOK, "buttonOK");
this.buttonOK.Name = "buttonOK";
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.ButtonOkClick);
//
//
// textBox1
//
//
resources.ApplyResources(this.textBox1, "textBox1");
this.textBox1.Name = "textBox1";
this.textBox1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TextBox1KeyDown);
//
//
// buttonCancel
//
//
resources.ApplyResources(this.buttonCancel, "buttonCancel");
this.buttonCancel.Name = "buttonCancel";
this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.ButtonCancelClick);
//
//
// GoToLine
//
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.buttonCancel);

View File

@ -41,27 +41,27 @@
this.textBoxSourceText = new System.Windows.Forms.TextBox();
this.labelSourceText = new System.Windows.Forms.Label();
this.SuspendLayout();
//
//
// buttonMicrosoft
//
//
this.buttonMicrosoft.Location = new System.Drawing.Point(322, 164);
this.buttonMicrosoft.Name = "buttonMicrosoft";
this.buttonMicrosoft.Size = new System.Drawing.Size(304, 55);
this.buttonMicrosoft.TabIndex = 5;
this.buttonMicrosoft.UseVisualStyleBackColor = true;
this.buttonMicrosoft.Click += new System.EventHandler(this.buttonMicrosoft_Click);
//
//
// buttonGoogle
//
//
this.buttonGoogle.Location = new System.Drawing.Point(12, 164);
this.buttonGoogle.Name = "buttonGoogle";
this.buttonGoogle.Size = new System.Drawing.Size(304, 55);
this.buttonGoogle.TabIndex = 4;
this.buttonGoogle.UseVisualStyleBackColor = true;
this.buttonGoogle.Click += new System.EventHandler(this.buttonGoogle_Click);
//
//
// buttonCancel
//
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.Location = new System.Drawing.Point(551, 227);
@ -70,36 +70,36 @@
this.buttonCancel.TabIndex = 6;
this.buttonCancel.Text = "C&ancel";
this.buttonCancel.UseVisualStyleBackColor = true;
//
//
// labelGoogleTranslate
//
//
this.labelGoogleTranslate.AutoSize = true;
this.labelGoogleTranslate.Location = new System.Drawing.Point(14, 148);
this.labelGoogleTranslate.Name = "labelGoogleTranslate";
this.labelGoogleTranslate.Size = new System.Drawing.Size(84, 13);
this.labelGoogleTranslate.TabIndex = 20;
this.labelGoogleTranslate.Text = "Google translate";
//
//
// labelMicrosoftTranslate
//
//
this.labelMicrosoftTranslate.AutoSize = true;
this.labelMicrosoftTranslate.Location = new System.Drawing.Point(319, 148);
this.labelMicrosoftTranslate.Name = "labelMicrosoftTranslate";
this.labelMicrosoftTranslate.Size = new System.Drawing.Size(93, 13);
this.labelMicrosoftTranslate.TabIndex = 21;
this.labelMicrosoftTranslate.Text = "Microsoft translate";
//
//
// comboBoxFrom
//
//
this.comboBoxFrom.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxFrom.FormattingEnabled = true;
this.comboBoxFrom.Location = new System.Drawing.Point(256, 12);
this.comboBoxFrom.Name = "comboBoxFrom";
this.comboBoxFrom.Size = new System.Drawing.Size(121, 21);
this.comboBoxFrom.TabIndex = 0;
//
//
// buttonTranslate
//
//
this.buttonTranslate.Location = new System.Drawing.Point(553, 12);
this.buttonTranslate.Name = "buttonTranslate";
this.buttonTranslate.Size = new System.Drawing.Size(75, 21);
@ -107,53 +107,53 @@
this.buttonTranslate.Text = "Translate";
this.buttonTranslate.UseVisualStyleBackColor = true;
this.buttonTranslate.Click += new System.EventHandler(this.buttonTranslate_Click);
//
//
// labelTo
//
//
this.labelTo.AutoSize = true;
this.labelTo.Location = new System.Drawing.Point(397, 15);
this.labelTo.Name = "labelTo";
this.labelTo.Size = new System.Drawing.Size(23, 13);
this.labelTo.TabIndex = 25;
this.labelTo.Text = "To:";
//
//
// comboBoxTo
//
//
this.comboBoxTo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxTo.FormattingEnabled = true;
this.comboBoxTo.Location = new System.Drawing.Point(426, 12);
this.comboBoxTo.Name = "comboBoxTo";
this.comboBoxTo.Size = new System.Drawing.Size(121, 21);
this.comboBoxTo.TabIndex = 1;
//
//
// labelFrom
//
//
this.labelFrom.AutoSize = true;
this.labelFrom.Location = new System.Drawing.Point(214, 19);
this.labelFrom.Name = "labelFrom";
this.labelFrom.Size = new System.Drawing.Size(33, 13);
this.labelFrom.TabIndex = 23;
this.labelFrom.Text = "From:";
//
//
// textBoxSourceText
//
//
this.textBoxSourceText.Location = new System.Drawing.Point(17, 71);
this.textBoxSourceText.Multiline = true;
this.textBoxSourceText.Name = "textBoxSourceText";
this.textBoxSourceText.Size = new System.Drawing.Size(299, 53);
this.textBoxSourceText.TabIndex = 3;
//
//
// labelSourceText
//
//
this.labelSourceText.AutoSize = true;
this.labelSourceText.Location = new System.Drawing.Point(14, 55);
this.labelSourceText.Name = "labelSourceText";
this.labelSourceText.Size = new System.Drawing.Size(61, 13);
this.labelSourceText.TabIndex = 28;
this.labelSourceText.Text = "Source text";
//
//
// GoogleOrMicrosoftTranslate
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(638, 260);

View File

@ -48,7 +48,7 @@ namespace Nikse.SubtitleEdit.Forms
Nikse.SubtitleEdit.Forms.GoogleTranslate.ComboBoxItem item = (Nikse.SubtitleEdit.Forms.GoogleTranslate.ComboBoxItem)comboBox.Items[i];
if (item.Value != FixMsLocale(item.Value))
comboBox.Items.RemoveAt(i);
}
}
}
internal void InitializeFromLanguage(string defaultFromLanguage, string defaultToLanguage)
@ -87,7 +87,7 @@ namespace Nikse.SubtitleEdit.Forms
}
private void GoogleOrMicrosoftTranslate_Shown(object sender, EventArgs e)
{
{
Refresh();
Translate();
}

View File

@ -43,45 +43,45 @@ namespace Nikse.SubtitleEdit.Forms
this.subtitleListViewTo = new Nikse.SubtitleEdit.Controls.SubtitleListView();
this.subtitleListViewFrom = new Nikse.SubtitleEdit.Controls.SubtitleListView();
this.SuspendLayout();
//
//
// comboBoxFrom
//
//
this.comboBoxFrom.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxFrom.FormattingEnabled = true;
this.comboBoxFrom.Location = new System.Drawing.Point(327, 34);
this.comboBoxFrom.Name = "comboBoxFrom";
this.comboBoxFrom.Size = new System.Drawing.Size(121, 21);
this.comboBoxFrom.TabIndex = 0;
//
//
// labelFrom
//
//
this.labelFrom.AutoSize = true;
this.labelFrom.Location = new System.Drawing.Point(285, 41);
this.labelFrom.Name = "labelFrom";
this.labelFrom.Size = new System.Drawing.Size(35, 13);
this.labelFrom.TabIndex = 1;
this.labelFrom.Text = "From:";
//
//
// labelTo
//
//
this.labelTo.AutoSize = true;
this.labelTo.Location = new System.Drawing.Point(468, 37);
this.labelTo.Name = "labelTo";
this.labelTo.Size = new System.Drawing.Size(23, 13);
this.labelTo.TabIndex = 4;
this.labelTo.Text = "To:";
//
//
// comboBoxTo
//
//
this.comboBoxTo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxTo.FormattingEnabled = true;
this.comboBoxTo.Location = new System.Drawing.Point(497, 34);
this.comboBoxTo.Name = "comboBoxTo";
this.comboBoxTo.Size = new System.Drawing.Size(121, 21);
this.comboBoxTo.TabIndex = 3;
//
//
// buttonTranslate
//
//
this.buttonTranslate.Location = new System.Drawing.Point(624, 34);
this.buttonTranslate.Name = "buttonTranslate";
this.buttonTranslate.Size = new System.Drawing.Size(75, 21);
@ -89,9 +89,9 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonTranslate.Text = "Translate";
this.buttonTranslate.UseVisualStyleBackColor = true;
this.buttonTranslate.Click += new System.EventHandler(this.buttonTranslate_Click);
//
//
// buttonOK
//
//
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonOK.Location = new System.Drawing.Point(754, 529);
this.buttonOK.Name = "buttonOK";
@ -100,9 +100,9 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonOK.Text = "&OK";
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.ButtonOkClick);
//
//
// buttonCancel
//
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.Location = new System.Drawing.Point(835, 529);
@ -111,9 +111,9 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonCancel.TabIndex = 7;
this.buttonCancel.Text = "C&ancel";
this.buttonCancel.UseVisualStyleBackColor = true;
//
//
// linkLabelPoweredByGoogleTranslate
//
//
this.linkLabelPoweredByGoogleTranslate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.linkLabelPoweredByGoogleTranslate.AutoSize = true;
this.linkLabelPoweredByGoogleTranslate.Location = new System.Drawing.Point(15, 529);
@ -123,25 +123,25 @@ namespace Nikse.SubtitleEdit.Forms
this.linkLabelPoweredByGoogleTranslate.TabStop = true;
this.linkLabelPoweredByGoogleTranslate.Text = "Powered by Google translate";
this.linkLabelPoweredByGoogleTranslate.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LinkLabel1LinkClicked);
//
//
// labelPleaseWait
//
//
this.labelPleaseWait.AutoSize = true;
this.labelPleaseWait.Location = new System.Drawing.Point(703, 23);
this.labelPleaseWait.Name = "labelPleaseWait";
this.labelPleaseWait.Size = new System.Drawing.Size(176, 13);
this.labelPleaseWait.TabIndex = 10;
this.labelPleaseWait.Text = "Please wait... this may take a while";
//
//
// progressBar1
//
//
this.progressBar1.Location = new System.Drawing.Point(705, 39);
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(192, 16);
this.progressBar1.TabIndex = 11;
//
//
// subtitleListViewTo
//
//
this.subtitleListViewTo.DisplayExtraFromExtra = false;
this.subtitleListViewTo.FirstVisibleIndex = -1;
this.subtitleListViewTo.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
@ -156,9 +156,9 @@ namespace Nikse.SubtitleEdit.Forms
this.subtitleListViewTo.View = System.Windows.Forms.View.Details;
this.subtitleListViewTo.Click += new System.EventHandler(this.subtitleListViewTo_DoubleClick);
this.subtitleListViewTo.DoubleClick += new System.EventHandler(this.subtitleListViewTo_DoubleClick);
//
//
// subtitleListViewFrom
//
//
this.subtitleListViewFrom.DisplayExtraFromExtra = false;
this.subtitleListViewFrom.FirstVisibleIndex = -1;
this.subtitleListViewFrom.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
@ -173,9 +173,9 @@ namespace Nikse.SubtitleEdit.Forms
this.subtitleListViewFrom.View = System.Windows.Forms.View.Details;
this.subtitleListViewFrom.Click += new System.EventHandler(this.subtitleListViewFrom_DoubleClick);
this.subtitleListViewFrom.DoubleClick += new System.EventHandler(this.subtitleListViewFrom_DoubleClick);
//
//
// GoogleTranslate
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(925, 558);

View File

@ -32,7 +32,7 @@ namespace Nikse.SubtitleEdit.Forms
if (text.Length > 1)
text = text.Substring(0, 1).ToUpper() + text.Substring(1).ToLower();
Text = text;
Value = value;
}
@ -222,7 +222,7 @@ namespace Nikse.SubtitleEdit.Forms
}
private void FillTranslatedText(string translatedText, int start, int end)
{
{
List<string> lines = new List<string>();
foreach (string s in translatedText.Split(new string[] { "|" }, StringSplitOptions.None))
lines.Add(s);
@ -336,7 +336,7 @@ namespace Nikse.SubtitleEdit.Forms
{
string key = "<p style";
while (test.Contains(key))
{
{
int startPosition = test.IndexOf(key);
int endPosition = test.IndexOf(">", startPosition + key.Length);
if (endPosition == -1)
@ -362,7 +362,7 @@ namespace Nikse.SubtitleEdit.Forms
//string url = String.Format("http://www.google.com/translate_t?hl=en&ie=UTF8&text={0}&langpair={1}", HttpUtility.UrlEncode(input), languagePair);
string url = String.Format("http://translate.google.com/?hl=en&eotf=1&sl={0}&tl={1}&q={2}", languagePair.Substring(0, 2), languagePair.Substring(3), HttpUtility.UrlEncode(input));
WebClient webClient = new WebClient();
webClient.Proxy = Utilities.GetProxy();
webClient.Encoding = System.Text.Encoding.Default;
@ -417,7 +417,7 @@ namespace Nikse.SubtitleEdit.Forms
if (end > 0)
{
res = res.Substring(0, end);
}
}
return res;
}
@ -428,7 +428,7 @@ namespace Nikse.SubtitleEdit.Forms
if (comboBox == comboBoxTo)
{
foreach (ComboBoxItem item in comboBoxFrom.Items)
{
{
comboBoxTo.Items.Add(new ComboBoxItem(item.Text, item.Value));
}
return;
@ -710,7 +710,7 @@ namespace Nikse.SubtitleEdit.Forms
s = s.Replace(" gonna ", " ville ");
s = s.Replace("Gonna ", "Vil ");
s = s.Replace("Ked af.", "Undskyld.");
s = s.Replace("Ked af.", "Undskyld.");
}
return s;
}

View File

@ -58,9 +58,9 @@
this.groupBoxSplitting.SuspendLayout();
this.groupBoxImportResult.SuspendLayout();
this.SuspendLayout();
//
//
// buttonOpenText
//
//
this.buttonOpenText.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonOpenText.Location = new System.Drawing.Point(358, 19);
this.buttonOpenText.Name = "buttonOpenText";
@ -69,10 +69,10 @@
this.buttonOpenText.Text = "Open file...";
this.buttonOpenText.UseVisualStyleBackColor = true;
this.buttonOpenText.Click += new System.EventHandler(this.buttonOpenText_Click);
//
//
// groupBoxImportText
//
this.groupBoxImportText.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
//
this.groupBoxImportText.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBoxImportText.Controls.Add(this.textBoxText);
this.groupBoxImportText.Controls.Add(this.buttonOpenText);
@ -82,11 +82,11 @@
this.groupBoxImportText.TabIndex = 13;
this.groupBoxImportText.TabStop = false;
this.groupBoxImportText.Text = "Import text";
//
//
// textBoxText
//
//
this.textBoxText.AllowDrop = true;
this.textBoxText.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
this.textBoxText.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.textBoxText.Location = new System.Drawing.Point(6, 48);
this.textBoxText.MaxLength = 232767;
@ -98,9 +98,9 @@
this.textBoxText.TextChanged += new System.EventHandler(this.textBoxText_TextChanged);
this.textBoxText.DragDrop += new System.Windows.Forms.DragEventHandler(this.textBoxText_DragDrop);
this.textBoxText.DragEnter += new System.Windows.Forms.DragEventHandler(this.textBoxText_DragEnter);
//
//
// groupBoxImportOptions
//
//
this.groupBoxImportOptions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.groupBoxImportOptions.Controls.Add(this.checkBoxMergeShortLines);
this.groupBoxImportOptions.Controls.Add(this.groupBoxDuration);
@ -116,9 +116,9 @@
this.groupBoxImportOptions.TabIndex = 14;
this.groupBoxImportOptions.TabStop = false;
this.groupBoxImportOptions.Text = "Import options";
//
//
// checkBoxMergeShortLines
//
//
this.checkBoxMergeShortLines.AutoSize = true;
this.checkBoxMergeShortLines.Checked = true;
this.checkBoxMergeShortLines.CheckState = System.Windows.Forms.CheckState.Checked;
@ -129,9 +129,9 @@
this.checkBoxMergeShortLines.Text = "Merge short lines with continuation";
this.checkBoxMergeShortLines.UseVisualStyleBackColor = true;
this.checkBoxMergeShortLines.CheckedChanged += new System.EventHandler(this.checkBoxMergeShortLines_CheckedChanged);
//
//
// groupBoxDuration
//
//
this.groupBoxDuration.Controls.Add(this.numericUpDownDurationFixed);
this.groupBoxDuration.Controls.Add(this.radioButtonDurationFixed);
this.groupBoxDuration.Controls.Add(this.radioButtonDurationAuto);
@ -141,9 +141,9 @@
this.groupBoxDuration.TabIndex = 39;
this.groupBoxDuration.TabStop = false;
this.groupBoxDuration.Text = "Duration";
//
//
// numericUpDownDurationFixed
//
//
this.numericUpDownDurationFixed.Location = new System.Drawing.Point(111, 42);
this.numericUpDownDurationFixed.Maximum = new decimal(new int[] {
10000,
@ -163,9 +163,9 @@
0,
0,
0});
//
//
// radioButtonDurationFixed
//
//
this.radioButtonDurationFixed.AutoSize = true;
this.radioButtonDurationFixed.Location = new System.Drawing.Point(16, 42);
this.radioButtonDurationFixed.Name = "radioButtonDurationFixed";
@ -174,9 +174,9 @@
this.radioButtonDurationFixed.Text = "Fixed";
this.radioButtonDurationFixed.UseVisualStyleBackColor = true;
this.radioButtonDurationFixed.CheckedChanged += new System.EventHandler(this.radioButtonDurationFixed_CheckedChanged);
//
//
// radioButtonDurationAuto
//
//
this.radioButtonDurationAuto.AutoSize = true;
this.radioButtonDurationAuto.Checked = true;
this.radioButtonDurationAuto.Location = new System.Drawing.Point(16, 19);
@ -186,9 +186,9 @@
this.radioButtonDurationAuto.TabStop = true;
this.radioButtonDurationAuto.Text = "Auto";
this.radioButtonDurationAuto.UseVisualStyleBackColor = true;
//
//
// buttonRefresh
//
//
this.buttonRefresh.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonRefresh.Location = new System.Drawing.Point(11, 299);
this.buttonRefresh.Name = "buttonRefresh";
@ -197,9 +197,9 @@
this.buttonRefresh.Text = "Refresh";
this.buttonRefresh.UseVisualStyleBackColor = true;
this.buttonRefresh.Click += new System.EventHandler(this.buttonRefresh_Click);
//
//
// numericUpDownGapBetweenLines
//
//
this.numericUpDownGapBetweenLines.Location = new System.Drawing.Point(19, 192);
this.numericUpDownGapBetweenLines.Maximum = new decimal(new int[] {
10000,
@ -219,18 +219,18 @@
0,
0,
0});
//
//
// labelGapBetweenSubtitles
//
//
this.labelGapBetweenSubtitles.AutoSize = true;
this.labelGapBetweenSubtitles.Location = new System.Drawing.Point(19, 175);
this.labelGapBetweenSubtitles.Name = "labelGapBetweenSubtitles";
this.labelGapBetweenSubtitles.Size = new System.Drawing.Size(180, 13);
this.labelGapBetweenSubtitles.TabIndex = 37;
this.labelGapBetweenSubtitles.Text = "Gap between subtitles (milliseconds)";
//
//
// checkBoxRemoveLinesWithoutLetters
//
//
this.checkBoxRemoveLinesWithoutLetters.AutoSize = true;
this.checkBoxRemoveLinesWithoutLetters.Checked = true;
this.checkBoxRemoveLinesWithoutLetters.CheckState = System.Windows.Forms.CheckState.Checked;
@ -241,9 +241,9 @@
this.checkBoxRemoveLinesWithoutLetters.Text = "Remove lines without letters";
this.checkBoxRemoveLinesWithoutLetters.UseVisualStyleBackColor = true;
this.checkBoxRemoveLinesWithoutLetters.CheckedChanged += new System.EventHandler(this.checkBoxRemoveLinesWithoutLettersOrNumbers_CheckedChanged);
//
//
// groupBoxSplitting
//
//
this.groupBoxSplitting.Controls.Add(this.radioButtonAutoSplit);
this.groupBoxSplitting.Controls.Add(this.radioButtonLineMode);
this.groupBoxSplitting.Location = new System.Drawing.Point(6, 19);
@ -252,9 +252,9 @@
this.groupBoxSplitting.TabIndex = 4;
this.groupBoxSplitting.TabStop = false;
this.groupBoxSplitting.Text = "Splitting";
//
//
// radioButtonAutoSplit
//
//
this.radioButtonAutoSplit.AutoSize = true;
this.radioButtonAutoSplit.Checked = true;
this.radioButtonAutoSplit.Location = new System.Drawing.Point(14, 19);
@ -265,9 +265,9 @@
this.radioButtonAutoSplit.Text = "Auto split text";
this.radioButtonAutoSplit.UseVisualStyleBackColor = true;
this.radioButtonAutoSplit.CheckedChanged += new System.EventHandler(this.radioButtonAutoSplit_CheckedChanged);
//
//
// radioButtonLineMode
//
//
this.radioButtonLineMode.AutoSize = true;
this.radioButtonLineMode.Location = new System.Drawing.Point(14, 42);
this.radioButtonLineMode.Name = "radioButtonLineMode";
@ -276,9 +276,9 @@
this.radioButtonLineMode.Text = "One line is one subtitle";
this.radioButtonLineMode.UseVisualStyleBackColor = true;
this.radioButtonLineMode.CheckedChanged += new System.EventHandler(this.radioButtonLineMode_CheckedChanged);
//
//
// checkBoxRemoveEmptyLines
//
//
this.checkBoxRemoveEmptyLines.AutoSize = true;
this.checkBoxRemoveEmptyLines.Checked = true;
this.checkBoxRemoveEmptyLines.CheckState = System.Windows.Forms.CheckState.Checked;
@ -289,11 +289,11 @@
this.checkBoxRemoveEmptyLines.Text = "Remove empty lines";
this.checkBoxRemoveEmptyLines.UseVisualStyleBackColor = true;
this.checkBoxRemoveEmptyLines.CheckedChanged += new System.EventHandler(this.checkBoxRemoveEmptyLines_CheckedChanged);
//
//
// groupBoxImportResult
//
this.groupBoxImportResult.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
//
this.groupBoxImportResult.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.groupBoxImportResult.Controls.Add(this.SubtitleListview1);
this.groupBoxImportResult.Location = new System.Drawing.Point(12, 344);
@ -302,12 +302,12 @@
this.groupBoxImportResult.TabIndex = 15;
this.groupBoxImportResult.TabStop = false;
this.groupBoxImportResult.Text = "Preview";
//
//
// SubtitleListview1
//
//
this.SubtitleListview1.AllowDrop = true;
this.SubtitleListview1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
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.FirstVisibleIndex = -1;
this.SubtitleListview1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
@ -321,13 +321,13 @@
this.SubtitleListview1.TabIndex = 12;
this.SubtitleListview1.UseCompatibleStateImageBehavior = false;
this.SubtitleListview1.View = System.Windows.Forms.View.Details;
//
//
// openFileDialog1
//
//
this.openFileDialog1.FileName = "openFileDialog1";
//
//
// buttonCancel
//
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonCancel.Location = new System.Drawing.Point(754, 579);
@ -337,9 +337,9 @@
this.buttonCancel.Text = "C&ancel";
this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
//
//
// buttonOK
//
//
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonOK.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonOK.Location = new System.Drawing.Point(673, 579);
@ -349,9 +349,9 @@
this.buttonOK.Text = "&Next >";
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
//
//
// ImportText
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(847, 616);

View File

@ -87,7 +87,7 @@ namespace Nikse.SubtitleEdit.Forms
_subtitle.Renumber(1);
FixDurations();
MakePseudoStartTime();
groupBoxImportResult.Text = string.Format(Configuration.Settings.Language.ImportText.PreviewLinesModifiedX, _subtitle.Paragraphs.Count);
SubtitleListview1.Fill(_subtitle);
if (_subtitle.Paragraphs.Count > 0)
@ -172,7 +172,7 @@ namespace Nikse.SubtitleEdit.Forms
private void ImportLineMode(IEnumerable<string> lines)
{
foreach (string line in lines)
{
{
if (line.Trim().Length == 0)
{
if (!checkBoxRemoveEmptyLines.Checked)
@ -186,7 +186,7 @@ namespace Nikse.SubtitleEdit.Forms
else
{
_subtitle.Paragraphs.Add(new Paragraph(0, 0, line.Trim()));
}
}
}
}
@ -252,7 +252,7 @@ namespace Nikse.SubtitleEdit.Forms
{
string letterList = Utilities.GetLetters(true, true, false);
foreach (char ch in line.ToCharArray())
{
{
if (letterList.Contains(ch.ToString()))
return true;
}
@ -274,7 +274,7 @@ namespace Nikse.SubtitleEdit.Forms
private void checkBoxRemoveLinesWithoutLettersOrNumbers_CheckedChanged(object sender, EventArgs e)
{
GeneratePreview();
GeneratePreview();
}
private void checkBoxRemoveEmptyLines_CheckedChanged(object sender, EventArgs e)
@ -335,10 +335,10 @@ namespace Nikse.SubtitleEdit.Forms
XmlDocument doc = new XmlDocument();
doc.Load(fileName);
foreach (XmlNode node in doc.DocumentElement.SelectNodes("//paragraph[@element='Dialog']")) // <paragraph objID="1:28" element="Dialog">
{
{
XmlNode textRun = node.SelectSingleNode("textRun"); // <textRun objID="1:259">Yeah...I suppose</textRun>
if (textRun != null)
sb.AppendLine(textRun.InnerText);
sb.AppendLine(textRun.InnerText);
}
textBoxText.Text = sb.ToString();
SetVideoFileName(fileName);

View File

@ -37,9 +37,9 @@
this.buttonOK = new System.Windows.Forms.Button();
this.groupBoxNamesIgonoreLists.SuspendLayout();
this.SuspendLayout();
//
//
// groupBoxNamesIgonoreLists
//
//
this.groupBoxNamesIgonoreLists.Controls.Add(this.buttonRemove);
this.groupBoxNamesIgonoreLists.Controls.Add(this.listBoxInterjections);
this.groupBoxNamesIgonoreLists.Controls.Add(this.textBoxInterjection);
@ -49,9 +49,9 @@
this.groupBoxNamesIgonoreLists.Size = new System.Drawing.Size(241, 250);
this.groupBoxNamesIgonoreLists.TabIndex = 3;
this.groupBoxNamesIgonoreLists.TabStop = false;
//
//
// buttonRemove
//
//
this.buttonRemove.Location = new System.Drawing.Point(159, 16);
this.buttonRemove.Name = "buttonRemove";
this.buttonRemove.Size = new System.Drawing.Size(75, 21);
@ -59,26 +59,26 @@
this.buttonRemove.Text = "Remove";
this.buttonRemove.UseVisualStyleBackColor = true;
this.buttonRemove.Click += new System.EventHandler(this.buttonRemove_Click);
//
//
// listBoxInterjections
//
//
this.listBoxInterjections.FormattingEnabled = true;
this.listBoxInterjections.Location = new System.Drawing.Point(3, 16);
this.listBoxInterjections.Name = "listBoxInterjections";
this.listBoxInterjections.Size = new System.Drawing.Size(150, 199);
this.listBoxInterjections.TabIndex = 20;
this.listBoxInterjections.SelectedIndexChanged += new System.EventHandler(this.listBoxInterjections_SelectedIndexChanged);
//
//
// textBoxInterjection
//
//
this.textBoxInterjection.Location = new System.Drawing.Point(2, 220);
this.textBoxInterjection.Name = "textBoxInterjection";
this.textBoxInterjection.Size = new System.Drawing.Size(151, 20);
this.textBoxInterjection.TabIndex = 24;
this.textBoxInterjection.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBoxInterjection_KeyDown);
//
//
// buttonAdd
//
//
this.buttonAdd.Location = new System.Drawing.Point(159, 219);
this.buttonAdd.Name = "buttonAdd";
this.buttonAdd.Size = new System.Drawing.Size(75, 21);
@ -86,9 +86,9 @@
this.buttonAdd.Text = "Add";
this.buttonAdd.UseVisualStyleBackColor = true;
this.buttonAdd.Click += new System.EventHandler(this.buttonAdd_Click);
//
//
// buttonCancel
//
//
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.Location = new System.Drawing.Point(178, 281);
this.buttonCancel.Name = "buttonCancel";
@ -96,9 +96,9 @@
this.buttonCancel.TabIndex = 5;
this.buttonCancel.Text = "C&ancel";
this.buttonCancel.UseVisualStyleBackColor = true;
//
//
// buttonOK
//
//
this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK;
this.buttonOK.Location = new System.Drawing.Point(99, 281);
this.buttonOK.Name = "buttonOK";
@ -106,9 +106,9 @@
this.buttonOK.TabIndex = 4;
this.buttonOK.Text = "&OK";
this.buttonOK.UseVisualStyleBackColor = true;
//
//
// Interjections
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(268, 315);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -33,9 +33,9 @@
this.listBox1 = new System.Windows.Forms.ListBox();
this.labelChoose = new System.Windows.Forms.Label();
this.SuspendLayout();
//
//
// buttonCancel
//
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.BackColor = System.Drawing.SystemColors.Control;
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
@ -45,9 +45,9 @@
this.buttonCancel.TabIndex = 46;
this.buttonCancel.Text = "C&ancel";
this.buttonCancel.UseVisualStyleBackColor = false;
//
//
// buttonOK
//
//
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonOK.Location = new System.Drawing.Point(281, 250);
this.buttonOK.Name = "buttonOK";
@ -56,11 +56,11 @@
this.buttonOK.Text = "OK";
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.ButtonOkClick);
//
//
// listBox1
//
this.listBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
//
this.listBox1.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.listBox1.FormattingEnabled = true;
this.listBox1.Location = new System.Drawing.Point(12, 43);
@ -68,18 +68,18 @@
this.listBox1.Size = new System.Drawing.Size(425, 199);
this.listBox1.TabIndex = 47;
this.listBox1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.listBox1_MouseDoubleClick);
//
//
// labelChoose
//
//
this.labelChoose.AutoSize = true;
this.labelChoose.Location = new System.Drawing.Point(9, 20);
this.labelChoose.Name = "labelChoose";
this.labelChoose.Size = new System.Drawing.Size(224, 13);
this.labelChoose.TabIndex = 48;
this.labelChoose.Text = "More than one subtitle found - please choose";
//
//
// MatroskaSubtitleChooser
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(450, 277);

View File

@ -56,8 +56,8 @@ namespace Nikse.SubtitleEdit.Forms
i++;
string handler = track.Mdia.HandlerName;
if (handler != null && handler.Length > 1)
handler = " - " + handler;
string s = string.Format("{0}: {1} - {2}{3}", i, track.Mdia.Mdhd.Iso639ThreeLetterCode, track.Mdia.Mdhd.LanguageString, handler);
handler = " - " + handler;
string s = string.Format("{0}: {1} - {2}{3}", i, track.Mdia.Mdhd.Iso639ThreeLetterCode, track.Mdia.Mdhd.LanguageString, handler);
listBox1.Items.Add(s);
}
listBox1.SelectedIndex = 0;

View File

@ -47,9 +47,9 @@ namespace Nikse.SubtitleEdit.Forms
((System.ComponentModel.ISupportInitialize)(this.numericUpDownMaxMillisecondsBetweenLines)).BeginInit();
this.groupBoxLinesFound.SuspendLayout();
this.SuspendLayout();
//
//
// buttonOK
//
//
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonOK.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonOK.Location = new System.Drawing.Point(608, 562);
@ -59,9 +59,9 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonOK.Text = "&OK";
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.ButtonOkClick);
//
//
// buttonCancel
//
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.ImeMode = System.Windows.Forms.ImeMode.NoControl;
@ -72,9 +72,9 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonCancel.Text = "C&ancel";
this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.ButtonCancelClick);
//
//
// numericUpDownMaxCharacters
//
//
this.numericUpDownMaxCharacters.Location = new System.Drawing.Point(190, 27);
this.numericUpDownMaxCharacters.Maximum = new decimal(new int[] {
200,
@ -95,27 +95,27 @@ namespace Nikse.SubtitleEdit.Forms
0,
0});
this.numericUpDownMaxCharacters.ValueChanged += new System.EventHandler(this.NumericUpDownMaxCharactersValueChanged);
//
//
// labelMaxCharacters
//
//
this.labelMaxCharacters.AutoSize = true;
this.labelMaxCharacters.Location = new System.Drawing.Point(187, 9);
this.labelMaxCharacters.Name = "labelMaxCharacters";
this.labelMaxCharacters.Size = new System.Drawing.Size(190, 13);
this.labelMaxCharacters.TabIndex = 32;
this.labelMaxCharacters.Text = "Maximum characters in one paragraph";
//
//
// labelMaxMillisecondsBetweenLines
//
//
this.labelMaxMillisecondsBetweenLines.AutoSize = true;
this.labelMaxMillisecondsBetweenLines.Location = new System.Drawing.Point(483, 9);
this.labelMaxMillisecondsBetweenLines.Name = "labelMaxMillisecondsBetweenLines";
this.labelMaxMillisecondsBetweenLines.Size = new System.Drawing.Size(178, 13);
this.labelMaxMillisecondsBetweenLines.TabIndex = 33;
this.labelMaxMillisecondsBetweenLines.Text = "Maximum milliseconds between lines";
//
//
// numericUpDownMaxMillisecondsBetweenLines
//
//
this.numericUpDownMaxMillisecondsBetweenLines.Location = new System.Drawing.Point(486, 26);
this.numericUpDownMaxMillisecondsBetweenLines.Maximum = new decimal(new int[] {
2000,
@ -136,10 +136,10 @@ namespace Nikse.SubtitleEdit.Forms
0,
0});
this.numericUpDownMaxMillisecondsBetweenLines.ValueChanged += new System.EventHandler(this.NumericUpDownMaxMillisecondsBetweenLinesValueChanged);
//
//
// groupBoxLinesFound
//
this.groupBoxLinesFound.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
//
this.groupBoxLinesFound.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBoxLinesFound.Controls.Add(this.listViewFixes);
this.groupBoxLinesFound.Location = new System.Drawing.Point(13, 68);
@ -148,10 +148,10 @@ namespace Nikse.SubtitleEdit.Forms
this.groupBoxLinesFound.TabIndex = 36;
this.groupBoxLinesFound.TabStop = false;
this.groupBoxLinesFound.Text = "Lines that will be merged";
//
//
// listViewFixes
//
this.listViewFixes.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
//
this.listViewFixes.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.listViewFixes.CheckBoxes = true;
this.listViewFixes.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
@ -166,24 +166,24 @@ namespace Nikse.SubtitleEdit.Forms
this.listViewFixes.UseCompatibleStateImageBehavior = false;
this.listViewFixes.View = System.Windows.Forms.View.Details;
this.listViewFixes.SelectedIndexChanged += new System.EventHandler(this.listViewFixes_SelectedIndexChanged);
//
//
// columnHeader4
//
//
this.columnHeader4.Text = "Apply";
this.columnHeader4.Width = 45;
//
//
// columnHeader5
//
//
this.columnHeader5.Text = "Line#";
this.columnHeader5.Width = 122;
//
//
// columnHeader7
//
//
this.columnHeader7.Text = "New text";
this.columnHeader7.Width = 500;
//
//
// checkBoxOnlyContinuationLines
//
//
this.checkBoxOnlyContinuationLines.AutoSize = true;
this.checkBoxOnlyContinuationLines.Checked = true;
this.checkBoxOnlyContinuationLines.CheckState = System.Windows.Forms.CheckState.Checked;
@ -194,12 +194,12 @@ namespace Nikse.SubtitleEdit.Forms
this.checkBoxOnlyContinuationLines.Text = "Only merge continuation lines";
this.checkBoxOnlyContinuationLines.UseVisualStyleBackColor = true;
this.checkBoxOnlyContinuationLines.CheckedChanged += new System.EventHandler(this.checkBoxOnlyContinuationLines_CheckedChanged);
//
//
// SubtitleListview1
//
//
this.SubtitleListview1.AllowDrop = true;
this.SubtitleListview1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
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.FirstVisibleIndex = -1;
this.SubtitleListview1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
@ -212,9 +212,9 @@ namespace Nikse.SubtitleEdit.Forms
this.SubtitleListview1.TabIndex = 4;
this.SubtitleListview1.UseCompatibleStateImageBehavior = false;
this.SubtitleListview1.View = System.Windows.Forms.View.Details;
//
//
// MergeShortLines
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(776, 595);

View File

@ -45,7 +45,7 @@ namespace Nikse.SubtitleEdit.Forms
public void Initialize(Subtitle subtitle)
{
if (subtitle.Paragraphs.Count > 0)
subtitle.Renumber(subtitle.Paragraphs[0].Number);
subtitle.Renumber(subtitle.Paragraphs[0].Number);
Text = Configuration.Settings.Language.MergedShortLines.Title;
labelMaxCharacters.Text = Configuration.Settings.Language.MergedShortLines.MaximumCharacters;
@ -88,7 +88,7 @@ namespace Nikse.SubtitleEdit.Forms
var mergedIndexes = new List<int>();
NumberOfMerges = 0;
SubtitleListview1.Items.Clear();
SubtitleListview1.Items.Clear();
SubtitleListview1.BeginUpdate();
int count;
_mergedSubtitle = MergeShortLinesInSubtitle(_subtitle, mergedIndexes, out count, (double)numericUpDownMaxMillisecondsBetweenLines.Value, (int)numericUpDownMaxCharacters.Value, true);
@ -98,9 +98,9 @@ namespace Nikse.SubtitleEdit.Forms
foreach(var index in mergedIndexes)
{
SubtitleListview1.SetBackgroundColor(index, Color.Green);
SubtitleListview1.SetBackgroundColor(index, Color.Green);
}
SubtitleListview1.EndUpdate();
groupBoxLinesFound.Text = string.Format(Configuration.Settings.Language.MergedShortLines.NumberOfMergesX, NumberOfMerges);
@ -242,7 +242,7 @@ namespace Nikse.SubtitleEdit.Forms
if (!checkBoxOnlyContinuationLines.Checked)
return true;
if (isLineContinuation)
if (isLineContinuation)
return true;
}
}
@ -295,7 +295,7 @@ namespace Nikse.SubtitleEdit.Forms
}
private void listViewFixes_ItemChecked(object sender, ItemCheckedEventArgs e)
{
{
var mergedIndexes = new List<int>();
NumberOfMerges = 0;

View File

@ -64,9 +64,9 @@
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.SuspendLayout();
//
//
// groupBoxLinesFound
//
//
this.groupBoxLinesFound.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)));
@ -79,9 +79,9 @@
this.groupBoxLinesFound.TabIndex = 8;
this.groupBoxLinesFound.TabStop = false;
this.groupBoxLinesFound.Text = "Lines found: {0}";
//
//
// buttonReplacesInverseSelection
//
//
this.buttonReplacesInverseSelection.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.buttonReplacesInverseSelection.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonReplacesInverseSelection.Location = new System.Drawing.Point(91, 287);
@ -91,9 +91,9 @@
this.buttonReplacesInverseSelection.Text = "&Inverse selection";
this.buttonReplacesInverseSelection.UseVisualStyleBackColor = true;
this.buttonReplacesInverseSelection.Click += new System.EventHandler(this.buttonReplacesInverseSelection_Click);
//
//
// buttonReplacesSelectAll
//
//
this.buttonReplacesSelectAll.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.buttonReplacesSelectAll.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonReplacesSelectAll.Location = new System.Drawing.Point(10, 287);
@ -103,9 +103,9 @@
this.buttonReplacesSelectAll.Text = "Select &all";
this.buttonReplacesSelectAll.UseVisualStyleBackColor = true;
this.buttonReplacesSelectAll.Click += new System.EventHandler(this.buttonReplacesSelectAll_Click);
//
//
// listViewFixes
//
//
this.listViewFixes.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)));
@ -123,29 +123,29 @@
this.listViewFixes.TabIndex = 9;
this.listViewFixes.UseCompatibleStateImageBehavior = false;
this.listViewFixes.View = System.Windows.Forms.View.Details;
//
//
// columnHeader4
//
//
this.columnHeader4.Text = "Apply";
this.columnHeader4.Width = 48;
//
//
// columnHeader5
//
//
this.columnHeader5.Text = "Line#";
this.columnHeader5.Width = 61;
//
//
// columnHeader7
//
//
this.columnHeader7.Text = "Before";
this.columnHeader7.Width = 330;
//
//
// columnHeader8
//
//
this.columnHeader8.Text = "After";
this.columnHeader8.Width = 440;
//
//
// groupBoxReplaces
//
//
this.groupBoxReplaces.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)));
@ -164,9 +164,9 @@
this.groupBoxReplaces.Size = new System.Drawing.Size(922, 297);
this.groupBoxReplaces.TabIndex = 0;
this.groupBoxReplaces.TabStop = false;
//
//
// buttonUpdate
//
//
this.buttonUpdate.Location = new System.Drawing.Point(588, 35);
this.buttonUpdate.Name = "buttonUpdate";
this.buttonUpdate.Size = new System.Drawing.Size(99, 21);
@ -174,9 +174,9 @@
this.buttonUpdate.Text = "&Update";
this.buttonUpdate.UseVisualStyleBackColor = true;
this.buttonUpdate.Click += new System.EventHandler(this.ButtonUpdateClick);
//
//
// buttonAdd
//
//
this.buttonAdd.Location = new System.Drawing.Point(483, 35);
this.buttonAdd.Name = "buttonAdd";
this.buttonAdd.Size = new System.Drawing.Size(99, 21);
@ -184,35 +184,35 @@
this.buttonAdd.Text = "&Add";
this.buttonAdd.UseVisualStyleBackColor = true;
this.buttonAdd.Click += new System.EventHandler(this.ButtonAddClick);
//
//
// labelFindWhat
//
//
this.labelFindWhat.AutoSize = true;
this.labelFindWhat.Location = new System.Drawing.Point(17, 16);
this.labelFindWhat.Name = "labelFindWhat";
this.labelFindWhat.Size = new System.Drawing.Size(89, 21);
this.labelFindWhat.TabIndex = 22;
this.labelFindWhat.Text = "Find what:";
//
//
// labelReplaceWith
//
//
this.labelReplaceWith.AutoSize = true;
this.labelReplaceWith.Location = new System.Drawing.Point(247, 16);
this.labelReplaceWith.Name = "labelReplaceWith";
this.labelReplaceWith.Size = new System.Drawing.Size(112, 21);
this.labelReplaceWith.TabIndex = 21;
this.labelReplaceWith.Text = "Replace with:";
//
//
// textBoxReplace
//
//
this.textBoxReplace.Location = new System.Drawing.Point(250, 35);
this.textBoxReplace.Name = "textBoxReplace";
this.textBoxReplace.Size = new System.Drawing.Size(227, 27);
this.textBoxReplace.TabIndex = 2;
this.textBoxReplace.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TextBoxReplaceKeyDown);
//
//
// radioButtonRegEx
//
//
this.radioButtonRegEx.AutoSize = true;
this.radioButtonRegEx.Location = new System.Drawing.Point(286, 62);
this.radioButtonRegEx.Name = "radioButtonRegEx";
@ -221,9 +221,9 @@
this.radioButtonRegEx.Text = "RegEx";
this.radioButtonRegEx.UseVisualStyleBackColor = true;
this.radioButtonRegEx.CheckedChanged += new System.EventHandler(this.RadioButtonCheckedChanged);
//
//
// radioButtonCaseSensitive
//
//
this.radioButtonCaseSensitive.AutoSize = true;
this.radioButtonCaseSensitive.Location = new System.Drawing.Point(146, 62);
this.radioButtonCaseSensitive.Name = "radioButtonCaseSensitive";
@ -232,9 +232,9 @@
this.radioButtonCaseSensitive.Text = "Case sensitive";
this.radioButtonCaseSensitive.UseVisualStyleBackColor = true;
this.radioButtonCaseSensitive.CheckedChanged += new System.EventHandler(this.RadioButtonCheckedChanged);
//
//
// radioButtonNormal
//
//
this.radioButtonNormal.AutoSize = true;
this.radioButtonNormal.Checked = true;
this.radioButtonNormal.Location = new System.Drawing.Point(22, 62);
@ -245,16 +245,16 @@
this.radioButtonNormal.Text = "Normal";
this.radioButtonNormal.UseVisualStyleBackColor = true;
this.radioButtonNormal.CheckedChanged += new System.EventHandler(this.RadioButtonCheckedChanged);
//
//
// textBoxFind
//
//
this.textBoxFind.Location = new System.Drawing.Point(20, 35);
this.textBoxFind.Name = "textBoxFind";
this.textBoxFind.Size = new System.Drawing.Size(224, 27);
this.textBoxFind.TabIndex = 1;
//
//
// listViewReplaceList
//
//
this.listViewReplaceList.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)));
@ -276,43 +276,43 @@
this.listViewReplaceList.ItemChecked += new System.Windows.Forms.ItemCheckedEventHandler(this.ListViewReplaceListItemChecked);
this.listViewReplaceList.SelectedIndexChanged += new System.EventHandler(this.ListViewReplaceListSelectedIndexChanged);
this.listViewReplaceList.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ListViewReplaceListKeyDown);
//
//
// columnHeader1
//
//
this.columnHeader1.Text = "Enabled";
this.columnHeader1.Width = 70;
//
//
// columnHeader2
//
//
this.columnHeader2.Text = "Find what";
this.columnHeader2.Width = 210;
//
//
// columnHeader3
//
//
this.columnHeader3.Text = "Replace with";
this.columnHeader3.Width = 210;
//
//
// columnHeader6
//
//
this.columnHeader6.Text = "Search type";
this.columnHeader6.Width = 200;
//
//
// contextMenuStrip1
//
//
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.deleteToolStripMenuItem});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(117, 26);
//
//
// deleteToolStripMenuItem
//
//
this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem";
this.deleteToolStripMenuItem.Size = new System.Drawing.Size(116, 22);
this.deleteToolStripMenuItem.Text = "Delete";
this.deleteToolStripMenuItem.Click += new System.EventHandler(this.DeleteToolStripMenuItemClick);
//
//
// buttonOK
//
//
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonOK.Location = new System.Drawing.Point(768, 323);
this.buttonOK.Name = "buttonOK";
@ -321,9 +321,9 @@
this.buttonOK.Text = "&OK";
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.ButtonOkClick);
//
//
// buttonCancel
//
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.Location = new System.Drawing.Point(849, 323);
@ -332,29 +332,29 @@
this.buttonCancel.TabIndex = 11;
this.buttonCancel.Text = "C&ancel";
this.buttonCancel.UseVisualStyleBackColor = true;
//
//
// splitContainer1
//
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
//
// splitContainer1.Panel1
//
//
this.splitContainer1.Panel1.Controls.Add(this.groupBoxReplaces);
//
//
// splitContainer1.Panel2
//
//
this.splitContainer1.Panel2.Controls.Add(this.groupBoxLinesFound);
this.splitContainer1.Panel2.Controls.Add(this.buttonOK);
this.splitContainer1.Panel2.Controls.Add(this.buttonCancel);
this.splitContainer1.Size = new System.Drawing.Size(933, 667);
this.splitContainer1.SplitterDistance = 303;
this.splitContainer1.TabIndex = 12;
//
//
// MultipleReplace
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 21F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(933, 667);

View File

@ -29,7 +29,7 @@ namespace Nikse.SubtitleEdit.Forms
labelReplaceWith.Text = Configuration.Settings.Language.MultipleReplace.ReplaceWith;
radioButtonNormal.Text = Configuration.Settings.Language.MultipleReplace.Normal;
radioButtonRegEx.Text = Configuration.Settings.Language.MultipleReplace.RegularExpression;
radioButtonCaseSensitive.Text = Configuration.Settings.Language.MultipleReplace.CaseSensitive;
radioButtonCaseSensitive.Text = Configuration.Settings.Language.MultipleReplace.CaseSensitive;
buttonAdd.Text = Configuration.Settings.Language.MultipleReplace.Add;
buttonUpdate.Text = Configuration.Settings.Language.MultipleReplace.Update;
listViewReplaceList.Columns[0].Text = Configuration.Settings.Language.MultipleReplace.Enabled;
@ -109,7 +109,7 @@ namespace Nikse.SubtitleEdit.Forms
AddToReplaceListView(true, textBoxFind.Text, textBoxReplace.Text, EnglishSearchTypeToLocal(searchType));
GeneratePreview();
textBoxFind.Text = string.Empty;
textBoxReplace.Text = string.Empty;
textBoxReplace.Text = string.Empty;
textBoxFind.Select();
SaveReplaceList();
}
@ -168,10 +168,10 @@ namespace Nikse.SubtitleEdit.Forms
while (index >= 0)
{
if (index < newText.Length)
newText = newText.Substring(0, index) + replaceWith + newText.Substring(index + findWhat.Length);
newText = newText.Substring(0, index) + replaceWith + newText.Substring(index + findWhat.Length);
else
newText = newText.Substring(0, index) + replaceWith;
hit = true;
index = newText.ToLower().IndexOf(findWhat.ToLower(), index+replaceWith.Length);
}
@ -242,7 +242,7 @@ namespace Nikse.SubtitleEdit.Forms
}
private void ButtonOkClick(object sender, EventArgs e)
{
{
ResetUncheckLines();
SaveReplaceList();
DialogResult = DialogResult.OK;
@ -331,7 +331,7 @@ namespace Nikse.SubtitleEdit.Forms
radioButtonNormal.Checked = true;
}
else
{
{
buttonUpdate.Enabled = false;
}
}

View File

@ -40,9 +40,9 @@
this.textBoxChat = new System.Windows.Forms.TextBox();
this.buttonSendChat = new System.Windows.Forms.Button();
this.SuspendLayout();
//
//
// listViewChat
//
//
this.listViewChat.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)));
@ -56,19 +56,19 @@
this.listViewChat.TabIndex = 3;
this.listViewChat.UseCompatibleStateImageBehavior = false;
this.listViewChat.View = System.Windows.Forms.View.Details;
//
//
// columnHeader1
//
//
this.columnHeader1.Text = "Username";
this.columnHeader1.Width = 82;
//
//
// columnHeader4
//
//
this.columnHeader4.Text = "Text";
this.columnHeader4.Width = 188;
//
//
// imageListUsers
//
//
this.imageListUsers.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageListUsers.ImageStream")));
this.imageListUsers.TransparentColor = System.Drawing.Color.Transparent;
this.imageListUsers.Images.SetKeyName(0, "person.jpg");
@ -79,9 +79,9 @@
this.imageListUsers.Images.SetKeyName(5, "Person6.jpg");
this.imageListUsers.Images.SetKeyName(6, "Person7.jpg");
this.imageListUsers.Images.SetKeyName(7, "Person8.jpg");
//
//
// listViewUsers
//
//
this.listViewUsers.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.listViewUsers.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
@ -94,19 +94,19 @@
this.listViewUsers.TabIndex = 2;
this.listViewUsers.UseCompatibleStateImageBehavior = false;
this.listViewUsers.View = System.Windows.Forms.View.Details;
//
//
// columnHeaderNick
//
//
this.columnHeaderNick.Text = "Username";
this.columnHeaderNick.Width = 178;
//
//
// columnHeader2
//
//
this.columnHeader2.Text = "IP";
this.columnHeader2.Width = 93;
//
//
// textBoxChat
//
//
this.textBoxChat.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.textBoxChat.Location = new System.Drawing.Point(3, 352);
@ -115,9 +115,9 @@
this.textBoxChat.Size = new System.Drawing.Size(188, 46);
this.textBoxChat.TabIndex = 0;
this.textBoxChat.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBoxChat_KeyDown);
//
//
// buttonSendChat
//
//
this.buttonSendChat.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonSendChat.Location = new System.Drawing.Point(197, 375);
this.buttonSendChat.Name = "buttonSendChat";
@ -126,9 +126,9 @@
this.buttonSendChat.Text = "Send message";
this.buttonSendChat.UseVisualStyleBackColor = true;
this.buttonSendChat.Click += new System.EventHandler(this.buttonSendChat_Click);
//
//
// NetworkChat
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(281, 402);

View File

@ -45,7 +45,7 @@ namespace Nikse.SubtitleEdit.Forms
_networkSession.SendChatMessage(textBoxChat.Text.Trim());
AddChatMessage(_networkSession.CurrentUser, textBoxChat.Text.Trim());
listViewChat.EnsureVisible(listViewChat.Items.Count - 1);
_networkSession.ChatLog.Add(new NikseWebServiceSession.ChatEntry() { User = _networkSession.CurrentUser, Message = textBoxChat.Text.Trim() });
_networkSession.ChatLog.Add(new NikseWebServiceSession.ChatEntry() { User = _networkSession.CurrentUser, Message = textBoxChat.Text.Trim() });
}
textBoxChat.Text = string.Empty;
textBoxChat.Focus();

View File

@ -39,27 +39,27 @@
this.textBoxSessionKey = new System.Windows.Forms.TextBox();
this.labelSessionKey = new System.Windows.Forms.Label();
this.SuspendLayout();
//
//
// labelStatus
//
//
this.labelStatus.AutoSize = true;
this.labelStatus.Location = new System.Drawing.Point(16, 167);
this.labelStatus.Name = "labelStatus";
this.labelStatus.Size = new System.Drawing.Size(59, 13);
this.labelStatus.TabIndex = 18;
this.labelStatus.Text = "labelStatus";
//
//
// labelInfo
//
//
this.labelInfo.AutoSize = true;
this.labelInfo.Location = new System.Drawing.Point(16, 13);
this.labelInfo.Name = "labelInfo";
this.labelInfo.Size = new System.Drawing.Size(212, 26);
this.labelInfo.TabIndex = 17;
this.labelInfo.Text = "Join existing session where multiple persons\r\ncan edit in same subtitle file.\r\n";
//
//
// labelWebServiceUrl
//
//
this.labelWebServiceUrl.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.labelWebServiceUrl.Location = new System.Drawing.Point(5, 112);
this.labelWebServiceUrl.Name = "labelWebServiceUrl";
@ -67,9 +67,9 @@
this.labelWebServiceUrl.TabIndex = 16;
this.labelWebServiceUrl.Text = "Web service url";
this.labelWebServiceUrl.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
//
// comboBoxWebServiceUrl
//
//
this.comboBoxWebServiceUrl.FormattingEnabled = true;
this.comboBoxWebServiceUrl.Items.AddRange(new object[] {
"http://www.nikse.dk/se/SeService.asmx",
@ -78,9 +78,9 @@
this.comboBoxWebServiceUrl.Name = "comboBoxWebServiceUrl";
this.comboBoxWebServiceUrl.Size = new System.Drawing.Size(261, 21);
this.comboBoxWebServiceUrl.TabIndex = 2;
//
//
// buttonCancel
//
//
this.buttonCancel.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonCancel.Location = new System.Drawing.Point(312, 147);
this.buttonCancel.Name = "buttonCancel";
@ -89,16 +89,16 @@
this.buttonCancel.Text = "C&ancel";
this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
//
//
// textBoxUserName
//
//
this.textBoxUserName.Location = new System.Drawing.Point(125, 57);
this.textBoxUserName.Name = "textBoxUserName";
this.textBoxUserName.Size = new System.Drawing.Size(261, 20);
this.textBoxUserName.TabIndex = 0;
//
//
// buttonJoin
//
//
this.buttonJoin.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonJoin.Location = new System.Drawing.Point(231, 147);
this.buttonJoin.Name = "buttonJoin";
@ -107,9 +107,9 @@
this.buttonJoin.Text = "&Join";
this.buttonJoin.UseVisualStyleBackColor = true;
this.buttonJoin.Click += new System.EventHandler(this.buttonJoin_Click);
//
//
// labelUserName
//
//
this.labelUserName.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.labelUserName.Location = new System.Drawing.Point(5, 60);
this.labelUserName.Name = "labelUserName";
@ -117,16 +117,16 @@
this.labelUserName.TabIndex = 11;
this.labelUserName.Text = "Username";
this.labelUserName.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
//
// textBoxSessionKey
//
//
this.textBoxSessionKey.Location = new System.Drawing.Point(125, 83);
this.textBoxSessionKey.Name = "textBoxSessionKey";
this.textBoxSessionKey.Size = new System.Drawing.Size(261, 20);
this.textBoxSessionKey.TabIndex = 1;
//
//
// labelSessionKey
//
//
this.labelSessionKey.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.labelSessionKey.Location = new System.Drawing.Point(5, 86);
this.labelSessionKey.Name = "labelSessionKey";
@ -134,9 +134,9 @@
this.labelSessionKey.TabIndex = 19;
this.labelSessionKey.Text = "Key";
this.labelSessionKey.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
//
// NetworkJoin
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(402, 185);

View File

@ -38,17 +38,17 @@
this.labelUserName = new System.Windows.Forms.Label();
this.textBoxWebServiceUrl = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
//
// textBoxSessionKey
//
//
this.textBoxSessionKey.Location = new System.Drawing.Point(157, 16);
this.textBoxSessionKey.Name = "textBoxSessionKey";
this.textBoxSessionKey.ReadOnly = true;
this.textBoxSessionKey.Size = new System.Drawing.Size(290, 20);
this.textBoxSessionKey.TabIndex = 1;
//
//
// labelSessionKey
//
//
this.labelSessionKey.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.labelSessionKey.Location = new System.Drawing.Point(12, 19);
this.labelSessionKey.Name = "labelSessionKey";
@ -56,18 +56,18 @@
this.labelSessionKey.TabIndex = 21;
this.labelSessionKey.Text = "Session key";
this.labelSessionKey.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
//
// labelLog
//
//
this.labelLog.AutoSize = true;
this.labelLog.Location = new System.Drawing.Point(9, 109);
this.labelLog.Name = "labelLog";
this.labelLog.Size = new System.Drawing.Size(28, 13);
this.labelLog.TabIndex = 24;
this.labelLog.Text = "Log:";
//
//
// textBoxLog
//
//
this.textBoxLog.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)));
@ -78,9 +78,9 @@
this.textBoxLog.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.textBoxLog.Size = new System.Drawing.Size(543, 179);
this.textBoxLog.TabIndex = 4;
//
//
// buttonOK
//
//
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonOK.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonOK.Location = new System.Drawing.Point(480, 310);
@ -90,9 +90,9 @@
this.buttonOK.Text = "&OK";
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
//
//
// labelWebServiceUrl
//
//
this.labelWebServiceUrl.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.labelWebServiceUrl.Location = new System.Drawing.Point(12, 71);
this.labelWebServiceUrl.Name = "labelWebServiceUrl";
@ -100,17 +100,17 @@
this.labelWebServiceUrl.TabIndex = 29;
this.labelWebServiceUrl.Text = "Web service url";
this.labelWebServiceUrl.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
//
// textBoxUserName
//
//
this.textBoxUserName.Location = new System.Drawing.Point(157, 42);
this.textBoxUserName.Name = "textBoxUserName";
this.textBoxUserName.ReadOnly = true;
this.textBoxUserName.Size = new System.Drawing.Size(290, 20);
this.textBoxUserName.TabIndex = 2;
//
//
// labelUserName
//
//
this.labelUserName.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.labelUserName.Location = new System.Drawing.Point(12, 45);
this.labelUserName.Name = "labelUserName";
@ -118,17 +118,17 @@
this.labelUserName.TabIndex = 28;
this.labelUserName.Text = "Username";
this.labelUserName.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
//
// textBoxWebServiceUrl
//
//
this.textBoxWebServiceUrl.Location = new System.Drawing.Point(157, 68);
this.textBoxWebServiceUrl.Name = "textBoxWebServiceUrl";
this.textBoxWebServiceUrl.ReadOnly = true;
this.textBoxWebServiceUrl.Size = new System.Drawing.Size(290, 20);
this.textBoxWebServiceUrl.TabIndex = 3;
//
//
// NetworkLogAndInfo
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(565, 337);

View File

@ -39,9 +39,9 @@
this.labelSessionKey = new System.Windows.Forms.Label();
this.textBoxSessionKey = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
//
// buttonCancel
//
//
this.buttonCancel.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonCancel.Location = new System.Drawing.Point(312, 147);
this.buttonCancel.Name = "buttonCancel";
@ -50,16 +50,16 @@
this.buttonCancel.Text = "C&ancel";
this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
//
//
// textBoxUserName
//
//
this.textBoxUserName.Location = new System.Drawing.Point(125, 83);
this.textBoxUserName.Name = "textBoxUserName";
this.textBoxUserName.Size = new System.Drawing.Size(262, 20);
this.textBoxUserName.TabIndex = 1;
//
//
// buttonStart
//
//
this.buttonStart.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonStart.Location = new System.Drawing.Point(231, 147);
this.buttonStart.Name = "buttonStart";
@ -68,9 +68,9 @@
this.buttonStart.Text = "&Start";
this.buttonStart.UseVisualStyleBackColor = true;
this.buttonStart.Click += new System.EventHandler(this.buttonStart_Click);
//
//
// labelUserName
//
//
this.labelUserName.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.labelUserName.Location = new System.Drawing.Point(5, 86);
this.labelUserName.Name = "labelUserName";
@ -78,9 +78,9 @@
this.labelUserName.TabIndex = 3;
this.labelUserName.Text = "Username";
this.labelUserName.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
//
// comboBoxWebServiceUrl
//
//
this.comboBoxWebServiceUrl.FormattingEnabled = true;
this.comboBoxWebServiceUrl.Items.AddRange(new object[] {
"http://www.nikse.dk/se/SeService.asmx",
@ -89,9 +89,9 @@
this.comboBoxWebServiceUrl.Name = "comboBoxWebServiceUrl";
this.comboBoxWebServiceUrl.Size = new System.Drawing.Size(262, 21);
this.comboBoxWebServiceUrl.TabIndex = 2;
//
//
// labelWebServiceUrl
//
//
this.labelWebServiceUrl.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.labelWebServiceUrl.Location = new System.Drawing.Point(5, 112);
this.labelWebServiceUrl.Name = "labelWebServiceUrl";
@ -99,27 +99,27 @@
this.labelWebServiceUrl.TabIndex = 8;
this.labelWebServiceUrl.Text = "Web service url";
this.labelWebServiceUrl.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
//
// labelInfo
//
//
this.labelInfo.AutoSize = true;
this.labelInfo.Location = new System.Drawing.Point(16, 13);
this.labelInfo.Name = "labelInfo";
this.labelInfo.Size = new System.Drawing.Size(200, 26);
this.labelInfo.TabIndex = 9;
this.labelInfo.Text = "Start new session where multiple persons\r\ncan edit in same subtitle file.\r\n";
//
//
// labelStatus
//
//
this.labelStatus.AutoSize = true;
this.labelStatus.Location = new System.Drawing.Point(16, 167);
this.labelStatus.Name = "labelStatus";
this.labelStatus.Size = new System.Drawing.Size(59, 13);
this.labelStatus.TabIndex = 10;
this.labelStatus.Text = "labelStatus";
//
//
// labelSessionKey
//
//
this.labelSessionKey.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.labelSessionKey.Location = new System.Drawing.Point(5, 60);
this.labelSessionKey.Name = "labelSessionKey";
@ -127,16 +127,16 @@
this.labelSessionKey.TabIndex = 11;
this.labelSessionKey.Text = "Session Key";
this.labelSessionKey.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
//
// textBoxSessionKey
//
//
this.textBoxSessionKey.Location = new System.Drawing.Point(125, 57);
this.textBoxSessionKey.Name = "textBoxSessionKey";
this.textBoxSessionKey.Size = new System.Drawing.Size(262, 20);
this.textBoxSessionKey.TabIndex = 0;
//
//
// NetworkStart
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(402, 185);

View File

@ -89,7 +89,7 @@ namespace Nikse.SubtitleEdit.Forms
textBoxSessionKey.Enabled = false;
textBoxUserName.Enabled = true;
comboBoxWebServiceUrl.Enabled = true;
labelStatus.Text = string.Empty;
labelStatus.Text = string.Empty;
}
private void buttonCancel_Click(object sender, EventArgs e)

View File

@ -59,9 +59,9 @@
((System.ComponentModel.ISupportInitialize)(this.pictureBoxText)).BeginInit();
this.groupBoxText.SuspendLayout();
this.SuspendLayout();
//
//
// buttonAbort
//
//
this.buttonAbort.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonAbort.Location = new System.Drawing.Point(623, 442);
this.buttonAbort.Name = "buttonAbort";
@ -70,18 +70,18 @@
this.buttonAbort.Text = "Abort";
this.buttonAbort.UseVisualStyleBackColor = true;
this.buttonAbort.Click += new System.EventHandler(this.ButtonAbortClick);
//
//
// labelWordNotFound
//
//
this.labelWordNotFound.AutoSize = true;
this.labelWordNotFound.Location = new System.Drawing.Point(9, 112);
this.labelWordNotFound.Name = "labelWordNotFound";
this.labelWordNotFound.Size = new System.Drawing.Size(0, 13);
this.labelWordNotFound.TabIndex = 23;
//
//
// groupBoxSuggestions
//
this.groupBoxSuggestions.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
//
this.groupBoxSuggestions.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBoxSuggestions.Controls.Add(this.buttonUseSuggestionAlways);
this.groupBoxSuggestions.Controls.Add(this.buttonUseSuggestion);
@ -92,9 +92,9 @@
this.groupBoxSuggestions.TabIndex = 32;
this.groupBoxSuggestions.TabStop = false;
this.groupBoxSuggestions.Text = "Suggestions";
//
//
// buttonUseSuggestionAlways
//
//
this.buttonUseSuggestionAlways.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonUseSuggestionAlways.Location = new System.Drawing.Point(291, 16);
this.buttonUseSuggestionAlways.Name = "buttonUseSuggestionAlways";
@ -103,9 +103,9 @@
this.buttonUseSuggestionAlways.Text = "Use always";
this.buttonUseSuggestionAlways.UseVisualStyleBackColor = true;
this.buttonUseSuggestionAlways.Click += new System.EventHandler(this.ButtonUseSuggestionAlwaysClick);
//
//
// buttonUseSuggestion
//
//
this.buttonUseSuggestion.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonUseSuggestion.Location = new System.Drawing.Point(206, 16);
this.buttonUseSuggestion.Name = "buttonUseSuggestion";
@ -114,19 +114,19 @@
this.buttonUseSuggestion.Text = "Use";
this.buttonUseSuggestion.UseVisualStyleBackColor = true;
this.buttonUseSuggestion.Click += new System.EventHandler(this.ButtonUseSuggestionClick);
//
//
// listBoxSuggestions
//
this.listBoxSuggestions.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
//
this.listBoxSuggestions.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.listBoxSuggestions.FormattingEnabled = true;
this.listBoxSuggestions.Location = new System.Drawing.Point(6, 39);
this.listBoxSuggestions.Name = "listBoxSuggestions";
this.listBoxSuggestions.Size = new System.Drawing.Size(372, 134);
this.listBoxSuggestions.TabIndex = 30;
//
//
// GroupBoxEditWord
//
//
this.GroupBoxEditWord.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.GroupBoxEditWord.Controls.Add(this.buttonAddToDictionary);
this.GroupBoxEditWord.Controls.Add(this.buttonChangeAll);
@ -141,9 +141,9 @@
this.GroupBoxEditWord.TabIndex = 33;
this.GroupBoxEditWord.TabStop = false;
this.GroupBoxEditWord.Text = "Word not found";
//
//
// buttonAddToDictionary
//
//
this.buttonAddToDictionary.Location = new System.Drawing.Point(6, 151);
this.buttonAddToDictionary.Name = "buttonAddToDictionary";
this.buttonAddToDictionary.Size = new System.Drawing.Size(290, 21);
@ -151,9 +151,9 @@
this.buttonAddToDictionary.Text = "Add to user dictionary (not case sensitive)";
this.buttonAddToDictionary.UseVisualStyleBackColor = true;
this.buttonAddToDictionary.Click += new System.EventHandler(this.ButtonAddToDictionaryClick);
//
//
// buttonChangeAll
//
//
this.buttonChangeAll.Location = new System.Drawing.Point(6, 45);
this.buttonChangeAll.Name = "buttonChangeAll";
this.buttonChangeAll.Size = new System.Drawing.Size(290, 21);
@ -161,9 +161,9 @@
this.buttonChangeAll.Text = "Change and add to ocr fix list (case sensitive)";
this.buttonChangeAll.UseVisualStyleBackColor = true;
this.buttonChangeAll.Click += new System.EventHandler(this.ButtonChangeAllClick);
//
//
// buttonChange
//
//
this.buttonChange.Location = new System.Drawing.Point(6, 72);
this.buttonChange.Name = "buttonChange";
this.buttonChange.Size = new System.Drawing.Size(141, 21);
@ -171,9 +171,9 @@
this.buttonChange.Text = "Change once";
this.buttonChange.UseVisualStyleBackColor = true;
this.buttonChange.Click += new System.EventHandler(this.ButtonChangeClick);
//
//
// buttonSkipAll
//
//
this.buttonSkipAll.Location = new System.Drawing.Point(155, 97);
this.buttonSkipAll.Name = "buttonSkipAll";
this.buttonSkipAll.Size = new System.Drawing.Size(141, 21);
@ -181,9 +181,9 @@
this.buttonSkipAll.Text = "&Skip all";
this.buttonSkipAll.UseVisualStyleBackColor = true;
this.buttonSkipAll.Click += new System.EventHandler(this.ButtonSkipAllClick);
//
//
// textBoxWord
//
//
this.textBoxWord.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textBoxWord.Location = new System.Drawing.Point(6, 19);
this.textBoxWord.Name = "textBoxWord";
@ -191,9 +191,9 @@
this.textBoxWord.TabIndex = 31;
this.textBoxWord.TextChanged += new System.EventHandler(this.textBoxWord_TextChanged);
this.textBoxWord.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TextBoxWordKeyDown);
//
//
// buttonSkipOnce
//
//
this.buttonSkipOnce.Location = new System.Drawing.Point(155, 72);
this.buttonSkipOnce.Name = "buttonSkipOnce";
this.buttonSkipOnce.Size = new System.Drawing.Size(141, 21);
@ -201,9 +201,9 @@
this.buttonSkipOnce.Text = "Skip &once";
this.buttonSkipOnce.UseVisualStyleBackColor = true;
this.buttonSkipOnce.Click += new System.EventHandler(this.ButtonSkipOnceClick);
//
//
// buttonAddToNames
//
//
this.buttonAddToNames.Location = new System.Drawing.Point(6, 124);
this.buttonAddToNames.Name = "buttonAddToNames";
this.buttonAddToNames.Size = new System.Drawing.Size(290, 21);
@ -211,9 +211,9 @@
this.buttonAddToNames.Text = "Add to names/noise list (case sensitive)";
this.buttonAddToNames.UseVisualStyleBackColor = true;
this.buttonAddToNames.Click += new System.EventHandler(this.ButtonAddToNamesClick);
//
//
// groupBoxEditWholeText
//
//
this.groupBoxEditWholeText.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.groupBoxEditWholeText.Controls.Add(this.buttonSkipText);
this.groupBoxEditWholeText.Controls.Add(this.buttonChangeWholeText);
@ -224,9 +224,9 @@
this.groupBoxEditWholeText.TabIndex = 37;
this.groupBoxEditWholeText.TabStop = false;
this.groupBoxEditWholeText.Text = "Edit whole text";
//
//
// buttonSkipText
//
//
this.buttonSkipText.Location = new System.Drawing.Point(156, 88);
this.buttonSkipText.Name = "buttonSkipText";
this.buttonSkipText.Size = new System.Drawing.Size(139, 21);
@ -234,9 +234,9 @@
this.buttonSkipText.Text = "Skip text";
this.buttonSkipText.UseVisualStyleBackColor = true;
this.buttonSkipText.Click += new System.EventHandler(this.ButtonSkipTextClick);
//
//
// buttonChangeWholeText
//
//
this.buttonChangeWholeText.Location = new System.Drawing.Point(6, 88);
this.buttonChangeWholeText.Name = "buttonChangeWholeText";
this.buttonChangeWholeText.Size = new System.Drawing.Size(143, 21);
@ -244,20 +244,20 @@
this.buttonChangeWholeText.Text = "Change";
this.buttonChangeWholeText.UseVisualStyleBackColor = true;
this.buttonChangeWholeText.Click += new System.EventHandler(this.ButtonChangeWholeTextClick);
//
//
// textBoxWholeText
//
//
this.textBoxWholeText.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textBoxWholeText.Location = new System.Drawing.Point(6, 19);
this.textBoxWholeText.Multiline = true;
this.textBoxWholeText.Name = "textBoxWholeText";
this.textBoxWholeText.Size = new System.Drawing.Size(290, 63);
this.textBoxWholeText.TabIndex = 31;
//
//
// groupBoxTextAsImage
//
this.groupBoxTextAsImage.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
//
this.groupBoxTextAsImage.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.groupBoxTextAsImage.Controls.Add(this.pictureBoxText);
this.groupBoxTextAsImage.Location = new System.Drawing.Point(12, 12);
@ -266,21 +266,21 @@
this.groupBoxTextAsImage.TabIndex = 34;
this.groupBoxTextAsImage.TabStop = false;
this.groupBoxTextAsImage.Text = "Image text";
//
//
// pictureBoxText
//
this.pictureBoxText.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
//
this.pictureBoxText.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.pictureBoxText.Location = new System.Drawing.Point(6, 18);
this.pictureBoxText.Name = "pictureBoxText";
this.pictureBoxText.Size = new System.Drawing.Size(684, 127);
this.pictureBoxText.TabIndex = 32;
this.pictureBoxText.TabStop = false;
//
//
// groupBoxText
//
this.groupBoxText.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
//
this.groupBoxText.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBoxText.Controls.Add(this.richTextBoxParagraph);
this.groupBoxText.Controls.Add(this.buttonEditWholeText);
@ -291,9 +291,9 @@
this.groupBoxText.TabIndex = 38;
this.groupBoxText.TabStop = false;
this.groupBoxText.Text = "Text";
//
//
// richTextBoxParagraph
//
//
this.richTextBoxParagraph.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.richTextBoxParagraph.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.richTextBoxParagraph.Location = new System.Drawing.Point(6, 12);
@ -302,9 +302,9 @@
this.richTextBoxParagraph.Size = new System.Drawing.Size(296, 54);
this.richTextBoxParagraph.TabIndex = 39;
this.richTextBoxParagraph.Text = "";
//
//
// buttonEditWholeText
//
//
this.buttonEditWholeText.Location = new System.Drawing.Point(308, 17);
this.buttonEditWholeText.Name = "buttonEditWholeText";
this.buttonEditWholeText.Size = new System.Drawing.Size(128, 21);
@ -312,9 +312,9 @@
this.buttonEditWholeText.Text = "Edit whole text";
this.buttonEditWholeText.UseVisualStyleBackColor = true;
this.buttonEditWholeText.Click += new System.EventHandler(this.ButtonEditWholeTextClick);
//
//
// buttonEditWord
//
//
this.buttonEditWord.Location = new System.Drawing.Point(308, 43);
this.buttonEditWord.Name = "buttonEditWord";
this.buttonEditWord.Size = new System.Drawing.Size(128, 21);
@ -322,9 +322,9 @@
this.buttonEditWord.Text = "Edit word";
this.buttonEditWord.UseVisualStyleBackColor = true;
this.buttonEditWord.Click += new System.EventHandler(this.ButtonEditWordClick);
//
//
// OcrSpellCheck
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(720, 473);

View File

@ -96,7 +96,7 @@ namespace Nikse.SubtitleEdit.Forms
for (int i = 0; i < richTextBoxParagraph.Text.Length; i++)
{
if (richTextBoxParagraph.Text.Substring(i).StartsWith(word))
{
{
bool startOk = i == 0;
if (!startOk)
startOk = (" <>-\"”“[]'`´¶()♪¿¡.…—!?,:;/" + Environment.NewLine).Contains(richTextBoxParagraph.Text.Substring(i - 1, 1));
@ -125,7 +125,7 @@ namespace Nikse.SubtitleEdit.Forms
richTextBoxParagraph.SelectionLength = 0;
richTextBoxParagraph.SelectionStart = 0;
}
}
}
private void ButtonEditWholeTextClick(object sender, EventArgs e)

View File

@ -56,9 +56,9 @@
this.groupBoxLinesFound.SuspendLayout();
this.groupBoxRemoveTextConditions.SuspendLayout();
this.SuspendLayout();
//
//
// buttonOK
//
//
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonOK.Location = new System.Drawing.Point(523, 480);
this.buttonOK.Name = "buttonOK";
@ -67,9 +67,9 @@
this.buttonOK.Text = "&OK";
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.ButtonOkClick);
//
//
// buttonCancel
//
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.Location = new System.Drawing.Point(604, 480);
@ -78,11 +78,11 @@
this.buttonCancel.TabIndex = 3;
this.buttonCancel.Text = "C&ancel";
this.buttonCancel.UseVisualStyleBackColor = true;
//
//
// groupBoxLinesFound
//
this.groupBoxLinesFound.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
//
this.groupBoxLinesFound.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.groupBoxLinesFound.Controls.Add(this.listViewFixes);
this.groupBoxLinesFound.Location = new System.Drawing.Point(12, 222);
@ -91,11 +91,11 @@
this.groupBoxLinesFound.TabIndex = 1;
this.groupBoxLinesFound.TabStop = false;
this.groupBoxLinesFound.Text = "Lines found";
//
//
// listViewFixes
//
this.listViewFixes.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
//
this.listViewFixes.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.listViewFixes.CheckBoxes = true;
this.listViewFixes.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
@ -110,29 +110,29 @@
this.listViewFixes.TabIndex = 0;
this.listViewFixes.UseCompatibleStateImageBehavior = false;
this.listViewFixes.View = System.Windows.Forms.View.Details;
//
//
// columnHeader4
//
//
this.columnHeader4.Text = "Apply";
this.columnHeader4.Width = 45;
//
//
// columnHeader5
//
//
this.columnHeader5.Text = "Line#";
this.columnHeader5.Width = 61;
//
//
// columnHeader7
//
//
this.columnHeader7.Text = "Before";
this.columnHeader7.Width = 251;
//
//
// columnHeader8
//
//
this.columnHeader8.Text = "After";
this.columnHeader8.Width = 266;
//
//
// checkBoxRemoveTextBeforeColon
//
//
this.checkBoxRemoveTextBeforeColon.AutoSize = true;
this.checkBoxRemoveTextBeforeColon.Checked = true;
this.checkBoxRemoveTextBeforeColon.CheckState = System.Windows.Forms.CheckState.Checked;
@ -143,10 +143,10 @@
this.checkBoxRemoveTextBeforeColon.Text = "Remove text before a colon (:)";
this.checkBoxRemoveTextBeforeColon.UseVisualStyleBackColor = true;
this.checkBoxRemoveTextBeforeColon.CheckedChanged += new System.EventHandler(this.checkBoxRemoveTextBeforeColon_CheckedChanged);
//
//
// groupBoxRemoveTextConditions
//
this.groupBoxRemoveTextConditions.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
//
this.groupBoxRemoveTextConditions.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBoxRemoveTextConditions.Controls.Add(this.buttonEditInterjections);
this.groupBoxRemoveTextConditions.Controls.Add(this.checkBoxRemoveInterjections);
@ -170,9 +170,9 @@
this.groupBoxRemoveTextConditions.TabIndex = 0;
this.groupBoxRemoveTextConditions.TabStop = false;
this.groupBoxRemoveTextConditions.Text = "Remove text conditions";
//
//
// buttonEditInterjections
//
//
this.buttonEditInterjections.Location = new System.Drawing.Point(377, 137);
this.buttonEditInterjections.Name = "buttonEditInterjections";
this.buttonEditInterjections.Size = new System.Drawing.Size(103, 23);
@ -180,9 +180,9 @@
this.buttonEditInterjections.Text = "Edit...";
this.buttonEditInterjections.UseVisualStyleBackColor = true;
this.buttonEditInterjections.Click += new System.EventHandler(this.buttonEditInterjections_Click);
//
//
// checkBoxRemoveInterjections
//
//
this.checkBoxRemoveInterjections.AutoSize = true;
this.checkBoxRemoveInterjections.Location = new System.Drawing.Point(241, 141);
this.checkBoxRemoveInterjections.Name = "checkBoxRemoveInterjections";
@ -191,18 +191,18 @@
this.checkBoxRemoveInterjections.Text = "Remove interjections ";
this.checkBoxRemoveInterjections.UseVisualStyleBackColor = true;
this.checkBoxRemoveInterjections.CheckedChanged += new System.EventHandler(this.checkBoxRemoveInterjections_CheckedChanged);
//
//
// labelRemoveTextBetween
//
//
this.labelRemoveTextBetween.AutoSize = true;
this.labelRemoveTextBetween.Location = new System.Drawing.Point(8, 26);
this.labelRemoveTextBetween.Name = "labelRemoveTextBetween";
this.labelRemoveTextBetween.Size = new System.Drawing.Size(114, 13);
this.labelRemoveTextBetween.TabIndex = 0;
this.labelRemoveTextBetween.Text = "Remove text between";
//
//
// comboBoxRemoveIfTextContains
//
//
this.comboBoxRemoveIfTextContains.FormattingEnabled = true;
this.comboBoxRemoveIfTextContains.Items.AddRange(new object[] {
"¶",
@ -215,9 +215,9 @@
this.comboBoxRemoveIfTextContains.TabIndex = 13;
this.comboBoxRemoveIfTextContains.Text = "¶";
this.comboBoxRemoveIfTextContains.TextChanged += new System.EventHandler(this.CheckBoxRemoveTextBetweenCheckedChanged);
//
//
// checkBoxRemoveWhereContains
//
//
this.checkBoxRemoveWhereContains.AutoSize = true;
this.checkBoxRemoveWhereContains.Location = new System.Drawing.Point(241, 92);
this.checkBoxRemoveWhereContains.Name = "checkBoxRemoveWhereContains";
@ -226,9 +226,9 @@
this.checkBoxRemoveWhereContains.Text = "Remove text if it contains:";
this.checkBoxRemoveWhereContains.UseVisualStyleBackColor = true;
this.checkBoxRemoveWhereContains.CheckedChanged += new System.EventHandler(this.CheckBoxRemoveTextBetweenCheckedChanged);
//
//
// comboBoxCustomEnd
//
//
this.comboBoxCustomEnd.FormattingEnabled = true;
this.comboBoxCustomEnd.Items.AddRange(new object[] {
"¶",
@ -241,9 +241,9 @@
this.comboBoxCustomEnd.TabIndex = 8;
this.comboBoxCustomEnd.Text = "¶";
this.comboBoxCustomEnd.TextChanged += new System.EventHandler(this.CheckBoxRemoveTextBetweenCheckedChanged);
//
//
// comboBoxCustomStart
//
//
this.comboBoxCustomStart.FormattingEnabled = true;
this.comboBoxCustomStart.Items.AddRange(new object[] {
"¶",
@ -256,9 +256,9 @@
this.comboBoxCustomStart.TabIndex = 6;
this.comboBoxCustomStart.Text = "¶";
this.comboBoxCustomStart.TextChanged += new System.EventHandler(this.CheckBoxRemoveTextBetweenCheckedChanged);
//
//
// checkBoxRemoveTextBeforeColonOnlyUppercase
//
//
this.checkBoxRemoveTextBeforeColonOnlyUppercase.AutoSize = true;
this.checkBoxRemoveTextBeforeColonOnlyUppercase.Location = new System.Drawing.Point(261, 46);
this.checkBoxRemoveTextBeforeColonOnlyUppercase.Name = "checkBoxRemoveTextBeforeColonOnlyUppercase";
@ -267,9 +267,9 @@
this.checkBoxRemoveTextBeforeColonOnlyUppercase.Text = "Only if text is UPPERCASE";
this.checkBoxRemoveTextBeforeColonOnlyUppercase.UseVisualStyleBackColor = true;
this.checkBoxRemoveTextBeforeColonOnlyUppercase.CheckedChanged += new System.EventHandler(this.CheckBoxRemoveTextBetweenCheckedChanged);
//
//
// checkBoxOnlyIfInSeparateLine
//
//
this.checkBoxOnlyIfInSeparateLine.AutoSize = true;
this.checkBoxOnlyIfInSeparateLine.Location = new System.Drawing.Point(21, 172);
this.checkBoxOnlyIfInSeparateLine.Name = "checkBoxOnlyIfInSeparateLine";
@ -278,9 +278,9 @@
this.checkBoxOnlyIfInSeparateLine.Text = "Only if on separate line";
this.checkBoxOnlyIfInSeparateLine.UseVisualStyleBackColor = true;
this.checkBoxOnlyIfInSeparateLine.CheckedChanged += new System.EventHandler(this.CheckBoxRemoveTextBetweenCheckedChanged);
//
//
// checkBoxRemoveTextBetweenCustomTags
//
//
this.checkBoxRemoveTextBetweenCustomTags.AutoSize = true;
this.checkBoxRemoveTextBetweenCustomTags.Checked = true;
this.checkBoxRemoveTextBetweenCustomTags.CheckState = System.Windows.Forms.CheckState.Checked;
@ -290,9 +290,9 @@
this.checkBoxRemoveTextBetweenCustomTags.TabIndex = 5;
this.checkBoxRemoveTextBetweenCustomTags.UseVisualStyleBackColor = true;
this.checkBoxRemoveTextBetweenCustomTags.CheckedChanged += new System.EventHandler(this.CheckBoxRemoveTextBetweenCheckedChanged);
//
//
// checkBoxRemoveTextBetweenQuestionMarks
//
//
this.checkBoxRemoveTextBetweenQuestionMarks.AutoSize = true;
this.checkBoxRemoveTextBetweenQuestionMarks.Checked = true;
this.checkBoxRemoveTextBetweenQuestionMarks.CheckState = System.Windows.Forms.CheckState.Checked;
@ -303,9 +303,9 @@
this.checkBoxRemoveTextBetweenQuestionMarks.Text = "\"?\" and \"?\"";
this.checkBoxRemoveTextBetweenQuestionMarks.UseVisualStyleBackColor = true;
this.checkBoxRemoveTextBetweenQuestionMarks.CheckedChanged += new System.EventHandler(this.CheckBoxRemoveTextBetweenCheckedChanged);
//
//
// checkBoxRemoveTextBetweenParentheses
//
//
this.checkBoxRemoveTextBetweenParentheses.AutoSize = true;
this.checkBoxRemoveTextBetweenParentheses.Checked = true;
this.checkBoxRemoveTextBetweenParentheses.CheckState = System.Windows.Forms.CheckState.Checked;
@ -316,9 +316,9 @@
this.checkBoxRemoveTextBetweenParentheses.Text = "\"(\" and \")\"";
this.checkBoxRemoveTextBetweenParentheses.UseVisualStyleBackColor = true;
this.checkBoxRemoveTextBetweenParentheses.CheckedChanged += new System.EventHandler(this.CheckBoxRemoveTextBetweenCheckedChanged);
//
//
// checkBoxRemoveTextBetweenBrackets
//
//
this.checkBoxRemoveTextBetweenBrackets.AutoSize = true;
this.checkBoxRemoveTextBetweenBrackets.Checked = true;
this.checkBoxRemoveTextBetweenBrackets.CheckState = System.Windows.Forms.CheckState.Checked;
@ -329,9 +329,9 @@
this.checkBoxRemoveTextBetweenBrackets.Text = "\"{\" and \"}\"";
this.checkBoxRemoveTextBetweenBrackets.UseVisualStyleBackColor = true;
this.checkBoxRemoveTextBetweenBrackets.CheckedChanged += new System.EventHandler(this.CheckBoxRemoveTextBetweenCheckedChanged);
//
//
// checkBoxRemoveTextBetweenSquares
//
//
this.checkBoxRemoveTextBetweenSquares.AutoSize = true;
this.checkBoxRemoveTextBetweenSquares.Checked = true;
this.checkBoxRemoveTextBetweenSquares.CheckState = System.Windows.Forms.CheckState.Checked;
@ -342,18 +342,18 @@
this.checkBoxRemoveTextBetweenSquares.Text = "\"[\" and \"]\"";
this.checkBoxRemoveTextBetweenSquares.UseVisualStyleBackColor = true;
this.checkBoxRemoveTextBetweenSquares.CheckedChanged += new System.EventHandler(this.CheckBoxRemoveTextBetweenCheckedChanged);
//
//
// labelAnd
//
//
this.labelAnd.AutoSize = true;
this.labelAnd.Location = new System.Drawing.Point(85, 141);
this.labelAnd.Name = "labelAnd";
this.labelAnd.Size = new System.Drawing.Size(25, 13);
this.labelAnd.TabIndex = 7;
this.labelAnd.Text = "and";
//
//
// FormRemoveTextForHearImpaired
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(697, 507);

View File

@ -89,7 +89,7 @@ namespace Nikse.SubtitleEdit.Forms
if (s.StartsWith("-") && s.Length > 2)
s = s.TrimStart('-');
return s.Trim();
}
@ -135,7 +135,7 @@ namespace Nikse.SubtitleEdit.Forms
}
if (checkBoxRemoveTextBetweenQuestionMarks.Checked)
{
{
text = RemoveTextBetweenTags("?", "?:", text);
text = RemoveTextBetweenTags("?", "?", text);
}
@ -388,10 +388,10 @@ namespace Nikse.SubtitleEdit.Forms
}
newText = newText.Trim();
if (noOfNames > 0 && Utilities.CountTagInText(newText, Environment.NewLine) == 1)
{
{
int indexOfDialogChar = newText.IndexOf('-');
bool insertDash = true;
string[] arr = newText.Split(Environment.NewLine.ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
string[] arr = newText.Split(Environment.NewLine.ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
if (arr.Length == 2 && arr[0].Length > 1 && arr[1].Length > 1)
{
string arr0 = new StripableText(arr[0]).StrippedText;
@ -407,7 +407,7 @@ namespace Nikse.SubtitleEdit.Forms
{
insertDash = false;
}
}
if (insertDash)
@ -437,7 +437,7 @@ namespace Nikse.SubtitleEdit.Forms
}
return newText;
}
internal string RemoveTextFromHearImpaired(string text)
{
if (checkBoxRemoveWhereContains.Checked && comboBoxRemoveIfTextContains.Text.Length > 0 && text.Contains(comboBoxRemoveIfTextContains.Text))
@ -526,7 +526,7 @@ namespace Nikse.SubtitleEdit.Forms
text = RemoveHearImpairedTags(text);
// fix 3 lines to two liners - if only two lines
// fix 3 lines to two liners - if only two lines
if (noOfNamesRemoved >= 1 && Utilities.CountTagInText(text, Environment.NewLine) == 2)
{
string[] a = Utilities.RemoveHtmlTags(text).Replace(" ", string.Empty).Split("!?.".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
@ -599,11 +599,11 @@ namespace Nikse.SubtitleEdit.Forms
text = text.ToLower();
text = text.TrimEnd(" ()[]?{}".ToCharArray());
text = text.TrimStart(" ()[]?{}".ToCharArray());
if (text == "sighing" ||
text == "laughs" ||
text == "chuckles" ||
text == "scoff" ||
text == "scoff" ||
text == "sighs" ||
text == "whispers" ||
text == "whisper" ||
@ -631,7 +631,7 @@ namespace Nikse.SubtitleEdit.Forms
result = result.TrimEnd(" ()[]?{}".ToCharArray());
result = result.TrimStart(" ()[]?{}".ToCharArray());
return result;
}
}
private string RemoveInterjections(string text)
{
@ -639,7 +639,7 @@ namespace Nikse.SubtitleEdit.Forms
foreach (string s in arr)
{
if (text.Contains(s))
{
{
Regex regex = new Regex(s);
Match match = regex.Match(text);
if (match.Success)
@ -671,7 +671,7 @@ namespace Nikse.SubtitleEdit.Forms
}
}
return text;
}
}
private string RemoveStartEndTags(string text)
{

View File

@ -39,9 +39,9 @@
this.labelFindWhat = new System.Windows.Forms.Label();
this.buttonFind = new System.Windows.Forms.Button();
this.SuspendLayout();
//
//
// radioButtonRegEx
//
//
this.radioButtonRegEx.AutoSize = true;
this.radioButtonRegEx.Location = new System.Drawing.Point(17, 97);
this.radioButtonRegEx.Name = "radioButtonRegEx";
@ -50,9 +50,9 @@
this.radioButtonRegEx.Text = "RegEx";
this.radioButtonRegEx.UseVisualStyleBackColor = true;
this.radioButtonRegEx.CheckedChanged += new System.EventHandler(this.RadioButtonCheckedChanged);
//
//
// radioButtonCaseSensitive
//
//
this.radioButtonCaseSensitive.AutoSize = true;
this.radioButtonCaseSensitive.Location = new System.Drawing.Point(17, 74);
this.radioButtonCaseSensitive.Name = "radioButtonCaseSensitive";
@ -61,9 +61,9 @@
this.radioButtonCaseSensitive.Text = "Case sensitive";
this.radioButtonCaseSensitive.UseVisualStyleBackColor = true;
this.radioButtonCaseSensitive.CheckedChanged += new System.EventHandler(this.RadioButtonCheckedChanged);
//
//
// radioButtonNormal
//
//
this.radioButtonNormal.AutoSize = true;
this.radioButtonNormal.Checked = true;
this.radioButtonNormal.Location = new System.Drawing.Point(17, 51);
@ -74,9 +74,9 @@
this.radioButtonNormal.Text = "Normal";
this.radioButtonNormal.UseVisualStyleBackColor = true;
this.radioButtonNormal.CheckedChanged += new System.EventHandler(this.RadioButtonCheckedChanged);
//
//
// buttonReplace
//
//
this.buttonReplace.Location = new System.Drawing.Point(96, 180);
this.buttonReplace.Name = "buttonReplace";
this.buttonReplace.Size = new System.Drawing.Size(75, 21);
@ -84,17 +84,17 @@
this.buttonReplace.Text = "Replace";
this.buttonReplace.UseVisualStyleBackColor = true;
this.buttonReplace.Click += new System.EventHandler(this.ButtonReplaceClick);
//
//
// textBoxFind
//
//
this.textBoxFind.Location = new System.Drawing.Point(15, 25);
this.textBoxFind.Name = "textBoxFind";
this.textBoxFind.Size = new System.Drawing.Size(262, 21);
this.textBoxFind.TabIndex = 0;
this.textBoxFind.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TextBoxFindKeyDown);
//
//
// buttonReplaceAll
//
//
this.buttonReplaceAll.Location = new System.Drawing.Point(177, 180);
this.buttonReplaceAll.Name = "buttonReplaceAll";
this.buttonReplaceAll.Size = new System.Drawing.Size(103, 21);
@ -102,35 +102,35 @@
this.buttonReplaceAll.Text = "Replace all";
this.buttonReplaceAll.UseVisualStyleBackColor = true;
this.buttonReplaceAll.Click += new System.EventHandler(this.ButtonReplaceAllClick);
//
//
// textBoxReplace
//
//
this.textBoxReplace.Location = new System.Drawing.Point(15, 144);
this.textBoxReplace.Name = "textBoxReplace";
this.textBoxReplace.Size = new System.Drawing.Size(265, 21);
this.textBoxReplace.TabIndex = 4;
this.textBoxReplace.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TextBoxFindKeyDown);
//
//
// labelReplaceWith
//
//
this.labelReplaceWith.AutoSize = true;
this.labelReplaceWith.Location = new System.Drawing.Point(12, 127);
this.labelReplaceWith.Name = "labelReplaceWith";
this.labelReplaceWith.Size = new System.Drawing.Size(72, 13);
this.labelReplaceWith.TabIndex = 14;
this.labelReplaceWith.Text = "Replace with:";
//
//
// labelFindWhat
//
//
this.labelFindWhat.AutoSize = true;
this.labelFindWhat.Location = new System.Drawing.Point(12, 8);
this.labelFindWhat.Name = "labelFindWhat";
this.labelFindWhat.Size = new System.Drawing.Size(58, 13);
this.labelFindWhat.TabIndex = 15;
this.labelFindWhat.Text = "Find what:";
//
//
// buttonFind
//
//
this.buttonFind.Location = new System.Drawing.Point(15, 180);
this.buttonFind.Name = "buttonFind";
this.buttonFind.Size = new System.Drawing.Size(75, 21);
@ -138,9 +138,9 @@
this.buttonFind.Text = "Find";
this.buttonFind.UseVisualStyleBackColor = true;
this.buttonFind.Click += new System.EventHandler(this.ButtonFindClick);
//
//
// ReplaceDialog
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(330, 208);

View File

@ -46,7 +46,7 @@ namespace Nikse.SubtitleEdit.Forms
public bool ReplaceAll { get; set; }
public bool FindOnly { get; set; }
public FindType GetFindType()
{
if (radioButtonNormal.Checked)

View File

@ -38,9 +38,9 @@
this.groupBoxLinesFound.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownMinMillisecondsBetweenLines)).BeginInit();
this.SuspendLayout();
//
//
// groupBoxLinesFound
//
//
this.groupBoxLinesFound.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)));
@ -51,9 +51,9 @@
this.groupBoxLinesFound.TabIndex = 14;
this.groupBoxLinesFound.TabStop = false;
this.groupBoxLinesFound.Text = "Preview";
//
//
// SubtitleListview1
//
//
this.SubtitleListview1.AllowDrop = true;
this.SubtitleListview1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
@ -69,9 +69,9 @@
this.SubtitleListview1.TabIndex = 5;
this.SubtitleListview1.UseCompatibleStateImageBehavior = false;
this.SubtitleListview1.View = System.Windows.Forms.View.Details;
//
//
// numericUpDownMinMillisecondsBetweenLines
//
//
this.numericUpDownMinMillisecondsBetweenLines.Location = new System.Drawing.Point(18, 34);
this.numericUpDownMinMillisecondsBetweenLines.Maximum = new decimal(new int[] {
1000,
@ -93,18 +93,18 @@
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(172, 13);
this.labelMaxMillisecondsBetweenLines.TabIndex = 35;
this.labelMaxMillisecondsBetweenLines.Text = "Mininum milliseconds between lines";
//
//
// buttonOK
//
//
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonOK.Location = new System.Drawing.Point(595, 447);
this.buttonOK.Name = "buttonOK";
@ -113,9 +113,9 @@
this.buttonOK.Text = "&OK";
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
//
//
// buttonCancel
//
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.Location = new System.Drawing.Point(676, 447);
@ -125,9 +125,9 @@
this.buttonCancel.Text = "C&ancel";
this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
//
//
// checkBoxShowOnlyChangedLines
//
//
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, 448);
@ -137,9 +137,9 @@
this.checkBoxShowOnlyChangedLines.Text = "Show only modified lines";
this.checkBoxShowOnlyChangedLines.UseVisualStyleBackColor = true;
this.checkBoxShowOnlyChangedLines.CheckedChanged += new System.EventHandler(this.checkBoxShowOnlyChangedLines_CheckedChanged);
//
//
// SetMinimumDisplayTimeBetweenParagraphs
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(754, 480);

View File

@ -49,9 +49,9 @@
this.groupBoxSyncPointTimeCode.SuspendLayout();
this.groupBox2.SuspendLayout();
this.SuspendLayout();
//
//
// groupBoxSyncPointTimeCode
//
//
this.groupBoxSyncPointTimeCode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.groupBoxSyncPointTimeCode.Controls.Add(this.timeUpDownLine);
@ -61,9 +61,9 @@
this.groupBoxSyncPointTimeCode.TabIndex = 1;
this.groupBoxSyncPointTimeCode.TabStop = false;
this.groupBoxSyncPointTimeCode.Text = "Sync point time code";
//
//
// timeUpDownLine
//
//
this.timeUpDownLine.AutoSize = true;
this.timeUpDownLine.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.timeUpDownLine.Location = new System.Drawing.Point(18, 19);
@ -71,9 +71,9 @@
this.timeUpDownLine.Name = "timeUpDownLine";
this.timeUpDownLine.Size = new System.Drawing.Size(92, 25);
this.timeUpDownLine.TabIndex = 1;
//
//
// groupBox2
//
//
this.groupBox2.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)));
@ -83,9 +83,9 @@
this.groupBox2.Size = new System.Drawing.Size(554, 182);
this.groupBox2.TabIndex = 10;
this.groupBox2.TabStop = false;
//
//
// 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)));
@ -101,9 +101,9 @@
this.subtitleListView1.UseCompatibleStateImageBehavior = false;
this.subtitleListView1.View = System.Windows.Forms.View.Details;
this.subtitleListView1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.subtitleListView1_MouseDoubleClick);
//
//
// buttonCancel
//
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonCancel.Location = new System.Drawing.Point(662, 542);
@ -113,9 +113,9 @@
this.buttonCancel.Text = "C&ancel";
this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
//
//
// buttonSetSyncPoint
//
//
this.buttonSetSyncPoint.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonSetSyncPoint.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonSetSyncPoint.Location = new System.Drawing.Point(533, 542);
@ -125,13 +125,13 @@
this.buttonSetSyncPoint.Text = "&Set sync point";
this.buttonSetSyncPoint.UseVisualStyleBackColor = true;
this.buttonSetSyncPoint.Click += new System.EventHandler(this.buttonOK_Click);
//
//
// openFileDialog1
//
//
this.openFileDialog1.FileName = "openFileDialog1";
//
//
// buttonOpenMovie
//
//
this.buttonOpenMovie.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonOpenMovie.Location = new System.Drawing.Point(631, 200);
this.buttonOpenMovie.Name = "buttonOpenMovie";
@ -140,14 +140,14 @@
this.buttonOpenMovie.Text = "Open movie...";
this.buttonOpenMovie.UseVisualStyleBackColor = true;
this.buttonOpenMovie.Click += new System.EventHandler(this.buttonOpenMovie_Click);
//
//
// timer1
//
//
this.timer1.Interval = 50;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
//
// labelVideoFileName
//
//
this.labelVideoFileName.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.labelVideoFileName.AutoSize = true;
this.labelVideoFileName.Location = new System.Drawing.Point(12, 209);
@ -155,9 +155,9 @@
this.labelVideoFileName.Size = new System.Drawing.Size(98, 13);
this.labelVideoFileName.TabIndex = 21;
this.labelVideoFileName.Text = "labelVideoFileName";
//
//
// buttonHalfASecondBack
//
//
this.buttonHalfASecondBack.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.buttonHalfASecondBack.Location = new System.Drawing.Point(12, 526);
this.buttonHalfASecondBack.Name = "buttonHalfASecondBack";
@ -166,9 +166,9 @@
this.buttonHalfASecondBack.Text = "&½ second <";
this.buttonHalfASecondBack.UseVisualStyleBackColor = true;
this.buttonHalfASecondBack.Click += new System.EventHandler(this.buttonStartHalfASecondBack_Click);
//
//
// buttonThreeSecondsBack
//
//
this.buttonThreeSecondsBack.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.buttonThreeSecondsBack.Location = new System.Drawing.Point(95, 526);
this.buttonThreeSecondsBack.Name = "buttonThreeSecondsBack";
@ -177,9 +177,9 @@
this.buttonThreeSecondsBack.Text = "&3 seconds <";
this.buttonThreeSecondsBack.UseVisualStyleBackColor = true;
this.buttonThreeSecondsBack.Click += new System.EventHandler(this.buttonStartThreeSecondsBack_Click);
//
//
// buttonThreeSecondsAhead
//
//
this.buttonThreeSecondsAhead.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.buttonThreeSecondsAhead.Location = new System.Drawing.Point(303, 526);
this.buttonThreeSecondsAhead.Name = "buttonThreeSecondsAhead";
@ -188,9 +188,9 @@
this.buttonThreeSecondsAhead.Text = "3 seconds >";
this.buttonThreeSecondsAhead.UseVisualStyleBackColor = true;
this.buttonThreeSecondsAhead.Click += new System.EventHandler(this.buttonStartThreeSecondsAhead_Click);
//
//
// buttonHalfASecondAhead
//
//
this.buttonHalfASecondAhead.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.buttonHalfASecondAhead.Location = new System.Drawing.Point(386, 526);
this.buttonHalfASecondAhead.Name = "buttonHalfASecondAhead";
@ -199,9 +199,9 @@
this.buttonHalfASecondAhead.Text = "½ second >";
this.buttonHalfASecondAhead.UseVisualStyleBackColor = true;
this.buttonHalfASecondAhead.Click += new System.EventHandler(this.buttonStartHalfASecondAhead_Click);
//
//
// buttonVerify
//
//
this.buttonVerify.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.buttonVerify.Location = new System.Drawing.Point(178, 526);
this.buttonVerify.Name = "buttonVerify";
@ -210,9 +210,9 @@
this.buttonVerify.Text = "Play 2 secs and back";
this.buttonVerify.UseVisualStyleBackColor = true;
this.buttonVerify.Click += new System.EventHandler(this.buttonStartVerify_Click);
//
//
// labelSubtitle
//
//
this.labelSubtitle.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.labelSubtitle.BackColor = System.Drawing.Color.Black;
@ -224,9 +224,9 @@
this.labelSubtitle.TabIndex = 27;
this.labelSubtitle.Text = "labelSubtitle";
this.labelSubtitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
//
// videoPlayerContainer1
//
//
this.videoPlayerContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.videoPlayerContainer1.BackColor = System.Drawing.Color.Black;
@ -239,9 +239,9 @@
this.videoPlayerContainer1.TabIndex = 13;
this.videoPlayerContainer1.VideoPlayer = null;
this.videoPlayerContainer1.Volume = 0D;
//
//
// SetSyncPoint
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(749, 568);

View File

@ -140,7 +140,7 @@ namespace Nikse.SubtitleEdit.Forms
timer1.Start();
videoPlayerContainer1.Pause();
if (_guess != null && _guess.TotalMilliseconds > 0 && _guess.TotalMilliseconds / 1000.0 < videoPlayerContainer1.VideoPlayer.Duration)
{
videoPlayerContainer1.VideoPlayer.CurrentPosition = _guess.TotalMilliseconds / 1000.0;
@ -314,7 +314,7 @@ namespace Nikse.SubtitleEdit.Forms
videoPlayerContainer1.Pause();
videoPlayerContainer1.CurrentPosition = _subtitle.Paragraphs[index].StartTime.TotalMilliseconds / 1000.0;
}
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -23,7 +23,7 @@ namespace Nikse.SubtitleEdit.Forms
List<string> _wordListNamesEtc = new List<string>();
List<string> _userWordList = new List<string>();
Dictionary<string, string> _ocrFixWords = new Dictionary<string, string>();
Dictionary<string, string> _ocrFixPartialLines = new Dictionary<string, string>();
Dictionary<string, string> _ocrFixPartialLines = new Dictionary<string, string>();
class ComboBoxLanguage
{
@ -35,7 +35,7 @@ namespace Nikse.SubtitleEdit.Forms
}
public Settings()
{
{
InitializeComponent();
labelStatus.Text = string.Empty;
@ -112,7 +112,7 @@ namespace Nikse.SubtitleEdit.Forms
textBoxCustomSearchUrl.Text = Configuration.Settings.VideoControls.CustomSearchUrl;
foreach (var x in System.Drawing.FontFamily.Families)
{
{
comboBoxSubtitleFont.Items.Add(x.Name);
if (string.Compare(x.Name, gs.SubtitleFontName, true) == 0)
comboBoxSubtitleFont.SelectedIndex = comboBoxSubtitleFont.Items.Count - 1;
@ -184,10 +184,10 @@ namespace Nikse.SubtitleEdit.Forms
checkBoxAutoWrapWhileTyping.Text = language.AutoWrapWhileTyping;
labelSubtitleFont.Text = language.SubtitleFont;
labelSubtitleFontSize.Text = language.SubtitleFontSize;
checkBoxSubtitleFontBold.Text = language.SubtitleBold;
checkBoxSubtitleFontBold.Text = language.SubtitleBold;
labelSubtitleFontColor.Text = language.SubtitleFontColor;
labelSubtitleFontBackgroundColor.Text = language.SubtitleBackgroundColor;
labelSpellChecker.Text = language.SpellChecker;
labelSpellChecker.Text = language.SpellChecker;
checkBoxRememberRecentFiles.Text = language.RememberRecentFiles;
checkBoxReopenLastOpened.Text = language.StartWithLastFileLoaded;
checkBoxRememberSelectedLine.Text = language.RememberSelectedLine;
@ -344,7 +344,7 @@ namespace Nikse.SubtitleEdit.Forms
comboBoxMergeShortLineLength.Items.Clear();
for (int i = 10; i < 100; i++)
comboBoxMergeShortLineLength.Items.Add(i.ToString());
if (toolsSettings.MergeLinesShorterThan >= 10 && toolsSettings.MergeLinesShorterThan - 10 < comboBoxMergeShortLineLength.Items.Count)
comboBoxMergeShortLineLength.SelectedIndex = toolsSettings.MergeLinesShorterThan - 10;
else
@ -369,7 +369,7 @@ namespace Nikse.SubtitleEdit.Forms
comboBoxToolsMusicSymbol.Items.Clear();
comboBoxToolsMusicSymbol.Items.Add("♪");
comboBoxToolsMusicSymbol.Items.Add("♫");
comboBoxToolsMusicSymbol.Items.Add("♫");
comboBoxToolsMusicSymbol.Items.Add("♪♪");
comboBoxToolsMusicSymbol.Items.Add("*");
comboBoxToolsMusicSymbol.Items.Add("#");
@ -393,17 +393,17 @@ namespace Nikse.SubtitleEdit.Forms
{
comboBoxToolsMusicSymbol.SelectedIndex = 4;
}
else
else
{
comboBoxToolsMusicSymbol.Items.Add(toolsSettings.MusicSymbol);
comboBoxToolsMusicSymbol.SelectedIndex = 5;
}
textBoxMusicSymbolsToReplace.Text = toolsSettings.MusicSymbolToReplace;
checkBoxFixCommonOcrErrorsUsingHardcodedRules.Checked = toolsSettings.OcrFixUseHardcodedRules;
checkBoxSpellCheckAutoChangeNames.Checked = toolsSettings.SpellCheckAutoChangeNames;
buttonOK.Text = Configuration.Settings.Language.General.OK;
buttonCancel.Text = Configuration.Settings.Language.General.Cancel;
@ -460,7 +460,7 @@ namespace Nikse.SubtitleEdit.Forms
TreeNode SyncNode = new TreeNode(Configuration.Settings.Language.Main.Menu.Synchronization.Title);
SyncNode.Nodes.Add(Configuration.Settings.Language.Main.Menu.Synchronization.AdjustAllTimes + GetShortcutText(Configuration.Settings.Shortcuts.MainSynchronizationAdjustTimes));
treeViewShortcuts.Nodes.Add(SyncNode);
//<MainListViewItalic>Control+G</MainListViewItalic>
TreeNode ListViewNode = new TreeNode(Configuration.Settings.Language.Main.Controls.ListView);
ListViewNode.Nodes.Add(Configuration.Settings.Language.General.Italic + GetShortcutText(Configuration.Settings.Shortcuts.MainListViewItalic));
@ -503,13 +503,13 @@ namespace Nikse.SubtitleEdit.Forms
comboBoxShortcutKey.Items[0] = Configuration.Settings.Language.General.None;
FixLargeFonts();
}
}
private string GetShortcutText(string shortcut)
{
if (string.IsNullOrEmpty(shortcut))
shortcut = Configuration.Settings.Language.General.None;
return string.Format(" [{0}]", shortcut);
return string.Format(" [{0}]", shortcut);
}
private void FixLargeFonts()
@ -568,7 +568,7 @@ namespace Nikse.SubtitleEdit.Forms
}
if (count > 0)
{
{
buttonWaveFormsFolderEmpty.Enabled = true;
labelWaveFormsFolderInfo.Text = string.Format(language.WaveformAndSpectrogramsFolderInfo, count, bytes / 1024.0 / 1024.0);
@ -576,11 +576,11 @@ namespace Nikse.SubtitleEdit.Forms
else
{
buttonWaveFormsFolderEmpty.Enabled = false;
labelWaveFormsFolderInfo.Text = string.Format(language.WaveformAndSpectrogramsFolderInfo, 0, 0);
labelWaveFormsFolderInfo.Text = string.Format(language.WaveformAndSpectrogramsFolderInfo, 0, 0);
}
}
public void Initialize(Icon icon, Image newFile, Image openFile, Image saveFile, Image SaveFileAs, Image find, Image replace,
public void Initialize(Icon icon, Image newFile, Image openFile, Image saveFile, Image SaveFileAs, Image find, Image replace,
Image visualSync, Image spellCheck, Image settings, Image help)
{
this.Icon = (Icon)icon.Clone();
@ -756,7 +756,7 @@ namespace Nikse.SubtitleEdit.Forms
gs.SubtitleLineMaximumLength = 68;
}
gs.AutoWrapLineWhileTyping = checkBoxAutoWrapWhileTyping.Checked;
if (comboBoxSubtitleFont.SelectedItem != null)
gs.SubtitleFontName = comboBoxSubtitleFont.SelectedItem.ToString();
@ -1016,7 +1016,7 @@ namespace Nikse.SubtitleEdit.Forms
{
var cb = comboBoxWordListLanguage.Items[comboBoxWordListLanguage.SelectedIndex] as ComboBoxLanguage;
if (cb == null)
return;
return;
_ocrFixWords = new Dictionary<string, string>();
_ocrFixPartialLines = new Dictionary<string, string>();
@ -1110,7 +1110,7 @@ namespace Nikse.SubtitleEdit.Forms
listBoxNamesEtc.EndUpdate();
}
catch
{
{
}
}
@ -1300,7 +1300,7 @@ namespace Nikse.SubtitleEdit.Forms
node.InnerText = word;
doc.DocumentElement.AppendChild(node);
}
doc.Save(userWordFileName);
doc.Save(userWordFileName);
LoadUserWords(language, false); // reload
buttonRemoveUserWord.Enabled = false;
@ -1357,7 +1357,7 @@ namespace Nikse.SubtitleEdit.Forms
var sortedDictionary = new SortedDictionary<string, string>();
foreach (var pair in dictionary)
sortedDictionary.Add(pair.Key, pair.Value);
string replaceListXmlFileName = Utilities.DictionaryFolder + cb.CultureInfo.ThreeLetterISOLanguageName + "_OCRFixReplaceList.xml";
var doc = new XmlDocument();
if (File.Exists(replaceListXmlFileName))
@ -1474,13 +1474,13 @@ namespace Nikse.SubtitleEdit.Forms
private void ListBoxKeyDownSearch(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Escape ||
if (e.KeyCode == Keys.Escape ||
e.KeyCode == Keys.Tab ||
e.KeyCode == Keys.Return ||
e.KeyCode == Keys.Enter ||
e.KeyCode == Keys.Down ||
e.KeyCode == Keys.Down ||
e.KeyCode == Keys.Up ||
e.KeyCode == Keys.PageDown ||
e.KeyCode == Keys.PageDown ||
e.KeyCode == Keys.PageUp ||
e.KeyCode == Keys.None ||
e.KeyCode == Keys.F1 ||
@ -1516,7 +1516,7 @@ namespace Nikse.SubtitleEdit.Forms
if (s.ToLower().StartsWith(_listBoxSearchString.ToLower()))
{
listBox.SelectedIndex = i;
break;
break;
}
i++;
}
@ -1536,7 +1536,7 @@ namespace Nikse.SubtitleEdit.Forms
else if (comboBoxCustomSearch.SelectedIndex == 1)
textBoxCustomSearchUrl.Text = "http://dictionary.reference.com/browse/{0}";
else if (comboBoxCustomSearch.SelectedIndex == 2)
textBoxCustomSearchUrl.Text = "http://www.visuwords.com/?word={0}";
textBoxCustomSearchUrl.Text = "http://www.visuwords.com/?word={0}";
}
}
@ -1594,14 +1594,14 @@ namespace Nikse.SubtitleEdit.Forms
foreach (FileInfo fileName in di.GetFiles("*.wav"))
{
try
{
File.Delete(fileName.FullName);
}
catch (Exception exception)
{
try
{
File.Delete(fileName.FullName);
}
catch (Exception exception)
{
MessageBox.Show(exception.Message);
}
}
}
}
@ -1721,10 +1721,10 @@ namespace Nikse.SubtitleEdit.Forms
i++;
}
}
}
}
}

View File

@ -40,18 +40,18 @@ namespace Nikse.SubtitleEdit.Forms
this.radioButtonSelectedLinesOnly = new System.Windows.Forms.RadioButton();
this.timeUpDownAdjust = new Nikse.SubtitleEdit.Controls.TimeUpDown();
this.SuspendLayout();
//
//
// labelHoursMinSecsMilliSecs
//
//
this.labelHoursMinSecsMilliSecs.AutoSize = true;
this.labelHoursMinSecsMilliSecs.Location = new System.Drawing.Point(11, 6);
this.labelHoursMinSecsMilliSecs.Name = "labelHoursMinSecsMilliSecs";
this.labelHoursMinSecsMilliSecs.Size = new System.Drawing.Size(108, 13);
this.labelHoursMinSecsMilliSecs.TabIndex = 18;
this.labelHoursMinSecsMilliSecs.Text = "Hours:min:sec.msecs";
//
//
// buttonShowLater
//
//
this.buttonShowLater.Location = new System.Drawing.Point(145, 53);
this.buttonShowLater.Name = "buttonShowLater";
this.buttonShowLater.Size = new System.Drawing.Size(119, 21);
@ -59,9 +59,9 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonShowLater.Text = "Show later";
this.buttonShowLater.UseVisualStyleBackColor = true;
this.buttonShowLater.Click += new System.EventHandler(this.ButtonShowLaterClick);
//
//
// buttonShowEarlier
//
//
this.buttonShowEarlier.Location = new System.Drawing.Point(145, 26);
this.buttonShowEarlier.Name = "buttonShowEarlier";
this.buttonShowEarlier.Size = new System.Drawing.Size(120, 21);
@ -69,22 +69,22 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonShowEarlier.Text = "Show earlier";
this.buttonShowEarlier.UseVisualStyleBackColor = true;
this.buttonShowEarlier.Click += new System.EventHandler(this.ButtonShowEarlierClick);
//
//
// labelTotalAdjustment
//
//
this.labelTotalAdjustment.AutoSize = true;
this.labelTotalAdjustment.Location = new System.Drawing.Point(12, 128);
this.labelTotalAdjustment.Name = "labelTotalAdjustment";
this.labelTotalAdjustment.Size = new System.Drawing.Size(108, 13);
this.labelTotalAdjustment.TabIndex = 38;
this.labelTotalAdjustment.Text = "labelTotalAdjustment";
//
//
// timer1
//
//
this.timer1.Interval = 250;
//
//
// radioButtonAllLines
//
//
this.radioButtonAllLines.AutoSize = true;
this.radioButtonAllLines.Location = new System.Drawing.Point(14, 70);
this.radioButtonAllLines.Name = "radioButtonAllLines";
@ -94,9 +94,9 @@ namespace Nikse.SubtitleEdit.Forms
this.radioButtonAllLines.Text = "All lines";
this.radioButtonAllLines.UseVisualStyleBackColor = true;
this.radioButtonAllLines.CheckedChanged += new System.EventHandler(this.radioButtonAllLines_CheckedChanged);
//
//
// radioButtonSelectedLinesOnly
//
//
this.radioButtonSelectedLinesOnly.AutoSize = true;
this.radioButtonSelectedLinesOnly.Location = new System.Drawing.Point(14, 93);
this.radioButtonSelectedLinesOnly.Name = "radioButtonSelectedLinesOnly";
@ -106,9 +106,9 @@ namespace Nikse.SubtitleEdit.Forms
this.radioButtonSelectedLinesOnly.Text = "Selected lines only";
this.radioButtonSelectedLinesOnly.UseVisualStyleBackColor = true;
this.radioButtonSelectedLinesOnly.CheckedChanged += new System.EventHandler(this.radioButtonAllLines_CheckedChanged);
//
//
// timeUpDownAdjust
//
//
this.timeUpDownAdjust.AutoSize = true;
this.timeUpDownAdjust.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.timeUpDownAdjust.Location = new System.Drawing.Point(12, 23);
@ -116,9 +116,9 @@ namespace Nikse.SubtitleEdit.Forms
this.timeUpDownAdjust.Name = "timeUpDownAdjust";
this.timeUpDownAdjust.Size = new System.Drawing.Size(92, 25);
this.timeUpDownAdjust.TabIndex = 21;
//
//
// ShowEarlierLater
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(291, 150);

View File

@ -37,9 +37,9 @@
this.buttonCompare = new System.Windows.Forms.Button();
this.buttonCompareHistory = new System.Windows.Forms.Button();
this.SuspendLayout();
//
//
// listViewHistory
//
//
this.listViewHistory.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.columnHeader1,
this.columnHeader2});
@ -52,19 +52,19 @@
this.listViewHistory.UseCompatibleStateImageBehavior = false;
this.listViewHistory.View = System.Windows.Forms.View.Details;
this.listViewHistory.SelectedIndexChanged += new System.EventHandler(this.ListViewHistorySelectedIndexChanged);
//
//
// columnHeader1
//
//
this.columnHeader1.Text = "Time";
this.columnHeader1.Width = 80;
//
//
// columnHeader2
//
//
this.columnHeader2.Text = "Description";
this.columnHeader2.Width = 365;
//
//
// buttonRollback
//
//
this.buttonRollback.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonRollback.Location = new System.Drawing.Point(490, 343);
this.buttonRollback.Name = "buttonRollback";
@ -73,9 +73,9 @@
this.buttonRollback.Text = "&Rollback";
this.buttonRollback.UseVisualStyleBackColor = true;
this.buttonRollback.Click += new System.EventHandler(this.ButtonOkClick);
//
//
// buttonCancel
//
//
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonCancel.Location = new System.Drawing.Point(594, 343);
@ -84,18 +84,18 @@
this.buttonCancel.TabIndex = 8;
this.buttonCancel.Text = "C&ancel";
this.buttonCancel.UseVisualStyleBackColor = true;
//
//
// label1
//
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 18);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(171, 13);
this.label1.TabIndex = 10;
this.label1.Text = "Select time/description for rollback";
//
//
// buttonCompare
//
//
this.buttonCompare.Enabled = false;
this.buttonCompare.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonCompare.Location = new System.Drawing.Point(490, 198);
@ -105,9 +105,9 @@
this.buttonCompare.Text = "&Compare with current";
this.buttonCompare.UseVisualStyleBackColor = true;
this.buttonCompare.Click += new System.EventHandler(this.ButtonCompareClick);
//
//
// buttonCompareHistory
//
//
this.buttonCompareHistory.Enabled = false;
this.buttonCompareHistory.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonCompareHistory.Location = new System.Drawing.Point(490, 171);
@ -117,9 +117,9 @@
this.buttonCompareHistory.Text = "&Compare history items";
this.buttonCompareHistory.UseVisualStyleBackColor = true;
this.buttonCompareHistory.Click += new System.EventHandler(this.ButtonCompareHistoryClick);
//
//
// ShowHistory
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(680, 373);

View File

@ -60,8 +60,8 @@ namespace Nikse.SubtitleEdit.Forms
var item = new ListViewItem("")
{
Tag = hi,
Text = string.Format("{0:00}:{1:00}:{2:00}",
hi.Timestamp.Hour,
Text = string.Format("{0:00}:{1:00}:{2:00}",
hi.Timestamp.Hour,
hi.Timestamp.Minute,
hi.Timestamp.Second)
};
@ -80,7 +80,7 @@ namespace Nikse.SubtitleEdit.Forms
private void ButtonOkClick(object sender, System.EventArgs e)
{
if (listViewHistory.SelectedItems.Count > 0)
{
{
_selectedIndex = listViewHistory.SelectedItems[0].Index;
DialogResult = DialogResult.OK;
}

View File

@ -59,9 +59,9 @@
this.groupBoxSuggestions.SuspendLayout();
this.groupBoxEditWholeText.SuspendLayout();
this.SuspendLayout();
//
//
// buttonAddToDictionary
//
//
this.buttonAddToDictionary.Location = new System.Drawing.Point(20, 131);
this.buttonAddToDictionary.Name = "buttonAddToDictionary";
this.buttonAddToDictionary.Size = new System.Drawing.Size(250, 21);
@ -69,9 +69,9 @@
this.buttonAddToDictionary.Text = "Add to user dictionary (not case sensitive)";
this.buttonAddToDictionary.UseVisualStyleBackColor = true;
this.buttonAddToDictionary.Click += new System.EventHandler(this.ButtonAddToDictionaryClick);
//
//
// buttonSkipOnce
//
//
this.buttonSkipOnce.Location = new System.Drawing.Point(20, 75);
this.buttonSkipOnce.Name = "buttonSkipOnce";
this.buttonSkipOnce.Size = new System.Drawing.Size(122, 21);
@ -79,9 +79,9 @@
this.buttonSkipOnce.Text = "Skip &once";
this.buttonSkipOnce.UseVisualStyleBackColor = true;
this.buttonSkipOnce.Click += new System.EventHandler(this.ButtonSkipOnceClick);
//
//
// comboBoxDictionaries
//
//
this.comboBoxDictionaries.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxDictionaries.FormattingEnabled = true;
this.comboBoxDictionaries.Location = new System.Drawing.Point(317, 33);
@ -89,18 +89,18 @@
this.comboBoxDictionaries.Size = new System.Drawing.Size(271, 21);
this.comboBoxDictionaries.TabIndex = 8;
this.comboBoxDictionaries.SelectedIndexChanged += new System.EventHandler(this.ComboBoxDictionariesSelectedIndexChanged);
//
//
// labelLanguage
//
//
this.labelLanguage.AutoSize = true;
this.labelLanguage.Location = new System.Drawing.Point(314, 14);
this.labelLanguage.Name = "labelLanguage";
this.labelLanguage.Size = new System.Drawing.Size(54, 13);
this.labelLanguage.TabIndex = 3;
this.labelLanguage.Text = "Language";
//
//
// richTextBoxParagraph
//
//
this.richTextBoxParagraph.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.richTextBoxParagraph.ContextMenuStrip = this.contextMenuStrip1;
this.richTextBoxParagraph.Location = new System.Drawing.Point(11, 33);
@ -109,50 +109,50 @@
this.richTextBoxParagraph.Size = new System.Drawing.Size(292, 54);
this.richTextBoxParagraph.TabIndex = 4;
this.richTextBoxParagraph.Text = "";
//
//
// contextMenuStrip1
//
//
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.addXToNamesnoiseListToolStripMenuItem});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(211, 26);
this.contextMenuStrip1.Opening += new System.ComponentModel.CancelEventHandler(this.ContextMenuStrip1Opening);
//
//
// addXToNamesnoiseListToolStripMenuItem
//
//
this.addXToNamesnoiseListToolStripMenuItem.Name = "addXToNamesnoiseListToolStripMenuItem";
this.addXToNamesnoiseListToolStripMenuItem.Size = new System.Drawing.Size(210, 22);
this.addXToNamesnoiseListToolStripMenuItem.Text = "Add x to names/noise list";
this.addXToNamesnoiseListToolStripMenuItem.Click += new System.EventHandler(this.AddXToNamesnoiseListToolStripMenuItemClick);
//
//
// listBoxSuggestions
//
//
this.listBoxSuggestions.FormattingEnabled = true;
this.listBoxSuggestions.Location = new System.Drawing.Point(8, 44);
this.listBoxSuggestions.Name = "listBoxSuggestions";
this.listBoxSuggestions.Size = new System.Drawing.Size(272, 82);
this.listBoxSuggestions.TabIndex = 11;
this.listBoxSuggestions.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.ListBoxSuggestionsMouseDoubleClick);
//
//
// labelFullText
//
//
this.labelFullText.AutoSize = true;
this.labelFullText.Location = new System.Drawing.Point(8, 14);
this.labelFullText.Name = "labelFullText";
this.labelFullText.Size = new System.Drawing.Size(46, 13);
this.labelFullText.TabIndex = 7;
this.labelFullText.Text = "Full text";
//
//
// textBoxWord
//
//
this.textBoxWord.Location = new System.Drawing.Point(20, 20);
this.textBoxWord.Name = "textBoxWord";
this.textBoxWord.Size = new System.Drawing.Size(250, 21);
this.textBoxWord.TabIndex = 1;
this.textBoxWord.TextChanged += new System.EventHandler(this.textBoxWord_TextChanged);
//
//
// buttonAbort
//
//
this.buttonAbort.Location = new System.Drawing.Point(510, 308);
this.buttonAbort.Name = "buttonAbort";
this.buttonAbort.Size = new System.Drawing.Size(85, 21);
@ -160,9 +160,9 @@
this.buttonAbort.Text = "Abort";
this.buttonAbort.UseVisualStyleBackColor = true;
this.buttonAbort.Click += new System.EventHandler(this.ButtonAbortClick);
//
//
// buttonSkipAll
//
//
this.buttonSkipAll.Location = new System.Drawing.Point(148, 75);
this.buttonSkipAll.Name = "buttonSkipAll";
this.buttonSkipAll.Size = new System.Drawing.Size(122, 21);
@ -170,9 +170,9 @@
this.buttonSkipAll.Text = "&Skip all";
this.buttonSkipAll.UseVisualStyleBackColor = true;
this.buttonSkipAll.Click += new System.EventHandler(this.ButtonSkipAllClick);
//
//
// buttonChange
//
//
this.buttonChange.Location = new System.Drawing.Point(20, 47);
this.buttonChange.Name = "buttonChange";
this.buttonChange.Size = new System.Drawing.Size(122, 21);
@ -180,9 +180,9 @@
this.buttonChange.Text = "Change";
this.buttonChange.UseVisualStyleBackColor = true;
this.buttonChange.Click += new System.EventHandler(this.ButtonChangeClick);
//
//
// buttonUseSuggestion
//
//
this.buttonUseSuggestion.Location = new System.Drawing.Point(93, 17);
this.buttonUseSuggestion.Name = "buttonUseSuggestion";
this.buttonUseSuggestion.Size = new System.Drawing.Size(90, 21);
@ -190,9 +190,9 @@
this.buttonUseSuggestion.Text = "Use";
this.buttonUseSuggestion.UseVisualStyleBackColor = true;
this.buttonUseSuggestion.Click += new System.EventHandler(this.ButtonUseSuggestionClick);
//
//
// buttonChangeAll
//
//
this.buttonChangeAll.Location = new System.Drawing.Point(148, 47);
this.buttonChangeAll.Name = "buttonChangeAll";
this.buttonChangeAll.Size = new System.Drawing.Size(122, 21);
@ -200,9 +200,9 @@
this.buttonChangeAll.Text = "Change all";
this.buttonChangeAll.UseVisualStyleBackColor = true;
this.buttonChangeAll.Click += new System.EventHandler(this.ButtonChangeAllClick);
//
//
// buttonUseSuggestionAlways
//
//
this.buttonUseSuggestionAlways.Location = new System.Drawing.Point(189, 17);
this.buttonUseSuggestionAlways.Name = "buttonUseSuggestionAlways";
this.buttonUseSuggestionAlways.Size = new System.Drawing.Size(90, 21);
@ -210,9 +210,9 @@
this.buttonUseSuggestionAlways.Text = "Use always";
this.buttonUseSuggestionAlways.UseVisualStyleBackColor = true;
this.buttonUseSuggestionAlways.Click += new System.EventHandler(this.ButtonUseSuggestionAlwaysClick);
//
//
// buttonAddToNames
//
//
this.buttonAddToNames.Location = new System.Drawing.Point(20, 103);
this.buttonAddToNames.Name = "buttonAddToNames";
this.buttonAddToNames.Size = new System.Drawing.Size(250, 21);
@ -220,9 +220,9 @@
this.buttonAddToNames.Text = "Add to names/noise list (case sensitive)";
this.buttonAddToNames.UseVisualStyleBackColor = true;
this.buttonAddToNames.Click += new System.EventHandler(this.ButtonAddToNamesClick);
//
//
// groupBoxWordNotFound
//
//
this.groupBoxWordNotFound.Controls.Add(this.buttonAddToNames);
this.groupBoxWordNotFound.Controls.Add(this.buttonAddToDictionary);
this.groupBoxWordNotFound.Controls.Add(this.buttonSkipOnce);
@ -236,9 +236,9 @@
this.groupBoxWordNotFound.TabIndex = 13;
this.groupBoxWordNotFound.TabStop = false;
this.groupBoxWordNotFound.Text = "Word not found";
//
//
// groupBoxSuggestions
//
//
this.groupBoxSuggestions.Controls.Add(this.buttonUseSuggestion);
this.groupBoxSuggestions.Controls.Add(this.buttonUseSuggestionAlways);
this.groupBoxSuggestions.Controls.Add(this.checkBoxAutoChangeNames);
@ -249,9 +249,9 @@
this.groupBoxSuggestions.TabIndex = 14;
this.groupBoxSuggestions.TabStop = false;
this.groupBoxSuggestions.Text = "Suggestions";
//
//
// checkBoxAutoChangeNames
//
//
this.checkBoxAutoChangeNames.AutoSize = true;
this.checkBoxAutoChangeNames.Location = new System.Drawing.Point(8, 157);
this.checkBoxAutoChangeNames.Name = "checkBoxAutoChangeNames";
@ -260,9 +260,9 @@
this.checkBoxAutoChangeNames.Text = "Auto fix names where only casing differ";
this.checkBoxAutoChangeNames.UseVisualStyleBackColor = true;
this.checkBoxAutoChangeNames.CheckedChanged += new System.EventHandler(this.CheckBoxAutoChangeNamesCheckedChanged);
//
//
// buttonEditWholeText
//
//
this.buttonEditWholeText.Location = new System.Drawing.Point(175, 91);
this.buttonEditWholeText.Name = "buttonEditWholeText";
this.buttonEditWholeText.Size = new System.Drawing.Size(128, 21);
@ -270,9 +270,9 @@
this.buttonEditWholeText.Text = "Edit whole text";
this.buttonEditWholeText.UseVisualStyleBackColor = true;
this.buttonEditWholeText.Click += new System.EventHandler(this.ButtonEditWholeTextClick);
//
//
// groupBoxEditWholeText
//
//
this.groupBoxEditWholeText.Controls.Add(this.buttonSkipText);
this.groupBoxEditWholeText.Controls.Add(this.buttonChangeWholeText);
this.groupBoxEditWholeText.Controls.Add(this.textBoxWholeText);
@ -282,9 +282,9 @@
this.groupBoxEditWholeText.TabIndex = 40;
this.groupBoxEditWholeText.TabStop = false;
this.groupBoxEditWholeText.Text = "Edit whole text";
//
//
// buttonSkipText
//
//
this.buttonSkipText.Location = new System.Drawing.Point(151, 88);
this.buttonSkipText.Name = "buttonSkipText";
this.buttonSkipText.Size = new System.Drawing.Size(135, 21);
@ -292,9 +292,9 @@
this.buttonSkipText.Text = "Skip once";
this.buttonSkipText.UseVisualStyleBackColor = true;
this.buttonSkipText.Click += new System.EventHandler(this.ButtonSkipTextClick);
//
//
// buttonChangeWholeText
//
//
this.buttonChangeWholeText.Location = new System.Drawing.Point(6, 88);
this.buttonChangeWholeText.Name = "buttonChangeWholeText";
this.buttonChangeWholeText.Size = new System.Drawing.Size(135, 21);
@ -302,18 +302,18 @@
this.buttonChangeWholeText.Text = "Change";
this.buttonChangeWholeText.UseVisualStyleBackColor = true;
this.buttonChangeWholeText.Click += new System.EventHandler(this.ButtonChangeWholeTextClick);
//
//
// textBoxWholeText
//
//
this.textBoxWholeText.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textBoxWholeText.Location = new System.Drawing.Point(6, 19);
this.textBoxWholeText.Multiline = true;
this.textBoxWholeText.Name = "textBoxWholeText";
this.textBoxWholeText.Size = new System.Drawing.Size(280, 63);
this.textBoxWholeText.TabIndex = 31;
//
//
// SpellCheck
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(605, 341);

View File

@ -153,7 +153,7 @@ namespace Nikse.SubtitleEdit.Forms
Match match = regEx.Match(richTextBoxParagraph.Text);
if (match.Success)
{
richTextBoxParagraph.SelectionStart = match.Index;
richTextBoxParagraph.SelectionLength = word.Length;
@ -183,7 +183,7 @@ namespace Nikse.SubtitleEdit.Forms
private void ButtonAbortClick(object sender, EventArgs e)
{
ShowEndStatusMessage(Configuration.Settings.Language.SpellCheck.SpellCheckAborted);
DialogResult = DialogResult.Abort;
DialogResult = DialogResult.Abort;
}
private void ButtonChangeClick(object sender, EventArgs e)
@ -249,12 +249,12 @@ namespace Nikse.SubtitleEdit.Forms
public bool DoSpell(string word)
{
return _hunspell.Spell(word);
return _hunspell.Spell(word);
}
public List<string> DoSuggest(string word)
{
return _hunspell.Suggest(word);
return _hunspell.Suggest(word);
}
private void ButtonChangeAllClick(object sender, EventArgs e)
@ -383,7 +383,7 @@ namespace Nikse.SubtitleEdit.Forms
string s = ChangeWord.Trim().ToLower();
if (s.Contains(" "))
_userPhraseList.Add(s);
else
else
_userWordList.Add(s);
XmlNode node = _userWordDictionary.CreateElement("word");
node.InnerText = s;
@ -448,7 +448,7 @@ namespace Nikse.SubtitleEdit.Forms
_words = s.Split(" .,-?!:;\"“”()[]{}|<>/+\r\n¿¡…—♪♫".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
_wordsIndex = 0;
if (_words.Length == 0)
{
{
_currentWord = string.Empty;
}
else

View File

@ -49,9 +49,9 @@
((System.ComponentModel.ISupportInitialize)(this.numericUpDownSingleLineMaxCharacters)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDownLineMaxCharacters)).BeginInit();
this.SuspendLayout();
//
//
// groupBoxLinesFound
//
//
this.groupBoxLinesFound.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBoxLinesFound.Controls.Add(this.listViewFixes);
@ -61,9 +61,9 @@
this.groupBoxLinesFound.TabIndex = 4;
this.groupBoxLinesFound.TabStop = false;
this.groupBoxLinesFound.Text = "Lines that will be splittet";
//
//
// listViewFixes
//
//
this.listViewFixes.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.listViewFixes.CheckBoxes = true;
@ -79,24 +79,24 @@
this.listViewFixes.UseCompatibleStateImageBehavior = false;
this.listViewFixes.View = System.Windows.Forms.View.Details;
this.listViewFixes.SelectedIndexChanged += new System.EventHandler(this.listViewFixes_SelectedIndexChanged);
//
//
// columnHeader4
//
//
this.columnHeader4.Text = "Apply";
this.columnHeader4.Width = 45;
//
//
// columnHeader5
//
//
this.columnHeader5.Text = "Line#";
this.columnHeader5.Width = 122;
//
//
// columnHeader7
//
//
this.columnHeader7.Text = "New text";
this.columnHeader7.Width = 500;
//
//
// numericUpDownSingleLineMaxCharacters
//
//
this.numericUpDownSingleLineMaxCharacters.Location = new System.Drawing.Point(28, 33);
this.numericUpDownSingleLineMaxCharacters.Maximum = new decimal(new int[] {
200,
@ -117,27 +117,27 @@
0,
0});
this.numericUpDownSingleLineMaxCharacters.ValueChanged += new System.EventHandler(this.NumericUpDownMaxCharactersValueChanged);
//
//
// labelLineMaxLength
//
//
this.labelLineMaxLength.AutoSize = true;
this.labelLineMaxLength.Location = new System.Drawing.Point(240, 16);
this.labelLineMaxLength.Name = "labelLineMaxLength";
this.labelLineMaxLength.Size = new System.Drawing.Size(105, 13);
this.labelLineMaxLength.TabIndex = 43;
this.labelLineMaxLength.Text = "Line maximum length";
//
//
// labelSingleLineMaxLength
//
//
this.labelSingleLineMaxLength.AutoSize = true;
this.labelSingleLineMaxLength.Location = new System.Drawing.Point(25, 16);
this.labelSingleLineMaxLength.Name = "labelSingleLineMaxLength";
this.labelSingleLineMaxLength.Size = new System.Drawing.Size(133, 13);
this.labelSingleLineMaxLength.TabIndex = 42;
this.labelSingleLineMaxLength.Text = "Single line maximum length";
//
//
// buttonOK
//
//
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonOK.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonOK.Location = new System.Drawing.Point(606, 581);
@ -147,9 +147,9 @@
this.buttonOK.Text = "&OK";
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
//
//
// buttonCancel
//
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.ImeMode = System.Windows.Forms.ImeMode.NoControl;
@ -160,9 +160,9 @@
this.buttonCancel.Text = "C&ancel";
this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
//
//
// numericUpDownLineMaxCharacters
//
//
this.numericUpDownLineMaxCharacters.Location = new System.Drawing.Point(243, 33);
this.numericUpDownLineMaxCharacters.Maximum = new decimal(new int[] {
200,
@ -183,9 +183,9 @@
0,
0});
this.numericUpDownLineMaxCharacters.ValueChanged += new System.EventHandler(this.NumericUpDownMaxCharactersValueChanged);
//
//
// labelMaxSingleLineLengthIs
//
//
this.labelMaxSingleLineLengthIs.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.labelMaxSingleLineLengthIs.AutoSize = true;
this.labelMaxSingleLineLengthIs.Location = new System.Drawing.Point(9, 579);
@ -194,9 +194,9 @@
this.labelMaxSingleLineLengthIs.TabIndex = 45;
this.labelMaxSingleLineLengthIs.Text = "Single line maximum length";
this.labelMaxSingleLineLengthIs.Click += new System.EventHandler(this.labelMaxSingleLineLengthIs_Click);
//
//
// labelMaxLineLengthIs
//
//
this.labelMaxLineLengthIs.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.labelMaxLineLengthIs.AutoSize = true;
this.labelMaxLineLengthIs.Location = new System.Drawing.Point(9, 597);
@ -205,9 +205,9 @@
this.labelMaxLineLengthIs.TabIndex = 46;
this.labelMaxLineLengthIs.Text = "Maximum length";
this.labelMaxLineLengthIs.Click += new System.EventHandler(this.labelMaxLineLengthIs_Click);
//
//
// comboBoxLineContinuationBegin
//
//
this.comboBoxLineContinuationBegin.FormattingEnabled = true;
this.comboBoxLineContinuationBegin.Items.AddRange(new object[] {
"- ",
@ -217,18 +217,18 @@
this.comboBoxLineContinuationBegin.Size = new System.Drawing.Size(80, 21);
this.comboBoxLineContinuationBegin.TabIndex = 2;
this.comboBoxLineContinuationBegin.SelectedIndexChanged += new System.EventHandler(this.ContinuationBeginEndChanged);
//
//
// labelLineContinuationBeginEnd
//
//
this.labelLineContinuationBeginEnd.AutoSize = true;
this.labelLineContinuationBeginEnd.Location = new System.Drawing.Point(475, 16);
this.labelLineContinuationBeginEnd.Name = "labelLineContinuationBeginEnd";
this.labelLineContinuationBeginEnd.Size = new System.Drawing.Size(173, 13);
this.labelLineContinuationBeginEnd.TabIndex = 48;
this.labelLineContinuationBeginEnd.Text = "Line continuation begin/end strings";
//
//
// comboBoxLineContinuationEnd
//
//
this.comboBoxLineContinuationEnd.FormattingEnabled = true;
this.comboBoxLineContinuationEnd.Items.AddRange(new object[] {
" -",
@ -238,9 +238,9 @@
this.comboBoxLineContinuationEnd.Size = new System.Drawing.Size(80, 21);
this.comboBoxLineContinuationEnd.TabIndex = 3;
this.comboBoxLineContinuationEnd.SelectedIndexChanged += new System.EventHandler(this.ContinuationBeginEndChanged);
//
//
// SubtitleListview1
//
//
this.SubtitleListview1.AllowDrop = true;
this.SubtitleListview1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
@ -256,9 +256,9 @@
this.SubtitleListview1.TabIndex = 5;
this.SubtitleListview1.UseCompatibleStateImageBehavior = false;
this.SubtitleListview1.View = System.Windows.Forms.View.Details;
//
//
// SplitLongLines
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(774, 614);

View File

@ -92,7 +92,7 @@ namespace Nikse.SubtitleEdit.Forms
var autoBreakedIndexes = new List<int>();
NumberOfSplits = 0;
SubtitleListview1.Items.Clear();
SubtitleListview1.Items.Clear();
SubtitleListview1.BeginUpdate();
int count;
_splittedSubtitle = SplitLongLinesInSubtitle(_subtitle, splittedIndexes, autoBreakedIndexes, out count, (int)numericUpDownLineMaxCharacters.Value, (int)numericUpDownSingleLineMaxCharacters.Value, clearFixes);
@ -136,7 +136,7 @@ namespace Nikse.SubtitleEdit.Forms
}
}
i++;
}
}
labelMaxSingleLineLengthIs.Text = string.Format(Configuration.Settings.Language.SplitLongLines.LongestSingleLineIsXAtY, singleLineMaxLength, singleLineMaxLengthIndex + 1);
labelMaxSingleLineLengthIs.Tag = singleLineMaxLengthIndex.ToString();
labelMaxLineLengthIs.Text = string.Format(Configuration.Settings.Language.SplitLongLines.LongestLineIsXAtY, maxLength, maxLengthIndex + 1);
@ -208,7 +208,7 @@ namespace Nikse.SubtitleEdit.Forms
p1Ends = true;
if (!p1Ends)
{
{
string post = string.Empty;
if (newParagraph1.Text.EndsWith("</i>"))
{

View File

@ -38,9 +38,9 @@
this.labelHoursMinSecsMilliSecs = new System.Windows.Forms.Label();
this.splitTimeUpDownAdjust = new Nikse.SubtitleEdit.Controls.TimeUpDown();
this.SuspendLayout();
//
//
// buttonGetFrameRate
//
//
this.buttonGetFrameRate.Location = new System.Drawing.Point(137, 69);
this.buttonGetFrameRate.Name = "buttonGetFrameRate";
this.buttonGetFrameRate.Size = new System.Drawing.Size(24, 22);
@ -48,9 +48,9 @@
this.buttonGetFrameRate.Text = "...";
this.buttonGetFrameRate.UseVisualStyleBackColor = true;
this.buttonGetFrameRate.Click += new System.EventHandler(this.buttonGetFrameRate_Click);
//
//
// buttonDone
//
//
this.buttonDone.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonDone.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonDone.Location = new System.Drawing.Point(239, 109);
@ -59,9 +59,9 @@
this.buttonDone.TabIndex = 18;
this.buttonDone.Text = "&Done";
this.buttonDone.UseVisualStyleBackColor = true;
//
//
// buttonSplit
//
//
this.buttonSplit.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonSplit.Location = new System.Drawing.Point(158, 109);
this.buttonSplit.Name = "buttonSplit";
@ -70,40 +70,40 @@
this.buttonSplit.Text = "&Split";
this.buttonSplit.UseVisualStyleBackColor = true;
this.buttonSplit.Click += new System.EventHandler(this.ButtonFixClick);
//
//
// label1
//
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(16, 12);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(217, 13);
this.label1.TabIndex = 19;
this.label1.Text = "Enter length of first part of video or browse";
//
//
// label2
//
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(16, 29);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(152, 13);
this.label2.TabIndex = 20;
this.label2.Text = "and get length from video file:";
//
//
// openFileDialog1
//
//
this.openFileDialog1.FileName = "openFileDialog1";
//
//
// labelHoursMinSecsMilliSecs
//
//
this.labelHoursMinSecsMilliSecs.AutoSize = true;
this.labelHoursMinSecsMilliSecs.Location = new System.Drawing.Point(26, 52);
this.labelHoursMinSecsMilliSecs.Name = "labelHoursMinSecsMilliSecs";
this.labelHoursMinSecsMilliSecs.Size = new System.Drawing.Size(108, 13);
this.labelHoursMinSecsMilliSecs.TabIndex = 22;
this.labelHoursMinSecsMilliSecs.Text = "Hours:min:sec.msecs";
//
//
// splitTimeUpDownAdjust
//
//
this.splitTimeUpDownAdjust.AutoSize = true;
this.splitTimeUpDownAdjust.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.splitTimeUpDownAdjust.Location = new System.Drawing.Point(29, 69);
@ -111,9 +111,9 @@
this.splitTimeUpDownAdjust.Name = "splitTimeUpDownAdjust";
this.splitTimeUpDownAdjust.Size = new System.Drawing.Size(92, 25);
this.splitTimeUpDownAdjust.TabIndex = 21;
//
//
// SplitSubtitle
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(325, 140);

View File

@ -33,27 +33,27 @@
this.buttonCancel = new System.Windows.Forms.Button();
this.buttonOK = new System.Windows.Forms.Button();
this.SuspendLayout();
//
//
// label1
//
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(24, 23);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(152, 21);
this.label1.TabIndex = 1;
this.label1.Text = "Start from number:";
//
//
// textBox1
//
//
this.textBox1.Location = new System.Drawing.Point(27, 41);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(104, 27);
this.textBox1.TabIndex = 0;
this.textBox1.Text = "1";
this.textBox1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TextBox1KeyDown);
//
//
// buttonCancel
//
//
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.Location = new System.Drawing.Point(113, 78);
this.buttonCancel.Name = "buttonCancel";
@ -61,9 +61,9 @@
this.buttonCancel.TabIndex = 2;
this.buttonCancel.Text = "C&ancel";
this.buttonCancel.UseVisualStyleBackColor = true;
//
//
// buttonOK
//
//
this.buttonOK.Location = new System.Drawing.Point(31, 78);
this.buttonOK.Name = "buttonOK";
this.buttonOK.Size = new System.Drawing.Size(75, 21);
@ -71,9 +71,9 @@
this.buttonOK.Text = "&OK";
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.ButtonOkClick);
//
//
// StartNumberingFrom
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 21F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(261, 113);

View File

@ -43,11 +43,11 @@
this.SubtitleListview1 = new Nikse.SubtitleEdit.Controls.SubtitleListView();
this.groupBoxImportResult.SuspendLayout();
this.SuspendLayout();
//
//
// groupBoxImportResult
//
this.groupBoxImportResult.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
//
this.groupBoxImportResult.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.groupBoxImportResult.Controls.Add(this.labelOtherSubtitleFileName);
this.groupBoxImportResult.Controls.Add(this.labelSubtitleFileName);
@ -63,27 +63,27 @@
this.groupBoxImportResult.Size = new System.Drawing.Size(1096, 434);
this.groupBoxImportResult.TabIndex = 16;
this.groupBoxImportResult.TabStop = false;
//
//
// labelOtherSubtitleFileName
//
//
this.labelOtherSubtitleFileName.AutoSize = true;
this.labelOtherSubtitleFileName.Location = new System.Drawing.Point(626, 17);
this.labelOtherSubtitleFileName.Name = "labelOtherSubtitleFileName";
this.labelOtherSubtitleFileName.Size = new System.Drawing.Size(136, 13);
this.labelOtherSubtitleFileName.TabIndex = 21;
this.labelOtherSubtitleFileName.Text = "labelOtherSubtitleFileName";
//
//
// labelSubtitleFileName
//
//
this.labelSubtitleFileName.AutoSize = true;
this.labelSubtitleFileName.Location = new System.Drawing.Point(6, 17);
this.labelSubtitleFileName.Name = "labelSubtitleFileName";
this.labelSubtitleFileName.Size = new System.Drawing.Size(108, 13);
this.labelSubtitleFileName.TabIndex = 20;
this.labelSubtitleFileName.Text = "labelSubtitleFileName";
//
//
// listBoxSyncPoints
//
//
this.listBoxSyncPoints.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.listBoxSyncPoints.FormattingEnabled = true;
this.listBoxSyncPoints.Location = new System.Drawing.Point(482, 214);
@ -91,9 +91,9 @@
this.listBoxSyncPoints.Size = new System.Drawing.Size(140, 82);
this.listBoxSyncPoints.TabIndex = 18;
this.listBoxSyncPoints.SelectedIndexChanged += new System.EventHandler(this.listBoxSyncPoints_SelectedIndexChanged);
//
//
// labelNoOfSyncPoints
//
//
this.labelNoOfSyncPoints.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.labelNoOfSyncPoints.AutoSize = true;
this.labelNoOfSyncPoints.Location = new System.Drawing.Point(481, 196);
@ -101,9 +101,9 @@
this.labelNoOfSyncPoints.Size = new System.Drawing.Size(75, 13);
this.labelNoOfSyncPoints.TabIndex = 16;
this.labelNoOfSyncPoints.Text = "Sync points: 0";
//
//
// labelSyncInfo
//
//
this.labelSyncInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.labelSyncInfo.AutoSize = true;
this.labelSyncInfo.Location = new System.Drawing.Point(6, 415);
@ -111,9 +111,9 @@
this.labelSyncInfo.Size = new System.Drawing.Size(284, 13);
this.labelSyncInfo.TabIndex = 17;
this.labelSyncInfo.Text = "Set at least two sync points to make rough syncronization";
//
//
// buttonRemoveSyncPoint
//
//
this.buttonRemoveSyncPoint.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.buttonRemoveSyncPoint.Location = new System.Drawing.Point(484, 170);
this.buttonRemoveSyncPoint.Name = "buttonRemoveSyncPoint";
@ -122,9 +122,9 @@
this.buttonRemoveSyncPoint.Text = "Remove sync point";
this.buttonRemoveSyncPoint.UseVisualStyleBackColor = true;
this.buttonRemoveSyncPoint.Click += new System.EventHandler(this.buttonRemoveSyncPoint_Click);
//
//
// buttonSetSyncPoint
//
//
this.buttonSetSyncPoint.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.buttonSetSyncPoint.Location = new System.Drawing.Point(484, 143);
this.buttonSetSyncPoint.Name = "buttonSetSyncPoint";
@ -133,9 +133,9 @@
this.buttonSetSyncPoint.Text = "Set sync point";
this.buttonSetSyncPoint.UseVisualStyleBackColor = true;
this.buttonSetSyncPoint.Click += new System.EventHandler(this.buttonSetSyncPoint_Click);
//
//
// buttonApplySync
//
//
this.buttonApplySync.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonApplySync.Enabled = false;
this.buttonApplySync.Location = new System.Drawing.Point(1029, 452);
@ -145,9 +145,9 @@
this.buttonApplySync.Text = "Apply";
this.buttonApplySync.UseVisualStyleBackColor = true;
this.buttonApplySync.Click += new System.EventHandler(this.buttonSync_Click);
//
//
// buttonCancel
//
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonCancel.Location = new System.Drawing.Point(948, 452);
@ -157,9 +157,9 @@
this.buttonCancel.Text = "C&ancel";
this.buttonCancel.UseVisualStyleBackColor = true;
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
//
//
// buttonOK
//
//
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonOK.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonOK.Location = new System.Drawing.Point(867, 452);
@ -169,9 +169,9 @@
this.buttonOK.Text = "&OK";
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
//
//
// subtitleListView2
//
//
this.subtitleListView2.AllowDrop = true;
this.subtitleListView2.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.subtitleListView2.DisplayExtraFromExtra = false;
@ -187,12 +187,12 @@
this.subtitleListView2.TabIndex = 19;
this.subtitleListView2.UseCompatibleStateImageBehavior = false;
this.subtitleListView2.View = System.Windows.Forms.View.Details;
//
//
// SubtitleListview1
//
//
this.SubtitleListview1.AllowDrop = true;
this.SubtitleListview1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
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.DisplayExtraFromExtra = false;
this.SubtitleListview1.FirstVisibleIndex = -1;
@ -208,9 +208,9 @@
this.SubtitleListview1.UseCompatibleStateImageBehavior = false;
this.SubtitleListview1.View = System.Windows.Forms.View.Details;
this.SubtitleListview1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.SubtitleListview1_MouseDoubleClick);
//
//
// SyncPointsSync
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1120, 485);

View File

@ -27,7 +27,7 @@ namespace Nikse.SubtitleEdit.Forms
Subtitle _otherSubtitle;
System.Collections.Generic.SortedDictionary<int, TimeSpan> _syncronizationPoints = new SortedDictionary<int, TimeSpan>();
public string VideoFileName
public string VideoFileName
{
get { return _videoFileName; }
}
@ -40,7 +40,7 @@ namespace Nikse.SubtitleEdit.Forms
public SyncPointsSync()
{
InitializeComponent();
buttonSetSyncPoint.Text = Configuration.Settings.Language.PointSync.SetSyncPoint;
buttonRemoveSyncPoint.Text = Configuration.Settings.Language.PointSync.RemoveSyncPoint;
buttonOK.Text = Configuration.Settings.Language.General.OK;
@ -125,7 +125,7 @@ namespace Nikse.SubtitleEdit.Forms
listBoxSyncPoints.Anchor = AnchorStyles.Left;
labelOtherSubtitleFileName.Visible = true;
subtitleListView2.Visible = true;
Width = subtitleListView2.Width * 2 + 250;
Width = subtitleListView2.Width * 2 + 250;
}
private void RefreshSyncronizationPointsUI()
@ -191,7 +191,7 @@ namespace Nikse.SubtitleEdit.Forms
{
int index = SubtitleListview1.SelectedItems[0].Index;
int indexOther = subtitleListView2.SelectedItems[0].Index;
if (_syncronizationPoints.ContainsKey(index))
_syncronizationPoints[index] = TimeSpan.FromMilliseconds(_otherSubtitle.Paragraphs[indexOther].StartTime.TotalMilliseconds);
else
@ -279,11 +279,11 @@ namespace Nikse.SubtitleEdit.Forms
int endIndex = -1;
int minIndex = 0;
int maxIndex;
List<int> syncIndices = new List<int>();
List<int> syncIndices = new List<int>();
foreach (KeyValuePair<int, TimeSpan> kvp in _syncronizationPoints)
syncIndices.Add(kvp.Key);
for (int i = 0; i < syncIndices.Count; i++)
{
{
if (i == 0)
{
endIndex = syncIndices[i];
@ -318,7 +318,7 @@ namespace Nikse.SubtitleEdit.Forms
private void listBoxSyncPoints_SelectedIndexChanged(object sender, EventArgs e)
{
if (listBoxSyncPoints.SelectedIndex >= 0)
{
{
ListBoxSyncPoint item = (ListBoxSyncPoint) listBoxSyncPoints.Items[listBoxSyncPoints.SelectedIndex];
SubtitleListview1.SelectIndexAndEnsureVisible(item.Index);
}
@ -327,7 +327,7 @@ namespace Nikse.SubtitleEdit.Forms
private void SubtitleListview1_MouseDoubleClick(object sender, MouseEventArgs e)
{
if (SubtitleListview1.SelectedItems.Count == 1)
{
{
int index = SubtitleListview1.SelectedItems[0].Index;
if (_syncronizationPoints.ContainsKey(index))
buttonRemoveSyncPoint_Click(null, null);

View File

@ -32,18 +32,18 @@
this.buttonOK = new System.Windows.Forms.Button();
this.richTextBoxMessage = new System.Windows.Forms.RichTextBox();
this.SuspendLayout();
//
//
// labelTitle
//
//
this.labelTitle.AutoSize = true;
this.labelTitle.Location = new System.Drawing.Point(15, 25);
this.labelTitle.Name = "labelTitle";
this.labelTitle.Size = new System.Drawing.Size(114, 13);
this.labelTitle.TabIndex = 0;
this.labelTitle.Text = "Unknown subtitle type";
//
//
// buttonOK
//
//
this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK;
this.buttonOK.ImeMode = System.Windows.Forms.ImeMode.NoControl;
this.buttonOK.Location = new System.Drawing.Point(262, 115);
@ -52,9 +52,9 @@
this.buttonOK.TabIndex = 8;
this.buttonOK.Text = "&OK";
this.buttonOK.UseVisualStyleBackColor = true;
//
//
// richTextBoxMessage
//
//
this.richTextBoxMessage.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.richTextBoxMessage.BorderStyle = System.Windows.Forms.BorderStyle.None;
@ -67,9 +67,9 @@
this.richTextBoxMessage.TabStop = false;
this.richTextBoxMessage.Text = "If you want this fixed please send an email to mailto:niksedk@gmail.com and inclu" +
"de a copy of the subtitle.";
//
//
// UnknownSubtitle
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(349, 148);

View File

@ -30,17 +30,17 @@
{
this.panelContainer = new System.Windows.Forms.Panel();
this.SuspendLayout();
//
//
// panelContainer
//
//
this.panelContainer.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelContainer.Location = new System.Drawing.Point(0, 0);
this.panelContainer.Name = "panelContainer";
this.panelContainer.Size = new System.Drawing.Size(458, 311);
this.panelContainer.TabIndex = 2;
//
//
// VideoControlsUndocked
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(458, 311);

View File

@ -34,9 +34,9 @@
this.buttonCancel = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
//
// groupBox1
//
//
this.groupBox1.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)));
@ -47,9 +47,9 @@
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Error message";
//
//
// textBoxError
//
//
this.textBoxError.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)));
@ -59,9 +59,9 @@
this.textBoxError.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.textBoxError.Size = new System.Drawing.Size(661, 134);
this.textBoxError.TabIndex = 0;
//
//
// richTextBoxMessage
//
//
this.richTextBoxMessage.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.richTextBoxMessage.BorderStyle = System.Windows.Forms.BorderStyle.None;
@ -73,9 +73,9 @@
this.richTextBoxMessage.TabIndex = 1;
this.richTextBoxMessage.Text = "";
this.richTextBoxMessage.LinkClicked += new System.Windows.Forms.LinkClickedEventHandler(this.richTextBoxMessage_LinkClicked);
//
//
// buttonCancel
//
//
this.buttonCancel.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.ImeMode = System.Windows.Forms.ImeMode.NoControl;
@ -85,9 +85,9 @@
this.buttonCancel.TabIndex = 11;
this.buttonCancel.Text = "&OK";
this.buttonCancel.UseVisualStyleBackColor = true;
//
//
// VideoError
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(699, 503);

View File

@ -132,10 +132,10 @@ namespace Nikse.SubtitleEdit.Forms
textBoxError.Text = "Message: " + exception.Message + Environment.NewLine +
"Source: " + exception.Source + Environment.NewLine +
Environment.NewLine +
"StackTrace: " + Environment.NewLine +
"StackTrace: " + Environment.NewLine +
exception.StackTrace;
}
Text += fileName;
Text += fileName;
}
private void VideoError_KeyDown(object sender, KeyEventArgs e)

View File

@ -30,18 +30,18 @@
{
this.panelContainer = new System.Windows.Forms.Panel();
this.SuspendLayout();
//
//
// panelContainer
//
//
this.panelContainer.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelContainer.Location = new System.Drawing.Point(0, 0);
this.panelContainer.Margin = new System.Windows.Forms.Padding(0);
this.panelContainer.Name = "panelContainer";
this.panelContainer.Size = new System.Drawing.Size(614, 323);
this.panelContainer.TabIndex = 0;
//
//
// VideoPlayerUnDocked
//
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(614, 323);

View File

@ -36,13 +36,13 @@ namespace Nikse.SubtitleEdit.Forms
private void VideoPlayerUnDocked_FormClosing(object sender, FormClosingEventArgs e)
{
if (e.CloseReason == CloseReason.UserClosing && panelContainer.Controls.Count > 0)
{
{
var control = panelContainer.Controls[0];
panelContainer.Controls.Clear();
_mainForm.ReDockVideoPlayer(control);
_mainForm.SetVideoPlayerToggleOff();
}
_positionsAndSizes.SavePositionAndSize(this);
_positionsAndSizes.SavePositionAndSize(this);
}
private void VideoPlayerUnDocked_KeyDown(object sender, KeyEventArgs e)
@ -71,7 +71,7 @@ namespace Nikse.SubtitleEdit.Forms
_mainForm.redockVideoControlsToolStripMenuItem_Click(null, null);
e.SuppressKeyPress = true;
}
else
else
{
_mainForm.Main_KeyDown(sender, e);
}

View File

@ -65,9 +65,9 @@ namespace Nikse.SubtitleEdit.Forms
this.panelControlsEnd.SuspendLayout();
this.groupBoxMovieInfo.SuspendLayout();
this.SuspendLayout();
//
//
// buttonOpenMovie
//
//
this.buttonOpenMovie.Location = new System.Drawing.Point(12, 12);
this.buttonOpenMovie.Name = "buttonOpenMovie";
this.buttonOpenMovie.Size = new System.Drawing.Size(100, 21);
@ -75,14 +75,14 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonOpenMovie.Text = "Open movie...";
this.buttonOpenMovie.UseVisualStyleBackColor = true;
this.buttonOpenMovie.Click += new System.EventHandler(this.ButtonOpenMovieClick);
//
//
// timer1
//
//
this.timer1.Interval = 50;
this.timer1.Tick += new System.EventHandler(this.Timer1Tick);
//
//
// buttonOK
//
//
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK;
this.buttonOK.Location = new System.Drawing.Point(749, 498);
@ -92,9 +92,9 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonOK.Text = "&OK";
this.buttonOK.UseVisualStyleBackColor = true;
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
//
//
// groupBoxStartScene
//
//
this.groupBoxStartScene.Controls.Add(this.MediaPlayerStart);
this.groupBoxStartScene.Controls.Add(this.panelControlsStart);
this.groupBoxStartScene.Location = new System.Drawing.Point(12, 65);
@ -104,9 +104,9 @@ namespace Nikse.SubtitleEdit.Forms
this.groupBoxStartScene.TabStop = false;
this.groupBoxStartScene.Text = "Start scene";
this.groupBoxStartScene.Enter += new System.EventHandler(this.GroupBoxStartSceneEnter);
//
//
// MediaPlayerStart
//
//
this.MediaPlayerStart.BackColor = System.Drawing.Color.Black;
this.MediaPlayerStart.CurrentPosition = 0D;
this.MediaPlayerStart.Location = new System.Drawing.Point(6, 34);
@ -118,9 +118,9 @@ namespace Nikse.SubtitleEdit.Forms
this.MediaPlayerStart.VideoPlayer = null;
this.MediaPlayerStart.Volume = 0D;
this.MediaPlayerStart.OnButtonClicked += new System.EventHandler(this.MediaPlayerStart_OnButtonClicked);
//
//
// panelControlsStart
//
//
this.panelControlsStart.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.panelControlsStart.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panelControlsStart.Controls.Add(this.buttonStartVerify);
@ -133,9 +133,9 @@ namespace Nikse.SubtitleEdit.Forms
this.panelControlsStart.Name = "panelControlsStart";
this.panelControlsStart.Size = new System.Drawing.Size(438, 68);
this.panelControlsStart.TabIndex = 1;
//
//
// buttonStartVerify
//
//
this.buttonStartVerify.Location = new System.Drawing.Point(138, 37);
this.buttonStartVerify.Name = "buttonStartVerify";
this.buttonStartVerify.Size = new System.Drawing.Size(119, 21);
@ -143,9 +143,9 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonStartVerify.Text = "Play 2 secs and back";
this.buttonStartVerify.UseVisualStyleBackColor = true;
this.buttonStartVerify.Click += new System.EventHandler(this.ButtonStartVerifyClick);
//
//
// buttonGotoStartSubtitlePosition
//
//
this.buttonGotoStartSubtitlePosition.Location = new System.Drawing.Point(263, 37);
this.buttonGotoStartSubtitlePosition.Name = "buttonGotoStartSubtitlePosition";
this.buttonGotoStartSubtitlePosition.Size = new System.Drawing.Size(90, 21);
@ -153,9 +153,9 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonGotoStartSubtitlePosition.Text = "Goto sub pos";
this.buttonGotoStartSubtitlePosition.UseVisualStyleBackColor = true;
this.buttonGotoStartSubtitlePosition.Click += new System.EventHandler(this.ButtonGotoStartSubtitlePositionClick);
//
//
// buttonFindTextStart
//
//
this.buttonFindTextStart.Location = new System.Drawing.Point(359, 37);
this.buttonFindTextStart.Name = "buttonFindTextStart";
this.buttonFindTextStart.Size = new System.Drawing.Size(70, 21);
@ -163,9 +163,9 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonFindTextStart.Text = "Find text...";
this.buttonFindTextStart.UseVisualStyleBackColor = true;
this.buttonFindTextStart.Click += new System.EventHandler(this.ButtonFindTextStartClick);
//
//
// buttonStartThreeSecondsBack
//
//
this.buttonStartThreeSecondsBack.Location = new System.Drawing.Point(6, 37);
this.buttonStartThreeSecondsBack.Name = "buttonStartThreeSecondsBack";
this.buttonStartThreeSecondsBack.Size = new System.Drawing.Size(60, 21);
@ -173,9 +173,9 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonStartThreeSecondsBack.Text = "< 3 secs";
this.buttonStartThreeSecondsBack.UseVisualStyleBackColor = true;
this.buttonStartThreeSecondsBack.Click += new System.EventHandler(this.ButtonStartThreeSecondsBackClick);
//
//
// buttonStartHalfASecondBack
//
//
this.buttonStartHalfASecondBack.Location = new System.Drawing.Point(72, 37);
this.buttonStartHalfASecondBack.Name = "buttonStartHalfASecondBack";
this.buttonStartHalfASecondBack.Size = new System.Drawing.Size(60, 21);
@ -183,18 +183,18 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonStartHalfASecondBack.Text = "< ½ sec";
this.buttonStartHalfASecondBack.UseVisualStyleBackColor = true;
this.buttonStartHalfASecondBack.Click += new System.EventHandler(this.ButtonStartHalfASecondBackClick);
//
//
// comboBoxStartTexts
//
//
this.comboBoxStartTexts.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxStartTexts.FormattingEnabled = true;
this.comboBoxStartTexts.Location = new System.Drawing.Point(7, 10);
this.comboBoxStartTexts.Name = "comboBoxStartTexts";
this.comboBoxStartTexts.Size = new System.Drawing.Size(422, 21);
this.comboBoxStartTexts.TabIndex = 0;
//
//
// groupBoxEndScene
//
//
this.groupBoxEndScene.Controls.Add(this.MediaPlayerEnd);
this.groupBoxEndScene.Controls.Add(this.panelControlsEnd);
this.groupBoxEndScene.Location = new System.Drawing.Point(468, 65);
@ -204,9 +204,9 @@ namespace Nikse.SubtitleEdit.Forms
this.groupBoxEndScene.TabStop = false;
this.groupBoxEndScene.Text = "End scene";
this.groupBoxEndScene.Enter += new System.EventHandler(this.GroupBoxEndSceneEnter);
//
//
// MediaPlayerEnd
//
//
this.MediaPlayerEnd.BackColor = System.Drawing.Color.Black;
this.MediaPlayerEnd.CurrentPosition = 0D;
this.MediaPlayerEnd.Location = new System.Drawing.Point(6, 34);
@ -218,9 +218,9 @@ namespace Nikse.SubtitleEdit.Forms
this.MediaPlayerEnd.VideoPlayer = null;
this.MediaPlayerEnd.Volume = 0D;
this.MediaPlayerEnd.OnButtonClicked += new System.EventHandler(this.MediaPlayerEnd_OnButtonClicked);
//
//
// panelControlsEnd
//
//
this.panelControlsEnd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.panelControlsEnd.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panelControlsEnd.Controls.Add(this.buttonEndVerify);
@ -233,9 +233,9 @@ namespace Nikse.SubtitleEdit.Forms
this.panelControlsEnd.Name = "panelControlsEnd";
this.panelControlsEnd.Size = new System.Drawing.Size(438, 68);
this.panelControlsEnd.TabIndex = 1;
//
//
// buttonEndVerify
//
//
this.buttonEndVerify.Location = new System.Drawing.Point(139, 37);
this.buttonEndVerify.Name = "buttonEndVerify";
this.buttonEndVerify.Size = new System.Drawing.Size(118, 21);
@ -243,9 +243,9 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonEndVerify.Text = "Play 2 secs and back";
this.buttonEndVerify.UseVisualStyleBackColor = true;
this.buttonEndVerify.Click += new System.EventHandler(this.ButtonEndVerifyClick);
//
//
// buttonGotoEndSubtitlePosition
//
//
this.buttonGotoEndSubtitlePosition.Location = new System.Drawing.Point(263, 37);
this.buttonGotoEndSubtitlePosition.Name = "buttonGotoEndSubtitlePosition";
this.buttonGotoEndSubtitlePosition.Size = new System.Drawing.Size(90, 21);
@ -253,9 +253,9 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonGotoEndSubtitlePosition.Text = "Goto sub pos";
this.buttonGotoEndSubtitlePosition.UseVisualStyleBackColor = true;
this.buttonGotoEndSubtitlePosition.Click += new System.EventHandler(this.ButtonGotoEndSubtitlePositionClick);
//
//
// buttonFindTextEnd
//
//
this.buttonFindTextEnd.Location = new System.Drawing.Point(359, 37);
this.buttonFindTextEnd.Name = "buttonFindTextEnd";
this.buttonFindTextEnd.Size = new System.Drawing.Size(70, 21);
@ -263,9 +263,9 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonFindTextEnd.Text = "Find text...";
this.buttonFindTextEnd.UseVisualStyleBackColor = true;
this.buttonFindTextEnd.Click += new System.EventHandler(this.ButtonFindTextEndClick);
//
//
// buttonThreeSecondsBack
//
//
this.buttonThreeSecondsBack.Location = new System.Drawing.Point(7, 37);
this.buttonThreeSecondsBack.Name = "buttonThreeSecondsBack";
this.buttonThreeSecondsBack.Size = new System.Drawing.Size(60, 21);
@ -273,9 +273,9 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonThreeSecondsBack.Text = "< 3 secs";
this.buttonThreeSecondsBack.UseVisualStyleBackColor = true;
this.buttonThreeSecondsBack.Click += new System.EventHandler(this.ButtonThreeSecondsBackClick);
//
//
// buttonEndHalfASecondBack
//
//
this.buttonEndHalfASecondBack.Location = new System.Drawing.Point(73, 37);
this.buttonEndHalfASecondBack.Name = "buttonEndHalfASecondBack";
this.buttonEndHalfASecondBack.Size = new System.Drawing.Size(60, 21);
@ -283,18 +283,18 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonEndHalfASecondBack.Text = "< ½ sec";
this.buttonEndHalfASecondBack.UseVisualStyleBackColor = true;
this.buttonEndHalfASecondBack.Click += new System.EventHandler(this.ButtonEndHalfASecondBackClick);
//
//
// comboBoxEndTexts
//
//
this.comboBoxEndTexts.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxEndTexts.FormattingEnabled = true;
this.comboBoxEndTexts.Location = new System.Drawing.Point(7, 10);
this.comboBoxEndTexts.Name = "comboBoxEndTexts";
this.comboBoxEndTexts.Size = new System.Drawing.Size(422, 21);
this.comboBoxEndTexts.TabIndex = 0;
//
//
// buttonCancel
//
//
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.buttonCancel.Location = new System.Drawing.Point(830, 498);
@ -303,18 +303,18 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonCancel.TabIndex = 4;
this.buttonCancel.Text = "C&ancel";
this.buttonCancel.UseVisualStyleBackColor = true;
//
//
// labelVideoInfo
//
//
this.labelVideoInfo.AutoSize = true;
this.labelVideoInfo.Location = new System.Drawing.Point(6, 16);
this.labelVideoInfo.Name = "labelVideoInfo";
this.labelVideoInfo.Size = new System.Drawing.Size(84, 13);
this.labelVideoInfo.TabIndex = 13;
this.labelVideoInfo.Text = "No video loaded";
//
//
// groupBoxMovieInfo
//
//
this.groupBoxMovieInfo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBoxMovieInfo.Controls.Add(this.labelVideoInfo);
@ -324,9 +324,9 @@ namespace Nikse.SubtitleEdit.Forms
this.groupBoxMovieInfo.TabIndex = 14;
this.groupBoxMovieInfo.TabStop = false;
this.groupBoxMovieInfo.Text = "Movie info";
//
//
// buttonSync
//
//
this.buttonSync.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.buttonSync.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.buttonSync.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
@ -337,13 +337,13 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonSync.Text = "Sync!";
this.buttonSync.UseVisualStyleBackColor = true;
this.buttonSync.Click += new System.EventHandler(this.ButtonSyncClick);
//
//
// openFileDialog1
//
//
this.openFileDialog1.FileName = "openFileDialog1";
//
//
// labelTip
//
//
this.labelTip.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.labelTip.AutoSize = true;
this.labelTip.ForeColor = System.Drawing.Color.Gray;
@ -352,13 +352,13 @@ namespace Nikse.SubtitleEdit.Forms
this.labelTip.Size = new System.Drawing.Size(332, 13);
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);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(927, 525);

Some files were not shown because too many files have changed in this diff Show More