diff --git a/Changelog.txt b/Changelog.txt index dde22148e..49f125a4f 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -2,7 +2,8 @@ 4.0.8 (xth September 2024) BETA * NEW: - * Add pixel format paramter to burn-in - thx Hafran420 + * Add "Batch mode" for "Generate transparent video with subs" - thx David + * Add "Pixel format" paramter to burn-in - thx Hafran420 * Add new ChatGPT "gpt-4o-mini" model * Add translation via Groq (api.groq.com) * IMPROVED: diff --git a/src/ui/Forms/GenerateTransparentVideoWithSubtitles.Designer.cs b/src/ui/Forms/GenerateTransparentVideoWithSubtitles.Designer.cs index e1554cb85..98d87ef64 100644 --- a/src/ui/Forms/GenerateTransparentVideoWithSubtitles.Designer.cs +++ b/src/ui/Forms/GenerateTransparentVideoWithSubtitles.Designer.cs @@ -30,9 +30,6 @@ { this.components = new System.ComponentModel.Container(); this.deleteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); - this.removeSubtitleFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.pickSubtitleFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); this.addFilesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.contextMenuStripBatch = new System.Windows.Forms.ContextMenuStrip(this.components); @@ -61,6 +58,28 @@ this.panelOutlineColor = new System.Windows.Forms.Panel(); this.buttonOutlineColor = new System.Windows.Forms.Button(); this.groupBoxSettings = new System.Windows.Forms.GroupBox(); + this.linkLabelSourceFolder = new System.Windows.Forms.LinkLabel(); + this.nikseLabelOutputFileFolder = new System.Windows.Forms.Label(); + this.buttonOutputFileSettings = new System.Windows.Forms.Button(); + this.buttonClear = new System.Windows.Forms.Button(); + this.buttonRemoveFile = new System.Windows.Forms.Button(); + this.buttonAddFile = new System.Windows.Forms.Button(); + this.listViewBatch = new System.Windows.Forms.ListView(); + this.columnHeaderSubtitleFile = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.columnHeaderSize = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.columnHeaderStatus = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.groupBoxCut = new System.Windows.Forms.GroupBox(); + this.buttonCutTo = new System.Windows.Forms.Button(); + this.buttonCutFrom = new System.Windows.Forms.Button(); + this.numericUpDownCutToSeconds = new Nikse.SubtitleEdit.Controls.NikseUpDown(); + this.numericUpDownCutToMinutes = new Nikse.SubtitleEdit.Controls.NikseUpDown(); + this.numericUpDownCutToHours = new Nikse.SubtitleEdit.Controls.NikseUpDown(); + this.numericUpDownCutFromSeconds = new Nikse.SubtitleEdit.Controls.NikseUpDown(); + this.numericUpDownCutFromMinutes = new Nikse.SubtitleEdit.Controls.NikseUpDown(); + this.numericUpDownCutFromHours = new Nikse.SubtitleEdit.Controls.NikseUpDown(); + this.labelCutTo = new Nikse.SubtitleEdit.Controls.NikseLabel(); + this.labelCutFrom = new Nikse.SubtitleEdit.Controls.NikseLabel(); + this.checkBoxCut = new System.Windows.Forms.CheckBox(); this.groupBoxSelection = new System.Windows.Forms.GroupBox(); this.radioButtonSelectedLinesOnly = new System.Windows.Forms.RadioButton(); this.radioButtonSelectedLineAndForward = new System.Windows.Forms.RadioButton(); @@ -90,6 +109,8 @@ this.contextMenuStripGenerate = new System.Windows.Forms.ContextMenuStrip(this.components); this.progressBar1 = new System.Windows.Forms.ProgressBar(); this.buttonGenerate = new System.Windows.Forms.Button(); + this.buttonMode = new System.Windows.Forms.Button(); + this.buttonPreview = new System.Windows.Forms.Button(); this.labelPass = new Nikse.SubtitleEdit.Controls.NikseLabel(); this.labelProgress = new Nikse.SubtitleEdit.Controls.NikseLabel(); this.labelPleaseWait = new Nikse.SubtitleEdit.Controls.NikseLabel(); @@ -97,6 +118,7 @@ this.contextMenuStripBatch.SuspendLayout(); this.contextMenuStripRes.SuspendLayout(); this.groupBoxSettings.SuspendLayout(); + this.groupBoxCut.SuspendLayout(); this.groupBoxSelection.SuspendLayout(); this.groupBoxVideo.SuspendLayout(); this.contextMenuStripGenerate.SuspendLayout(); @@ -105,36 +127,21 @@ // deleteToolStripMenuItem // this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem"; - this.deleteToolStripMenuItem.Size = new System.Drawing.Size(239, 32); + this.deleteToolStripMenuItem.Size = new System.Drawing.Size(171, 22); this.deleteToolStripMenuItem.Text = "Delete"; - // - // toolStripSeparator1 - // - this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new System.Drawing.Size(236, 6); - // - // removeSubtitleFileToolStripMenuItem - // - this.removeSubtitleFileToolStripMenuItem.Name = "removeSubtitleFileToolStripMenuItem"; - this.removeSubtitleFileToolStripMenuItem.Size = new System.Drawing.Size(239, 32); - this.removeSubtitleFileToolStripMenuItem.Text = "Remove subtitle file"; - // - // pickSubtitleFileToolStripMenuItem - // - this.pickSubtitleFileToolStripMenuItem.Name = "pickSubtitleFileToolStripMenuItem"; - this.pickSubtitleFileToolStripMenuItem.Size = new System.Drawing.Size(239, 32); - this.pickSubtitleFileToolStripMenuItem.Text = "Pick subtitle file..."; + this.deleteToolStripMenuItem.Click += new System.EventHandler(this.deleteToolStripMenuItem_Click); // // toolStripSeparator2 // this.toolStripSeparator2.Name = "toolStripSeparator2"; - this.toolStripSeparator2.Size = new System.Drawing.Size(236, 6); + this.toolStripSeparator2.Size = new System.Drawing.Size(168, 6); // // addFilesToolStripMenuItem // this.addFilesToolStripMenuItem.Name = "addFilesToolStripMenuItem"; - this.addFilesToolStripMenuItem.Size = new System.Drawing.Size(239, 32); - this.addFilesToolStripMenuItem.Text = "Add video files..."; + this.addFilesToolStripMenuItem.Size = new System.Drawing.Size(171, 22); + this.addFilesToolStripMenuItem.Text = "Add subtitle files..."; + this.addFilesToolStripMenuItem.Click += new System.EventHandler(this.addFilesToolStripMenuItem_Click); // // contextMenuStripBatch // @@ -142,141 +149,139 @@ this.contextMenuStripBatch.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.addFilesToolStripMenuItem, this.toolStripSeparator2, - this.pickSubtitleFileToolStripMenuItem, - this.removeSubtitleFileToolStripMenuItem, - this.toolStripSeparator1, this.deleteToolStripMenuItem, this.clearToolStripMenuItem}); this.contextMenuStripBatch.Name = "contextMenuStripBatch"; - this.contextMenuStripBatch.Size = new System.Drawing.Size(240, 176); + this.contextMenuStripBatch.Size = new System.Drawing.Size(172, 76); // // clearToolStripMenuItem // this.clearToolStripMenuItem.Name = "clearToolStripMenuItem"; - this.clearToolStripMenuItem.Size = new System.Drawing.Size(239, 32); + this.clearToolStripMenuItem.Size = new System.Drawing.Size(171, 22); this.clearToolStripMenuItem.Text = "Clear"; + this.clearToolStripMenuItem.Click += new System.EventHandler(this.clearToolStripMenuItem_Click); // // bAspectRatio916180270ToolStripMenuItem // this.bAspectRatio916180270ToolStripMenuItem.Name = "bAspectRatio916180270ToolStripMenuItem"; - this.bAspectRatio916180270ToolStripMenuItem.Size = new System.Drawing.Size(533, 32); + this.bAspectRatio916180270ToolStripMenuItem.Size = new System.Drawing.Size(367, 22); this.bAspectRatio916180270ToolStripMenuItem.Text = "1/4 B - Aspect Ratio 9∶16 - (180x270)"; this.bAspectRatio916180270ToolStripMenuItem.Click += new System.EventHandler(this.ResolutionPickClick); // // aAspectRatio916270480ToolStripMenuItem // this.aAspectRatio916270480ToolStripMenuItem.Name = "aAspectRatio916270480ToolStripMenuItem"; - this.aAspectRatio916270480ToolStripMenuItem.Size = new System.Drawing.Size(533, 32); + this.aAspectRatio916270480ToolStripMenuItem.Size = new System.Drawing.Size(367, 22); this.aAspectRatio916270480ToolStripMenuItem.Text = "1/4 A - Aspect Ratio 9∶16 - (270x480)"; this.aAspectRatio916270480ToolStripMenuItem.Click += new System.EventHandler(this.ResolutionPickClick); // // bAspectRatio916360540ToolStripMenuItem // this.bAspectRatio916360540ToolStripMenuItem.Name = "bAspectRatio916360540ToolStripMenuItem"; - this.bAspectRatio916360540ToolStripMenuItem.Size = new System.Drawing.Size(533, 32); + this.bAspectRatio916360540ToolStripMenuItem.Size = new System.Drawing.Size(367, 22); this.bAspectRatio916360540ToolStripMenuItem.Text = "1/2 B - Aspect Ratio 9∶16 - (360x540)"; this.bAspectRatio916360540ToolStripMenuItem.Click += new System.EventHandler(this.ResolutionPickClick); // // aAspectRatio916540960ToolStripMenuItem // this.aAspectRatio916540960ToolStripMenuItem.Name = "aAspectRatio916540960ToolStripMenuItem"; - this.aAspectRatio916540960ToolStripMenuItem.Size = new System.Drawing.Size(533, 32); + this.aAspectRatio916540960ToolStripMenuItem.Size = new System.Drawing.Size(367, 22); this.aAspectRatio916540960ToolStripMenuItem.Text = "1/2 A - Aspect Ratio 9∶16 - (540x960)"; this.aAspectRatio916540960ToolStripMenuItem.Click += new System.EventHandler(this.ResolutionPickClick); // // youTubeShortsTikTokAspectRatio9167201280ToolStripMenuItem // this.youTubeShortsTikTokAspectRatio9167201280ToolStripMenuItem.Name = "youTubeShortsTikTokAspectRatio9167201280ToolStripMenuItem"; - this.youTubeShortsTikTokAspectRatio9167201280ToolStripMenuItem.Size = new System.Drawing.Size(533, 32); + this.youTubeShortsTikTokAspectRatio9167201280ToolStripMenuItem.Size = new System.Drawing.Size(367, 22); this.youTubeShortsTikTokAspectRatio9167201280ToolStripMenuItem.Text = "YouTube shorts/TikTok - Aspect Ratio 9∶16 - (720x1280)"; this.youTubeShortsTikTokAspectRatio9167201280ToolStripMenuItem.Click += new System.EventHandler(this.ResolutionPickClick); // // youTubeShortsTikTok10801920ToolStripMenuItem // this.youTubeShortsTikTok10801920ToolStripMenuItem.Name = "youTubeShortsTikTok10801920ToolStripMenuItem"; - this.youTubeShortsTikTok10801920ToolStripMenuItem.Size = new System.Drawing.Size(533, 32); + this.youTubeShortsTikTok10801920ToolStripMenuItem.Size = new System.Drawing.Size(367, 22); this.youTubeShortsTikTok10801920ToolStripMenuItem.Text = "YouTube shorts/TikTok - Aspect Ratio 9∶16 - (1080x1920)"; this.youTubeShortsTikTok10801920ToolStripMenuItem.Click += new System.EventHandler(this.ResolutionPickClick); // // toolStripSeparator4 // this.toolStripSeparator4.Name = "toolStripSeparator4"; - this.toolStripSeparator4.Size = new System.Drawing.Size(530, 6); + this.toolStripSeparator4.Size = new System.Drawing.Size(364, 6); // // pAL720x576ToolStripMenuItem // this.pAL720x576ToolStripMenuItem.Name = "pAL720x576ToolStripMenuItem"; - this.pAL720x576ToolStripMenuItem.Size = new System.Drawing.Size(533, 32); + this.pAL720x576ToolStripMenuItem.Size = new System.Drawing.Size(367, 22); this.pAL720x576ToolStripMenuItem.Text = "360p - Aspect Ratio 16∶9 - (640x360)"; this.pAL720x576ToolStripMenuItem.Click += new System.EventHandler(this.ResolutionPickClick); // // p848x480ToolStripMenuItem // this.p848x480ToolStripMenuItem.Name = "p848x480ToolStripMenuItem"; - this.p848x480ToolStripMenuItem.Size = new System.Drawing.Size(533, 32); + this.p848x480ToolStripMenuItem.Size = new System.Drawing.Size(367, 22); this.p848x480ToolStripMenuItem.Text = "VGA - Aspect Ratio 4:3 - (640x480)"; this.p848x480ToolStripMenuItem.Click += new System.EventHandler(this.ResolutionPickClick); // // x720ToolStripMenuItem // this.x720ToolStripMenuItem.Name = "x720ToolStripMenuItem"; - this.x720ToolStripMenuItem.Size = new System.Drawing.Size(533, 32); + this.x720ToolStripMenuItem.Size = new System.Drawing.Size(367, 22); this.x720ToolStripMenuItem.Text = "SD NTSC - Aspect Ratio 3:2 - (720x480)"; this.x720ToolStripMenuItem.Click += new System.EventHandler(this.ResolutionPickClick); // // p1280x720ToolStripMenuItem // this.p1280x720ToolStripMenuItem.Name = "p1280x720ToolStripMenuItem"; - this.p1280x720ToolStripMenuItem.Size = new System.Drawing.Size(533, 32); + this.p1280x720ToolStripMenuItem.Size = new System.Drawing.Size(367, 22); this.p1280x720ToolStripMenuItem.Text = "SD PAL - Aspect Ratio 4:3 - (720x576)"; this.p1280x720ToolStripMenuItem.Click += new System.EventHandler(this.ResolutionPickClick); // // x1080ToolStripMenuItem // this.x1080ToolStripMenuItem.Name = "x1080ToolStripMenuItem"; - this.x1080ToolStripMenuItem.Size = new System.Drawing.Size(533, 32); + this.x1080ToolStripMenuItem.Size = new System.Drawing.Size(367, 22); this.x1080ToolStripMenuItem.Text = "540p - Aspect Ratio 16∶9 - (960x540)"; this.x1080ToolStripMenuItem.Click += new System.EventHandler(this.ResolutionPickClick); // // p1920x1080ToolStripMenuItem // this.p1920x1080ToolStripMenuItem.Name = "p1920x1080ToolStripMenuItem"; - this.p1920x1080ToolStripMenuItem.Size = new System.Drawing.Size(533, 32); + this.p1920x1080ToolStripMenuItem.Size = new System.Drawing.Size(367, 22); this.p1920x1080ToolStripMenuItem.Text = "HD 720p - Aspect Ratio 16∶9 - (1280x720)"; this.p1920x1080ToolStripMenuItem.Click += new System.EventHandler(this.ResolutionPickClick); // // dCI2KFlat1998x1080ToolStripMenuItem // this.dCI2KFlat1998x1080ToolStripMenuItem.Name = "dCI2KFlat1998x1080ToolStripMenuItem"; - this.dCI2KFlat1998x1080ToolStripMenuItem.Size = new System.Drawing.Size(533, 32); + this.dCI2KFlat1998x1080ToolStripMenuItem.Size = new System.Drawing.Size(367, 22); this.dCI2KFlat1998x1080ToolStripMenuItem.Text = "Full HD 1080p - Aspect Ratio 16∶9 - (1920x1080)"; this.dCI2KFlat1998x1080ToolStripMenuItem.Click += new System.EventHandler(this.ResolutionPickClick); // // dCI2KScope2048x858ToolStripMenuItem // this.dCI2KScope2048x858ToolStripMenuItem.Name = "dCI2KScope2048x858ToolStripMenuItem"; - this.dCI2KScope2048x858ToolStripMenuItem.Size = new System.Drawing.Size(533, 32); + this.dCI2KScope2048x858ToolStripMenuItem.Size = new System.Drawing.Size(367, 22); this.dCI2KScope2048x858ToolStripMenuItem.Text = "2K DCI - Aspect Ratio 16∶9 - (2048x1080)"; this.dCI2KScope2048x858ToolStripMenuItem.Click += new System.EventHandler(this.ResolutionPickClick); // // k2048x1080ToolStripMenuItem // this.k2048x1080ToolStripMenuItem.Name = "k2048x1080ToolStripMenuItem"; - this.k2048x1080ToolStripMenuItem.Size = new System.Drawing.Size(533, 32); + this.k2048x1080ToolStripMenuItem.Size = new System.Drawing.Size(367, 22); this.k2048x1080ToolStripMenuItem.Text = "2K WQHD - Aspect Ratio 16∶9 - (2560x1440)"; this.k2048x1080ToolStripMenuItem.Click += new System.EventHandler(this.ResolutionPickClick); // // uHD3840x2160ToolStripMenuItem // this.uHD3840x2160ToolStripMenuItem.Name = "uHD3840x2160ToolStripMenuItem"; - this.uHD3840x2160ToolStripMenuItem.Size = new System.Drawing.Size(533, 32); + this.uHD3840x2160ToolStripMenuItem.Size = new System.Drawing.Size(367, 22); this.uHD3840x2160ToolStripMenuItem.Text = "4K UHD - Aspect Ratio 16∶9 - (3840x2160)"; this.uHD3840x2160ToolStripMenuItem.Click += new System.EventHandler(this.ResolutionPickClick); // // x2160ToolStripMenuItem // this.x2160ToolStripMenuItem.Name = "x2160ToolStripMenuItem"; - this.x2160ToolStripMenuItem.Size = new System.Drawing.Size(533, 32); + this.x2160ToolStripMenuItem.Size = new System.Drawing.Size(367, 22); this.x2160ToolStripMenuItem.Text = "4K DCI - Aspect Ratio 16∶9 - (4096x2160)"; this.x2160ToolStripMenuItem.Click += new System.EventHandler(this.ResolutionPickClick); // @@ -303,16 +308,15 @@ this.aAspectRatio916270480ToolStripMenuItem, this.bAspectRatio916180270ToolStripMenuItem}); this.contextMenuStripRes.Name = "contextMenuStripRes"; - this.contextMenuStripRes.Size = new System.Drawing.Size(534, 554); + this.contextMenuStripRes.Size = new System.Drawing.Size(368, 384); // // checkBoxFontBold // this.checkBoxFontBold.AutoSize = true; this.checkBoxFontBold.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.checkBoxFontBold.Location = new System.Drawing.Point(280, 48); - this.checkBoxFontBold.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.checkBoxFontBold.Location = new System.Drawing.Point(187, 31); this.checkBoxFontBold.Name = "checkBoxFontBold"; - this.checkBoxFontBold.Size = new System.Drawing.Size(73, 24); + this.checkBoxFontBold.Size = new System.Drawing.Size(51, 17); this.checkBoxFontBold.TabIndex = 20; this.checkBoxFontBold.Text = "Bold"; this.checkBoxFontBold.UseVisualStyleBackColor = true; @@ -320,29 +324,26 @@ // panelForeColor // this.panelForeColor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panelForeColor.Location = new System.Drawing.Point(554, 43); - this.panelForeColor.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.panelForeColor.Location = new System.Drawing.Point(369, 28); this.panelForeColor.Name = "panelForeColor"; - this.panelForeColor.Size = new System.Drawing.Size(30, 31); + this.panelForeColor.Size = new System.Drawing.Size(21, 21); this.panelForeColor.TabIndex = 6; this.panelForeColor.Click += new System.EventHandler(this.panelForeColor_Click); // // panelOutlineColor // this.panelOutlineColor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panelOutlineColor.Location = new System.Drawing.Point(554, 86); - this.panelOutlineColor.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.panelOutlineColor.Location = new System.Drawing.Point(369, 56); this.panelOutlineColor.Name = "panelOutlineColor"; - this.panelOutlineColor.Size = new System.Drawing.Size(30, 30); + this.panelOutlineColor.Size = new System.Drawing.Size(21, 20); this.panelOutlineColor.TabIndex = 4; this.panelOutlineColor.Click += new System.EventHandler(this.panelOutlineColor_Click); // // buttonOutlineColor // - this.buttonOutlineColor.Location = new System.Drawing.Point(411, 83); - this.buttonOutlineColor.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.buttonOutlineColor.Location = new System.Drawing.Point(274, 54); this.buttonOutlineColor.Name = "buttonOutlineColor"; - this.buttonOutlineColor.Size = new System.Drawing.Size(134, 35); + this.buttonOutlineColor.Size = new System.Drawing.Size(89, 23); this.buttonOutlineColor.TabIndex = 60; this.buttonOutlineColor.Text = "Color"; this.buttonOutlineColor.UseVisualStyleBackColor = true; @@ -353,6 +354,14 @@ this.groupBoxSettings.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.groupBoxSettings.Controls.Add(this.linkLabelSourceFolder); + this.groupBoxSettings.Controls.Add(this.nikseLabelOutputFileFolder); + this.groupBoxSettings.Controls.Add(this.buttonOutputFileSettings); + this.groupBoxSettings.Controls.Add(this.buttonClear); + this.groupBoxSettings.Controls.Add(this.buttonRemoveFile); + this.groupBoxSettings.Controls.Add(this.buttonAddFile); + this.groupBoxSettings.Controls.Add(this.listViewBatch); + this.groupBoxSettings.Controls.Add(this.groupBoxCut); this.groupBoxSettings.Controls.Add(this.groupBoxSelection); this.groupBoxSettings.Controls.Add(this.nikseLabelOutline); this.groupBoxSettings.Controls.Add(this.numericUpDownOutline); @@ -370,15 +379,409 @@ this.groupBoxSettings.Controls.Add(this.groupBoxVideo); this.groupBoxSettings.Controls.Add(this.numericUpDownFontSize); this.groupBoxSettings.Controls.Add(this.labelFontSize); - this.groupBoxSettings.Location = new System.Drawing.Point(18, 9); - this.groupBoxSettings.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.groupBoxSettings.Location = new System.Drawing.Point(12, 6); this.groupBoxSettings.Name = "groupBoxSettings"; - this.groupBoxSettings.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.groupBoxSettings.Size = new System.Drawing.Size(968, 429); + this.groupBoxSettings.Size = new System.Drawing.Size(777, 431); this.groupBoxSettings.TabIndex = 144; this.groupBoxSettings.TabStop = false; this.groupBoxSettings.Text = "Settings"; // + // linkLabelSourceFolder + // + this.linkLabelSourceFolder.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.linkLabelSourceFolder.AutoSize = true; + this.linkLabelSourceFolder.Location = new System.Drawing.Point(522, 405); + this.linkLabelSourceFolder.Name = "linkLabelSourceFolder"; + this.linkLabelSourceFolder.Size = new System.Drawing.Size(112, 13); + this.linkLabelSourceFolder.TabIndex = 159; + this.linkLabelSourceFolder.TabStop = true; + this.linkLabelSourceFolder.Text = "linkLabelSourceFolder"; + this.linkLabelSourceFolder.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabelSourceFolder_LinkClicked); + // + // nikseLabelOutputFileFolder + // + this.nikseLabelOutputFileFolder.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.nikseLabelOutputFileFolder.AutoSize = true; + this.nikseLabelOutputFileFolder.Location = new System.Drawing.Point(417, 405); + this.nikseLabelOutputFileFolder.Name = "nikseLabelOutputFileFolder"; + this.nikseLabelOutputFileFolder.Size = new System.Drawing.Size(90, 13); + this.nikseLabelOutputFileFolder.TabIndex = 158; + this.nikseLabelOutputFileFolder.Text = "Use source folder"; + // + // buttonOutputFileSettings + // + this.buttonOutputFileSettings.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.buttonOutputFileSettings.Location = new System.Drawing.Point(244, 400); + this.buttonOutputFileSettings.Name = "buttonOutputFileSettings"; + this.buttonOutputFileSettings.Size = new System.Drawing.Size(167, 23); + this.buttonOutputFileSettings.TabIndex = 157; + this.buttonOutputFileSettings.Text = "Output file/folder..."; + this.buttonOutputFileSettings.UseVisualStyleBackColor = true; + this.buttonOutputFileSettings.Click += new System.EventHandler(this.buttonOutputFileSettings_Click); + // + // buttonClear + // + this.buttonClear.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.buttonClear.Location = new System.Drawing.Point(164, 400); + this.buttonClear.Name = "buttonClear"; + this.buttonClear.Size = new System.Drawing.Size(74, 23); + this.buttonClear.TabIndex = 156; + this.buttonClear.Text = "Clear"; + this.buttonClear.UseVisualStyleBackColor = true; + this.buttonClear.Click += new System.EventHandler(this.buttonClear_Click); + // + // buttonRemoveFile + // + this.buttonRemoveFile.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.buttonRemoveFile.Location = new System.Drawing.Point(84, 400); + this.buttonRemoveFile.Name = "buttonRemoveFile"; + this.buttonRemoveFile.Size = new System.Drawing.Size(74, 23); + this.buttonRemoveFile.TabIndex = 155; + this.buttonRemoveFile.Text = "Remove"; + this.buttonRemoveFile.UseVisualStyleBackColor = true; + this.buttonRemoveFile.Click += new System.EventHandler(this.buttonRemoveFile_Click); + // + // buttonAddFile + // + this.buttonAddFile.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.buttonAddFile.Location = new System.Drawing.Point(5, 400); + this.buttonAddFile.Name = "buttonAddFile"; + this.buttonAddFile.Size = new System.Drawing.Size(73, 23); + this.buttonAddFile.TabIndex = 154; + this.buttonAddFile.Text = "Add..."; + this.buttonAddFile.UseVisualStyleBackColor = true; + this.buttonAddFile.Click += new System.EventHandler(this.buttonAddFile_Click); + // + // listViewBatch + // + this.listViewBatch.AllowDrop = true; + this.listViewBatch.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.listViewBatch.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeaderSubtitleFile, + this.columnHeaderSize, + this.columnHeaderStatus}); + this.listViewBatch.ContextMenuStrip = this.contextMenuStripBatch; + this.listViewBatch.FullRowSelect = true; + this.listViewBatch.HideSelection = false; + this.listViewBatch.Location = new System.Drawing.Point(6, 250); + this.listViewBatch.Name = "listViewBatch"; + this.listViewBatch.Size = new System.Drawing.Size(764, 144); + this.listViewBatch.TabIndex = 153; + this.listViewBatch.UseCompatibleStateImageBehavior = false; + this.listViewBatch.View = System.Windows.Forms.View.Details; + this.listViewBatch.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.listViewBatch_ColumnClick); + this.listViewBatch.DragDrop += new System.Windows.Forms.DragEventHandler(this.listViewBatch_DragDrop); + this.listViewBatch.DragEnter += new System.Windows.Forms.DragEventHandler(this.listViewBatch_DragEnter); + this.listViewBatch.KeyDown += new System.Windows.Forms.KeyEventHandler(this.listViewBatch_KeyDown); + // + // columnHeaderSubtitleFile + // + this.columnHeaderSubtitleFile.Text = "Subtitle file"; + this.columnHeaderSubtitleFile.Width = 600; + // + // columnHeaderSize + // + this.columnHeaderSize.Text = "Size"; + this.columnHeaderSize.Width = 80; + // + // columnHeaderStatus + // + this.columnHeaderStatus.Text = "Status"; + this.columnHeaderStatus.Width = 80; + // + // groupBoxCut + // + this.groupBoxCut.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBoxCut.Controls.Add(this.buttonCutTo); + this.groupBoxCut.Controls.Add(this.buttonCutFrom); + this.groupBoxCut.Controls.Add(this.numericUpDownCutToSeconds); + this.groupBoxCut.Controls.Add(this.numericUpDownCutToMinutes); + this.groupBoxCut.Controls.Add(this.numericUpDownCutToHours); + this.groupBoxCut.Controls.Add(this.numericUpDownCutFromSeconds); + this.groupBoxCut.Controls.Add(this.numericUpDownCutFromMinutes); + this.groupBoxCut.Controls.Add(this.numericUpDownCutFromHours); + this.groupBoxCut.Controls.Add(this.labelCutTo); + this.groupBoxCut.Controls.Add(this.labelCutFrom); + this.groupBoxCut.Controls.Add(this.checkBoxCut); + this.groupBoxCut.Location = new System.Drawing.Point(409, 19); + this.groupBoxCut.Name = "groupBoxCut"; + this.groupBoxCut.Size = new System.Drawing.Size(361, 116); + this.groupBoxCut.TabIndex = 152; + this.groupBoxCut.TabStop = false; + // + // buttonCutTo + // + this.buttonCutTo.Location = new System.Drawing.Point(237, 62); + this.buttonCutTo.Name = "buttonCutTo"; + this.buttonCutTo.Size = new System.Drawing.Size(33, 23); + this.buttonCutTo.TabIndex = 24; + this.buttonCutTo.Text = "..."; + this.buttonCutTo.UseVisualStyleBackColor = true; + this.buttonCutTo.Click += new System.EventHandler(this.buttonCutTo_Click); + // + // buttonCutFrom + // + this.buttonCutFrom.Location = new System.Drawing.Point(94, 62); + this.buttonCutFrom.Name = "buttonCutFrom"; + this.buttonCutFrom.Size = new System.Drawing.Size(33, 23); + this.buttonCutFrom.TabIndex = 23; + this.buttonCutFrom.Text = "..."; + this.buttonCutFrom.UseVisualStyleBackColor = true; + this.buttonCutFrom.Click += new System.EventHandler(this.buttonCutFrom_Click); + // + // numericUpDownCutToSeconds + // + this.numericUpDownCutToSeconds.BackColor = System.Drawing.SystemColors.Window; + this.numericUpDownCutToSeconds.BackColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240))))); + this.numericUpDownCutToSeconds.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(171)))), ((int)(((byte)(173)))), ((int)(((byte)(179))))); + this.numericUpDownCutToSeconds.BorderColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(120)))), ((int)(((byte)(120)))), ((int)(((byte)(120))))); + this.numericUpDownCutToSeconds.ButtonForeColor = System.Drawing.SystemColors.ControlText; + this.numericUpDownCutToSeconds.ButtonForeColorDown = System.Drawing.Color.Orange; + this.numericUpDownCutToSeconds.ButtonForeColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(120)))), ((int)(((byte)(215))))); + this.numericUpDownCutToSeconds.DecimalPlaces = 0; + this.numericUpDownCutToSeconds.Increment = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.numericUpDownCutToSeconds.Location = new System.Drawing.Point(309, 36); + this.numericUpDownCutToSeconds.Maximum = new decimal(new int[] { + 59, + 0, + 0, + 0}); + this.numericUpDownCutToSeconds.Minimum = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.numericUpDownCutToSeconds.Name = "numericUpDownCutToSeconds"; + this.numericUpDownCutToSeconds.Size = new System.Drawing.Size(40, 23); + this.numericUpDownCutToSeconds.TabIndex = 22; + this.numericUpDownCutToSeconds.TabStop = false; + this.numericUpDownCutToSeconds.ThousandsSeparator = false; + this.numericUpDownCutToSeconds.Value = new decimal(new int[] { + 0, + 0, + 0, + 0}); + // + // numericUpDownCutToMinutes + // + this.numericUpDownCutToMinutes.BackColor = System.Drawing.SystemColors.Window; + this.numericUpDownCutToMinutes.BackColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240))))); + this.numericUpDownCutToMinutes.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(171)))), ((int)(((byte)(173)))), ((int)(((byte)(179))))); + this.numericUpDownCutToMinutes.BorderColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(120)))), ((int)(((byte)(120)))), ((int)(((byte)(120))))); + this.numericUpDownCutToMinutes.ButtonForeColor = System.Drawing.SystemColors.ControlText; + this.numericUpDownCutToMinutes.ButtonForeColorDown = System.Drawing.Color.Orange; + this.numericUpDownCutToMinutes.ButtonForeColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(120)))), ((int)(((byte)(215))))); + this.numericUpDownCutToMinutes.DecimalPlaces = 0; + this.numericUpDownCutToMinutes.Increment = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.numericUpDownCutToMinutes.Location = new System.Drawing.Point(273, 36); + this.numericUpDownCutToMinutes.Maximum = new decimal(new int[] { + 59, + 0, + 0, + 0}); + this.numericUpDownCutToMinutes.Minimum = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.numericUpDownCutToMinutes.Name = "numericUpDownCutToMinutes"; + this.numericUpDownCutToMinutes.Size = new System.Drawing.Size(40, 23); + this.numericUpDownCutToMinutes.TabIndex = 21; + this.numericUpDownCutToMinutes.TabStop = false; + this.numericUpDownCutToMinutes.ThousandsSeparator = false; + this.numericUpDownCutToMinutes.Value = new decimal(new int[] { + 0, + 0, + 0, + 0}); + // + // numericUpDownCutToHours + // + this.numericUpDownCutToHours.BackColor = System.Drawing.SystemColors.Window; + this.numericUpDownCutToHours.BackColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240))))); + this.numericUpDownCutToHours.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(171)))), ((int)(((byte)(173)))), ((int)(((byte)(179))))); + this.numericUpDownCutToHours.BorderColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(120)))), ((int)(((byte)(120)))), ((int)(((byte)(120))))); + this.numericUpDownCutToHours.ButtonForeColor = System.Drawing.SystemColors.ControlText; + this.numericUpDownCutToHours.ButtonForeColorDown = System.Drawing.Color.Orange; + this.numericUpDownCutToHours.ButtonForeColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(120)))), ((int)(((byte)(215))))); + this.numericUpDownCutToHours.DecimalPlaces = 0; + this.numericUpDownCutToHours.Increment = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.numericUpDownCutToHours.Location = new System.Drawing.Point(237, 36); + this.numericUpDownCutToHours.Maximum = new decimal(new int[] { + 99, + 0, + 0, + 0}); + this.numericUpDownCutToHours.Minimum = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.numericUpDownCutToHours.Name = "numericUpDownCutToHours"; + this.numericUpDownCutToHours.Size = new System.Drawing.Size(40, 23); + this.numericUpDownCutToHours.TabIndex = 20; + this.numericUpDownCutToHours.TabStop = false; + this.numericUpDownCutToHours.ThousandsSeparator = false; + this.numericUpDownCutToHours.Value = new decimal(new int[] { + 0, + 0, + 0, + 0}); + // + // numericUpDownCutFromSeconds + // + this.numericUpDownCutFromSeconds.BackColor = System.Drawing.SystemColors.Window; + this.numericUpDownCutFromSeconds.BackColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240))))); + this.numericUpDownCutFromSeconds.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(171)))), ((int)(((byte)(173)))), ((int)(((byte)(179))))); + this.numericUpDownCutFromSeconds.BorderColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(120)))), ((int)(((byte)(120)))), ((int)(((byte)(120))))); + this.numericUpDownCutFromSeconds.ButtonForeColor = System.Drawing.SystemColors.ControlText; + this.numericUpDownCutFromSeconds.ButtonForeColorDown = System.Drawing.Color.Orange; + this.numericUpDownCutFromSeconds.ButtonForeColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(120)))), ((int)(((byte)(215))))); + this.numericUpDownCutFromSeconds.DecimalPlaces = 0; + this.numericUpDownCutFromSeconds.Increment = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.numericUpDownCutFromSeconds.Location = new System.Drawing.Point(166, 36); + this.numericUpDownCutFromSeconds.Maximum = new decimal(new int[] { + 59, + 0, + 0, + 0}); + this.numericUpDownCutFromSeconds.Minimum = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.numericUpDownCutFromSeconds.Name = "numericUpDownCutFromSeconds"; + this.numericUpDownCutFromSeconds.Size = new System.Drawing.Size(40, 23); + this.numericUpDownCutFromSeconds.TabIndex = 19; + this.numericUpDownCutFromSeconds.TabStop = false; + this.numericUpDownCutFromSeconds.ThousandsSeparator = false; + this.numericUpDownCutFromSeconds.Value = new decimal(new int[] { + 0, + 0, + 0, + 0}); + // + // numericUpDownCutFromMinutes + // + this.numericUpDownCutFromMinutes.BackColor = System.Drawing.SystemColors.Window; + this.numericUpDownCutFromMinutes.BackColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240))))); + this.numericUpDownCutFromMinutes.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(171)))), ((int)(((byte)(173)))), ((int)(((byte)(179))))); + this.numericUpDownCutFromMinutes.BorderColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(120)))), ((int)(((byte)(120)))), ((int)(((byte)(120))))); + this.numericUpDownCutFromMinutes.ButtonForeColor = System.Drawing.SystemColors.ControlText; + this.numericUpDownCutFromMinutes.ButtonForeColorDown = System.Drawing.Color.Orange; + this.numericUpDownCutFromMinutes.ButtonForeColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(120)))), ((int)(((byte)(215))))); + this.numericUpDownCutFromMinutes.DecimalPlaces = 0; + this.numericUpDownCutFromMinutes.Increment = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.numericUpDownCutFromMinutes.Location = new System.Drawing.Point(130, 36); + this.numericUpDownCutFromMinutes.Maximum = new decimal(new int[] { + 59, + 0, + 0, + 0}); + this.numericUpDownCutFromMinutes.Minimum = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.numericUpDownCutFromMinutes.Name = "numericUpDownCutFromMinutes"; + this.numericUpDownCutFromMinutes.Size = new System.Drawing.Size(40, 23); + this.numericUpDownCutFromMinutes.TabIndex = 18; + this.numericUpDownCutFromMinutes.TabStop = false; + this.numericUpDownCutFromMinutes.ThousandsSeparator = false; + this.numericUpDownCutFromMinutes.Value = new decimal(new int[] { + 0, + 0, + 0, + 0}); + // + // numericUpDownCutFromHours + // + this.numericUpDownCutFromHours.BackColor = System.Drawing.SystemColors.Window; + this.numericUpDownCutFromHours.BackColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240))))); + this.numericUpDownCutFromHours.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(171)))), ((int)(((byte)(173)))), ((int)(((byte)(179))))); + this.numericUpDownCutFromHours.BorderColorDisabled = System.Drawing.Color.FromArgb(((int)(((byte)(120)))), ((int)(((byte)(120)))), ((int)(((byte)(120))))); + this.numericUpDownCutFromHours.ButtonForeColor = System.Drawing.SystemColors.ControlText; + this.numericUpDownCutFromHours.ButtonForeColorDown = System.Drawing.Color.Orange; + this.numericUpDownCutFromHours.ButtonForeColorOver = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(120)))), ((int)(((byte)(215))))); + this.numericUpDownCutFromHours.DecimalPlaces = 0; + this.numericUpDownCutFromHours.Increment = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.numericUpDownCutFromHours.Location = new System.Drawing.Point(94, 36); + this.numericUpDownCutFromHours.Maximum = new decimal(new int[] { + 99, + 0, + 0, + 0}); + this.numericUpDownCutFromHours.Minimum = new decimal(new int[] { + 0, + 0, + 0, + 0}); + this.numericUpDownCutFromHours.Name = "numericUpDownCutFromHours"; + this.numericUpDownCutFromHours.Size = new System.Drawing.Size(40, 23); + this.numericUpDownCutFromHours.TabIndex = 17; + this.numericUpDownCutFromHours.TabStop = false; + this.numericUpDownCutFromHours.ThousandsSeparator = false; + this.numericUpDownCutFromHours.Value = new decimal(new int[] { + 0, + 0, + 0, + 0}); + // + // labelCutTo + // + this.labelCutTo.AutoSize = true; + this.labelCutTo.Location = new System.Drawing.Point(237, 15); + this.labelCutTo.Name = "labelCutTo"; + this.labelCutTo.Size = new System.Drawing.Size(20, 13); + this.labelCutTo.TabIndex = 16; + this.labelCutTo.Text = "To"; + // + // labelCutFrom + // + this.labelCutFrom.AutoSize = true; + this.labelCutFrom.Location = new System.Drawing.Point(91, 15); + this.labelCutFrom.Name = "labelCutFrom"; + this.labelCutFrom.Size = new System.Drawing.Size(30, 13); + this.labelCutFrom.TabIndex = 14; + this.labelCutFrom.Text = "From"; + // + // checkBoxCut + // + this.checkBoxCut.AutoSize = true; + this.checkBoxCut.Location = new System.Drawing.Point(12, 36); + this.checkBoxCut.Name = "checkBoxCut"; + this.checkBoxCut.Size = new System.Drawing.Size(42, 17); + this.checkBoxCut.TabIndex = 0; + this.checkBoxCut.Text = "Cut"; + this.checkBoxCut.UseVisualStyleBackColor = true; + // // groupBoxSelection // this.groupBoxSelection.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) @@ -386,11 +789,9 @@ this.groupBoxSelection.Controls.Add(this.radioButtonSelectedLinesOnly); this.groupBoxSelection.Controls.Add(this.radioButtonSelectedLineAndForward); this.groupBoxSelection.Controls.Add(this.radioButtonAllLines); - this.groupBoxSelection.Location = new System.Drawing.Point(478, 217); - this.groupBoxSelection.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.groupBoxSelection.Location = new System.Drawing.Point(409, 141); this.groupBoxSelection.Name = "groupBoxSelection"; - this.groupBoxSelection.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.groupBoxSelection.Size = new System.Drawing.Size(480, 158); + this.groupBoxSelection.Size = new System.Drawing.Size(362, 103); this.groupBoxSelection.TabIndex = 90; this.groupBoxSelection.TabStop = false; this.groupBoxSelection.Text = "Selection"; @@ -398,10 +799,9 @@ // radioButtonSelectedLinesOnly // this.radioButtonSelectedLinesOnly.AutoSize = true; - this.radioButtonSelectedLinesOnly.Location = new System.Drawing.Point(20, 72); - this.radioButtonSelectedLinesOnly.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.radioButtonSelectedLinesOnly.Location = new System.Drawing.Point(13, 47); this.radioButtonSelectedLinesOnly.Name = "radioButtonSelectedLinesOnly"; - this.radioButtonSelectedLinesOnly.Size = new System.Drawing.Size(165, 24); + this.radioButtonSelectedLinesOnly.Size = new System.Drawing.Size(113, 17); this.radioButtonSelectedLinesOnly.TabIndex = 153; this.radioButtonSelectedLinesOnly.TabStop = true; this.radioButtonSelectedLinesOnly.Text = "Selected lines only"; @@ -411,10 +811,9 @@ // radioButtonSelectedLineAndForward // this.radioButtonSelectedLineAndForward.AutoSize = true; - this.radioButtonSelectedLineAndForward.Location = new System.Drawing.Point(20, 108); - this.radioButtonSelectedLineAndForward.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.radioButtonSelectedLineAndForward.Location = new System.Drawing.Point(13, 70); this.radioButtonSelectedLineAndForward.Name = "radioButtonSelectedLineAndForward"; - this.radioButtonSelectedLineAndForward.Size = new System.Drawing.Size(231, 24); + this.radioButtonSelectedLineAndForward.Size = new System.Drawing.Size(156, 17); this.radioButtonSelectedLineAndForward.TabIndex = 154; this.radioButtonSelectedLineAndForward.TabStop = true; this.radioButtonSelectedLineAndForward.Text = "Selected line(s) and forward"; @@ -424,10 +823,9 @@ // radioButtonAllLines // this.radioButtonAllLines.AutoSize = true; - this.radioButtonAllLines.Location = new System.Drawing.Point(20, 37); - this.radioButtonAllLines.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.radioButtonAllLines.Location = new System.Drawing.Point(13, 24); this.radioButtonAllLines.Name = "radioButtonAllLines"; - this.radioButtonAllLines.Size = new System.Drawing.Size(87, 24); + this.radioButtonAllLines.Size = new System.Drawing.Size(60, 17); this.radioButtonAllLines.TabIndex = 152; this.radioButtonAllLines.TabStop = true; this.radioButtonAllLines.Text = "All lines"; @@ -437,10 +835,9 @@ // nikseLabelOutline // this.nikseLabelOutline.AutoSize = true; - this.nikseLabelOutline.Location = new System.Drawing.Point(28, 89); - this.nikseLabelOutline.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.nikseLabelOutline.Location = new System.Drawing.Point(19, 58); this.nikseLabelOutline.Name = "nikseLabelOutline"; - this.nikseLabelOutline.Size = new System.Drawing.Size(59, 20); + this.nikseLabelOutline.Size = new System.Drawing.Size(40, 13); this.nikseLabelOutline.TabIndex = 151; this.nikseLabelOutline.Text = "Outline"; // @@ -459,8 +856,7 @@ 0, 0, 65536}); - this.numericUpDownOutline.Location = new System.Drawing.Point(178, 83); - this.numericUpDownOutline.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.numericUpDownOutline.Location = new System.Drawing.Point(119, 54); this.numericUpDownOutline.Maximum = new decimal(new int[] { 100, 0, @@ -472,7 +868,7 @@ 0, 0}); this.numericUpDownOutline.Name = "numericUpDownOutline"; - this.numericUpDownOutline.Size = new System.Drawing.Size(81, 35); + this.numericUpDownOutline.Size = new System.Drawing.Size(54, 23); this.numericUpDownOutline.TabIndex = 40; this.numericUpDownOutline.TabStop = false; this.numericUpDownOutline.ThousandsSeparator = false; @@ -484,10 +880,9 @@ // // buttonForeColor // - this.buttonForeColor.Location = new System.Drawing.Point(411, 38); - this.buttonForeColor.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.buttonForeColor.Location = new System.Drawing.Point(274, 25); this.buttonForeColor.Name = "buttonForeColor"; - this.buttonForeColor.Size = new System.Drawing.Size(134, 35); + this.buttonForeColor.Size = new System.Drawing.Size(89, 23); this.buttonForeColor.TabIndex = 30; this.buttonForeColor.Text = "Color"; this.buttonForeColor.UseVisualStyleBackColor = true; @@ -496,10 +891,9 @@ // checkBoxBox // this.checkBoxBox.AutoSize = true; - this.checkBoxBox.Location = new System.Drawing.Point(280, 92); - this.checkBoxBox.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.checkBoxBox.Location = new System.Drawing.Point(187, 60); this.checkBoxBox.Name = "checkBoxBox"; - this.checkBoxBox.Size = new System.Drawing.Size(62, 24); + this.checkBoxBox.Size = new System.Drawing.Size(44, 17); this.checkBoxBox.TabIndex = 50; this.checkBoxBox.Text = "Box"; this.checkBoxBox.UseVisualStyleBackColor = true; @@ -507,10 +901,9 @@ // checkBoxAlignRight // this.checkBoxAlignRight.AutoSize = true; - this.checkBoxAlignRight.Location = new System.Drawing.Point(327, 175); - this.checkBoxAlignRight.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.checkBoxAlignRight.Location = new System.Drawing.Point(218, 114); this.checkBoxAlignRight.Name = "checkBoxAlignRight"; - this.checkBoxAlignRight.Size = new System.Drawing.Size(105, 24); + this.checkBoxAlignRight.Size = new System.Drawing.Size(72, 17); this.checkBoxAlignRight.TabIndex = 76; this.checkBoxAlignRight.Text = "Align right"; this.checkBoxAlignRight.UseVisualStyleBackColor = true; @@ -519,20 +912,18 @@ // this.labelInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.labelInfo.AutoSize = true; - this.labelInfo.Location = new System.Drawing.Point(8, 397); - this.labelInfo.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelInfo.Location = new System.Drawing.Point(5, 410); this.labelInfo.Name = "labelInfo"; - this.labelInfo.Size = new System.Drawing.Size(37, 20); + this.labelInfo.Size = new System.Drawing.Size(25, 13); this.labelInfo.TabIndex = 1; this.labelInfo.Text = "Info"; // // checkBoxRightToLeft // this.checkBoxRightToLeft.AutoSize = true; - this.checkBoxRightToLeft.Location = new System.Drawing.Point(180, 175); - this.checkBoxRightToLeft.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.checkBoxRightToLeft.Location = new System.Drawing.Point(120, 114); this.checkBoxRightToLeft.Name = "checkBoxRightToLeft"; - this.checkBoxRightToLeft.Size = new System.Drawing.Size(117, 24); + this.checkBoxRightToLeft.Size = new System.Drawing.Size(80, 17); this.checkBoxRightToLeft.TabIndex = 75; this.checkBoxRightToLeft.Text = "Right to left"; this.checkBoxRightToLeft.UseVisualStyleBackColor = true; @@ -550,24 +941,22 @@ this.comboBoxSubtitleFont.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBoxSubtitleFont.DropDownWidth = 250; this.comboBoxSubtitleFont.FormattingEnabled = true; - this.comboBoxSubtitleFont.Location = new System.Drawing.Point(180, 134); - this.comboBoxSubtitleFont.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.comboBoxSubtitleFont.Location = new System.Drawing.Point(120, 87); this.comboBoxSubtitleFont.MaxLength = 32767; this.comboBoxSubtitleFont.Name = "comboBoxSubtitleFont"; this.comboBoxSubtitleFont.SelectedIndex = -1; this.comboBoxSubtitleFont.SelectedItem = null; this.comboBoxSubtitleFont.SelectedText = ""; - this.comboBoxSubtitleFont.Size = new System.Drawing.Size(400, 32); + this.comboBoxSubtitleFont.Size = new System.Drawing.Size(267, 21); this.comboBoxSubtitleFont.TabIndex = 70; this.comboBoxSubtitleFont.UsePopupWindow = false; // // labelSubtitleFont // this.labelSubtitleFont.AutoSize = true; - this.labelSubtitleFont.Location = new System.Drawing.Point(28, 138); - this.labelSubtitleFont.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelSubtitleFont.Location = new System.Drawing.Point(19, 90); this.labelSubtitleFont.Name = "labelSubtitleFont"; - this.labelSubtitleFont.Size = new System.Drawing.Size(95, 20); + this.labelSubtitleFont.Size = new System.Drawing.Size(63, 13); this.labelSubtitleFont.TabIndex = 7; this.labelSubtitleFont.Text = "Subtitle font"; // @@ -580,11 +969,9 @@ this.groupBoxVideo.Controls.Add(this.numericUpDownWidth); this.groupBoxVideo.Controls.Add(this.numericUpDownHeight); this.groupBoxVideo.Controls.Add(this.labelX); - this.groupBoxVideo.Location = new System.Drawing.Point(9, 217); - this.groupBoxVideo.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.groupBoxVideo.Location = new System.Drawing.Point(6, 141); this.groupBoxVideo.Name = "groupBoxVideo"; - this.groupBoxVideo.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.groupBoxVideo.Size = new System.Drawing.Size(460, 158); + this.groupBoxVideo.Size = new System.Drawing.Size(397, 103); this.groupBoxVideo.TabIndex = 80; this.groupBoxVideo.TabStop = false; this.groupBoxVideo.Text = "Video"; @@ -592,10 +979,9 @@ // labelFrameRate // this.labelFrameRate.AutoSize = true; - this.labelFrameRate.Location = new System.Drawing.Point(20, 83); - this.labelFrameRate.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelFrameRate.Location = new System.Drawing.Point(13, 54); this.labelFrameRate.Name = "labelFrameRate"; - this.labelFrameRate.Size = new System.Drawing.Size(87, 20); + this.labelFrameRate.Size = new System.Drawing.Size(57, 13); this.labelFrameRate.TabIndex = 32; this.labelFrameRate.Text = "Frame rate"; // @@ -612,24 +998,22 @@ this.comboBoxFrameRate.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDown; this.comboBoxFrameRate.DropDownWidth = 200; this.comboBoxFrameRate.FormattingEnabled = true; - this.comboBoxFrameRate.Location = new System.Drawing.Point(144, 71); - this.comboBoxFrameRate.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.comboBoxFrameRate.Location = new System.Drawing.Point(96, 46); this.comboBoxFrameRate.MaxLength = 32767; this.comboBoxFrameRate.Name = "comboBoxFrameRate"; this.comboBoxFrameRate.SelectedIndex = -1; this.comboBoxFrameRate.SelectedItem = null; this.comboBoxFrameRate.SelectedText = ""; - this.comboBoxFrameRate.Size = new System.Drawing.Size(96, 35); + this.comboBoxFrameRate.Size = new System.Drawing.Size(64, 23); this.comboBoxFrameRate.TabIndex = 33; this.comboBoxFrameRate.TabStop = false; this.comboBoxFrameRate.UsePopupWindow = false; // // buttonVideoChooseStandardRes // - this.buttonVideoChooseStandardRes.Location = new System.Drawing.Point(386, 26); - this.buttonVideoChooseStandardRes.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.buttonVideoChooseStandardRes.Location = new System.Drawing.Point(257, 17); this.buttonVideoChooseStandardRes.Name = "buttonVideoChooseStandardRes"; - this.buttonVideoChooseStandardRes.Size = new System.Drawing.Size(40, 35); + this.buttonVideoChooseStandardRes.Size = new System.Drawing.Size(27, 23); this.buttonVideoChooseStandardRes.TabIndex = 3; this.buttonVideoChooseStandardRes.Text = "..."; this.buttonVideoChooseStandardRes.UseVisualStyleBackColor = true; @@ -638,10 +1022,9 @@ // labelResolution // this.labelResolution.AutoSize = true; - this.labelResolution.Location = new System.Drawing.Point(15, 29); - this.labelResolution.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelResolution.Location = new System.Drawing.Point(10, 19); this.labelResolution.Name = "labelResolution"; - this.labelResolution.Size = new System.Drawing.Size(85, 20); + this.labelResolution.Size = new System.Drawing.Size(57, 13); this.labelResolution.TabIndex = 0; this.labelResolution.Text = "Resolution"; // @@ -660,8 +1043,7 @@ 0, 0, 0}); - this.numericUpDownWidth.Location = new System.Drawing.Point(144, 26); - this.numericUpDownWidth.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.numericUpDownWidth.Location = new System.Drawing.Point(96, 17); this.numericUpDownWidth.Maximum = new decimal(new int[] { 50000, 0, @@ -673,7 +1055,7 @@ 0, 0}); this.numericUpDownWidth.Name = "numericUpDownWidth"; - this.numericUpDownWidth.Size = new System.Drawing.Size(96, 35); + this.numericUpDownWidth.Size = new System.Drawing.Size(64, 23); this.numericUpDownWidth.TabIndex = 1; this.numericUpDownWidth.TabStop = false; this.numericUpDownWidth.ThousandsSeparator = false; @@ -698,8 +1080,7 @@ 0, 0, 0}); - this.numericUpDownHeight.Location = new System.Drawing.Point(276, 26); - this.numericUpDownHeight.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.numericUpDownHeight.Location = new System.Drawing.Point(184, 17); this.numericUpDownHeight.Maximum = new decimal(new int[] { 50000, 0, @@ -711,7 +1092,7 @@ 0, 0}); this.numericUpDownHeight.Name = "numericUpDownHeight"; - this.numericUpDownHeight.Size = new System.Drawing.Size(96, 35); + this.numericUpDownHeight.Size = new System.Drawing.Size(64, 23); this.numericUpDownHeight.TabIndex = 2; this.numericUpDownHeight.TabStop = false; this.numericUpDownHeight.ThousandsSeparator = false; @@ -724,10 +1105,9 @@ // labelX // this.labelX.AutoSize = true; - this.labelX.Location = new System.Drawing.Point(249, 29); - this.labelX.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelX.Location = new System.Drawing.Point(166, 19); this.labelX.Name = "labelX"; - this.labelX.Size = new System.Drawing.Size(16, 20); + this.labelX.Size = new System.Drawing.Size(12, 13); this.labelX.TabIndex = 31; this.labelX.Text = "x"; // @@ -746,8 +1126,7 @@ 0, 0, 0}); - this.numericUpDownFontSize.Location = new System.Drawing.Point(180, 38); - this.numericUpDownFontSize.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.numericUpDownFontSize.Location = new System.Drawing.Point(120, 25); this.numericUpDownFontSize.Maximum = new decimal(new int[] { 1000, 0, @@ -759,7 +1138,7 @@ 0, 0}); this.numericUpDownFontSize.Name = "numericUpDownFontSize"; - this.numericUpDownFontSize.Size = new System.Drawing.Size(81, 31); + this.numericUpDownFontSize.Size = new System.Drawing.Size(54, 20); this.numericUpDownFontSize.TabIndex = 10; this.numericUpDownFontSize.TabStop = false; this.numericUpDownFontSize.ThousandsSeparator = false; @@ -772,10 +1151,9 @@ // labelFontSize // this.labelFontSize.AutoSize = true; - this.labelFontSize.Location = new System.Drawing.Point(28, 42); - this.labelFontSize.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelFontSize.Location = new System.Drawing.Point(19, 27); this.labelFontSize.Name = "labelFontSize"; - this.labelFontSize.Size = new System.Drawing.Size(74, 20); + this.labelFontSize.Size = new System.Drawing.Size(49, 13); this.labelFontSize.TabIndex = 0; this.labelFontSize.Text = "Font size"; // @@ -789,10 +1167,9 @@ this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.buttonCancel.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.buttonCancel.Location = new System.Drawing.Point(798, 508); - this.buttonCancel.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.buttonCancel.Location = new System.Drawing.Point(664, 482); this.buttonCancel.Name = "buttonCancel"; - this.buttonCancel.Size = new System.Drawing.Size(188, 35); + this.buttonCancel.Size = new System.Drawing.Size(125, 23); this.buttonCancel.TabIndex = 154; this.buttonCancel.Text = "C&ancel"; this.buttonCancel.UseVisualStyleBackColor = true; @@ -801,7 +1178,7 @@ // promptParameterBeforeGenerateToolStripMenuItem // this.promptParameterBeforeGenerateToolStripMenuItem.Name = "promptParameterBeforeGenerateToolStripMenuItem"; - this.promptParameterBeforeGenerateToolStripMenuItem.Size = new System.Drawing.Size(409, 32); + this.promptParameterBeforeGenerateToolStripMenuItem.Size = new System.Drawing.Size(289, 22); this.promptParameterBeforeGenerateToolStripMenuItem.Text = "Prompt FFmpeg parameter and generate"; this.promptParameterBeforeGenerateToolStripMenuItem.Click += new System.EventHandler(this.promptParameterBeforeGenerateToolStripMenuItem_Click); // @@ -811,16 +1188,15 @@ this.contextMenuStripGenerate.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.promptParameterBeforeGenerateToolStripMenuItem}); this.contextMenuStripGenerate.Name = "contextMenuStripGenerate"; - this.contextMenuStripGenerate.Size = new System.Drawing.Size(410, 36); + this.contextMenuStripGenerate.Size = new System.Drawing.Size(290, 26); // // progressBar1 // this.progressBar1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.progressBar1.Location = new System.Drawing.Point(18, 508); - this.progressBar1.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.progressBar1.Location = new System.Drawing.Point(12, 482); this.progressBar1.Name = "progressBar1"; - this.progressBar1.Size = new System.Drawing.Size(580, 17); + this.progressBar1.Size = new System.Drawing.Size(519, 11); this.progressBar1.TabIndex = 145; this.progressBar1.Visible = false; // @@ -829,23 +1205,44 @@ this.buttonGenerate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.buttonGenerate.ContextMenuStrip = this.contextMenuStripGenerate; this.buttonGenerate.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.buttonGenerate.Location = new System.Drawing.Point(608, 508); - this.buttonGenerate.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.buttonGenerate.Location = new System.Drawing.Point(537, 482); this.buttonGenerate.Name = "buttonGenerate"; - this.buttonGenerate.Size = new System.Drawing.Size(182, 35); + this.buttonGenerate.Size = new System.Drawing.Size(121, 23); this.buttonGenerate.TabIndex = 153; this.buttonGenerate.Text = "Generate"; this.buttonGenerate.UseVisualStyleBackColor = true; this.buttonGenerate.Click += new System.EventHandler(this.buttonGenerate_Click); // + // buttonMode + // + this.buttonMode.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonMode.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.buttonMode.Location = new System.Drawing.Point(664, 453); + this.buttonMode.Name = "buttonMode"; + this.buttonMode.Size = new System.Drawing.Size(125, 23); + this.buttonMode.TabIndex = 156; + this.buttonMode.Text = "Batch mode"; + this.buttonMode.UseVisualStyleBackColor = true; + this.buttonMode.Click += new System.EventHandler(this.buttonMode_Click); + // + // buttonPreview + // + this.buttonPreview.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.buttonPreview.Location = new System.Drawing.Point(537, 453); + this.buttonPreview.Name = "buttonPreview"; + this.buttonPreview.Size = new System.Drawing.Size(121, 23); + this.buttonPreview.TabIndex = 155; + this.buttonPreview.Text = "Preview"; + this.buttonPreview.UseVisualStyleBackColor = true; + this.buttonPreview.Click += new System.EventHandler(this.buttonPreview_Click); + // // labelPass // this.labelPass.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.labelPass.AutoSize = true; - this.labelPass.Location = new System.Drawing.Point(522, 483); - this.labelPass.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelPass.Location = new System.Drawing.Point(480, 466); this.labelPass.Name = "labelPass"; - this.labelPass.Size = new System.Drawing.Size(75, 20); + this.labelPass.Size = new System.Drawing.Size(51, 13); this.labelPass.TabIndex = 149; this.labelPass.Text = "Pass one"; // @@ -853,10 +1250,9 @@ // this.labelProgress.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.labelProgress.AutoSize = true; - this.labelProgress.Location = new System.Drawing.Point(18, 529); - this.labelProgress.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelProgress.Location = new System.Drawing.Point(12, 496); this.labelProgress.Name = "labelProgress"; - this.labelProgress.Size = new System.Drawing.Size(131, 20); + this.labelProgress.Size = new System.Drawing.Size(88, 13); this.labelProgress.TabIndex = 147; this.labelProgress.Text = "Remaining time..."; // @@ -864,29 +1260,29 @@ // this.labelPleaseWait.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.labelPleaseWait.AutoSize = true; - this.labelPleaseWait.Location = new System.Drawing.Point(18, 483); - this.labelPleaseWait.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.labelPleaseWait.Location = new System.Drawing.Point(12, 466); this.labelPleaseWait.Name = "labelPleaseWait"; - this.labelPleaseWait.Size = new System.Drawing.Size(101, 20); + this.labelPleaseWait.Size = new System.Drawing.Size(70, 13); this.labelPleaseWait.TabIndex = 146; this.labelPleaseWait.Text = "Please wait..."; // // textBoxLog // this.textBoxLog.FocusedColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(120)))), ((int)(((byte)(215))))); - this.textBoxLog.Location = new System.Drawing.Point(48, 11); - this.textBoxLog.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.textBoxLog.Location = new System.Drawing.Point(32, 7); this.textBoxLog.Multiline = true; this.textBoxLog.Name = "textBoxLog"; this.textBoxLog.ReadOnly = true; - this.textBoxLog.Size = new System.Drawing.Size(280, 38); + this.textBoxLog.Size = new System.Drawing.Size(188, 26); this.textBoxLog.TabIndex = 148; // // GenerateTransparentVideoWithSubtitles // - this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1004, 560); + this.ClientSize = new System.Drawing.Size(801, 516); + this.Controls.Add(this.buttonMode); + this.Controls.Add(this.buttonPreview); this.Controls.Add(this.labelPass); this.Controls.Add(this.labelProgress); this.Controls.Add(this.labelPleaseWait); @@ -897,7 +1293,6 @@ this.Controls.Add(this.buttonGenerate); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.KeyPreview = true; - this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "GenerateTransparentVideoWithSubtitles"; @@ -910,6 +1305,8 @@ this.contextMenuStripRes.ResumeLayout(false); this.groupBoxSettings.ResumeLayout(false); this.groupBoxSettings.PerformLayout(); + this.groupBoxCut.ResumeLayout(false); + this.groupBoxCut.PerformLayout(); this.groupBoxSelection.ResumeLayout(false); this.groupBoxSelection.PerformLayout(); this.groupBoxVideo.ResumeLayout(false); @@ -923,9 +1320,6 @@ #endregion private System.Windows.Forms.ToolStripMenuItem deleteToolStripMenuItem; - private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; - private System.Windows.Forms.ToolStripMenuItem removeSubtitleFileToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem pickSubtitleFileToolStripMenuItem; private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; private System.Windows.Forms.ToolStripMenuItem addFilesToolStripMenuItem; private System.Windows.Forms.ContextMenuStrip contextMenuStripBatch; @@ -987,5 +1381,29 @@ private System.Windows.Forms.RadioButton radioButtonSelectedLinesOnly; private System.Windows.Forms.RadioButton radioButtonAllLines; private System.Windows.Forms.GroupBox groupBoxSelection; + private System.Windows.Forms.Button buttonMode; + private System.Windows.Forms.Button buttonPreview; + private System.Windows.Forms.GroupBox groupBoxCut; + private System.Windows.Forms.Button buttonCutTo; + private System.Windows.Forms.Button buttonCutFrom; + private Controls.NikseUpDown numericUpDownCutToSeconds; + private Controls.NikseUpDown numericUpDownCutToMinutes; + private Controls.NikseUpDown numericUpDownCutToHours; + private Controls.NikseUpDown numericUpDownCutFromSeconds; + private Controls.NikseUpDown numericUpDownCutFromMinutes; + private Controls.NikseUpDown numericUpDownCutFromHours; + private Controls.NikseLabel labelCutTo; + private Controls.NikseLabel labelCutFrom; + private System.Windows.Forms.CheckBox checkBoxCut; + private System.Windows.Forms.Button buttonClear; + private System.Windows.Forms.Button buttonRemoveFile; + private System.Windows.Forms.Button buttonAddFile; + private System.Windows.Forms.ListView listViewBatch; + private System.Windows.Forms.ColumnHeader columnHeaderSubtitleFile; + private System.Windows.Forms.ColumnHeader columnHeaderSize; + private System.Windows.Forms.ColumnHeader columnHeaderStatus; + private System.Windows.Forms.Button buttonOutputFileSettings; + private System.Windows.Forms.Label nikseLabelOutputFileFolder; + private System.Windows.Forms.LinkLabel linkLabelSourceFolder; } } \ No newline at end of file diff --git a/src/ui/Forms/GenerateTransparentVideoWithSubtitles.cs b/src/ui/Forms/GenerateTransparentVideoWithSubtitles.cs index 30899e4ab..f577a799d 100644 --- a/src/ui/Forms/GenerateTransparentVideoWithSubtitles.cs +++ b/src/ui/Forms/GenerateTransparentVideoWithSubtitles.cs @@ -4,17 +4,27 @@ using Nikse.SubtitleEdit.Logic; using System; using System.Collections.Generic; using System.Diagnostics; +using System.Drawing; using System.Globalization; using System.IO; using System.Linq; using System.Text; using System.Text.RegularExpressions; using System.Windows.Forms; +using MessageBox = Nikse.SubtitleEdit.Forms.SeMsgBox.MessageBox; namespace Nikse.SubtitleEdit.Forms { public sealed partial class GenerateTransparentVideoWithSubtitles : Form { + public bool BatchMode { get; set; } + public string BatchInfo { get; set; } + public string VideoFileName { get; private set; } + public long MillisecondsEncoding { get; private set; } + + private const int ListViewBatchSubItemIndexColumnSubtitleSize = 0; + private const int ListViewBatchSubItemIndexColumnStatus = 1; + private bool _abort; private readonly Subtitle _assaSubtitle; private readonly List _selectedLines; @@ -26,8 +36,8 @@ namespace Nikse.SubtitleEdit.Forms private StringBuilder _log; private readonly bool _isAssa; private bool _promptFFmpegParameters; - public string VideoFileName { get; private set; } - public long MillisecondsEncoding { get; private set; } + private readonly List _batchItems; + private bool _converting; public GenerateTransparentVideoWithSubtitles(Subtitle subtitle, List selectedLines, SubtitleFormat format, VideoInfo videoInfo) { @@ -39,6 +49,7 @@ namespace Nikse.SubtitleEdit.Forms _videoInfo = videoInfo; _assaSubtitle = new Subtitle(subtitle); _selectedLines = selectedLines; + _batchItems = new List(); if (selectedLines.Count > 1) { @@ -129,6 +140,7 @@ namespace Nikse.SubtitleEdit.Forms { initialFont = Configuration.Settings.Tools.ExportBluRayFontName; } + labelInfo.Text = LanguageSettings.Current.GenerateVideoWithBurnedInSubs.InfoAssaOn; if (string.IsNullOrEmpty(initialFont)) { @@ -143,6 +155,7 @@ namespace Nikse.SubtitleEdit.Forms comboBoxSubtitleFont.SelectedIndex = comboBoxSubtitleFont.Items.Count - 1; } } + if (comboBoxSubtitleFont.SelectedIndex < 0 && comboBoxSubtitleFont.Items.Count > 0) { comboBoxSubtitleFont.SelectedIndex = 0; @@ -175,6 +188,14 @@ namespace Nikse.SubtitleEdit.Forms panelOutlineColor.BackColor = Configuration.Settings.Tools.GenVideoNonAssaBoxColor; panelForeColor.BackColor = Configuration.Settings.Tools.GenVideoNonAssaTextColor; + + var hasSubtitle = subtitle != null && subtitle.Paragraphs.Count > 0; + BatchMode = hasSubtitle; + buttonMode_Click(null, null); + if (!hasSubtitle) + { + buttonMode.Enabled = false; + } } private void FontEnableOrDisable(bool assa) @@ -256,7 +277,15 @@ namespace Nikse.SubtitleEdit.Forms private void buttonGenerate_Click(object sender, EventArgs e) { - var subtitle = GetSubtitleBasedOnSelection(); + if (BatchMode && _batchItems.Count == 0) + { + MessageBox.Show("No subtitle files added for batch."); + return; + } + + _converting = true; + var selectionSubtitle = GetSubtitleBasedOnSelection(); + var subtitle = GetSubtitleBasedOnCut(selectionSubtitle); CalculateTotalFrames(subtitle); @@ -265,46 +294,121 @@ namespace Nikse.SubtitleEdit.Forms _log = new StringBuilder(); buttonGenerate.Enabled = false; + buttonPreview.Enabled = false; + buttonMode.Enabled = false; var oldFontSizeEnabled = numericUpDownFontSize.Enabled; numericUpDownFontSize.Enabled = false; + var stopWatch = Stopwatch.StartNew(); + var sbInfo = new StringBuilder(); + sbInfo.AppendLine("Conversion report:"); + sbInfo.AppendLine(); + var okCount = 0; + var failCount = 0; - using (var saveDialog = new SaveFileDialog + if (BatchMode) { - FileName = SuggestNewVideoFileName(), - Filter = "MP4|*.mp4|Matroska|*.mkv|WebM|*.webm|mov|*.mov", - AddExtension = true, - InitialDirectory = string.IsNullOrEmpty(_assaSubtitle.FileName) ? string.Empty : Path.GetDirectoryName(_assaSubtitle.FileName), - }) + for (var i = 0; i < listViewBatch.Items.Count; i++) + { + listViewBatch.Items[i].SubItems[1].Text = string.Empty; + } + + listViewBatch.SelectedIndices.Clear(); + listViewBatch.Refresh(); + + for (var index = 0; index < _batchItems.Count; index++) + { + var batchItem = _batchItems[index]; + + labelPleaseWait.Text = $"{index + 1}/{_batchItems.Count} - {LanguageSettings.Current.General.PleaseWait}"; + VideoFileName = GetBatchFileName(batchItem); + listViewBatch.Items[index].Selected = true; + listViewBatch.Items[index].Focused = true; + listViewBatch.Items[index].EnsureVisible(); + Refresh(); + + var batchSubtitle = Subtitle.Parse(batchItem.SubtitleFileName); + if (ConvertVideo(oldFontSizeEnabled, batchSubtitle)) + { + listViewBatch.Items[index].SubItems[ListViewBatchSubItemIndexColumnStatus].Text = LanguageSettings.Current.BatchConvert.Converted; + sbInfo.AppendLine($"{index + 1}: {batchItem.SubtitleFileName} -> {VideoFileName}"); + okCount++; + } + else + { + listViewBatch.Items[index].SubItems[ListViewBatchSubItemIndexColumnStatus].Text = "Error"; + failCount++; + } + + if (_abort) + { + break; + } + } + + sbInfo.AppendLine(); + + var timeString = $"{stopWatch.Elapsed.Hours + stopWatch.Elapsed.Days * 24:00}:{stopWatch.Elapsed.Minutes:00}:{stopWatch.Elapsed.Seconds:00}"; + if (okCount == 1) + { + sbInfo.AppendLine($"One video file converted in {timeString}"); + } + else + { + sbInfo.AppendLine($"{okCount} video files converted in {timeString}"); + } + + if (failCount > 0) + { + sbInfo.AppendLine($"{failCount} video file(s) failed!"); + } + + BatchInfo = sbInfo.ToString(); + } + else { - if (saveDialog.ShowDialog(this) != DialogResult.OK) + using (var saveDialog = new SaveFileDialog + { + FileName = SuggestNewVideoFileName(), + Filter = "MP4|*.mp4|Matroska|*.mkv|WebM|*.webm|mov|*.mov", + AddExtension = true, + InitialDirectory = string.IsNullOrEmpty(_assaSubtitle.FileName) ? string.Empty : Path.GetDirectoryName(_assaSubtitle.FileName), + }) + { + if (saveDialog.ShowDialog(this) != DialogResult.OK) + { + buttonGenerate.Enabled = true; + buttonPreview.Enabled = true; + buttonMode.Enabled = true; + numericUpDownFontSize.Enabled = true; + _converting = false; + return; + } + + VideoFileName = saveDialog.FileName; + } + + if (!ConvertVideo(oldFontSizeEnabled, subtitle)) { buttonGenerate.Enabled = true; + buttonPreview.Enabled = true; + buttonMode.Enabled = true; numericUpDownFontSize.Enabled = true; + progressBar1.Visible = false; + labelPleaseWait.Visible = false; + timer1.Stop(); + MillisecondsEncoding = stopWatch.ElapsedMilliseconds; + labelProgress.Text = string.Empty; + groupBoxSettings.Enabled = true; + _converting = false; + + if (!_abort && _log.ToString().Length > 10) + { + var title = "Error occurred during encoding"; + MessageBox.Show($"Encoding with ffmpeg failed: {Environment.NewLine}{_log}", title, MessageBoxButtons.OK, MessageBoxIcon.Error); + } + return; } - - VideoFileName = saveDialog.FileName; - } - - var stopWatch = Stopwatch.StartNew(); - if (!ConvertVideo(oldFontSizeEnabled, subtitle)) - { - buttonGenerate.Enabled = true; - numericUpDownFontSize.Enabled = true; - progressBar1.Visible = false; - labelPleaseWait.Visible = false; - timer1.Stop(); - MillisecondsEncoding = stopWatch.ElapsedMilliseconds; - labelProgress.Text = string.Empty; - groupBoxSettings.Enabled = true; - - if (!_abort && _log.ToString().Length > 10) - { - var title = "Error occurred during encoding"; - MessageBox.Show($"Encoding with ffmpeg failed: {Environment.NewLine}{_log}", title, MessageBoxButtons.OK, MessageBoxIcon.Error); - } - - return; } progressBar1.Visible = false; @@ -313,37 +417,111 @@ namespace Nikse.SubtitleEdit.Forms MillisecondsEncoding = stopWatch.ElapsedMilliseconds; labelProgress.Text = string.Empty; groupBoxSettings.Enabled = true; + _converting = false; if (_abort) { DialogResult = DialogResult.Cancel; buttonGenerate.Enabled = true; + buttonPreview.Enabled = true; + buttonMode.Enabled = true; numericUpDownFontSize.Enabled = true; return; } - if (!File.Exists(VideoFileName) || new FileInfo(VideoFileName).Length == 0) + if (BatchMode) + { + MessageBox.Show(BatchInfo); + } + else if (!File.Exists(VideoFileName) || new FileInfo(VideoFileName).Length == 0) { SeLogger.Error(Environment.NewLine + "Generate video failed: " + Environment.NewLine + _log); MessageBox.Show("Generate embedded video failed" + Environment.NewLine + "For more info see the error log: " + SeLogger.ErrorFile); buttonGenerate.Enabled = true; + buttonPreview.Enabled = true; + buttonMode.Enabled = true; numericUpDownFontSize.Enabled = oldFontSizeEnabled; return; } - - var encodingTime = new TimeCode(MillisecondsEncoding).ToString(); - using (var f = new ExportPngXmlDialogOpenFolder(string.Format(LanguageSettings.Current.GenerateVideoWithBurnedInSubs.XGeneratedWithBurnedInSubsInX, Path.GetFileName(VideoFileName), encodingTime), Path.GetDirectoryName(VideoFileName), VideoFileName)) + else { - f.ShowDialog(this); + var encodingTime = new TimeCode(MillisecondsEncoding).ToString(); + using (var f = new ExportPngXmlDialogOpenFolder(string.Format(LanguageSettings.Current.GenerateVideoWithBurnedInSubs.XGeneratedWithBurnedInSubsInX, Path.GetFileName(VideoFileName), encodingTime), Path.GetDirectoryName(VideoFileName), VideoFileName)) + { + f.ShowDialog(this); + } } buttonGenerate.Enabled = true; + buttonPreview.Enabled = true; + buttonMode.Enabled = true; numericUpDownFontSize.Enabled = true; } + private string GetBatchFileName(BatchItem batchItem) + { + var path = Path.GetDirectoryName(batchItem.SubtitleFileName); + if (Configuration.Settings.Tools.GenVideoUseOutputFolder && + !string.IsNullOrEmpty(Configuration.Settings.Tools.GenVideoOutputFolder) && + Directory.Exists(Configuration.Settings.Tools.GenVideoOutputFolder)) + { + path = Configuration.Settings.Tools.GenVideoOutputFolder; + } + + var nameNoExt = Path.GetFileNameWithoutExtension(batchItem.SubtitleFileName); + var ext = ".mp4"; //TODO: use setting form .mkv/.mp4/? + + var outputFileName = Path.Combine(path, $"{nameNoExt.TrimEnd('.', '.')}{Configuration.Settings.Tools.GenVideoOutputFileSuffix}{ext}"); + return outputFileName; + } + + private TimeSpan GetCutEnd() + { + return TimeSpan.FromSeconds( + (double)numericUpDownCutToHours.Value * 60 * 60 + + (double)numericUpDownCutToMinutes.Value * 60 + + (double)numericUpDownCutToSeconds.Value); + } + + private TimeSpan GetCutStart() + { + return TimeSpan.FromSeconds( + (double)numericUpDownCutFromHours.Value * 60 * 60 + + (double)numericUpDownCutFromMinutes.Value * 60 + + (double)numericUpDownCutFromSeconds.Value); + } + + private Subtitle GetSubtitleBasedOnCut(Subtitle selectionSubtitle) + { + if (!checkBoxCut.Checked) + { + return selectionSubtitle; + } + + var subtitle = new Subtitle(); + var start = GetCutStart(); + var end = GetCutEnd(); + foreach (var p in selectionSubtitle.Paragraphs) + { + if (p.StartTime.TotalMilliseconds >= start.TotalMilliseconds && p.EndTime.TotalMilliseconds <= end.TotalMilliseconds) + { + subtitle.Paragraphs.Add(new Paragraph(p)); + } + } + + subtitle.AddTimeToAllParagraphs(TimeSpan.FromMilliseconds(-start.TotalMilliseconds)); + + return subtitle; + } + private Subtitle GetSubtitleBasedOnSelection() { + if (BatchMode) + { + return _assaSubtitle; + } + var subtitle = new Subtitle(_assaSubtitle); if (radioButtonSelectedLinesOnly.Checked) { @@ -427,14 +605,6 @@ namespace Nikse.SubtitleEdit.Forms _log = new StringBuilder(); - if (_videoInfo != null) - { - _log.AppendLine("Video info width: " + _videoInfo.Width); - _log.AppendLine("Video info width: " + _videoInfo.Height); - _log.AppendLine("Video info total frames: " + _videoInfo.TotalFrames); - _log.AppendLine("Video info total seconds: " + _videoInfo.TotalSeconds); - } - if (!_isAssa) { SetStyleForNonAssa(subtitle); @@ -465,7 +635,7 @@ namespace Nikse.SubtitleEdit.Forms progressBar1.Visible = true; } - var result = RunOnePassEncoding(assaTempFileName, subtitle); + var result = RunOnePassEncoding(assaTempFileName, subtitle, VideoFileName); try { @@ -543,9 +713,9 @@ namespace Nikse.SubtitleEdit.Forms } } - private bool RunOnePassEncoding(string assaTempFileName, Subtitle subtitle) + private bool RunOnePassEncoding(string assaTempFileName, Subtitle subtitle, string videoFileName) { - var process = GetFfmpegProcess(VideoFileName, assaTempFileName, subtitle); + var process = GetFfmpegProcess(videoFileName, assaTempFileName, subtitle); _log.AppendLine("ffmpeg arguments: " + process.StartInfo.Arguments); if (!CheckForPromptParameters(process, Text)) @@ -702,5 +872,497 @@ namespace Nikse.SubtitleEdit.Forms DialogResult = DialogResult.Cancel; } } + + private void buttonMode_Click(object sender, EventArgs e) + { + BatchMode = !BatchMode; + + listViewBatch.Visible = BatchMode; + labelInfo.Visible = !BatchMode; + groupBoxSelection.Visible = !BatchMode; + buttonAddFile.Visible = BatchMode; + buttonRemoveFile.Visible = BatchMode; + buttonClear.Visible = BatchMode; + buttonOutputFileSettings.Visible = BatchMode; + labelProgress.Text = string.Empty; + buttonMode.Text = BatchMode + ? LanguageSettings.Current.Split.Basic + : LanguageSettings.Current.AudioToText.BatchMode; + + if (!numericUpDownWidth.Visible) + { + var item = new ToolStripMenuItem(); + item.Text = _videoInfo == null + ? "(1920x1080)" + : $"({_videoInfo.Width}x{_videoInfo.Height})"; + + ResolutionPickClick(item, null); + } + + Height = BatchMode ? 600 : 425; + ShowLabelOutput(); + listViewBatch.AutoSizeLastColumn(); + } + + private static string GetSubtitleFilter() + { + var sb = new StringBuilder(); + sb.Append(LanguageSettings.Current.General.SubtitleFiles + "|"); + foreach (var s in SubtitleFormat.AllSubtitleFormats.Concat(SubtitleFormat.GetTextOtherFormats())) + { + UiUtil.AddExtension(sb, s.Extension); + foreach (var ext in s.AlternateExtensions) + { + UiUtil.AddExtension(sb, ext); + } + } + + return sb.ToString(); + } + + + private void buttonAddFile_Click(object sender, EventArgs e) + { + using (var openFileDialog1 = new OpenFileDialog()) + { + openFileDialog1.Title = LanguageSettings.Current.General.OpenSubtitle; + openFileDialog1.FileName = string.Empty; + openFileDialog1.Filter = GetSubtitleFilter(); + openFileDialog1.Multiselect = true; + if (openFileDialog1.ShowDialog(this) != DialogResult.OK) + { + return; + } + + try + { + Cursor = Cursors.WaitCursor; + Refresh(); + Application.DoEvents(); + for (var i = 0; i < listViewBatch.Columns.Count; i++) + { + ListViewSorter.SetSortArrow(listViewBatch.Columns[i], SortOrder.None); + } + + foreach (var fileName in openFileDialog1.FileNames) + { + Application.DoEvents(); + AddInputFile(fileName); + } + } + finally + { + Cursor = Cursors.Default; + } + } + } + + private void AddInputFile(string subtitleFileName) + { + if (string.IsNullOrEmpty(subtitleFileName)) + { + return; + } + + var ext = Path.GetExtension(subtitleFileName).ToLowerInvariant(); + if (SubtitleFormat.AllSubtitleFormats.Any(p => p.Extension == ext) && File.Exists(subtitleFileName)) + { + var batchVideoAndSub = CreateBatchItem(subtitleFileName); + var listViewItem = new ListViewItem(subtitleFileName) { Tag = batchVideoAndSub }; + var s = Utilities.FormatBytesToDisplayFileSize(batchVideoAndSub.SubtitleFileFileSizeInBytes); + listViewItem.SubItems.Add(s); + listViewItem.SubItems.Add(string.Empty); // status + listViewBatch.Items.Add(listViewItem); + _batchItems.Add(batchVideoAndSub); + } + } + + private static BatchItem CreateBatchItem(string subtitleFileName) + { + var batchVideoAndSub = new BatchItem + { + SubtitleFileName = subtitleFileName, + SubtitleFileFileSizeInBytes = new FileInfo(subtitleFileName).Length + }; + + return batchVideoAndSub; + } + + public class BatchItem + { + public string SubtitleFileName { get; set; } + public long SubtitleFileFileSizeInBytes { get; set; } + } + + private void buttonClear_Click(object sender, EventArgs e) + { + ClearBatchItems(); + } + + private void buttonRemoveFile_Click(object sender, EventArgs e) + { + RemoveSelectedBatchItems(); + } + + private void ClearBatchItems() + { + listViewBatch.Items.Clear(); + _batchItems.Clear(); + } + + private void RemoveSelectedBatchItems() + { + var indices = new List(); + foreach (int i in listViewBatch.SelectedIndices) + { + indices.Add(i); + } + + if (indices.Count == 0) + { + return; + } + + indices = indices.OrderByDescending(p => p).ToList(); + var currentIndex = indices.Min(); + foreach (var i in indices) + { + listViewBatch.Items.RemoveAt(i); + _batchItems.RemoveAt(i); + } + + var newIdx = currentIndex; + if (currentIndex >= _batchItems.Count - 1) + { + newIdx = _batchItems.Count - 1; + } + + if (listViewBatch.Items.Count > 0) + { + listViewBatch.Items[newIdx].Selected = true; + listViewBatch.Items[newIdx].Focused = true; + } + } + + private void addFilesToolStripMenuItem_Click(object sender, EventArgs e) + { + buttonAddFile_Click(null, null); + } + + private void deleteToolStripMenuItem_Click(object sender, EventArgs e) + { + RemoveSelectedBatchItems(); + } + + private void clearToolStripMenuItem_Click(object sender, EventArgs e) + { + ClearBatchItems(); + } + + private void buttonPreview_Click(object sender, EventArgs e) + { + try + { + Cursor = Cursors.WaitCursor; + + var subtitle = new Subtitle(_assaSubtitle); + _log = new StringBuilder(); + + if (!_isAssa) + { + SetStyleForNonAssa(subtitle); + } + + FixRightToLeft(subtitle); + + var p = subtitle.Paragraphs.FirstOrDefault(); + subtitle.Paragraphs.Clear(); + if (p == null) + { + p = new Paragraph("This is a sample text.", 0, 0); + } + subtitle.Paragraphs.Add(p); + p.StartTime.TotalMilliseconds = 0; + p.EndTime.TotalMilliseconds = 3_000; + if (HtmlUtil.RemoveHtmlTags(p.Text, true).Length < 2) + { + p.Text = "This is a sample text."; + } + + var format = new AdvancedSubStationAlpha(); + var assaTempFileName = GetAssaFileName(subtitle.FileName); + + if (Configuration.Settings.General.CurrentVideoIsSmpte && comboBoxFrameRate.Text.Contains(".", StringComparison.Ordinal)) + { + foreach (var assaP in subtitle.Paragraphs) + { + assaP.StartTime.TotalMilliseconds *= 1.001; + assaP.EndTime.TotalMilliseconds *= 1.001; + } + } + + FileUtil.WriteAllText(assaTempFileName, format.ToText(subtitle, null), new TextEncoding(Encoding.UTF8, "UTF8")); + + var videoFileName = Path.Combine(Path.GetTempPath(), $"{Guid.NewGuid()}.mp4"); + var result = RunOnePassEncoding(assaTempFileName, subtitle, videoFileName); + labelPleaseWait.Text = string.Empty; + labelProgress.Text = string.Empty; + if (result) + { + try + { + var bmpFileName = VideoPreviewGenerator.GetScreenShot(videoFileName, "00:00:01"); + using (var bmp = new Bitmap(bmpFileName)) + { + using (var form = new ExportPngXmlPreview(bmp)) + { + form.AllowNext = false; + form.AllowPrevious = false; + form.ShowDialog(this); + } + } + + try + { + File.Delete(videoFileName); + File.Delete(bmpFileName); + } + catch + { + // ignore + } + } + catch + { + UiUtil.OpenFile(videoFileName); + } + } + } + finally + { + Cursor = Cursors.Default; + } + } + + private void buttonOutputFileSettings_Click(object sender, EventArgs e) + { + using (var form = new GenerateVideoWithHardSubsOutFile()) + { + form.ShowDialog(this); + + ShowLabelOutput(); + } + } + + private void ShowLabelOutput() + { + if (!BatchMode) + { + nikseLabelOutputFileFolder.Visible = false; + linkLabelSourceFolder.Visible = false; + return; + } + + nikseLabelOutputFileFolder.Left = buttonOutputFileSettings.Right + 3; + linkLabelSourceFolder.Left = buttonOutputFileSettings.Right + 3; + + if (Configuration.Settings.Tools.GenVideoUseOutputFolder) + { + linkLabelSourceFolder.Text = Configuration.Settings.Tools.GenVideoOutputFolder; + linkLabelSourceFolder.Visible = true; + nikseLabelOutputFileFolder.Visible = false; + } + else + { + nikseLabelOutputFileFolder.Text = LanguageSettings.Current.BatchConvert.SaveInSourceFolder; + linkLabelSourceFolder.Visible = false; + nikseLabelOutputFileFolder.Visible = true; + } + } + + private void linkLabelSourceFolder_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + var path = linkLabelSourceFolder.Text; + + if (!Directory.Exists(path)) + { + try + { + Directory.CreateDirectory(path); + } + catch + { + return; + } + } + + UiUtil.OpenFolder(linkLabelSourceFolder.Text); + } + + private void listViewBatch_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Delete) + { + RemoveSelectedBatchItems(); + e.SuppressKeyPress = true; + } + } + + private void listViewBatch_ColumnClick(object sender, ColumnClickEventArgs e) + { + if (_converting || listViewBatch.Items.Count == 0) + { + return; + } + + for (var i = 0; i < listViewBatch.Columns.Count; i++) + { + ListViewSorter.SetSortArrow(listViewBatch.Columns[i], SortOrder.None); + } + + var lv = (ListView)sender; + if (!(lv.ListViewItemSorter is ListViewSorter sorter)) + { + sorter = new ListViewSorter + { + ColumnNumber = e.Column, + IsDisplayFileSize = e.Column == ListViewBatchSubItemIndexColumnSubtitleSize + 1, + }; + lv.ListViewItemSorter = sorter; + } + + if (e.Column == sorter.ColumnNumber) + { + sorter.Descending = !sorter.Descending; // inverse sort direction + } + else + { + sorter.ColumnNumber = e.Column; + sorter.Descending = false; + sorter.IsDisplayFileSize = e.Column == ListViewBatchSubItemIndexColumnSubtitleSize + 1; + } + + lv.Sort(); + + ListViewSorter.SetSortArrow(listViewBatch.Columns[e.Column], sorter.Descending ? SortOrder.Descending : SortOrder.Ascending); + + _batchItems.Clear(); + foreach (ListViewItem item in listViewBatch.Items) + { + _batchItems.Add((BatchItem)item.Tag); + } + } + + private void listViewBatch_DragDrop(object sender, DragEventArgs e) + { + if (_converting) + { + return; + } + + var fileNames = (string[])e.Data.GetData(DataFormats.FileDrop); + labelPleaseWait.Visible = true; + + TaskDelayHelper.RunDelayed(TimeSpan.FromMilliseconds(5), () => + { + try + { + Cursor = Cursors.WaitCursor; + foreach (var fileName in fileNames) + { + if (FileUtil.IsDirectory(fileName)) + { + SearchFolder(fileName); + } + else + { + Application.DoEvents(); + AddInputFile(fileName); + } + } + } + finally + { + Cursor = Cursors.Default; + labelPleaseWait.Visible = false; + } + }); + } + + private void SearchFolder(string path) + { + _abort = false; + foreach (var fileName in Directory.EnumerateFiles(path)) + { + AddInputFile(fileName); + } + } + + private void listViewBatch_DragEnter(object sender, DragEventArgs e) + { + if (_converting) + { + e.Effect = DragDropEffects.None; + return; + } + + if (e.Data.GetDataPresent(DataFormats.FileDrop, false)) + { + e.Effect = DragDropEffects.All; + } + } + + private void buttonCutFrom_Click(object sender, EventArgs e) + { + using (var openFileDialog1 = new OpenFileDialog()) + { + openFileDialog1.Title = LanguageSettings.Current.General.OpenVideoFileTitle; + openFileDialog1.FileName = string.Empty; + openFileDialog1.Filter = UiUtil.GetVideoFileFilter(true); + + openFileDialog1.FileName = string.Empty; + if (openFileDialog1.ShowDialog() == DialogResult.OK) + { + var videoInfo = UiUtil.GetVideoInfo(openFileDialog1.FileName); + var timeSpan = new TimeSpan((int)numericUpDownCutFromHours.Value, (int)numericUpDownCutFromMinutes.Value, (int)numericUpDownCutFromSeconds.Value); + using (var form = new GetVideoPosition(_assaSubtitle, openFileDialog1.FileName, videoInfo, timeSpan, LanguageSettings.Current.GenerateVideoWithBurnedInSubs.GetStartPosition)) + { + if (form.ShowDialog(this) == DialogResult.OK) + { + numericUpDownCutFromHours.Value = form.VideoPosition.Hours; + numericUpDownCutFromMinutes.Value = form.VideoPosition.Minutes; + numericUpDownCutFromSeconds.Value = form.VideoPosition.Seconds; + } + } + } + } + } + + private void buttonCutTo_Click(object sender, EventArgs e) + { + using (var openFileDialog1 = new OpenFileDialog()) + { + openFileDialog1.Title = LanguageSettings.Current.General.OpenVideoFileTitle; + openFileDialog1.FileName = string.Empty; + openFileDialog1.Filter = UiUtil.GetVideoFileFilter(true); + + openFileDialog1.FileName = string.Empty; + if (openFileDialog1.ShowDialog() == DialogResult.OK) + { + var videoInfo = UiUtil.GetVideoInfo(openFileDialog1.FileName); + var timeSpan = new TimeSpan((int)numericUpDownCutFromHours.Value, (int)numericUpDownCutToMinutes.Value, (int)numericUpDownCutFromSeconds.Value); + using (var form = new GetVideoPosition(_assaSubtitle, openFileDialog1.FileName, videoInfo, timeSpan, LanguageSettings.Current.GenerateVideoWithBurnedInSubs.GetEndPosition)) + { + if (form.ShowDialog(this) == DialogResult.OK) + { + numericUpDownCutToHours.Value = form.VideoPosition.Hours; + numericUpDownCutToMinutes.Value = form.VideoPosition.Minutes; + numericUpDownCutToSeconds.Value = form.VideoPosition.Seconds; + } + } + } + } + } } } + diff --git a/src/ui/Forms/Main.cs b/src/ui/Forms/Main.cs index b694fa865..5f62deba7 100644 --- a/src/ui/Forms/Main.cs +++ b/src/ui/Forms/Main.cs @@ -36907,12 +36907,6 @@ namespace Nikse.SubtitleEdit.Forms private void generaeTransparentVideoWithSubtitleToolStripMenuItem_Click(object sender, EventArgs e) { - if (!IsSubtitleLoaded) - { - DisplaySubtitleNotLoadedMessage(); - return; - } - if (!RequireFfmpegOk()) { return;