Use split container in "Break/split long lines" - thx oep42 :)

Fix #7432
This commit is contained in:
niksedk 2023-09-23 13:58:42 +02:00
parent f893b72290
commit e6975f045f
5 changed files with 95 additions and 31 deletions

View File

@ -156,15 +156,35 @@
//
// numericUpDownMaxMillisecondsBetweenLines
//
this.numericUpDownMaxMillisecondsBetweenLines.BackColor = System.Drawing.SystemColors.Window;
this.numericUpDownMaxMillisecondsBetweenLines.BackColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
this.numericUpDownMaxMillisecondsBetweenLines.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(171)))), ((int)(((byte)(173)))), ((int)(((byte)(179)))));
this.numericUpDownMaxMillisecondsBetweenLines.BorderColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(120)))), ((int)(((byte)(120)))), ((int)(((byte)(120)))));
this.numericUpDownMaxMillisecondsBetweenLines.ButtonForeColor = System.Drawing.SystemColors.ControlText;
this.numericUpDownMaxMillisecondsBetweenLines.ButtonForeColorDown = System.Drawing.Color.Orange;
this.numericUpDownMaxMillisecondsBetweenLines.ButtonForeColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(120)))), ((int)(((byte)(215)))));
this.numericUpDownMaxMillisecondsBetweenLines.DecimalPlaces = 0;
this.numericUpDownMaxMillisecondsBetweenLines.Increment = new decimal(new int[] {
1,
0,
0,
0});
this.numericUpDownMaxMillisecondsBetweenLines.Location = new System.Drawing.Point(202, 15);
this.numericUpDownMaxMillisecondsBetweenLines.Maximum = new decimal(new int[] {
10000,
0,
0,
0});
this.numericUpDownMaxMillisecondsBetweenLines.Minimum = new decimal(new int[] {
0,
0,
0,
0});
this.numericUpDownMaxMillisecondsBetweenLines.Name = "numericUpDownMaxMillisecondsBetweenLines";
this.numericUpDownMaxMillisecondsBetweenLines.Size = new System.Drawing.Size(64, 20);
this.numericUpDownMaxMillisecondsBetweenLines.Size = new System.Drawing.Size(64, 23);
this.numericUpDownMaxMillisecondsBetweenLines.TabIndex = 48;
this.numericUpDownMaxMillisecondsBetweenLines.TabStop = false;
this.numericUpDownMaxMillisecondsBetweenLines.ThousandsSeparator = false;
this.numericUpDownMaxMillisecondsBetweenLines.Value = new decimal(new int[] {
250,
0,

View File

@ -91,7 +91,7 @@ namespace Nikse.SubtitleEdit.Forms
0,
0,
0});
this.numericUpDownMaxCharacters.Location = new System.Drawing.Point(190, 27);
this.numericUpDownMaxCharacters.Location = new System.Drawing.Point(190, 26);
this.numericUpDownMaxCharacters.Maximum = new decimal(new int[] {
999,
0,
@ -103,7 +103,7 @@ namespace Nikse.SubtitleEdit.Forms
0,
0});
this.numericUpDownMaxCharacters.Name = "numericUpDownMaxCharacters";
this.numericUpDownMaxCharacters.Size = new System.Drawing.Size(64, 21);
this.numericUpDownMaxCharacters.Size = new System.Drawing.Size(64, 23);
this.numericUpDownMaxCharacters.TabIndex = 0;
this.numericUpDownMaxCharacters.TabStop = false;
this.numericUpDownMaxCharacters.ThousandsSeparator = false;
@ -117,7 +117,7 @@ namespace Nikse.SubtitleEdit.Forms
// labelMaxCharacters
//
this.labelMaxCharacters.AutoSize = true;
this.labelMaxCharacters.Location = new System.Drawing.Point(187, 9);
this.labelMaxCharacters.Location = new System.Drawing.Point(187, 8);
this.labelMaxCharacters.Name = "labelMaxCharacters";
this.labelMaxCharacters.Size = new System.Drawing.Size(190, 13);
this.labelMaxCharacters.TabIndex = 32;
@ -126,7 +126,7 @@ namespace Nikse.SubtitleEdit.Forms
// labelMaxMillisecondsBetweenLines
//
this.labelMaxMillisecondsBetweenLines.AutoSize = true;
this.labelMaxMillisecondsBetweenLines.Location = new System.Drawing.Point(483, 9);
this.labelMaxMillisecondsBetweenLines.Location = new System.Drawing.Point(483, 8);
this.labelMaxMillisecondsBetweenLines.Name = "labelMaxMillisecondsBetweenLines";
this.labelMaxMillisecondsBetweenLines.Size = new System.Drawing.Size(178, 13);
this.labelMaxMillisecondsBetweenLines.TabIndex = 33;
@ -147,7 +147,7 @@ namespace Nikse.SubtitleEdit.Forms
0,
0,
0});
this.numericUpDownMaxMillisecondsBetweenLines.Location = new System.Drawing.Point(486, 26);
this.numericUpDownMaxMillisecondsBetweenLines.Location = new System.Drawing.Point(486, 25);
this.numericUpDownMaxMillisecondsBetweenLines.Maximum = new decimal(new int[] {
10000,
0,
@ -159,7 +159,7 @@ namespace Nikse.SubtitleEdit.Forms
0,
0});
this.numericUpDownMaxMillisecondsBetweenLines.Name = "numericUpDownMaxMillisecondsBetweenLines";
this.numericUpDownMaxMillisecondsBetweenLines.Size = new System.Drawing.Size(64, 21);
this.numericUpDownMaxMillisecondsBetweenLines.Size = new System.Drawing.Size(64, 23);
this.numericUpDownMaxMillisecondsBetweenLines.TabIndex = 2;
this.numericUpDownMaxMillisecondsBetweenLines.TabStop = false;
this.numericUpDownMaxMillisecondsBetweenLines.ThousandsSeparator = false;

