Work on ebu stl boxing - thx Milenko :)

This commit is contained in:
Nikolaj Olsson 2018-11-20 21:19:28 +01:00
parent d8535f5e05
commit 922d96d5d4
11 changed files with 343 additions and 249 deletions

View File

@ -1136,6 +1136,7 @@ Note: Do check free disk space.</WaveFileMalformed>
<MergeWithLineAfter>Merge with line after</MergeWithLineAfter>
<Normal>Normal (remove formatting)</Normal>
<Underline>Underline</Underline>
<Box>Box</Box>
<Color>Color...</Color>
<FontName>Font name...</FontName>
<Alignment>Alignment...</Alignment>
@ -2334,6 +2335,7 @@ Keep changes?</KeepChangesMessage>
<DiscardTitle>Discard changes made in OCR?</DiscardTitle>
<DiscardText>Do you want to discard changes made in current OCR session?</DiscardText>
<MinLineSplitHeight>Min. line height (split)</MinLineSplitHeight>
<FallbackToX>Fallback to {0}</FallbackToX>
</VobSubOcr>
<VobSubOcrCharacter>
<Title>VobSub - Manual image to text</Title>

View File

@ -370,6 +370,8 @@ namespace Nikse.SubtitleEdit.Core
if (s.Contains("< "))
s = FixInvalidItalicTags(s);
s = s.Replace("<box>", string.Empty).Replace("</box>", string.Empty);
return RemoveCommonHtmlTags(s);
}

View File

@ -1644,6 +1644,7 @@ namespace Nikse.SubtitleEdit.Core
MergeWithLineAfter = "Merge with line after",
Normal = "Normal (remove formatting)",
Underline = "Underline",
Box = "Box",
Color = "Color...",
FontName = "Font name...",
Alignment = "Alignment...",
@ -2665,6 +2666,7 @@ Keep changes?",
DiscardTitle = "Discard changes made in OCR?",
DiscardText = "Do you want to discard changes made in current OCR session?",
MinLineSplitHeight = "Min. line height (split)",
FallbackToX = "Fallback to {0}"
};
VobSubOcrCharacter = new LanguageStructure.VobSubOcrCharacter

View File

@ -3802,6 +3802,9 @@ namespace Nikse.SubtitleEdit.Core
case "Main/Menu/ContextMenu/Underline":
language.Main.Menu.ContextMenu.Underline = reader.Value;
break;
case "Main/Menu/ContextMenu/Box":
language.Main.Menu.ContextMenu.Box = reader.Value;
break;
case "Main/Menu/ContextMenu/Color":
language.Main.Menu.ContextMenu.Color = reader.Value;
break;
@ -6307,6 +6310,9 @@ namespace Nikse.SubtitleEdit.Core
case "VobSubOcr/MinLineSplitHeight":
language.VobSubOcr.MinLineSplitHeight = reader.Value;
break;
case "VobSubOcr/FallbackToX":
language.VobSubOcr.FallbackToX = reader.Value;
break;
case "VobSubOcrCharacter/Title":
language.VobSubOcrCharacter.Title = reader.Value;
break;

View File

@ -1504,6 +1504,7 @@
public string MergeWithLineAfter { get; set; }
public string Normal { get; set; }
public string Underline { get; set; }
public string Box { get; set; }
public string Color { get; set; }
public string FontName { get; set; }
public string Alignment { get; set; }
@ -2541,6 +2542,7 @@
public string DiscardTitle { get; set; }
public string DiscardText { get; set; }
public string MinLineSplitHeight { get; set; }
public string FallbackToX { get; set; }
}
public class VobSubOcrCharacter

View File

@ -365,6 +365,8 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
string italicsOff = encoding.GetString(new byte[] { 0x81 });
string underlineOn = encoding.GetString(new byte[] { 0x82 });
string underlineOff = encoding.GetString(new byte[] { 0x83 });
string boxingOn = encoding.GetString(new byte[] { 0x84 });
string boxingOff = encoding.GetString(new byte[] { 0x85 });
if (Utilities.CountTagInText(TextField, "<i>") == 1 && TextField.StartsWith("<i>") && TextField.EndsWith("</i>")) // italic on all lines
TextField = TextField.Replace(Environment.NewLine, Environment.NewLine + "<i>");
TextField = TextField.Replace("<i>", italicsOn);
@ -375,6 +377,10 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
TextField = TextField.Replace("<U>", underlineOn);
TextField = TextField.Replace("</u>", underlineOff);
TextField = TextField.Replace("</U>", underlineOff);
TextField = TextField.Replace("<box>", boxingOn);
TextField = TextField.Replace("<BOX>", boxingOn);
TextField = TextField.Replace("</box>", boxingOff);
TextField = TextField.Replace("</BOX>", boxingOff);
if (header.CharacterCodeTableNumber == "00")
{
TextField = TextField.Replace("©", encoding.GetString(new byte[] { 0xd3 }));
@ -683,7 +689,9 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
var text = p.Text.Trim(Utilities.NewLineChars);
if (text.StartsWith("{\\an7}", StringComparison.Ordinal) || text.StartsWith("{\\an8}", StringComparison.Ordinal) || text.StartsWith("{\\an9}", StringComparison.Ordinal))
{
tti.VerticalPosition = (byte)(1 + Configuration.Settings.SubtitleSettings.EbuStlMarginTop); // top (vertical)
tti.VerticalPosition = (byte)Configuration.Settings.SubtitleSettings.EbuStlMarginTop; // top (vertical)
if (header.DisplayStandardCode == "1" || header.DisplayStandardCode == "2") // teletext
tti.VerticalPosition++;
}
else if (text.StartsWith("{\\an4}", StringComparison.Ordinal) || text.StartsWith("{\\an5}", StringComparison.Ordinal) || text.StartsWith("{\\an6}", StringComparison.Ordinal))
{
@ -1222,6 +1230,8 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
const byte italicsOff = 0x81;
const byte underlineOn = 0x82;
const byte underlineOff = 0x83;
const byte boxingOn = 0x84;
const byte boxingOff = 0x85;
var list = new List<EbuTextTimingInformation>();
int index = startOfTextAndTimingBlock;
@ -1289,6 +1299,10 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
sb.Append("<u>");
else if (b == underlineOff && header.LanguageCode != LanguageCodeChinese)
sb.Append("</u>");
else if (b == boxingOn && header.LanguageCode != LanguageCodeChinese)
sb.Append("<box>");
else if (b == boxingOff && header.LanguageCode != LanguageCodeChinese)
sb.Append("</box>");
}
}
else if (b >= 0x86 && b <= 0x89) // Both - Reserved for future use

View File

