Batch convert use new label

This commit is contained in:
niksedk 2023-08-15 22:48:56 +02:00
parent 81349967dd
commit c942f2f1c1
2 changed files with 54 additions and 55 deletions

View File

@ -53,23 +53,23 @@ namespace Nikse.SubtitleEdit.Forms
this.checkBoxAdjustDurationCheckShotChanges = new System.Windows.Forms.CheckBox();
this.checkBoxEnforceDurationLimits = new System.Windows.Forms.CheckBox();
this.comboBoxAdjustDurationVia = new Nikse.SubtitleEdit.Controls.NikseComboBox();
this.labelAdjustDurationVia = new System.Windows.Forms.Label();
this.labelAdjustDurationVia = new Nikse.SubtitleEdit.Controls.NikseLabel();
this.panelAdjustDurationFixed = new System.Windows.Forms.Panel();
this.numericUpDownFixedMilliseconds = new Nikse.SubtitleEdit.Controls.NikseUpDown();
this.labelMillisecondsFixed = new System.Windows.Forms.Label();
this.labelMillisecondsFixed = new Nikse.SubtitleEdit.Controls.NikseLabel();
this.panelAdjustDurationAddPercent = new System.Windows.Forms.Panel();
this.label1 = new System.Windows.Forms.Label();
this.label1 = new Nikse.SubtitleEdit.Controls.NikseLabel();
this.numericUpDownAdjustViaPercent = new Nikse.SubtitleEdit.Controls.NikseUpDown();
this.labelAdjustViaPercent = new System.Windows.Forms.Label();
this.labelAdjustViaPercent = new Nikse.SubtitleEdit.Controls.NikseLabel();
this.panelAdjustDurationAddSeconds = new System.Windows.Forms.Panel();
this.numericUpDownSeconds = new Nikse.SubtitleEdit.Controls.NikseUpDown();
this.labelAddSeconds = new System.Windows.Forms.Label();
this.labelAddSeconds = new Nikse.SubtitleEdit.Controls.NikseLabel();
this.panelAdjustDurationRecalc = new System.Windows.Forms.Panel();
this.checkBoxExtendOnly = new System.Windows.Forms.CheckBox();
this.numericUpDownOptimalCharsSec = new Nikse.SubtitleEdit.Controls.NikseUpDown();
this.labelOptimalCharsSec = new System.Windows.Forms.Label();
this.labelOptimalCharsSec = new Nikse.SubtitleEdit.Controls.NikseLabel();
this.numericUpDownMaxCharsSec = new Nikse.SubtitleEdit.Controls.NikseUpDown();
this.labelMaxCharsPerSecond = new System.Windows.Forms.Label();
this.labelMaxCharsPerSecond = new Nikse.SubtitleEdit.Controls.NikseLabel();
this.groupBoxBeautifyTimeCodes = new System.Windows.Forms.GroupBox();
this.buttonBeautifyTimeCodesEditProfile = new System.Windows.Forms.Button();
this.checkBoxBeautifyTimeCodesSnapToShotChanges = new System.Windows.Forms.CheckBox();
@ -94,18 +94,18 @@ namespace Nikse.SubtitleEdit.Forms
this.checkBoxOnlyContinuationLines = new System.Windows.Forms.CheckBox();
this.numericUpDownMaxCharacters = new Nikse.SubtitleEdit.Controls.NikseUpDown();
this.numericUpDownMaxMillisecondsBetweenLines = new Nikse.SubtitleEdit.Controls.NikseUpDown();
this.labelMaxMillisecondsBetweenLines = new System.Windows.Forms.Label();
this.labelMaxCharacters = new System.Windows.Forms.Label();
this.labelMaxMillisecondsBetweenLines = new Nikse.SubtitleEdit.Controls.NikseLabel();
this.labelMaxCharacters = new Nikse.SubtitleEdit.Controls.NikseLabel();
this.buttonConvertOptionsSettings = new System.Windows.Forms.Button();
this.groupBoxAssaChangeRes = new System.Windows.Forms.GroupBox();
this.checkBoxDrawing = new System.Windows.Forms.CheckBox();
this.checkBoxPosition = new System.Windows.Forms.CheckBox();
this.checkBoxFontSize = new System.Windows.Forms.CheckBox();
this.checkBoxMargins = new System.Windows.Forms.CheckBox();
this.labelTargetRes = new System.Windows.Forms.Label();
this.labelTargetRes = new Nikse.SubtitleEdit.Controls.NikseLabel();
this.numericUpDownTargetHeight = new Nikse.SubtitleEdit.Controls.NikseUpDown();
this.buttonGetResolutionFromVideo = new System.Windows.Forms.Button();
this.labelX = new System.Windows.Forms.Label();
this.labelX = new Nikse.SubtitleEdit.Controls.NikseLabel();
this.numericUpDownTargetWidth = new Nikse.SubtitleEdit.Controls.NikseUpDown();
this.groupBoxSortBy = new System.Windows.Forms.GroupBox();
this.comboBoxSortBy = new Nikse.SubtitleEdit.Controls.NikseComboBox();
@ -113,32 +113,32 @@ namespace Nikse.SubtitleEdit.Forms
this.checkBoxMergeSameTimeCodesReBreakLines = new System.Windows.Forms.CheckBox();
this.checkBoxMergeSameTimeCodesMakeDialog = new System.Windows.Forms.CheckBox();
this.numericUpDownMergeSameTimeCodesMaxDifference = new Nikse.SubtitleEdit.Controls.NikseUpDown();
this.labelMergeSameTimeCodesMaxDifference = new System.Windows.Forms.Label();
this.labelMergeSameTimeCodesMaxDifference = new Nikse.SubtitleEdit.Controls.NikseLabel();
this.groupBoxConvertColorsToDialog = new System.Windows.Forms.GroupBox();
this.checkBoxConvertColorsToDialogReBreakLines = new System.Windows.Forms.CheckBox();
this.checkBoxConvertColorsToDialogAddNewLines = new System.Windows.Forms.CheckBox();
this.checkBoxConvertColorsToDialogRemoveColorTags = new System.Windows.Forms.CheckBox();
this.groupBoxDeleteLines = new System.Windows.Forms.GroupBox();
this.textBoxDeleteContains = new System.Windows.Forms.TextBox();
this.labelDeleteLinesContaining = new System.Windows.Forms.Label();
this.labelDeleteLinesContaining = new Nikse.SubtitleEdit.Controls.NikseLabel();
this.numericUpDownDeleteLast = new Nikse.SubtitleEdit.Controls.NikseUpDown();
this.labelDeleteLastLines = new System.Windows.Forms.Label();
this.labelDeleteLastLines = new Nikse.SubtitleEdit.Controls.NikseLabel();
this.numericUpDownDeleteFirst = new Nikse.SubtitleEdit.Controls.NikseUpDown();
this.labelDeleteFirstLines = new System.Windows.Forms.Label();
this.labelDeleteFirstLines = new Nikse.SubtitleEdit.Controls.NikseLabel();
this.groupBoxRemoveStyle = new System.Windows.Forms.GroupBox();
this.textBoxRemoveStyle = new System.Windows.Forms.TextBox();
this.labelStyleName = new System.Windows.Forms.Label();
this.labelStyleName = new Nikse.SubtitleEdit.Controls.NikseLabel();
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.NikseTimeUpDown();
this.labelHourMinSecMilliSecond = new System.Windows.Forms.Label();
this.labelHourMinSecMilliSecond = new Nikse.SubtitleEdit.Controls.NikseLabel();
this.groupBoxChangeFrameRate = new System.Windows.Forms.GroupBox();
this.buttonSwapFrameRate = new System.Windows.Forms.Button();
this.comboBoxFrameRateTo = new Nikse.SubtitleEdit.Controls.NikseComboBox();
this.labelToFrameRate = new System.Windows.Forms.Label();
this.labelToFrameRate = new Nikse.SubtitleEdit.Controls.NikseLabel();
this.comboBoxFrameRateFrom = new Nikse.SubtitleEdit.Controls.NikseComboBox();
this.labelFromFrameRate = new System.Windows.Forms.Label();
this.labelFromFrameRate = new Nikse.SubtitleEdit.Controls.NikseLabel();
this.groupBoxFixRtl = new System.Windows.Forms.GroupBox();
this.radioButtonReverseStartEnd = new System.Windows.Forms.RadioButton();
this.radioButtonRemoveUnicode = new System.Windows.Forms.RadioButton();
@ -148,7 +148,7 @@ namespace Nikse.SubtitleEdit.Forms
this.radioButtonSpeedFromDropFrame = new System.Windows.Forms.RadioButton();
this.radioButtonSpeedCustom = new System.Windows.Forms.RadioButton();
this.numericUpDownPercent = new Nikse.SubtitleEdit.Controls.NikseUpDown();
this.labelPercent = new System.Windows.Forms.Label();
this.labelPercent = new Nikse.SubtitleEdit.Controls.NikseLabel();
this.groupBoxOutput = new System.Windows.Forms.GroupBox();
this.buttonBrowseEncoding = new System.Windows.Forms.Button();
this.radioButtonSaveInOutputFolder = new System.Windows.Forms.RadioButton();
@ -160,19 +160,19 @@ namespace Nikse.SubtitleEdit.Forms
this.buttonChooseFolder = new System.Windows.Forms.Button();
this.comboBoxSubtitleFormats = new Nikse.SubtitleEdit.Controls.NikseComboBox();
this.textBoxOutputFolder = new Nikse.SubtitleEdit.Controls.SETextBox(true);
this.labelEncoding = new System.Windows.Forms.Label();
this.labelEncoding = new Nikse.SubtitleEdit.Controls.NikseLabel();
this.radioButtonSaveInSourceFolder = new System.Windows.Forms.RadioButton();
this.comboBoxEncoding = new Nikse.SubtitleEdit.Controls.NikseComboBox();
this.labelOutputFormat = new System.Windows.Forms.Label();
this.labelOutputFormat = new Nikse.SubtitleEdit.Controls.NikseLabel();
this.groupBoxInput = new System.Windows.Forms.GroupBox();
this.labelNumberOfFiles = new System.Windows.Forms.Label();
this.labelNumberOfFiles = new Nikse.SubtitleEdit.Controls.NikseLabel();
this.textBoxFilter = new System.Windows.Forms.TextBox();
this.labelFilter = new System.Windows.Forms.Label();
this.labelFilter = new Nikse.SubtitleEdit.Controls.NikseLabel();
this.comboBoxFilter = new Nikse.SubtitleEdit.Controls.NikseComboBox();
this.checkBoxScanFolderRecursive = new System.Windows.Forms.CheckBox();
this.buttonSearchFolder = new System.Windows.Forms.Button();
this.buttonInputBrowse = new System.Windows.Forms.Button();
this.labelChooseInputFiles = new System.Windows.Forms.Label();
this.labelChooseInputFiles = new Nikse.SubtitleEdit.Controls.NikseLabel();
this.listViewInputFiles = new System.Windows.Forms.ListView();
this.columnHeaderFName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.columnHeaderSize = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
@ -191,8 +191,8 @@ namespace Nikse.SubtitleEdit.Forms
this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.progressBar1 = new System.Windows.Forms.ProgressBar();
this.labelStatus = new System.Windows.Forms.Label();
this.labelError = new System.Windows.Forms.Label();
this.labelStatus = new Nikse.SubtitleEdit.Controls.NikseLabel();
this.labelError = new Nikse.SubtitleEdit.Controls.NikseLabel();
this.groupBoxConvertOptions.SuspendLayout();
this.groupBoxRemoveFormatting.SuspendLayout();
this.groupBoxApplyDurationLimits.SuspendLayout();
@ -2160,12 +2160,12 @@ namespace Nikse.SubtitleEdit.Forms
private System.Windows.Forms.GroupBox groupBoxConvertOptions;
private System.Windows.Forms.GroupBox groupBoxOutput;
private Nikse.SubtitleEdit.Controls.NikseComboBox comboBoxSubtitleFormats;
private System.Windows.Forms.Label labelEncoding;
private Nikse.SubtitleEdit.Controls.NikseLabel labelEncoding;
private Nikse.SubtitleEdit.Controls.NikseComboBox comboBoxEncoding;
private System.Windows.Forms.Label labelOutputFormat;
private Nikse.SubtitleEdit.Controls.NikseLabel labelOutputFormat;
private System.Windows.Forms.GroupBox groupBoxInput;
private System.Windows.Forms.Button buttonInputBrowse;
private System.Windows.Forms.Label labelChooseInputFiles;
private Nikse.SubtitleEdit.Controls.NikseLabel labelChooseInputFiles;
private System.Windows.Forms.ListView listViewInputFiles;
private System.Windows.Forms.ColumnHeader columnHeaderFName;
private System.Windows.Forms.ColumnHeader columnHeaderSize;
@ -2177,26 +2177,26 @@ namespace Nikse.SubtitleEdit.Forms
private System.Windows.Forms.GroupBox groupBoxOffsetTimeCodes;
private System.Windows.Forms.GroupBox groupBoxChangeFrameRate;
private Controls.NikseTimeUpDown timeUpDownAdjust;
private System.Windows.Forms.Label labelHourMinSecMilliSecond;
private Nikse.SubtitleEdit.Controls.NikseLabel labelHourMinSecMilliSecond;
private Nikse.SubtitleEdit.Controls.NikseComboBox comboBoxFrameRateTo;
private System.Windows.Forms.Label labelToFrameRate;
private Nikse.SubtitleEdit.Controls.NikseLabel labelToFrameRate;
private Nikse.SubtitleEdit.Controls.NikseComboBox comboBoxFrameRateFrom;
private System.Windows.Forms.Label labelFromFrameRate;
private Nikse.SubtitleEdit.Controls.NikseLabel labelFromFrameRate;
private System.Windows.Forms.ContextMenuStrip contextMenuStripFiles;
private System.Windows.Forms.ToolStripMenuItem removeToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem removeAllToolStripMenuItem;
private System.Windows.Forms.ProgressBar progressBar1;
private System.Windows.Forms.Label labelStatus;
private Nikse.SubtitleEdit.Controls.NikseLabel labelStatus;
private System.Windows.Forms.RadioButton radioButtonShowLater;
private System.Windows.Forms.RadioButton radioButtonShowEarlier;
private System.Windows.Forms.Button buttonSearchFolder;
private System.Windows.Forms.CheckBox checkBoxScanFolderRecursive;
private System.Windows.Forms.Label labelFilter;
private Nikse.SubtitleEdit.Controls.NikseLabel labelFilter;
private Nikse.SubtitleEdit.Controls.NikseComboBox comboBoxFilter;
private System.Windows.Forms.TextBox textBoxFilter;
private System.Windows.Forms.GroupBox groupBoxSpeed;
private Nikse.SubtitleEdit.Controls.NikseUpDown numericUpDownPercent;
private System.Windows.Forms.Label labelPercent;
private Nikse.SubtitleEdit.Controls.NikseLabel labelPercent;
private System.Windows.Forms.RadioButton radioButtonToDropFrame;
private System.Windows.Forms.RadioButton radioButtonSpeedFromDropFrame;
private System.Windows.Forms.RadioButton radioButtonSpeedCustom;
@ -2220,8 +2220,8 @@ namespace Nikse.SubtitleEdit.Forms
private System.Windows.Forms.CheckBox checkBoxOnlyContinuationLines;
private Nikse.SubtitleEdit.Controls.NikseUpDown numericUpDownMaxCharacters;
private Nikse.SubtitleEdit.Controls.NikseUpDown numericUpDownMaxMillisecondsBetweenLines;
private System.Windows.Forms.Label labelMaxMillisecondsBetweenLines;
private System.Windows.Forms.Label labelMaxCharacters;
private Nikse.SubtitleEdit.Controls.NikseLabel labelMaxMillisecondsBetweenLines;
private Nikse.SubtitleEdit.Controls.NikseLabel labelMaxCharacters;
private System.Windows.Forms.Button buttonSwapFrameRate;
private System.Windows.Forms.GroupBox groupBoxChangeCasing;
private System.Windows.Forms.RadioButton radioButtonFixOnlyNames;
@ -2232,58 +2232,58 @@ namespace Nikse.SubtitleEdit.Forms
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemSelectAll;
private System.Windows.Forms.ToolStripMenuItem inverseSelectionToolStripMenuItem;
private System.Windows.Forms.Button buttonBrowseEncoding;
private System.Windows.Forms.Label labelNumberOfFiles;
private Nikse.SubtitleEdit.Controls.NikseLabel labelNumberOfFiles;
private System.Windows.Forms.ToolStripMenuItem openContainingFolderToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripMenuItem convertMkvSettingsToolStripMenuItem;
private System.Windows.Forms.GroupBox groupBoxRemoveStyle;
private System.Windows.Forms.TextBox textBoxRemoveStyle;
private System.Windows.Forms.Label labelStyleName;
private Nikse.SubtitleEdit.Controls.NikseLabel labelStyleName;
private System.Windows.Forms.GroupBox groupBoxAdjustDuration;
private System.Windows.Forms.Label labelAdjustDurationVia;
private Nikse.SubtitleEdit.Controls.NikseLabel labelAdjustDurationVia;
private Nikse.SubtitleEdit.Controls.NikseComboBox comboBoxAdjustDurationVia;
private System.Windows.Forms.Panel panelAdjustDurationAddPercent;
private System.Windows.Forms.Panel panelAdjustDurationAddSeconds;
private Nikse.SubtitleEdit.Controls.NikseUpDown numericUpDownSeconds;
private System.Windows.Forms.Label labelAddSeconds;
private Nikse.SubtitleEdit.Controls.NikseLabel labelAddSeconds;
private System.Windows.Forms.Panel panelAdjustDurationFixed;
private System.Windows.Forms.Label label1;
private Nikse.SubtitleEdit.Controls.NikseLabel label1;
private Nikse.SubtitleEdit.Controls.NikseUpDown numericUpDownAdjustViaPercent;
private System.Windows.Forms.Label labelAdjustViaPercent;
private Nikse.SubtitleEdit.Controls.NikseLabel labelAdjustViaPercent;
private Nikse.SubtitleEdit.Controls.NikseUpDown numericUpDownFixedMilliseconds;
private System.Windows.Forms.Label labelMillisecondsFixed;
private Nikse.SubtitleEdit.Controls.NikseLabel labelMillisecondsFixed;
private System.Windows.Forms.Panel panelAdjustDurationRecalc;
private System.Windows.Forms.CheckBox checkBoxExtendOnly;
private Nikse.SubtitleEdit.Controls.NikseUpDown numericUpDownOptimalCharsSec;
private System.Windows.Forms.Label labelOptimalCharsSec;
private Nikse.SubtitleEdit.Controls.NikseLabel labelOptimalCharsSec;
private Nikse.SubtitleEdit.Controls.NikseUpDown numericUpDownMaxCharsSec;
private System.Windows.Forms.Label labelMaxCharsPerSecond;
private Nikse.SubtitleEdit.Controls.NikseLabel labelMaxCharsPerSecond;
private System.Windows.Forms.ToolStripMenuItem addFilesToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
private System.Windows.Forms.GroupBox groupBoxDeleteLines;
private System.Windows.Forms.TextBox textBoxDeleteContains;
private System.Windows.Forms.Label labelDeleteLinesContaining;
private Nikse.SubtitleEdit.Controls.NikseLabel labelDeleteLinesContaining;
private Nikse.SubtitleEdit.Controls.NikseUpDown numericUpDownDeleteLast;
private System.Windows.Forms.Label labelDeleteLastLines;
private Nikse.SubtitleEdit.Controls.NikseLabel labelDeleteLastLines;
private Nikse.SubtitleEdit.Controls.NikseUpDown numericUpDownDeleteFirst;
private System.Windows.Forms.Label labelDeleteFirstLines;
private Nikse.SubtitleEdit.Controls.NikseLabel labelDeleteFirstLines;
private System.Windows.Forms.GroupBox groupBoxAssaChangeRes;
private System.Windows.Forms.Label labelTargetRes;
private Nikse.SubtitleEdit.Controls.NikseLabel labelTargetRes;
private Nikse.SubtitleEdit.Controls.NikseUpDown numericUpDownTargetHeight;
private System.Windows.Forms.Button buttonGetResolutionFromVideo;
private System.Windows.Forms.Label labelX;
private Nikse.SubtitleEdit.Controls.NikseLabel labelX;
private Nikse.SubtitleEdit.Controls.NikseUpDown numericUpDownTargetWidth;
private System.Windows.Forms.CheckBox checkBoxDrawing;
private System.Windows.Forms.CheckBox checkBoxPosition;
private System.Windows.Forms.CheckBox checkBoxFontSize;
private System.Windows.Forms.CheckBox checkBoxMargins;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemOcrEngine;
private System.Windows.Forms.Label labelError;
private Nikse.SubtitleEdit.Controls.NikseLabel labelError;
private System.Windows.Forms.GroupBox groupBoxMergeSameTimeCodes;
private System.Windows.Forms.CheckBox checkBoxMergeSameTimeCodesReBreakLines;
private System.Windows.Forms.CheckBox checkBoxMergeSameTimeCodesMakeDialog;
private Nikse.SubtitleEdit.Controls.NikseUpDown numericUpDownMergeSameTimeCodesMaxDifference;
private System.Windows.Forms.Label labelMergeSameTimeCodesMaxDifference;
private Nikse.SubtitleEdit.Controls.NikseLabel labelMergeSameTimeCodesMaxDifference;
private System.Windows.Forms.GroupBox groupBoxConvertColorsToDialog;
private System.Windows.Forms.CheckBox checkBoxConvertColorsToDialogReBreakLines;
private System.Windows.Forms.CheckBox checkBoxConvertColorsToDialogAddNewLines;

View File

@ -2744,7 +2744,6 @@ namespace Nikse.SubtitleEdit.Forms
private void ThreadWorkerCompleted(ThreadDoWorkParameter p)
{
CommandLineConverter.BatchConvertProgress progressCallback = null;
//var p = (ThreadDoWorkParameter)e.Result;
if (p.Item.Index + 2 < listViewInputFiles.Items.Count)
{
listViewInputFiles.EnsureVisible(p.Item.Index + 2);