View File

@ -50,15 +50,35 @@
//
// numericUpDownMaxMillisecondsBetweenLines
//
this.numericUpDownMaxMillisecondsBetweenLines.BackColor = System.Drawing.SystemColors.Window;
this.numericUpDownMaxMillisecondsBetweenLines.BackColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
this.numericUpDownMaxMillisecondsBetweenLines.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(171)))), ((int)(((byte)(173)))), ((int)(((byte)(179)))));
this.numericUpDownMaxMillisecondsBetweenLines.BorderColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(120)))), ((int)(((byte)(120)))), ((int)(((byte)(120)))));
this.numericUpDownMaxMillisecondsBetweenLines.ButtonForeColor = System.Drawing.SystemColors.ControlText;
this.numericUpDownMaxMillisecondsBetweenLines.ButtonForeColorDown = System.Drawing.Color.Orange;
this.numericUpDownMaxMillisecondsBetweenLines.ButtonForeColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(120)))), ((int)(((byte)(215)))));
this.numericUpDownMaxMillisecondsBetweenLines.DecimalPlaces = 0;
this.numericUpDownMaxMillisecondsBetweenLines.Increment = new decimal(new int[] {
1,
0,
0,
0});
this.numericUpDownMaxMillisecondsBetweenLines.Location = new System.Drawing.Point(189, 12);
this.numericUpDownMaxMillisecondsBetweenLines.Maximum = new decimal(new int[] {
10000,
0,
0,
0});
this.numericUpDownMaxMillisecondsBetweenLines.Minimum = new decimal(new int[] {
0,
0,
0,
0});
this.numericUpDownMaxMillisecondsBetweenLines.Name = "numericUpDownMaxMillisecondsBetweenLines";
this.numericUpDownMaxMillisecondsBetweenLines.Size = new System.Drawing.Size(64, 20);
this.numericUpDownMaxMillisecondsBetweenLines.Size = new System.Drawing.Size(64, 23);
this.numericUpDownMaxMillisecondsBetweenLines.TabIndex = 2;
this.numericUpDownMaxMillisecondsBetweenLines.TabStop = false;
this.numericUpDownMaxMillisecondsBetweenLines.ThousandsSeparator = false;
this.numericUpDownMaxMillisecondsBetweenLines.Value = new decimal(new int[] {
250,
0,

View File

@ -50,37 +50,40 @@
this.comboBoxLineContinuationEnd = new Nikse.SubtitleEdit.Controls.NikseComboBox();
this.SubtitleListview1 = new Nikse.SubtitleEdit.Controls.SubtitleListView();
this.checkBoxSplitAtLineBreaks = new System.Windows.Forms.CheckBox();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.groupBoxLinesFound.SuspendLayout();
this.contextMenuStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.SuspendLayout();
//
// groupBoxLinesFound
//
this.groupBoxLinesFound.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBoxLinesFound.Controls.Add(this.listViewFixes);
this.groupBoxLinesFound.Location = new System.Drawing.Point(12, 100);
this.groupBoxLinesFound.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBoxLinesFound.Location = new System.Drawing.Point(0, 0);
this.groupBoxLinesFound.Name = "groupBoxLinesFound";
this.groupBoxLinesFound.Size = new System.Drawing.Size(750, 164);
this.groupBoxLinesFound.Size = new System.Drawing.Size(750, 232);
this.groupBoxLinesFound.TabIndex = 4;
this.groupBoxLinesFound.TabStop = false;
this.groupBoxLinesFound.Text = "Lines that will be split";
//
// listViewFixes
//
this.listViewFixes.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.listViewFixes.CheckBoxes = true;
this.listViewFixes.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.columnHeader4,
this.columnHeader5,
this.columnHeader7});
this.listViewFixes.ContextMenuStrip = this.contextMenuStrip1;
this.listViewFixes.Dock = System.Windows.Forms.DockStyle.Fill;
this.listViewFixes.FullRowSelect = true;
this.listViewFixes.HideSelection = false;
this.listViewFixes.Location = new System.Drawing.Point(6, 23);
this.listViewFixes.Location = new System.Drawing.Point(3, 16);
this.listViewFixes.Name = "listViewFixes";
this.listViewFixes.Size = new System.Drawing.Size(738, 171);
this.listViewFixes.Size = new System.Drawing.Size(744, 213);
this.listViewFixes.TabIndex = 0;
this.listViewFixes.UseCompatibleStateImageBehavior = false;
this.listViewFixes.View = System.Windows.Forms.View.Details;
@ -150,7 +153,7 @@
0,
0});
this.numericUpDownSingleLineMaxCharacters.Name = "numericUpDownSingleLineMaxCharacters";
this.numericUpDownSingleLineMaxCharacters.Size = new System.Drawing.Size(64, 20);
this.numericUpDownSingleLineMaxCharacters.Size = new System.Drawing.Size(64, 22);
this.numericUpDownSingleLineMaxCharacters.TabIndex = 0;
this.numericUpDownSingleLineMaxCharacters.TabStop = false;
this.numericUpDownSingleLineMaxCharacters.ThousandsSeparator = false;
@ -231,7 +234,7 @@
0,
0});
this.numericUpDownLineMaxCharacters.Name = "numericUpDownLineMaxCharacters";
this.numericUpDownLineMaxCharacters.Size = new System.Drawing.Size(64, 20);
this.numericUpDownLineMaxCharacters.Size = new System.Drawing.Size(64, 23);
this.numericUpDownLineMaxCharacters.TabIndex = 1;
this.numericUpDownLineMaxCharacters.TabStop = false;
this.numericUpDownLineMaxCharacters.ThousandsSeparator = false;
@ -247,7 +250,7 @@
this.labelMaxSingleLineLengthIs.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.labelMaxSingleLineLengthIs.AutoSize = true;
this.labelMaxSingleLineLengthIs.Cursor = System.Windows.Forms.Cursors.Hand;
this.labelMaxSingleLineLengthIs.Location = new System.Drawing.Point(9, 579);
this.labelMaxSingleLineLengthIs.Location = new System.Drawing.Point(9, 578);
this.labelMaxSingleLineLengthIs.Name = "labelMaxSingleLineLengthIs";
this.labelMaxSingleLineLengthIs.Size = new System.Drawing.Size(133, 13);
this.labelMaxSingleLineLengthIs.TabIndex = 45;
@ -259,7 +262,7 @@
this.labelMaxLineLengthIs.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.labelMaxLineLengthIs.AutoSize = true;
this.labelMaxLineLengthIs.Cursor = System.Windows.Forms.Cursors.Hand;
this.labelMaxLineLengthIs.Location = new System.Drawing.Point(9, 597);
this.labelMaxLineLengthIs.Location = new System.Drawing.Point(9, 596);
this.labelMaxLineLengthIs.Name = "labelMaxLineLengthIs";
this.labelMaxLineLengthIs.Size = new System.Drawing.Size(83, 13);
this.labelMaxLineLengthIs.TabIndex = 46;
@ -289,7 +292,7 @@
this.comboBoxLineContinuationBegin.SelectedIndex = -1;
this.comboBoxLineContinuationBegin.SelectedItem = null;
this.comboBoxLineContinuationBegin.SelectedText = "";
this.comboBoxLineContinuationBegin.Size = new System.Drawing.Size(80, 21);
this.comboBoxLineContinuationBegin.Size = new System.Drawing.Size(80, 23);
this.comboBoxLineContinuationBegin.TabIndex = 2;
this.comboBoxLineContinuationBegin.TabStop = false;
this.comboBoxLineContinuationBegin.UsePopupWindow = false;
@ -327,7 +330,7 @@
this.comboBoxLineContinuationEnd.SelectedIndex = -1;
this.comboBoxLineContinuationEnd.SelectedItem = null;
this.comboBoxLineContinuationEnd.SelectedText = "";
this.comboBoxLineContinuationEnd.Size = new System.Drawing.Size(80, 21);
this.comboBoxLineContinuationEnd.Size = new System.Drawing.Size(80, 23);
this.comboBoxLineContinuationEnd.TabIndex = 3;
this.comboBoxLineContinuationEnd.TabStop = false;
this.comboBoxLineContinuationEnd.UsePopupWindow = false;
@ -337,19 +340,17 @@
//
this.SubtitleListview1.AllowColumnReorder = true;
this.SubtitleListview1.AllowDrop = true;
this.SubtitleListview1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
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(12, 270);
this.SubtitleListview1.Location = new System.Drawing.Point(0, 0);
this.SubtitleListview1.Name = "SubtitleListview1";
this.SubtitleListview1.OwnerDraw = true;
this.SubtitleListview1.Size = new System.Drawing.Size(750, 301);
this.SubtitleListview1.Size = new System.Drawing.Size(750, 229);
this.SubtitleListview1.SubtitleFontBold = false;
this.SubtitleListview1.SubtitleFontName = "Tahoma";
this.SubtitleListview1.SubtitleFontSize = 8;
@ -361,7 +362,7 @@
// checkBoxSplitAtLineBreaks
//
this.checkBoxSplitAtLineBreaks.AutoSize = true;
this.checkBoxSplitAtLineBreaks.Location = new System.Drawing.Point(28, 70);
this.checkBoxSplitAtLineBreaks.Location = new System.Drawing.Point(28, 66);
this.checkBoxSplitAtLineBreaks.Name = "checkBoxSplitAtLineBreaks";
this.checkBoxSplitAtLineBreaks.Size = new System.Drawing.Size(112, 17);
this.checkBoxSplitAtLineBreaks.TabIndex = 49;
@ -369,11 +370,32 @@
this.checkBoxSplitAtLineBreaks.UseVisualStyleBackColor = true;
this.checkBoxSplitAtLineBreaks.CheckedChanged += new System.EventHandler(this.checkBoxSplitAtLineBreaks_CheckedChanged);
//
// splitContainer1
//
this.splitContainer1.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.splitContainer1.Location = new System.Drawing.Point(12, 93);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.groupBoxLinesFound);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.SubtitleListview1);
this.splitContainer1.Size = new System.Drawing.Size(750, 465);
this.splitContainer1.SplitterDistance = 232;
this.splitContainer1.TabIndex = 50;
//
// SplitLongLines
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(774, 614);
this.Controls.Add(this.splitContainer1);
this.Controls.Add(this.checkBoxSplitAtLineBreaks);
this.Controls.Add(this.comboBoxLineContinuationEnd);
this.Controls.Add(this.labelLineContinuationBeginEnd);
@ -381,11 +403,9 @@
this.Controls.Add(this.labelMaxLineLengthIs);
this.Controls.Add(this.labelMaxSingleLineLengthIs);
this.Controls.Add(this.numericUpDownLineMaxCharacters);
this.Controls.Add(this.groupBoxLinesFound);
this.Controls.Add(this.numericUpDownSingleLineMaxCharacters);
this.Controls.Add(this.labelLineMaxLength);
this.Controls.Add(this.labelSingleLineMaxLength);
this.Controls.Add(this.SubtitleListview1);
this.Controls.Add(this.buttonOK);
this.Controls.Add(this.buttonCancel);
this.KeyPreview = true;
@ -401,6 +421,10 @@
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.SplitLongLines_KeyDown);
this.groupBoxLinesFound.ResumeLayout(false);
this.contextMenuStrip1.ResumeLayout(false);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
@ -429,5 +453,6 @@
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemSelectAll;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItemInverseSelection;
private System.Windows.Forms.CheckBox checkBoxSplitAtLineBreaks;
private System.Windows.Forms.SplitContainer splitContainer1;
}
}

View File

@ -3,7 +3,6 @@ using Nikse.SubtitleEdit.Core.Forms;
using Nikse.SubtitleEdit.Logic;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Globalization;
using System.Windows.Forms;