@ -324,11 +324,13 @@ namespace Nikse.SubtitleEdit.Controls
SubtitleFormat format = new AdvancedSubStationAlpha();
if (subtitle.Header == null || !subtitle.Header.Contains("[V4+ Styles]"))
{
var oldSub = subtitle;
subtitle = new Subtitle(subtitle);
if (_subtitleTextBox.RightToLeft == RightToLeft.Yes && LanguageAutoDetect.CouldBeRightToLeftLanguge(subtitle))
{
foreach (var paragraph in subtitle.Paragraphs)
for (var index = 0; index < subtitle.Paragraphs.Count; index++)
{
var paragraph = subtitle.Paragraphs[index];
paragraph.Text = "\u200F" + paragraph.Text.Replace(Environment.NewLine, "\u200F" + Environment.NewLine + "\u200F") + "\u200F"; // RTL control character
}
}
@ -339,8 +341,24 @@ namespace Nikse.SubtitleEdit.Controls
subtitle.Header = AdvancedSubStationAlpha.DefaultHeader;
Configuration.Settings.SubtitleSettings.SsaFontSize = oldFontSize;
Configuration.Settings.SubtitleSettings.SsaFontBold = oldFontBold;
if (oldSub.Header.Length > 20 && oldSub.Header.Substring(3, 3) == "STL")
{
subtitle.Header = subtitle.Header.Replace("Style: Default,", "Style: Box,arial,20,&H00FFFFFF,&H0300FFFF,&H00000000,&H02000000,0,0,0,0,100,100,0,0,3,2,0,2,10,10,10,1" +
Environment.NewLine + "Style: Default,");
for (var index = 0; index < subtitle.Paragraphs.Count; index++)
{
var p = subtitle.Paragraphs[index];
if (p.Text.Contains("<box>"))
{
p.Extra = "Box";
p.Text = p.Text.Replace("<box>", string.Empty).Replace("</box>", string.Empty);
}
}
}
}
string text = subtitle.ToText(format);
if (text != _mpvTextOld || _mpvTextFileName == null || _retryCount > 0)
{

View File

@ -38,9 +38,9 @@
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Main));
Nikse.SubtitleEdit.Core.TimeCode timeCode4 = new Nikse.SubtitleEdit.Core.TimeCode();
Nikse.SubtitleEdit.Core.TimeCode timeCode5 = new Nikse.SubtitleEdit.Core.TimeCode();
Nikse.SubtitleEdit.Core.TimeCode timeCode6 = new Nikse.SubtitleEdit.Core.TimeCode();
Nikse.SubtitleEdit.Core.TimeCode timeCode1 = new Nikse.SubtitleEdit.Core.TimeCode();
Nikse.SubtitleEdit.Core.TimeCode timeCode2 = new Nikse.SubtitleEdit.Core.TimeCode();
Nikse.SubtitleEdit.Core.TimeCode timeCode3 = new Nikse.SubtitleEdit.Core.TimeCode();
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.labelStatus = new System.Windows.Forms.ToolStripStatusLabel();
this.toolStripSelected = new System.Windows.Forms.ToolStripStatusLabel();
@ -288,6 +288,7 @@
this.normalToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.boldToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.italicToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.boxToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.underlineToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.colorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItemFont = new System.Windows.Forms.ToolStripMenuItem();
@ -314,6 +315,7 @@
this.colorDialog1 = new System.Windows.Forms.ColorDialog();
this.groupBoxVideo = new System.Windows.Forms.GroupBox();
this.labelNextWord = new System.Windows.Forms.Label();
this.audioVisualizer = new Nikse.SubtitleEdit.Controls.AudioVisualizer();
this.checkBoxSyncListViewWithVideoWhilePlaying = new System.Windows.Forms.CheckBox();
this.labelVideoInfo = new System.Windows.Forms.Label();
this.trackBarWaveformPosition = new System.Windows.Forms.TrackBar();
@ -349,6 +351,7 @@
this.buttonPlayCurrent = new System.Windows.Forms.Button();
this.buttonPlayNext = new System.Windows.Forms.Button();
this.tabPageCreate = new System.Windows.Forms.TabPage();
this.timeUpDownVideoPosition = new Nikse.SubtitleEdit.Controls.TimeUpDown();
this.buttonGotoSub = new System.Windows.Forms.Button();
this.buttonBeforeText = new System.Windows.Forms.Button();
this.buttonSetEnd = new System.Windows.Forms.Button();
@ -383,6 +386,7 @@
this.labelVideoPosition2 = new System.Windows.Forms.Label();
this.buttonAdjustGoToPosAndPause = new System.Windows.Forms.Button();
this.buttonAdjustPlayBefore = new System.Windows.Forms.Button();
this.timeUpDownVideoPositionAdjust = new Nikse.SubtitleEdit.Controls.TimeUpDown();
this.ShowSubtitleTimer = new System.Windows.Forms.Timer(this.components);
this.timerAutoDuration = new System.Windows.Forms.Timer(this.components);
this.timerAutoContinue = new System.Windows.Forms.Timer(this.components);
@ -413,6 +417,7 @@
this.tabControlSubtitle = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.splitContainerListViewAndText = new System.Windows.Forms.SplitContainer();
this.SubtitleListview1 = new Nikse.SubtitleEdit.Controls.SubtitleListView();
this.groupBoxEdit = new System.Windows.Forms.GroupBox();
this.labelSingleLine = new System.Windows.Forms.Label();
this.labelAlternateSingleLine = new System.Windows.Forms.Label();
@ -424,6 +429,7 @@
this.labelTextAlternateLineLengths = new System.Windows.Forms.Label();
this.labelAlternateText = new System.Windows.Forms.Label();
this.labelText = new System.Windows.Forms.Label();
this.textBoxListViewTextAlternate = new Nikse.SubtitleEdit.Controls.SETextBox();
this.contextMenuStripTextBoxListView = new System.Windows.Forms.ContextMenuStrip(this.components);
this.toolStripMenuItemWebVttVoice = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparatorWebVTT = new System.Windows.Forms.ToolStripSeparator();
@ -458,28 +464,23 @@
this.labelTextLineTotal = new System.Windows.Forms.Label();
this.labelCharactersPerSecond = new System.Windows.Forms.Label();
this.buttonUnBreak = new System.Windows.Forms.Button();
this.timeUpDownStartTime = new Nikse.SubtitleEdit.Controls.TimeUpDown();
this.numericUpDownDuration = new System.Windows.Forms.NumericUpDown();
this.buttonPrevious = new System.Windows.Forms.Button();
this.buttonNext = new System.Windows.Forms.Button();
this.labelStartTime = new System.Windows.Forms.Label();
this.textBoxListViewText = new Nikse.SubtitleEdit.Controls.SETextBox();
this.labelDuration = new System.Windows.Forms.Label();
this.labelAutoDuration = new System.Windows.Forms.Label();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.textBoxSource = new System.Windows.Forms.TextBox();
this.panelVideoPlayer = new System.Windows.Forms.Panel();
this.mediaPlayer = new Nikse.SubtitleEdit.Controls.VideoPlayerContainer();
this.contextMenuStripEmpty = new System.Windows.Forms.ContextMenuStrip(this.components);
this.insertLineToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.imageListPlayRate = new System.Windows.Forms.ImageList(this.components);
this.timerTextUndo = new System.Windows.Forms.Timer(this.components);
this.timerAlternateTextUndo = new System.Windows.Forms.Timer(this.components);
this.SubtitleListview1 = new Nikse.SubtitleEdit.Controls.SubtitleListView();
this.textBoxListViewTextAlternate = new Nikse.SubtitleEdit.Controls.SETextBox();
this.timeUpDownStartTime = new Nikse.SubtitleEdit.Controls.TimeUpDown();
this.textBoxListViewText = new Nikse.SubtitleEdit.Controls.SETextBox();
this.mediaPlayer = new Nikse.SubtitleEdit.Controls.VideoPlayerContainer();
this.audioVisualizer = new Nikse.SubtitleEdit.Controls.AudioVisualizer();
this.timeUpDownVideoPosition = new Nikse.SubtitleEdit.Controls.TimeUpDown();
this.timeUpDownVideoPositionAdjust = new Nikse.SubtitleEdit.Controls.TimeUpDown();
this.statusStrip1.SuspendLayout();
this.toolStrip1.SuspendLayout();
this.menuStrip1.SuspendLayout();
@ -2379,6 +2380,7 @@
this.normalToolStripMenuItem,
this.boldToolStripMenuItem,
this.italicToolStripMenuItem,
this.boxToolStripMenuItem,
this.underlineToolStripMenuItem,
this.colorToolStripMenuItem,
this.toolStripMenuItemFont,
@ -2400,7 +2402,7 @@
this.changeCasingForSelectedLinesToolStripMenuItem,
this.toolStripMenuItemSaveSelectedLines});
this.contextMenuStripListview.Name = "contextMenuStripListview";
this.contextMenuStripListview.Size = new System.Drawing.Size(285, 848);
this.contextMenuStripListview.Size = new System.Drawing.Size(285, 892);
this.contextMenuStripListview.Closed += new System.Windows.Forms.ToolStripDropDownClosedEventHandler(this.MenuClosed);
this.contextMenuStripListview.Opening += new System.ComponentModel.CancelEventHandler(this.ContextMenuStripListviewOpening);
this.contextMenuStripListview.Opened += new System.EventHandler(this.MenuOpened);
@ -2626,6 +2628,13 @@
this.italicToolStripMenuItem.Text = "Italic";
this.italicToolStripMenuItem.Click += new System.EventHandler(this.ItalicToolStripMenuItemClick);
//
// boxToolStripMenuItem
//
this.boxToolStripMenuItem.Name = "boxToolStripMenuItem";
this.boxToolStripMenuItem.Size = new System.Drawing.Size(284, 22);
this.boxToolStripMenuItem.Text = "Box";
this.boxToolStripMenuItem.Click += new System.EventHandler(this.boxToolStripMenuItem_Click);
//
// underlineToolStripMenuItem
//
this.underlineToolStripMenuItem.Name = "underlineToolStripMenuItem";
@ -2799,6 +2808,44 @@
this.labelNextWord.Text = "Next: xxx";
this.labelNextWord.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// audioVisualizer
//
this.audioVisualizer.AllowDrop = true;
this.audioVisualizer.AllowNewSelection = true;
this.audioVisualizer.AllowOverlap = false;
this.audioVisualizer.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.audioVisualizer.BackColor = System.Drawing.Color.Black;
this.audioVisualizer.BackgroundColor = System.Drawing.Color.Black;
this.audioVisualizer.Color = System.Drawing.Color.GreenYellow;
this.audioVisualizer.Font = new System.Drawing.Font("Segoe UI", 9F);
this.audioVisualizer.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(18)))));
this.audioVisualizer.Location = new System.Drawing.Point(472, 32);
this.audioVisualizer.Margin = new System.Windows.Forms.Padding(0);
this.audioVisualizer.Name = "audioVisualizer";
this.audioVisualizer.NewSelectionParagraph = null;
this.audioVisualizer.ParagraphColor = System.Drawing.Color.LimeGreen;
this.audioVisualizer.SceneChanges = ((System.Collections.Generic.List<double>)(resources.GetObject("audioVisualizer.SceneChanges")));
this.audioVisualizer.SelectedColor = System.Drawing.Color.Red;
this.audioVisualizer.ShowGridLines = true;
this.audioVisualizer.ShowSpectrogram = false;
this.audioVisualizer.ShowWaveform = true;
this.audioVisualizer.Size = new System.Drawing.Size(499, 229);
this.audioVisualizer.StartPositionSeconds = 0D;
this.audioVisualizer.TabIndex = 6;
this.audioVisualizer.TextBold = true;
this.audioVisualizer.TextColor = System.Drawing.Color.Gray;
this.audioVisualizer.TextSize = 9F;
this.audioVisualizer.VerticalZoomFactor = 1D;
this.audioVisualizer.WaveformNotLoadedText = "Click to add waveform";
this.audioVisualizer.WavePeaks = null;
this.audioVisualizer.ZoomFactor = 1D;
this.audioVisualizer.Click += new System.EventHandler(this.AudioWaveform_Click);
this.audioVisualizer.DragDrop += new System.Windows.Forms.DragEventHandler(this.AudioWaveformDragDrop);
this.audioVisualizer.DragEnter += new System.Windows.Forms.DragEventHandler(this.AudioWaveformDragEnter);
this.audioVisualizer.MouseEnter += new System.EventHandler(this.audioVisualizer_MouseEnter);
//
// checkBoxSyncListViewWithVideoWhilePlaying
//
this.checkBoxSyncListViewWithVideoWhilePlaying.AutoSize = true;
@ -3223,6 +3270,26 @@
this.tabPageCreate.Text = "Create";
this.tabPageCreate.UseVisualStyleBackColor = true;
//
// timeUpDownVideoPosition
//
this.timeUpDownVideoPosition.AutoSize = true;
this.timeUpDownVideoPosition.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.timeUpDownVideoPosition.Font = new System.Drawing.Font("Segoe UI", 9F);
this.timeUpDownVideoPosition.Location = new System.Drawing.Point(96, 191);
this.timeUpDownVideoPosition.Margin = new System.Windows.Forms.Padding(4);
this.timeUpDownVideoPosition.Name = "timeUpDownVideoPosition";
this.timeUpDownVideoPosition.Size = new System.Drawing.Size(96, 27);
this.timeUpDownVideoPosition.TabIndex = 12;
timeCode1.Hours = 0;
timeCode1.Milliseconds = 0;
timeCode1.Minutes = 0;
timeCode1.Seconds = 0;
timeCode1.TimeSpan = System.TimeSpan.Parse("00:00:00");
timeCode1.TotalMilliseconds = 0D;
timeCode1.TotalSeconds = 0D;
this.timeUpDownVideoPosition.TimeCode = timeCode1;
this.timeUpDownVideoPosition.UseVideoOffset = false;
//
// buttonGotoSub
//
this.buttonGotoSub.Location = new System.Drawing.Point(6, 58);
@ -3636,6 +3703,26 @@
this.buttonAdjustPlayBefore.UseVisualStyleBackColor = true;
this.buttonAdjustPlayBefore.Click += new System.EventHandler(this.buttonBeforeText_Click);
//
// timeUpDownVideoPositionAdjust
//
this.timeUpDownVideoPositionAdjust.AutoSize = true;
this.timeUpDownVideoPositionAdjust.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.timeUpDownVideoPositionAdjust.Font = new System.Drawing.Font("Segoe UI", 9F);
this.timeUpDownVideoPositionAdjust.Location = new System.Drawing.Point(96, 213);
this.timeUpDownVideoPositionAdjust.Margin = new System.Windows.Forms.Padding(4);
this.timeUpDownVideoPositionAdjust.Name = "timeUpDownVideoPositionAdjust";
this.timeUpDownVideoPositionAdjust.Size = new System.Drawing.Size(96, 27);
this.timeUpDownVideoPositionAdjust.TabIndex = 13;
timeCode2.Hours = 0;
timeCode2.Milliseconds = 0;
timeCode2.Minutes = 0;
timeCode2.Seconds = 0;
timeCode2.TimeSpan = System.TimeSpan.Parse("00:00:00");
timeCode2.TotalMilliseconds = 0D;
timeCode2.TotalSeconds = 0D;
this.timeUpDownVideoPositionAdjust.TimeCode = timeCode2;
this.timeUpDownVideoPositionAdjust.UseVideoOffset = false;
//
// ShowSubtitleTimer
//
this.ShowSubtitleTimer.Enabled = true;
@ -3900,6 +3987,36 @@
this.splitContainerListViewAndText.SplitterDistance = 91;
this.splitContainerListViewAndText.TabIndex = 2;
//
// SubtitleListview1
//
this.SubtitleListview1.AllowColumnReorder = true;
this.SubtitleListview1.AllowDrop = true;
this.SubtitleListview1.ContextMenuStrip = this.contextMenuStripListview;
this.SubtitleListview1.Dock = System.Windows.Forms.DockStyle.Fill;
this.SubtitleListview1.FirstVisibleIndex = -1;
this.SubtitleListview1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.SubtitleListview1.FullRowSelect = true;
this.SubtitleListview1.GridLines = true;
this.SubtitleListview1.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
this.SubtitleListview1.HideSelection = false;
this.SubtitleListview1.Location = new System.Drawing.Point(0, 0);
this.SubtitleListview1.Name = "SubtitleListview1";
this.SubtitleListview1.OwnerDraw = true;
this.SubtitleListview1.Size = new System.Drawing.Size(724, 91);
this.SubtitleListview1.SubtitleFontBold = false;
this.SubtitleListview1.SubtitleFontName = "Tahoma";
this.SubtitleListview1.SubtitleFontSize = 8;
this.SubtitleListview1.TabIndex = 0;
this.SubtitleListview1.UseCompatibleStateImageBehavior = false;
this.SubtitleListview1.UseSyntaxColoring = true;
this.SubtitleListview1.View = System.Windows.Forms.View.Details;
this.SubtitleListview1.SelectedIndexChanged += new System.EventHandler(this.SubtitleListview1_SelectedIndexChanged);
this.SubtitleListview1.DragDrop += new System.Windows.Forms.DragEventHandler(this.SubtitleListview1_DragDrop);
this.SubtitleListview1.DragEnter += new System.Windows.Forms.DragEventHandler(this.SubtitleListview1_DragEnter);
this.SubtitleListview1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.SubtitleListview1KeyDown);
this.SubtitleListview1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.SubtitleListview1_MouseDoubleClick);
this.SubtitleListview1.MouseEnter += new System.EventHandler(this.SubtitleListview1_MouseEnter);
//
// groupBoxEdit
//
this.groupBoxEdit.Controls.Add(this.labelSingleLine);
@ -4035,6 +4152,28 @@
this.labelText.TabIndex = 5;
this.labelText.Text = "Text";
//
// textBoxListViewTextAlternate
//
this.textBoxListViewTextAlternate.AllowDrop = true;
this.textBoxListViewTextAlternate.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.textBoxListViewTextAlternate.ContextMenuStrip = this.contextMenuStripTextBoxListView;
this.textBoxListViewTextAlternate.Enabled = false;
this.textBoxListViewTextAlternate.HideSelection = false;
this.textBoxListViewTextAlternate.Location = new System.Drawing.Point(946, 28);
this.textBoxListViewTextAlternate.Multiline = true;
this.textBoxListViewTextAlternate.Name = "textBoxListViewTextAlternate";
this.textBoxListViewTextAlternate.Size = new System.Drawing.Size(0, 63);
this.textBoxListViewTextAlternate.TabIndex = 33;
this.textBoxListViewTextAlternate.Visible = false;
this.textBoxListViewTextAlternate.MouseClick += new System.Windows.Forms.MouseEventHandler(this.TextBoxListViewTextAlternateMouseClick);
this.textBoxListViewTextAlternate.TextChanged += new System.EventHandler(this.textBoxListViewTextAlternate_TextChanged);
this.textBoxListViewTextAlternate.Enter += new System.EventHandler(this.TextBoxListViewTextAlternateEnter);
this.textBoxListViewTextAlternate.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TextBoxListViewTextAlternateKeyDown);
this.textBoxListViewTextAlternate.KeyUp += new System.Windows.Forms.KeyEventHandler(this.TextBoxListViewTextAlternateKeyUp);
this.textBoxListViewTextAlternate.MouseMove += new System.Windows.Forms.MouseEventHandler(this.TextBoxListViewTextAlternateMouseMove);
//
// contextMenuStripTextBoxListView
//
this.contextMenuStripTextBoxListView.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -4315,6 +4454,26 @@
this.buttonUnBreak.UseVisualStyleBackColor = true;
this.buttonUnBreak.Click += new System.EventHandler(this.ButtonUnBreakClick);
//
// timeUpDownStartTime
//
this.timeUpDownStartTime.AutoSize = true;
this.timeUpDownStartTime.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.timeUpDownStartTime.Font = new System.Drawing.Font("Segoe UI", 9F);
this.timeUpDownStartTime.Location = new System.Drawing.Point(9, 26);
this.timeUpDownStartTime.Margin = new System.Windows.Forms.Padding(4);
this.timeUpDownStartTime.Name = "timeUpDownStartTime";
this.timeUpDownStartTime.Size = new System.Drawing.Size(96, 27);
this.timeUpDownStartTime.TabIndex = 0;
timeCode3.Hours = 0;
timeCode3.Milliseconds = 0;
timeCode3.Minutes = 0;
timeCode3.Seconds = 0;
timeCode3.TimeSpan = System.TimeSpan.Parse("00:00:00");
timeCode3.TotalMilliseconds = 0D;
timeCode3.TotalSeconds = 0D;
this.timeUpDownStartTime.TimeCode = timeCode3;
this.timeUpDownStartTime.UseVideoOffset = false;
//
// numericUpDownDuration
//
this.numericUpDownDuration.DecimalPlaces = 3;
@ -4368,6 +4527,28 @@
this.labelStartTime.TabIndex = 3;
this.labelStartTime.Text = "Start time";
//
// textBoxListViewText
//
this.textBoxListViewText.AllowDrop = true;
this.textBoxListViewText.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.textBoxListViewText.ContextMenuStrip = this.contextMenuStripTextBoxListView;
this.textBoxListViewText.Enabled = false;
this.textBoxListViewText.HideSelection = false;
this.textBoxListViewText.Location = new System.Drawing.Point(236, 28);
this.textBoxListViewText.Multiline = true;
this.textBoxListViewText.Name = "textBoxListViewText";
this.textBoxListViewText.Size = new System.Drawing.Size(362, 63);
this.textBoxListViewText.TabIndex = 5;
this.textBoxListViewText.MouseClick += new System.Windows.Forms.MouseEventHandler(this.TextBoxListViewTextMouseClick);
this.textBoxListViewText.TextChanged += new System.EventHandler(this.TextBoxListViewTextTextChanged);
this.textBoxListViewText.Enter += new System.EventHandler(this.TextBoxListViewTextEnter);
this.textBoxListViewText.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TextBoxListViewTextKeyDown);
this.textBoxListViewText.KeyUp += new System.Windows.Forms.KeyEventHandler(this.textBoxListViewText_KeyUp);
this.textBoxListViewText.Leave += new System.EventHandler(this.textBoxListViewText_Leave);
this.textBoxListViewText.MouseMove += new System.Windows.Forms.MouseEventHandler(this.textBoxListViewText_MouseMove);
//
// labelDuration
//
this.labelDuration.AutoSize = true;
@ -4429,6 +4610,34 @@
this.panelVideoPlayer.Size = new System.Drawing.Size(220, 246);
this.panelVideoPlayer.TabIndex = 5;
//
// mediaPlayer
//
this.mediaPlayer.AllowDrop = true;
this.mediaPlayer.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.mediaPlayer.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(18)))), ((int)(((byte)(18)))), ((int)(((byte)(18)))));
this.mediaPlayer.CurrentPosition = 0D;
this.mediaPlayer.FontSizeFactor = 1F;
this.mediaPlayer.LastParagraph = null;
this.mediaPlayer.Location = new System.Drawing.Point(0, 0);
this.mediaPlayer.Margin = new System.Windows.Forms.Padding(0);
this.mediaPlayer.Name = "mediaPlayer";
this.mediaPlayer.ShowFullscreenButton = true;
this.mediaPlayer.ShowMuteButton = true;
this.mediaPlayer.ShowStopButton = true;
this.mediaPlayer.Size = new System.Drawing.Size(219, 246);
this.mediaPlayer.SmpteMode = false;
this.mediaPlayer.SubtitleText = "";
this.mediaPlayer.TabIndex = 5;
this.mediaPlayer.TextRightToLeft = System.Windows.Forms.RightToLeft.No;
this.mediaPlayer.VideoHeight = 0;
this.mediaPlayer.VideoPlayer = null;
this.mediaPlayer.VideoWidth = 0;
this.mediaPlayer.Volume = 0D;
this.mediaPlayer.DragDrop += new System.Windows.Forms.DragEventHandler(this.mediaPlayer_DragDrop);
this.mediaPlayer.DragEnter += new System.Windows.Forms.DragEventHandler(this.mediaPlayer_DragEnter);
//
// contextMenuStripEmpty
//
this.contextMenuStripEmpty.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -4460,206 +4669,6 @@
this.timerAlternateTextUndo.Interval = 700;
this.timerAlternateTextUndo.Tick += new System.EventHandler(this.TimerAlternateTextUndoTick);
//
// SubtitleListview1
//
this.SubtitleListview1.AllowColumnReorder = true;
this.SubtitleListview1.AllowDrop = true;
this.SubtitleListview1.ContextMenuStrip = this.contextMenuStripListview;
this.SubtitleListview1.Dock = System.Windows.Forms.DockStyle.Fill;
this.SubtitleListview1.FirstVisibleIndex = -1;
this.SubtitleListview1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.SubtitleListview1.FullRowSelect = true;
this.SubtitleListview1.GridLines = true;
this.SubtitleListview1.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
this.SubtitleListview1.HideSelection = false;
this.SubtitleListview1.Location = new System.Drawing.Point(0, 0);
this.SubtitleListview1.Name = "SubtitleListview1";
this.SubtitleListview1.OwnerDraw = true;
this.SubtitleListview1.Size = new System.Drawing.Size(724, 91);
this.SubtitleListview1.SubtitleFontBold = false;
this.SubtitleListview1.SubtitleFontName = "Tahoma";
this.SubtitleListview1.SubtitleFontSize = 8;
this.SubtitleListview1.TabIndex = 0;
this.SubtitleListview1.UseCompatibleStateImageBehavior = false;
this.SubtitleListview1.UseSyntaxColoring = true;
this.SubtitleListview1.View = System.Windows.Forms.View.Details;
this.SubtitleListview1.SelectedIndexChanged += new System.EventHandler(this.SubtitleListview1_SelectedIndexChanged);
this.SubtitleListview1.DragDrop += new System.Windows.Forms.DragEventHandler(this.SubtitleListview1_DragDrop);
this.SubtitleListview1.DragEnter += new System.Windows.Forms.DragEventHandler(this.SubtitleListview1_DragEnter);
this.SubtitleListview1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.SubtitleListview1KeyDown);
this.SubtitleListview1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.SubtitleListview1_MouseDoubleClick);
this.SubtitleListview1.MouseEnter += new System.EventHandler(this.SubtitleListview1_MouseEnter);
//
// textBoxListViewTextAlternate
//
this.textBoxListViewTextAlternate.AllowDrop = true;
this.textBoxListViewTextAlternate.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.textBoxListViewTextAlternate.ContextMenuStrip = this.contextMenuStripTextBoxListView;
this.textBoxListViewTextAlternate.Enabled = false;
this.textBoxListViewTextAlternate.HideSelection = false;
this.textBoxListViewTextAlternate.Location = new System.Drawing.Point(946, 28);
this.textBoxListViewTextAlternate.Multiline = true;
this.textBoxListViewTextAlternate.Name = "textBoxListViewTextAlternate";
this.textBoxListViewTextAlternate.Size = new System.Drawing.Size(0, 63);
this.textBoxListViewTextAlternate.TabIndex = 33;
this.textBoxListViewTextAlternate.Visible = false;
this.textBoxListViewTextAlternate.MouseClick += new System.Windows.Forms.MouseEventHandler(this.TextBoxListViewTextAlternateMouseClick);
this.textBoxListViewTextAlternate.TextChanged += new System.EventHandler(this.textBoxListViewTextAlternate_TextChanged);
this.textBoxListViewTextAlternate.Enter += new System.EventHandler(this.TextBoxListViewTextAlternateEnter);
this.textBoxListViewTextAlternate.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TextBoxListViewTextAlternateKeyDown);
this.textBoxListViewTextAlternate.KeyUp += new System.Windows.Forms.KeyEventHandler(this.TextBoxListViewTextAlternateKeyUp);
this.textBoxListViewTextAlternate.MouseMove += new System.Windows.Forms.MouseEventHandler(this.TextBoxListViewTextAlternateMouseMove);
//
// timeUpDownStartTime
//
this.timeUpDownStartTime.AutoSize = true;
this.timeUpDownStartTime.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.timeUpDownStartTime.Font = new System.Drawing.Font("Segoe UI", 9F);
this.timeUpDownStartTime.Location = new System.Drawing.Point(9, 26);
this.timeUpDownStartTime.Margin = new System.Windows.Forms.Padding(4);
this.timeUpDownStartTime.Name = "timeUpDownStartTime";
this.timeUpDownStartTime.Size = new System.Drawing.Size(96, 27);
this.timeUpDownStartTime.TabIndex = 0;
timeCode4.Hours = 0;
timeCode4.Milliseconds = 0;
timeCode4.Minutes = 0;
timeCode4.Seconds = 0;
timeCode4.TimeSpan = System.TimeSpan.Parse("00:00:00");
timeCode4.TotalMilliseconds = 0D;
timeCode4.TotalSeconds = 0D;
this.timeUpDownStartTime.TimeCode = timeCode4;
this.timeUpDownStartTime.UseVideoOffset = false;
//
// textBoxListViewText
//
this.textBoxListViewText.AllowDrop = true;
this.textBoxListViewText.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.textBoxListViewText.ContextMenuStrip = this.contextMenuStripTextBoxListView;
this.textBoxListViewText.Enabled = false;
this.textBoxListViewText.HideSelection = false;
this.textBoxListViewText.Location = new System.Drawing.Point(236, 28);
this.textBoxListViewText.Multiline = true;
this.textBoxListViewText.Name = "textBoxListViewText";
this.textBoxListViewText.Size = new System.Drawing.Size(362, 63);
this.textBoxListViewText.TabIndex = 5;
this.textBoxListViewText.MouseClick += new System.Windows.Forms.MouseEventHandler(this.TextBoxListViewTextMouseClick);
this.textBoxListViewText.TextChanged += new System.EventHandler(this.TextBoxListViewTextTextChanged);
this.textBoxListViewText.Enter += new System.EventHandler(this.TextBoxListViewTextEnter);
this.textBoxListViewText.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TextBoxListViewTextKeyDown);
this.textBoxListViewText.KeyUp += new System.Windows.Forms.KeyEventHandler(this.textBoxListViewText_KeyUp);
this.textBoxListViewText.Leave += new System.EventHandler(this.textBoxListViewText_Leave);
this.textBoxListViewText.MouseMove += new System.Windows.Forms.MouseEventHandler(this.textBoxListViewText_MouseMove);
//
// mediaPlayer
//
this.mediaPlayer.AllowDrop = true;
this.mediaPlayer.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.mediaPlayer.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(18)))), ((int)(((byte)(18)))), ((int)(((byte)(18)))));
this.mediaPlayer.CurrentPosition = 0D;
this.mediaPlayer.FontSizeFactor = 1F;
this.mediaPlayer.LastParagraph = null;
this.mediaPlayer.Location = new System.Drawing.Point(0, 0);
this.mediaPlayer.Margin = new System.Windows.Forms.Padding(0);
this.mediaPlayer.Name = "mediaPlayer";
this.mediaPlayer.ShowFullscreenButton = true;
this.mediaPlayer.ShowMuteButton = true;
this.mediaPlayer.ShowStopButton = true;
this.mediaPlayer.Size = new System.Drawing.Size(219, 246);
this.mediaPlayer.SmpteMode = false;
this.mediaPlayer.SubtitleText = "";
this.mediaPlayer.TabIndex = 5;
this.mediaPlayer.TextRightToLeft = System.Windows.Forms.RightToLeft.No;
this.mediaPlayer.VideoHeight = 0;
this.mediaPlayer.VideoPlayer = null;
this.mediaPlayer.VideoWidth = 0;
this.mediaPlayer.Volume = 0D;
this.mediaPlayer.DragDrop += new System.Windows.Forms.DragEventHandler(this.mediaPlayer_DragDrop);
this.mediaPlayer.DragEnter += new System.Windows.Forms.DragEventHandler(this.mediaPlayer_DragEnter);
//
// audioVisualizer
//
this.audioVisualizer.AllowDrop = true;
this.audioVisualizer.AllowNewSelection = true;
this.audioVisualizer.AllowOverlap = false;
this.audioVisualizer.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.audioVisualizer.BackColor = System.Drawing.Color.Black;
this.audioVisualizer.BackgroundColor = System.Drawing.Color.Black;
this.audioVisualizer.Color = System.Drawing.Color.GreenYellow;
this.audioVisualizer.Font = new System.Drawing.Font("Segoe UI", 9F);
this.audioVisualizer.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(20)))), ((int)(((byte)(20)))), ((int)(((byte)(18)))));
this.audioVisualizer.Location = new System.Drawing.Point(472, 32);
this.audioVisualizer.Margin = new System.Windows.Forms.Padding(0);
this.audioVisualizer.Name = "audioVisualizer";
this.audioVisualizer.NewSelectionParagraph = null;
this.audioVisualizer.ParagraphColor = System.Drawing.Color.LimeGreen;
this.audioVisualizer.SceneChanges = ((System.Collections.Generic.List<double>)(resources.GetObject("audioVisualizer.SceneChanges")));
this.audioVisualizer.SelectedColor = System.Drawing.Color.Red;
this.audioVisualizer.ShowGridLines = true;
this.audioVisualizer.ShowSpectrogram = false;
this.audioVisualizer.ShowWaveform = true;
this.audioVisualizer.Size = new System.Drawing.Size(499, 229);
this.audioVisualizer.StartPositionSeconds = 0D;
this.audioVisualizer.TabIndex = 6;
this.audioVisualizer.TextBold = true;
this.audioVisualizer.TextColor = System.Drawing.Color.Gray;
this.audioVisualizer.TextSize = 9F;
this.audioVisualizer.VerticalZoomFactor = 1D;
this.audioVisualizer.WaveformNotLoadedText = "Click to add waveform";
this.audioVisualizer.WavePeaks = null;
this.audioVisualizer.ZoomFactor = 1D;
this.audioVisualizer.Click += new System.EventHandler(this.AudioWaveform_Click);
this.audioVisualizer.DragDrop += new System.Windows.Forms.DragEventHandler(this.AudioWaveformDragDrop);
this.audioVisualizer.DragEnter += new System.Windows.Forms.DragEventHandler(this.AudioWaveformDragEnter);
this.audioVisualizer.MouseEnter += new System.EventHandler(this.audioVisualizer_MouseEnter);
//
// timeUpDownVideoPosition
//
this.timeUpDownVideoPosition.AutoSize = true;
this.timeUpDownVideoPosition.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.timeUpDownVideoPosition.Font = new System.Drawing.Font("Segoe UI", 9F);
this.timeUpDownVideoPosition.Location = new System.Drawing.Point(96, 191);
this.timeUpDownVideoPosition.Margin = new System.Windows.Forms.Padding(4);
this.timeUpDownVideoPosition.Name = "timeUpDownVideoPosition";
this.timeUpDownVideoPosition.Size = new System.Drawing.Size(96, 27);
this.timeUpDownVideoPosition.TabIndex = 12;
timeCode5.Hours = 0;
timeCode5.Milliseconds = 0;
timeCode5.Minutes = 0;
timeCode5.Seconds = 0;
timeCode5.TimeSpan = System.TimeSpan.Parse("00:00:00");
timeCode5.TotalMilliseconds = 0D;
timeCode5.TotalSeconds = 0D;
this.timeUpDownVideoPosition.TimeCode = timeCode5;
this.timeUpDownVideoPosition.UseVideoOffset = false;
//
// timeUpDownVideoPositionAdjust
//
this.timeUpDownVideoPositionAdjust.AutoSize = true;
this.timeUpDownVideoPositionAdjust.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.timeUpDownVideoPositionAdjust.Font = new System.Drawing.Font("Segoe UI", 9F);
this.timeUpDownVideoPositionAdjust.Location = new System.Drawing.Point(96, 213);
this.timeUpDownVideoPositionAdjust.Margin = new System.Windows.Forms.Padding(4);
this.timeUpDownVideoPositionAdjust.Name = "timeUpDownVideoPositionAdjust";
this.timeUpDownVideoPositionAdjust.Size = new System.Drawing.Size(96, 27);
this.timeUpDownVideoPositionAdjust.TabIndex = 13;
timeCode6.Hours = 0;
timeCode6.Milliseconds = 0;
timeCode6.Minutes = 0;
timeCode6.Seconds = 0;
timeCode6.TimeSpan = System.TimeSpan.Parse("00:00:00");
timeCode6.TotalMilliseconds = 0D;
timeCode6.TotalSeconds = 0D;
this.timeUpDownVideoPositionAdjust.TimeCode = timeCode6;
this.timeUpDownVideoPositionAdjust.UseVideoOffset = false;
//
// Main
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -5181,5 +5190,6 @@
private System.Windows.Forms.ToolStripMenuItem generateTextFromCurrentVideoToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemSplitViaWaveform;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemEbuProperties;
private System.Windows.Forms.ToolStripMenuItem boxToolStripMenuItem;
}
}

