mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 19:22:53 +01:00
Add merge actions to batch convert
This commit is contained in:
parent
78b01939ab
commit
bf275f7592
@ -148,6 +148,9 @@ namespace Nikse.SubtitleEdit.Core
|
||||
public bool BatchConvertMergeShortLines { get; set; }
|
||||
public bool BatchConvertMergeSameText { get; set; }
|
||||
public bool BatchConvertMergeSameTimeCodes { get; set; }
|
||||
public bool BatchConvertChangeFrameRate { get; set; }
|
||||
public bool BatchConvertChangeSpeed { get; set; }
|
||||
public bool BatchConvertOffsetTimeCodes { get; set; }
|
||||
public string BatchConvertLanguage { get; set; }
|
||||
public string BatchConvertFormat { get; set; }
|
||||
public string BatchConvertAssStyles { get; set; }
|
||||
@ -2926,6 +2929,24 @@ $HorzAlign = Center
|
||||
settings.Tools.BatchConvertMergeSameTimeCodes = Convert.ToBoolean(subNode.InnerText);
|
||||
}
|
||||
|
||||
subNode = node.SelectSingleNode("BatchConvertChangeSpeed");
|
||||
if (subNode != null)
|
||||
{
|
||||
settings.Tools.BatchConvertChangeSpeed = Convert.ToBoolean(subNode.InnerText);
|
||||
}
|
||||
|
||||
subNode = node.SelectSingleNode("BatchConvertChangeFrameRate");
|
||||
if (subNode != null)
|
||||
{
|
||||
settings.Tools.BatchConvertChangeFrameRate = Convert.ToBoolean(subNode.InnerText);
|
||||
}
|
||||
|
||||
subNode = node.SelectSingleNode("BatchConvertOffsetTimeCodes");
|
||||
if (subNode != null)
|
||||
{
|
||||
settings.Tools.BatchConvertOffsetTimeCodes = Convert.ToBoolean(subNode.InnerText);
|
||||
}
|
||||
|
||||
subNode = node.SelectSingleNode("BatchConvertLanguage");
|
||||
if (subNode != null)
|
||||
{
|
||||
@ -6210,6 +6231,9 @@ $HorzAlign = Center
|
||||
textWriter.WriteElementString("BatchConvertMergeShortLines", settings.Tools.BatchConvertMergeShortLines.ToString(CultureInfo.InvariantCulture));
|
||||
textWriter.WriteElementString("BatchConvertMergeSameText", settings.Tools.BatchConvertMergeSameText.ToString(CultureInfo.InvariantCulture));
|
||||
textWriter.WriteElementString("BatchConvertMergeSameTimeCodes", settings.Tools.BatchConvertMergeSameTimeCodes.ToString(CultureInfo.InvariantCulture));
|
||||
textWriter.WriteElementString("BatchConvertChangeSpeed", settings.Tools.BatchConvertChangeSpeed.ToString(CultureInfo.InvariantCulture));
|
||||
textWriter.WriteElementString("BatchConvertChangeFrameRate", settings.Tools.BatchConvertChangeFrameRate.ToString(CultureInfo.InvariantCulture));
|
||||
textWriter.WriteElementString("BatchConvertOffsetTimeCodes", settings.Tools.BatchConvertOffsetTimeCodes.ToString(CultureInfo.InvariantCulture));
|
||||
textWriter.WriteElementString("BatchConvertLanguage", settings.Tools.BatchConvertLanguage);
|
||||
textWriter.WriteElementString("BatchConvertFormat", settings.Tools.BatchConvertFormat);
|
||||
textWriter.WriteElementString("BatchConvertAssStyles", settings.Tools.BatchConvertAssStyles);
|
||||
|
351
src/Forms/BatchConvert.Designer.cs
generated
351
src/Forms/BatchConvert.Designer.cs
generated
@ -29,12 +29,24 @@
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
Nikse.SubtitleEdit.Core.TimeCode timeCode3 = new Nikse.SubtitleEdit.Core.TimeCode();
|
||||
Nikse.SubtitleEdit.Core.TimeCode timeCode2 = new Nikse.SubtitleEdit.Core.TimeCode();
|
||||
this.buttonConvert = new System.Windows.Forms.Button();
|
||||
this.buttonCancel = new System.Windows.Forms.Button();
|
||||
this.groupBoxConvertOptions = new System.Windows.Forms.GroupBox();
|
||||
this.groupBoxSpeed = new System.Windows.Forms.GroupBox();
|
||||
this.buttonConvertOptionsSettings = new System.Windows.Forms.Button();
|
||||
this.listViewConvertOptions = new System.Windows.Forms.ListView();
|
||||
this.ActionCheckBox = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.Action = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.groupBoxOffsetTimeCodes = new System.Windows.Forms.GroupBox();
|
||||
this.radioButtonShowLater = new System.Windows.Forms.RadioButton();
|
||||
this.radioButtonShowEarlier = new System.Windows.Forms.RadioButton();
|
||||
this.timeUpDownAdjust = new Nikse.SubtitleEdit.Controls.TimeUpDown();
|
||||
this.labelHourMinSecMilliSecond = new System.Windows.Forms.Label();
|
||||
this.groupBoxFixRtl = new System.Windows.Forms.GroupBox();
|
||||
this.radioButtonReverseStartEnd = new System.Windows.Forms.RadioButton();
|
||||
this.radioButtonRemoveUnicode = new System.Windows.Forms.RadioButton();
|
||||
this.radioButtonAddUnicode = new System.Windows.Forms.RadioButton();
|
||||
this.groupBoxSpeed = new System.Windows.Forms.GroupBox();
|
||||
this.radioButtonToDropFrame = new System.Windows.Forms.RadioButton();
|
||||
this.radioButtonSpeedFromDropFrame = new System.Windows.Forms.RadioButton();
|
||||
this.radioButtonSpeedCustom = new System.Windows.Forms.RadioButton();
|
||||
@ -45,14 +57,6 @@
|
||||
this.labelToFrameRate = new System.Windows.Forms.Label();
|
||||
this.comboBoxFrameRateFrom = new System.Windows.Forms.ComboBox();
|
||||
this.labelFromFrameRate = new System.Windows.Forms.Label();
|
||||
this.groupBoxOffsetTimeCodes = new System.Windows.Forms.GroupBox();
|
||||
this.radioButtonShowLater = new System.Windows.Forms.RadioButton();
|
||||
this.radioButtonShowEarlier = new System.Windows.Forms.RadioButton();
|
||||
this.timeUpDownAdjust = new Nikse.SubtitleEdit.Controls.TimeUpDown();
|
||||
this.labelHourMinSecMilliSecond = new System.Windows.Forms.Label();
|
||||
this.listViewConvertOptions = new System.Windows.Forms.ListView();
|
||||
this.ActionCheckBox = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.Action = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.groupBoxOutput = new System.Windows.Forms.GroupBox();
|
||||
this.radioButtonSaveInOutputFolder = new System.Windows.Forms.RadioButton();
|
||||
this.buttonTransportStreamSettings = new System.Windows.Forms.Button();
|
||||
@ -87,19 +91,15 @@
|
||||
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
|
||||
this.progressBar1 = new System.Windows.Forms.ProgressBar();
|
||||
this.labelStatus = new System.Windows.Forms.Label();
|
||||
this.groupBoxFixRtl = new System.Windows.Forms.GroupBox();
|
||||
this.radioButtonReverseStartEnd = new System.Windows.Forms.RadioButton();
|
||||
this.radioButtonRemoveUnicode = new System.Windows.Forms.RadioButton();
|
||||
this.radioButtonAddUnicode = new System.Windows.Forms.RadioButton();
|
||||
this.groupBoxConvertOptions.SuspendLayout();
|
||||
this.groupBoxOffsetTimeCodes.SuspendLayout();
|
||||
this.groupBoxFixRtl.SuspendLayout();
|
||||
this.groupBoxSpeed.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDownPercent)).BeginInit();
|
||||
this.groupBoxChangeFrameRate.SuspendLayout();
|
||||
this.groupBoxOffsetTimeCodes.SuspendLayout();
|
||||
this.groupBoxOutput.SuspendLayout();
|
||||
this.groupBoxInput.SuspendLayout();
|
||||
this.contextMenuStripFiles.SuspendLayout();
|
||||
this.groupBoxFixRtl.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// buttonConvert
|
||||
@ -132,17 +132,167 @@
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.groupBoxConvertOptions.Controls.Add(this.buttonConvertOptionsSettings);
|
||||
this.groupBoxConvertOptions.Controls.Add(this.listViewConvertOptions);
|
||||
this.groupBoxConvertOptions.Controls.Add(this.groupBoxFixRtl);
|
||||
this.groupBoxConvertOptions.Controls.Add(this.groupBoxSpeed);
|
||||
this.groupBoxConvertOptions.Controls.Add(this.groupBoxChangeFrameRate);
|
||||
this.groupBoxConvertOptions.Controls.Add(this.groupBoxOffsetTimeCodes);
|
||||
this.groupBoxConvertOptions.Controls.Add(this.groupBoxFixRtl);
|
||||
this.groupBoxConvertOptions.Controls.Add(this.groupBoxSpeed);
|
||||
this.groupBoxConvertOptions.Location = new System.Drawing.Point(422, 19);
|
||||
this.groupBoxConvertOptions.Name = "groupBoxConvertOptions";
|
||||
this.groupBoxConvertOptions.Size = new System.Drawing.Size(583, 275);
|
||||
this.groupBoxConvertOptions.TabIndex = 11;
|
||||
this.groupBoxConvertOptions.TabStop = false;
|
||||
this.groupBoxConvertOptions.Text = "Convert options";
|
||||
this.groupBoxConvertOptions.Enter += new System.EventHandler(this.groupBoxConvertOptions_Enter);
|
||||
//
|
||||
// buttonConvertOptionsSettings
|
||||
//
|
||||
this.buttonConvertOptionsSettings.Location = new System.Drawing.Point(305, 144);
|
||||
this.buttonConvertOptionsSettings.Name = "buttonConvertOptionsSettings";
|
||||
this.buttonConvertOptionsSettings.Size = new System.Drawing.Size(116, 23);
|
||||
this.buttonConvertOptionsSettings.TabIndex = 302;
|
||||
this.buttonConvertOptionsSettings.Text = "Settings...";
|
||||
this.buttonConvertOptionsSettings.UseVisualStyleBackColor = true;
|
||||
this.buttonConvertOptionsSettings.Visible = false;
|
||||
this.buttonConvertOptionsSettings.Click += new System.EventHandler(this.ButtonOptionConvertSettings);
|
||||
//
|
||||
// listViewConvertOptions
|
||||
//
|
||||
this.listViewConvertOptions.CheckBoxes = true;
|
||||
this.listViewConvertOptions.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||
this.ActionCheckBox,
|
||||
this.Action});
|
||||
this.listViewConvertOptions.FullRowSelect = true;
|
||||
this.listViewConvertOptions.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
|
||||
this.listViewConvertOptions.HideSelection = false;
|
||||
this.listViewConvertOptions.Location = new System.Drawing.Point(6, 17);
|
||||
this.listViewConvertOptions.MultiSelect = false;
|
||||
this.listViewConvertOptions.Name = "listViewConvertOptions";
|
||||
this.listViewConvertOptions.Size = new System.Drawing.Size(293, 252);
|
||||
this.listViewConvertOptions.TabIndex = 301;
|
||||
this.listViewConvertOptions.UseCompatibleStateImageBehavior = false;
|
||||
this.listViewConvertOptions.View = System.Windows.Forms.View.Details;
|
||||
this.listViewConvertOptions.SelectedIndexChanged += new System.EventHandler(this.listViewConvertOptions_SelectedIndexChanged);
|
||||
//
|
||||
// ActionCheckBox
|
||||
//
|
||||
this.ActionCheckBox.Width = 30;
|
||||
//
|
||||
// Action
|
||||
//
|
||||
this.Action.Width = 400;
|
||||
//
|
||||
// groupBoxOffsetTimeCodes
|
||||
//
|
||||
this.groupBoxOffsetTimeCodes.Controls.Add(this.radioButtonShowLater);
|
||||
this.groupBoxOffsetTimeCodes.Controls.Add(this.radioButtonShowEarlier);
|
||||
this.groupBoxOffsetTimeCodes.Controls.Add(this.timeUpDownAdjust);
|
||||
this.groupBoxOffsetTimeCodes.Controls.Add(this.labelHourMinSecMilliSecond);
|
||||
this.groupBoxOffsetTimeCodes.Location = new System.Drawing.Point(305, 19);
|
||||
this.groupBoxOffsetTimeCodes.Name = "groupBoxOffsetTimeCodes";
|
||||
this.groupBoxOffsetTimeCodes.Size = new System.Drawing.Size(271, 119);
|
||||
this.groupBoxOffsetTimeCodes.TabIndex = 200;
|
||||
this.groupBoxOffsetTimeCodes.TabStop = false;
|
||||
this.groupBoxOffsetTimeCodes.Text = "Offset time codes";
|
||||
this.groupBoxOffsetTimeCodes.Visible = false;
|
||||
//
|
||||
// radioButtonShowLater
|
||||
//
|
||||
this.radioButtonShowLater.AutoSize = true;
|
||||
this.radioButtonShowLater.Checked = true;
|
||||
this.radioButtonShowLater.Location = new System.Drawing.Point(9, 89);
|
||||
this.radioButtonShowLater.Name = "radioButtonShowLater";
|
||||
this.radioButtonShowLater.Size = new System.Drawing.Size(75, 17);
|
||||
this.radioButtonShowLater.TabIndex = 3;
|
||||
this.radioButtonShowLater.TabStop = true;
|
||||
this.radioButtonShowLater.Text = "Show later";
|
||||
this.radioButtonShowLater.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// radioButtonShowEarlier
|
||||
//
|
||||
this.radioButtonShowEarlier.AutoSize = true;
|
||||
this.radioButtonShowEarlier.Location = new System.Drawing.Point(9, 66);
|
||||
this.radioButtonShowEarlier.Name = "radioButtonShowEarlier";
|
||||
this.radioButtonShowEarlier.Size = new System.Drawing.Size(83, 17);
|
||||
this.radioButtonShowEarlier.TabIndex = 2;
|
||||
this.radioButtonShowEarlier.Text = "Show earlier";
|
||||
this.radioButtonShowEarlier.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// timeUpDownAdjust
|
||||
//
|
||||
this.timeUpDownAdjust.AutoSize = true;
|
||||
this.timeUpDownAdjust.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.timeUpDownAdjust.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);
|
||||
this.timeUpDownAdjust.Location = new System.Drawing.Point(7, 37);
|
||||
this.timeUpDownAdjust.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.timeUpDownAdjust.Name = "timeUpDownAdjust";
|
||||
this.timeUpDownAdjust.Size = new System.Drawing.Size(96, 27);
|
||||
this.timeUpDownAdjust.TabIndex = 1;
|
||||
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.timeUpDownAdjust.TimeCode = timeCode2;
|
||||
this.timeUpDownAdjust.UseVideoOffset = false;
|
||||
//
|
||||
// labelHourMinSecMilliSecond
|
||||
//
|
||||
this.labelHourMinSecMilliSecond.AutoSize = true;
|
||||
this.labelHourMinSecMilliSecond.Location = new System.Drawing.Point(6, 20);
|
||||
this.labelHourMinSecMilliSecond.Name = "labelHourMinSecMilliSecond";
|
||||
this.labelHourMinSecMilliSecond.Size = new System.Drawing.Size(90, 13);
|
||||
this.labelHourMinSecMilliSecond.TabIndex = 0;
|
||||
this.labelHourMinSecMilliSecond.Text = "Hours:min:sec.ms";
|
||||
//
|
||||
// groupBoxFixRtl
|
||||
//
|
||||
this.groupBoxFixRtl.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.groupBoxFixRtl.Controls.Add(this.radioButtonReverseStartEnd);
|
||||
this.groupBoxFixRtl.Controls.Add(this.radioButtonRemoveUnicode);
|
||||
this.groupBoxFixRtl.Controls.Add(this.radioButtonAddUnicode);
|
||||
this.groupBoxFixRtl.Location = new System.Drawing.Point(305, 17);
|
||||
this.groupBoxFixRtl.Name = "groupBoxFixRtl";
|
||||
this.groupBoxFixRtl.Size = new System.Drawing.Size(271, 115);
|
||||
this.groupBoxFixRtl.TabIndex = 303;
|
||||
this.groupBoxFixRtl.TabStop = false;
|
||||
this.groupBoxFixRtl.Text = "Settings";
|
||||
this.groupBoxFixRtl.Visible = false;
|
||||
//
|
||||
// radioButtonReverseStartEnd
|
||||
//
|
||||
this.radioButtonReverseStartEnd.AutoSize = true;
|
||||
this.radioButtonReverseStartEnd.Location = new System.Drawing.Point(19, 77);
|
||||
this.radioButtonReverseStartEnd.Name = "radioButtonReverseStartEnd";
|
||||
this.radioButtonReverseStartEnd.Size = new System.Drawing.Size(135, 17);
|
||||
this.radioButtonReverseStartEnd.TabIndex = 2;
|
||||
this.radioButtonReverseStartEnd.TabStop = true;
|
||||
this.radioButtonReverseStartEnd.Text = "Reverse RTL start/end";
|
||||
this.radioButtonReverseStartEnd.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// radioButtonRemoveUnicode
|
||||
//
|
||||
this.radioButtonRemoveUnicode.AutoSize = true;
|
||||
this.radioButtonRemoveUnicode.Location = new System.Drawing.Point(19, 54);
|
||||
this.radioButtonRemoveUnicode.Name = "radioButtonRemoveUnicode";
|
||||
this.radioButtonRemoveUnicode.Size = new System.Drawing.Size(153, 17);
|
||||
this.radioButtonRemoveUnicode.TabIndex = 1;
|
||||
this.radioButtonRemoveUnicode.TabStop = true;
|
||||
this.radioButtonRemoveUnicode.Text = "Remove RTL unicode tags";
|
||||
this.radioButtonRemoveUnicode.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// radioButtonAddUnicode
|
||||
//
|
||||
this.radioButtonAddUnicode.AutoSize = true;
|
||||
this.radioButtonAddUnicode.Location = new System.Drawing.Point(19, 31);
|
||||
this.radioButtonAddUnicode.Name = "radioButtonAddUnicode";
|
||||
this.radioButtonAddUnicode.Size = new System.Drawing.Size(145, 17);
|
||||
this.radioButtonAddUnicode.TabIndex = 0;
|
||||
this.radioButtonAddUnicode.TabStop = true;
|
||||
this.radioButtonAddUnicode.Text = "Fix RTL via Unicode tags";
|
||||
this.radioButtonAddUnicode.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// groupBoxSpeed
|
||||
//
|
||||
@ -159,17 +309,6 @@
|
||||
this.groupBoxSpeed.Text = "Change speed";
|
||||
this.groupBoxSpeed.Visible = false;
|
||||
//
|
||||
// buttonConvertOptionsSettings
|
||||
//
|
||||
this.buttonConvertOptionsSettings.Location = new System.Drawing.Point(305, 144);
|
||||
this.buttonConvertOptionsSettings.Name = "buttonConvertOptionsSettings";
|
||||
this.buttonConvertOptionsSettings.Size = new System.Drawing.Size(116, 23);
|
||||
this.buttonConvertOptionsSettings.TabIndex = 302;
|
||||
this.buttonConvertOptionsSettings.Text = "Settings...";
|
||||
this.buttonConvertOptionsSettings.UseVisualStyleBackColor = true;
|
||||
this.buttonConvertOptionsSettings.Visible = false;
|
||||
this.buttonConvertOptionsSettings.Click += new System.EventHandler(this.ButtonOptionConvertSettings);
|
||||
//
|
||||
// radioButtonToDropFrame
|
||||
//
|
||||
this.radioButtonToDropFrame.AutoSize = true;
|
||||
@ -251,7 +390,6 @@
|
||||
this.groupBoxChangeFrameRate.TabStop = false;
|
||||
this.groupBoxChangeFrameRate.Text = "Change frame rate";
|
||||
this.groupBoxChangeFrameRate.Visible = false;
|
||||
this.groupBoxChangeFrameRate.Enter += new System.EventHandler(this.groupBoxChangeFrameRate_Enter);
|
||||
//
|
||||
// comboBoxFrameRateTo
|
||||
//
|
||||
@ -287,98 +425,6 @@
|
||||
this.labelFromFrameRate.TabIndex = 0;
|
||||
this.labelFromFrameRate.Text = "From frame rate";
|
||||
//
|
||||
// groupBoxOffsetTimeCodes
|
||||
//
|
||||
this.groupBoxOffsetTimeCodes.Controls.Add(this.radioButtonShowLater);
|
||||
this.groupBoxOffsetTimeCodes.Controls.Add(this.radioButtonShowEarlier);
|
||||
this.groupBoxOffsetTimeCodes.Controls.Add(this.timeUpDownAdjust);
|
||||
this.groupBoxOffsetTimeCodes.Controls.Add(this.labelHourMinSecMilliSecond);
|
||||
this.groupBoxOffsetTimeCodes.Location = new System.Drawing.Point(305, 19);
|
||||
this.groupBoxOffsetTimeCodes.Name = "groupBoxOffsetTimeCodes";
|
||||
this.groupBoxOffsetTimeCodes.Size = new System.Drawing.Size(271, 119);
|
||||
this.groupBoxOffsetTimeCodes.TabIndex = 200;
|
||||
this.groupBoxOffsetTimeCodes.TabStop = false;
|
||||
this.groupBoxOffsetTimeCodes.Text = "Offset time codes";
|
||||
this.groupBoxOffsetTimeCodes.Visible = false;
|
||||
this.groupBoxOffsetTimeCodes.Enter += new System.EventHandler(this.groupBoxOffsetTimeCodes_Enter);
|
||||
//
|
||||
// radioButtonShowLater
|
||||
//
|
||||
this.radioButtonShowLater.AutoSize = true;
|
||||
this.radioButtonShowLater.Checked = true;
|
||||
this.radioButtonShowLater.Location = new System.Drawing.Point(9, 89);
|
||||
this.radioButtonShowLater.Name = "radioButtonShowLater";
|
||||
this.radioButtonShowLater.Size = new System.Drawing.Size(75, 17);
|
||||
this.radioButtonShowLater.TabIndex = 3;
|
||||
this.radioButtonShowLater.TabStop = true;
|
||||
this.radioButtonShowLater.Text = "Show later";
|
||||
this.radioButtonShowLater.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// radioButtonShowEarlier
|
||||
//
|
||||
this.radioButtonShowEarlier.AutoSize = true;
|
||||
this.radioButtonShowEarlier.Location = new System.Drawing.Point(9, 66);
|
||||
this.radioButtonShowEarlier.Name = "radioButtonShowEarlier";
|
||||
this.radioButtonShowEarlier.Size = new System.Drawing.Size(83, 17);
|
||||
this.radioButtonShowEarlier.TabIndex = 2;
|
||||
this.radioButtonShowEarlier.Text = "Show earlier";
|
||||
this.radioButtonShowEarlier.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// timeUpDownAdjust
|
||||
//
|
||||
this.timeUpDownAdjust.AutoSize = true;
|
||||
this.timeUpDownAdjust.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.timeUpDownAdjust.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);
|
||||
this.timeUpDownAdjust.Location = new System.Drawing.Point(7, 37);
|
||||
this.timeUpDownAdjust.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.timeUpDownAdjust.Name = "timeUpDownAdjust";
|
||||
this.timeUpDownAdjust.Size = new System.Drawing.Size(96, 27);
|
||||
this.timeUpDownAdjust.TabIndex = 1;
|
||||
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.timeUpDownAdjust.TimeCode = timeCode3;
|
||||
this.timeUpDownAdjust.UseVideoOffset = false;
|
||||
//
|
||||
// labelHourMinSecMilliSecond
|
||||
//
|
||||
this.labelHourMinSecMilliSecond.AutoSize = true;
|
||||
this.labelHourMinSecMilliSecond.Location = new System.Drawing.Point(6, 20);
|
||||
this.labelHourMinSecMilliSecond.Name = "labelHourMinSecMilliSecond";
|
||||
this.labelHourMinSecMilliSecond.Size = new System.Drawing.Size(90, 13);
|
||||
this.labelHourMinSecMilliSecond.TabIndex = 0;
|
||||
this.labelHourMinSecMilliSecond.Text = "Hours:min:sec.ms";
|
||||
//
|
||||
// listViewConvertOptions
|
||||
//
|
||||
this.listViewConvertOptions.CheckBoxes = true;
|
||||
this.listViewConvertOptions.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||
this.ActionCheckBox,
|
||||
this.Action});
|
||||
this.listViewConvertOptions.FullRowSelect = true;
|
||||
this.listViewConvertOptions.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
|
||||
this.listViewConvertOptions.HideSelection = false;
|
||||
this.listViewConvertOptions.Location = new System.Drawing.Point(6, 17);
|
||||
this.listViewConvertOptions.MultiSelect = false;
|
||||
this.listViewConvertOptions.Name = "listViewConvertOptions";
|
||||
this.listViewConvertOptions.Size = new System.Drawing.Size(293, 252);
|
||||
this.listViewConvertOptions.TabIndex = 301;
|
||||
this.listViewConvertOptions.UseCompatibleStateImageBehavior = false;
|
||||
this.listViewConvertOptions.View = System.Windows.Forms.View.Details;
|
||||
this.listViewConvertOptions.SelectedIndexChanged += new System.EventHandler(this.listViewConvertOptions_SelectedIndexChanged);
|
||||
//
|
||||
// ActionCheckBox
|
||||
//
|
||||
this.ActionCheckBox.Width = 30;
|
||||
//
|
||||
// Action
|
||||
//
|
||||
this.Action.Width = 400;
|
||||
//
|
||||
// groupBoxOutput
|
||||
//
|
||||
this.groupBoxOutput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
@ -657,7 +703,6 @@
|
||||
this.listViewInputFiles.TabIndex = 2;
|
||||
this.listViewInputFiles.UseCompatibleStateImageBehavior = false;
|
||||
this.listViewInputFiles.View = System.Windows.Forms.View.Details;
|
||||
this.listViewInputFiles.SelectedIndexChanged += new System.EventHandler(this.listViewInputFiles_SelectedIndexChanged);
|
||||
this.listViewInputFiles.DragDrop += new System.Windows.Forms.DragEventHandler(this.listViewInputFiles_DragDrop);
|
||||
this.listViewInputFiles.DragEnter += new System.Windows.Forms.DragEventHandler(this.listViewInputFiles_DragEnter);
|
||||
this.listViewInputFiles.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ListViewInputFilesKeyDown);
|
||||
@ -728,56 +773,6 @@
|
||||
this.labelStatus.TabIndex = 9;
|
||||
this.labelStatus.Text = "labelStatus";
|
||||
//
|
||||
// groupBoxFixRtl
|
||||
//
|
||||
this.groupBoxFixRtl.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.groupBoxFixRtl.Controls.Add(this.radioButtonReverseStartEnd);
|
||||
this.groupBoxFixRtl.Controls.Add(this.radioButtonRemoveUnicode);
|
||||
this.groupBoxFixRtl.Controls.Add(this.radioButtonAddUnicode);
|
||||
this.groupBoxFixRtl.Location = new System.Drawing.Point(305, 17);
|
||||
this.groupBoxFixRtl.Name = "groupBoxFixRtl";
|
||||
this.groupBoxFixRtl.Size = new System.Drawing.Size(271, 115);
|
||||
this.groupBoxFixRtl.TabIndex = 303;
|
||||
this.groupBoxFixRtl.TabStop = false;
|
||||
this.groupBoxFixRtl.Text = "Settings";
|
||||
this.groupBoxFixRtl.Visible = false;
|
||||
this.groupBoxFixRtl.Enter += new System.EventHandler(this.groupBox1_Enter);
|
||||
//
|
||||
// radioButtonReverseStartEnd
|
||||
//
|
||||
this.radioButtonReverseStartEnd.AutoSize = true;
|
||||
this.radioButtonReverseStartEnd.Location = new System.Drawing.Point(19, 77);
|
||||
this.radioButtonReverseStartEnd.Name = "radioButtonReverseStartEnd";
|
||||
this.radioButtonReverseStartEnd.Size = new System.Drawing.Size(135, 17);
|
||||
this.radioButtonReverseStartEnd.TabIndex = 2;
|
||||
this.radioButtonReverseStartEnd.TabStop = true;
|
||||
this.radioButtonReverseStartEnd.Text = "Reverse RTL start/end";
|
||||
this.radioButtonReverseStartEnd.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// radioButtonRemoveUnicode
|
||||
//
|
||||
this.radioButtonRemoveUnicode.AutoSize = true;
|
||||
this.radioButtonRemoveUnicode.Location = new System.Drawing.Point(19, 54);
|
||||
this.radioButtonRemoveUnicode.Name = "radioButtonRemoveUnicode";
|
||||
this.radioButtonRemoveUnicode.Size = new System.Drawing.Size(153, 17);
|
||||
this.radioButtonRemoveUnicode.TabIndex = 1;
|
||||
this.radioButtonRemoveUnicode.TabStop = true;
|
||||
this.radioButtonRemoveUnicode.Text = "Remove RTL unicode tags";
|
||||
this.radioButtonRemoveUnicode.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// radioButtonAddUnicode
|
||||
//
|
||||
this.radioButtonAddUnicode.AutoSize = true;
|
||||
this.radioButtonAddUnicode.Location = new System.Drawing.Point(19, 31);
|
||||
this.radioButtonAddUnicode.Name = "radioButtonAddUnicode";
|
||||
this.radioButtonAddUnicode.Size = new System.Drawing.Size(145, 17);
|
||||
this.radioButtonAddUnicode.TabIndex = 0;
|
||||
this.radioButtonAddUnicode.TabStop = true;
|
||||
this.radioButtonAddUnicode.Text = "Fix RTL via Unicode tags";
|
||||
this.radioButtonAddUnicode.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// BatchConvert
|
||||
//
|
||||
this.AllowDrop = true;
|
||||
@ -798,20 +793,20 @@
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.BatchConvert_FormClosing);
|
||||
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.BatchConvert_KeyDown);
|
||||
this.groupBoxConvertOptions.ResumeLayout(false);
|
||||
this.groupBoxOffsetTimeCodes.ResumeLayout(false);
|
||||
this.groupBoxOffsetTimeCodes.PerformLayout();
|
||||
this.groupBoxFixRtl.ResumeLayout(false);
|
||||
this.groupBoxFixRtl.PerformLayout();
|
||||
this.groupBoxSpeed.ResumeLayout(false);
|
||||
this.groupBoxSpeed.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.numericUpDownPercent)).EndInit();
|
||||
this.groupBoxChangeFrameRate.ResumeLayout(false);
|
||||
this.groupBoxChangeFrameRate.PerformLayout();
|
||||
this.groupBoxOffsetTimeCodes.ResumeLayout(false);
|
||||
this.groupBoxOffsetTimeCodes.PerformLayout();
|
||||
this.groupBoxOutput.ResumeLayout(false);
|
||||
this.groupBoxOutput.PerformLayout();
|
||||
this.groupBoxInput.ResumeLayout(false);
|
||||
this.groupBoxInput.PerformLayout();
|
||||
this.contextMenuStripFiles.ResumeLayout(false);
|
||||
this.groupBoxFixRtl.ResumeLayout(false);
|
||||
this.groupBoxFixRtl.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
|
@ -326,38 +326,38 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
},
|
||||
new FixActionItem
|
||||
{
|
||||
Text = "Merge short lines",
|
||||
Text = Configuration.Settings.Language.MergedShortLines.Title,
|
||||
Checked = Configuration.Settings.Tools.BatchConvertMergeShortLines,
|
||||
Action = CommandLineConverter.BatchAction.MergeShortLines
|
||||
},
|
||||
new FixActionItem
|
||||
{
|
||||
Text = "Merge lines with same text",
|
||||
Text = Configuration.Settings.Language.MergeDoubleLines.Title,
|
||||
Checked = Configuration.Settings.Tools.BatchConvertMergeSameText,
|
||||
Action = CommandLineConverter.BatchAction.MergeSameTexts
|
||||
},
|
||||
new FixActionItem
|
||||
{
|
||||
Text = "Merge lines with same time codes",
|
||||
Checked = false,
|
||||
Text = Configuration.Settings.Language.MergeTextWithSameTimeCodes.Title,
|
||||
Checked = Configuration.Settings.Tools.BatchConvertMergeSameTimeCodes,
|
||||
Action = CommandLineConverter.BatchAction.MergeSameTimeCodes
|
||||
},
|
||||
new FixActionItem
|
||||
{
|
||||
Text = "Change frame rate",
|
||||
Checked = false,
|
||||
Text = Configuration.Settings.Language.ChangeFrameRate.Title,
|
||||
Checked = Configuration.Settings.Tools.BatchConvertChangeFrameRate,
|
||||
Action = CommandLineConverter.BatchAction.ChangeFrameRate
|
||||
},
|
||||
new FixActionItem
|
||||
{
|
||||
Text = "Offset time codes",
|
||||
Checked = false,
|
||||
Text = l.OffsetTimeCodes,
|
||||
Checked = Configuration.Settings.Tools.BatchConvertOffsetTimeCodes,
|
||||
Action = CommandLineConverter.BatchAction.OffsetTimeCodes
|
||||
},
|
||||
new FixActionItem
|
||||
{
|
||||
Text = "Change speed",
|
||||
Checked = false,
|
||||
Text = Configuration.Settings.Language.ChangeSpeedInPercent.TitleShort,
|
||||
Checked = Configuration.Settings.Tools.BatchConvertChangeSpeed,
|
||||
Action = CommandLineConverter.BatchAction.ChangeSpeed
|
||||
}
|
||||
};
|
||||
@ -1015,7 +1015,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
p.Text = HtmlUtil.RemoveHtmlTags(p.Text, true);
|
||||
}
|
||||
if (!numericUpDownPercent.Value.Equals(100))
|
||||
if (!numericUpDownPercent.Value.Equals(100) && IsActionEnabled(CommandLineConverter.BatchAction.ChangeSpeed))
|
||||
{
|
||||
var toSpeedPercentage = Convert.ToDouble(numericUpDownPercent.Value) / 100.0;
|
||||
p.StartTime.TotalMilliseconds = p.StartTime.TotalMilliseconds * toSpeedPercentage;
|
||||
@ -1046,12 +1046,43 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
_changeCasingNames.FixCasing();
|
||||
}
|
||||
|
||||
if (double.TryParse(comboBoxFrameRateFrom.Text.Replace(',', '.').Replace(CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator, "."), NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out var fromFrameRate) &&
|
||||
double.TryParse(comboBoxFrameRateTo.Text.Replace(',', '.').Replace(CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator, "."), NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out var toFrameRate))
|
||||
if (IsActionEnabled(CommandLineConverter.BatchAction.MergeShortLines))
|
||||
{
|
||||
var mergedShortLinesSub = MergeShortLinesUtils.MergeShortLinesInSubtitle(sub, 250, Configuration.Settings.General.SubtitleLineMaximumLength, true);
|
||||
if (mergedShortLinesSub.Paragraphs.Count != sub.Paragraphs.Count)
|
||||
{
|
||||
sub.Paragraphs.Clear();
|
||||
sub.Paragraphs.AddRange(mergedShortLinesSub.Paragraphs);
|
||||
}
|
||||
}
|
||||
|
||||
if (IsActionEnabled(CommandLineConverter.BatchAction.MergeSameTexts))
|
||||
{
|
||||
var mergedSameTextsSub = MergeLinesSameTextUtils.MergeLinesWithSameTextInSubtitle(sub, true, true, 250);
|
||||
if (mergedSameTextsSub.Paragraphs.Count != sub.Paragraphs.Count)
|
||||
{
|
||||
sub.Paragraphs.Clear();
|
||||
sub.Paragraphs.AddRange(mergedSameTextsSub.Paragraphs);
|
||||
}
|
||||
}
|
||||
|
||||
if (IsActionEnabled(CommandLineConverter.BatchAction.MergeSameTimeCodes))
|
||||
{
|
||||
var mergedSameTimeCodesSub = Core.Forms.MergeLinesWithSameTimeCodes.Merge(sub, new List<int>(), out _, true, false, 1000, "en", new List<int>(), new Dictionary<int, bool>(), new Subtitle());
|
||||
if (mergedSameTimeCodesSub.Paragraphs.Count != sub.Paragraphs.Count)
|
||||
{
|
||||
sub.Paragraphs.Clear();
|
||||
sub.Paragraphs.AddRange(mergedSameTimeCodesSub.Paragraphs);
|
||||
}
|
||||
}
|
||||
|
||||
if (IsActionEnabled(CommandLineConverter.BatchAction.ChangeFrameRate) &&
|
||||
double.TryParse(comboBoxFrameRateFrom.Text.Replace(',', '.').Replace(CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator, "."), NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out var fromFrameRate) &&
|
||||
double.TryParse(comboBoxFrameRateTo.Text.Replace(',', '.').Replace(CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator, "."), NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out var toFrameRate))
|
||||
{
|
||||
sub.ChangeFrameRate(fromFrameRate, toFrameRate);
|
||||
}
|
||||
if (timeUpDownAdjust.TimeCode.TotalMilliseconds > 0.00001)
|
||||
if (IsActionEnabled(CommandLineConverter.BatchAction.OffsetTimeCodes) && timeUpDownAdjust.TimeCode.TotalMilliseconds > 0.00001)
|
||||
{
|
||||
var totalMilliseconds = timeUpDownAdjust.TimeCode.TotalMilliseconds;
|
||||
if (radioButtonShowEarlier.Checked)
|
||||
@ -1752,7 +1783,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
private void buttonFixCommonErrorSettings_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void BatchConvert_FormClosing(object sender, FormClosingEventArgs e)
|
||||
@ -1785,6 +1816,12 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
Configuration.Settings.Tools.BatchConvertUseStyleFromSource = checkBoxUseStyleFromSource.Checked;
|
||||
Configuration.Settings.Tools.BatchConvertExportCustomTextTemplate = _customTextTemplate;
|
||||
Configuration.Settings.Tools.BatchConvertSaveInSourceFolder = radioButtonSaveInSourceFolder.Checked;
|
||||
Configuration.Settings.Tools.BatchConvertMergeShortLines = IsActionEnabled(CommandLineConverter.BatchAction.MergeShortLines);
|
||||
Configuration.Settings.Tools.BatchConvertMergeSameText = IsActionEnabled(CommandLineConverter.BatchAction.MergeSameTexts);
|
||||
Configuration.Settings.Tools.BatchConvertMergeSameTimeCodes = IsActionEnabled(CommandLineConverter.BatchAction.MergeSameTimeCodes);
|
||||
Configuration.Settings.Tools.BatchConvertChangeSpeed = IsActionEnabled(CommandLineConverter.BatchAction.ChangeSpeed);
|
||||
Configuration.Settings.Tools.BatchConvertChangeFrameRate = IsActionEnabled(CommandLineConverter.BatchAction.ChangeFrameRate);
|
||||
Configuration.Settings.Tools.BatchConvertOffsetTimeCodes = IsActionEnabled(CommandLineConverter.BatchAction.OffsetTimeCodes);
|
||||
|
||||
UpdateRtlSettings();
|
||||
}
|
||||
@ -1807,7 +1844,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
private void buttonMultipleReplaceSettings_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
private string _rootFolder;
|
||||
@ -2051,7 +2088,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
private void buttonFixRtlSettings_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void buttonTransportStreamSettings_Click(object sender, EventArgs e)
|
||||
@ -2204,55 +2241,5 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void groupBoxChangeFrameRate_Enter(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void groupBoxOffsetTimeCodes_Enter(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void groupBoxConvertOptions_Enter(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void checkBoxBridgeGaps_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void checkBoxFixCommonErrors_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void checkBoxAutoBalance_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void checkBoxSplitLongLines_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void checkBoxSetMinimumDisplayTimeBetweenSubs_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void listViewInputFiles_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void groupBox1_Enter(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user