View File

@ -1397,6 +1397,7 @@ namespace Nikse.SubtitleEdit.Forms
normalToolStripMenuItem1.Text = _language.Menu.ContextMenu.Normal;
boldToolStripMenuItem1.Text = _languageGeneral.Bold;
italicToolStripMenuItem1.Text = _languageGeneral.Italic;
boxToolStripMenuItem.Text = _language.Menu.ContextMenu.Box;
underlineToolStripMenuItem1.Text = _language.Menu.ContextMenu.Underline;
colorToolStripMenuItem1.Text = _language.Menu.ContextMenu.Color;
fontNameToolStripMenuItem.Text = _language.Menu.ContextMenu.FontName;
@ -7036,7 +7037,7 @@ namespace Nikse.SubtitleEdit.Forms
toolStripMenuItemAssStyles.Visible = false;
setStylesForSelectedLinesToolStripMenuItem.Text = _language.Menu.ContextMenu.SamiSetStyle;
}
else if ((formatType == typeof(WebVTT) && SubtitleListview1.SelectedItems.Count > 0))
else if (formatType == typeof(WebVTT) && SubtitleListview1.SelectedItems.Count > 0)
{
setStylesForSelectedLinesToolStripMenuItem.Visible = false;
toolStripMenuItemAssStyles.Visible = false;
@ -7080,6 +7081,25 @@ namespace Nikse.SubtitleEdit.Forms
setActorForSelectedLinesToolStripMenuItem.Visible = false;
}
if (formatType == typeof(Ebu))
{
Ebu.EbuGeneralSubtitleInformation header;
if (_subtitle != null && _subtitle.Header != null && (_subtitle.Header.Contains("STL2") || _subtitle.Header.Contains("STL3")))
{
header = Ebu.ReadHeader(Encoding.UTF8.GetBytes(_subtitle.Header));
}
else
{
header = new Ebu.EbuGeneralSubtitleInformation();
}
var open = header.DisplayStandardCode != "1" && header.DisplayStandardCode != "2";
boxToolStripMenuItem.Visible = open;
}
else
{
boxToolStripMenuItem.Visible = false;
}
toolStripMenuItemGoogleMicrosoftTranslateSelLine.Visible = false;
if (SubtitleListview1.SelectedItems.Count == 0)
{
@ -14002,7 +14022,7 @@ namespace Nikse.SubtitleEdit.Forms
p.StartTime.TotalMilliseconds += addMs;
p.EndTime.TotalMilliseconds += addMs;
_subtitle.Paragraphs.Insert(firstIndex + i + 1, p);
selectIndices.Insert(0 ,firstIndex + i +1);
selectIndices.Insert(0, firstIndex + i + 1);
}
SubtitleListview1.Fill(_subtitle, _subtitleAlternate);
SubtitleListview1.BeginUpdate();
@ -20022,7 +20042,7 @@ namespace Nikse.SubtitleEdit.Forms
}
var formatType = GetCurrentSubtitleFormat().GetType();
if ((formatType == typeof(WebVTT) && tb.SelectionLength > 0))
if (formatType == typeof(WebVTT) && tb.SelectionLength > 0)
{
toolStripSeparatorWebVTT.Visible = true;
toolStripMenuItemWebVttVoice.Visible = true;
@ -21756,7 +21776,7 @@ namespace Nikse.SubtitleEdit.Forms
{
if (index + i < _subtitle.Paragraphs.Count)
{
var original = Utilities.GetOriginalParagraph(index +i, _subtitle.Paragraphs[index + i], _subtitleAlternate.Paragraphs);
var original = Utilities.GetOriginalParagraph(index + i, _subtitle.Paragraphs[index + i], _subtitleAlternate.Paragraphs);
if (original != null)
{
original.Text = tmp.Paragraphs[i].Text;
@ -23018,6 +23038,11 @@ namespace Nikse.SubtitleEdit.Forms
form.ShowDialog(this);
}
}
private void boxToolStripMenuItem_Click(object sender, EventArgs e)
{
ListViewToggleTag("box");
}
}
}

View File

@ -462,19 +462,19 @@
<data name="toolStripButtonNetflixQualityCheck.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
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
AAAASUVORK5CYII=
</value>
</data>
@ -650,9 +650,15 @@
<metadata name="colorDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>813, 17</value>
</metadata>
<metadata name="toolStripWaveControls.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>650, 56</value>
</metadata>
<data name="audioVisualizer.SceneChanges" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAJoBbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1u
ZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0sIG1zY29ybGliLCBWZXJzaW9u
PTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUB
AAAAMFN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkxpc3RgMVtbU3lzdGVtLkRvdWJsZQMAAAAGX2l0
ZW1zBV9zaXplCF92ZXJzaW9uBwAABggIAgAAAAkDAAAAAAAAAAAAAAAPAwAAAAAAAAAGCw==
</value>
</data>
<metadata name="toolStripWaveControls.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>650, 56</value>
</metadata>
@ -762,7 +768,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD2
CAAAAk1TRnQBSQFMAgEBAgEAAQgBJQEIASUBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
CAAAAk1TRnQBSQFMAgEBAgEAASgBJQEoASUBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
@ -809,15 +815,6 @@
<metadata name="timerAlternateTextUndo.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>916, 95</value>
</metadata>
<data name="audioVisualizer.SceneChanges" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAJoBbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1u
ZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0sIG1zY29ybGliLCBWZXJzaW9u
PTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUB
AAAAMFN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkxpc3RgMVtbU3lzdGVtLkRvdWJsZQMAAAAGX2l0
ZW1zBV9zaXplCF92ZXJzaW9uBwAABggIAgAAAAkDAAAAAAAAAAAAAAAPAwAAAAAAAAAGCw==
</value>
</data>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>145</value>
</metadata>

View File

@ -6707,10 +6707,28 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
private void ComboBoxTesseractLanguagesSelectedIndexChanged(object sender, EventArgs e)
{
Configuration.Settings.VobSubOcr.TesseractLastLanguage = (comboBoxTesseractLanguages.SelectedItem as TesseractLanguage).Id;
var l = (comboBoxTesseractLanguages.SelectedItem as TesseractLanguage).Id;
Configuration.Settings.VobSubOcr.TesseractLastLanguage = l;
_ocrFixEngine?.Dispose();
_ocrFixEngine = null;
LoadOcrFixEngine(null, null);
if (_ocrMethodIndex == _ocrMethodTesseract4)
{
var ok = File.Exists(Path.Combine(Configuration.Tesseract302Directory, "tesseract.exe")) &&
File.Exists(Path.Combine(Configuration.Tesseract302DataDirectory, l + ".traineddata"));
checkBoxTesseractFallback.Visible = ok;
if (!ok)
checkBoxTesseractFallback.Checked = false;
}
else if (_ocrMethodIndex == _ocrMethodTesseract302)
{
var ok = File.Exists(Path.Combine(Configuration.TesseractDirectory, "tesseract.exe")) &&
File.Exists(Path.Combine(Configuration.TesseractDataDirectory, l + ".traineddata"));
checkBoxTesseractFallback.Visible = ok;
if (!ok)
checkBoxTesseractFallback.Checked = false;
}
}
private void LoadOcrFixEngine(string threeLetterIsoLanguageName, string hunspellName)
@ -6800,8 +6818,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
Configuration.Settings.VobSubOcr.LastOcrMethod = "Tesseract4";
comboBoxTesseractEngineMode.Visible = true;
labelTesseractEngineMode.Visible = true;
checkBoxTesseractFallback.Text = "Fallback to Tesseract 3.02";
checkBoxTesseractFallback.Visible = File.Exists(Path.Combine(Configuration.Tesseract302Directory, "tesseract.exe"));
checkBoxTesseractFallback.Text = string.Format(Configuration.Settings.Language.VobSubOcr.FallbackToX, "Tesseract 3.02");
if (!File.Exists(Path.Combine(Configuration.TesseractDirectory, "tesseract.exe")))
{
if (MessageBox.Show("Download Tesseract 4.0.0", "Subtitle Edit", MessageBoxButtons.YesNoCancel) == DialogResult.Yes)
@ -6827,8 +6844,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
Configuration.Settings.VobSubOcr.LastOcrMethod = "Tesseract302";
comboBoxTesseractEngineMode.Visible = false;
labelTesseractEngineMode.Visible = false;
checkBoxTesseractFallback.Text = "Fallback to Tesseract 4";
checkBoxTesseractFallback.Visible = File.Exists(Path.Combine(Configuration.TesseractDirectory, "tesseract.exe"));
checkBoxTesseractFallback.Text = string.Format(Configuration.Settings.Language.VobSubOcr.FallbackToX, "Tesseract 4.00");
if (!File.Exists(Path.Combine(Configuration.Tesseract302Directory, "tesseract.exe")))
{
if (MessageBox.Show("Download Tesseract 3.02", "Subtitle Edit", MessageBoxButtons.YesNoCancel) == DialogResult.Yes)