mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-25 04:33:04 +01:00
parent
6fadc4a81f
commit
e85d51d95d
@ -481,6 +481,9 @@ namespace Nikse.SubtitleEdit.Core.Common
|
||||
public string GenVideoEmbedOutputSuffix { get; set; }
|
||||
public string GenVideoEmbedOutputReplace { get; set; }
|
||||
public bool GenVideoDeleteInputVideoFile { get; set; }
|
||||
public bool GenVideoUseOutputFolder { get; set; }
|
||||
public string GenVideoOutputFolder { get; set; }
|
||||
public string GenVideoOutputFileSuffix { get; set; }
|
||||
|
||||
public bool VoskPostProcessing { get; set; }
|
||||
public string VoskModel { get; set; }
|
||||
@ -734,6 +737,7 @@ namespace Nikse.SubtitleEdit.Core.Common
|
||||
GenVideoNonAssaTextColor = Color.White;
|
||||
GenVideoEmbedOutputSuffix = "embed";
|
||||
GenVideoEmbedOutputReplace = "embed" + Environment.NewLine + "SoftSub" + Environment.NewLine + "SoftSubbed";
|
||||
GenVideoOutputFileSuffix = "_new";
|
||||
VoskPostProcessing = true;
|
||||
WhisperChoice = Configuration.IsRunningOnWindows ? AudioToText.WhisperChoice.PurfviewFasterWhisper : AudioToText.WhisperChoice.OpenAi;
|
||||
WhisperDeleteTempFiles = true;
|
||||
@ -7183,6 +7187,24 @@ $HorzAlign = Center
|
||||
settings.Tools.GenVideoDeleteInputVideoFile = Convert.ToBoolean(subNode.InnerText, CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
subNode = node.SelectSingleNode("GenVideoUseOutputFolder");
|
||||
if (subNode != null)
|
||||
{
|
||||
settings.Tools.GenVideoUseOutputFolder = Convert.ToBoolean(subNode.InnerText, CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
subNode = node.SelectSingleNode("GenVideoOutputFolder");
|
||||
if (subNode != null)
|
||||
{
|
||||
settings.Tools.GenVideoOutputFolder = subNode.InnerText;
|
||||
}
|
||||
|
||||
subNode = node.SelectSingleNode("GenVideoOutputFileSuffix");
|
||||
if (subNode != null)
|
||||
{
|
||||
settings.Tools.GenVideoOutputFileSuffix = subNode.InnerText;
|
||||
}
|
||||
|
||||
|
||||
subNode = node.SelectSingleNode("VoskPostProcessing");
|
||||
if (subNode != null)
|
||||
@ -12283,6 +12305,9 @@ $HorzAlign = Center
|
||||
textWriter.WriteElementString("GenVideoEmbedOutputSuffix", settings.Tools.GenVideoEmbedOutputSuffix);
|
||||
textWriter.WriteElementString("GenVideoEmbedOutputReplace", settings.Tools.GenVideoEmbedOutputReplace);
|
||||
textWriter.WriteElementString("GenVideoDeleteInputVideoFile", settings.Tools.GenVideoDeleteInputVideoFile.ToString(CultureInfo.InvariantCulture));
|
||||
textWriter.WriteElementString("GenVideoUseOutputFolder", settings.Tools.GenVideoUseOutputFolder.ToString(CultureInfo.InvariantCulture));
|
||||
textWriter.WriteElementString("GenVideoOutputFileSuffix", settings.Tools.GenVideoOutputFolder);
|
||||
textWriter.WriteElementString("GenVideoOutputFileSuffix", settings.Tools.GenVideoOutputFileSuffix);
|
||||
textWriter.WriteElementString("VoskPostProcessing", settings.Tools.VoskPostProcessing.ToString(CultureInfo.InvariantCulture));
|
||||
textWriter.WriteElementString("VoskModel", settings.Tools.VoskModel);
|
||||
textWriter.WriteElementString("WhisperChoice", settings.Tools.WhisperChoice);
|
||||
|
1000
src/ui/Forms/GenerateVideoWithHardSubs.Designer.cs
generated
1000
src/ui/Forms/GenerateVideoWithHardSubs.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@ -314,8 +314,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
buttonRemoveFile.Visible = BatchMode;
|
||||
buttonClear.Visible = BatchMode;
|
||||
buttonAddFile.Visible = BatchMode;
|
||||
nikseLabelSuffix.Visible = BatchMode;
|
||||
nikseTextBoxSuffix.Visible = BatchMode;
|
||||
buttonOutputFileSettings.Visible = BatchMode;
|
||||
|
||||
var audioTracks = _mediaInfo.Tracks.Where(p => p.TrackType == FfmpegTrackType.Audio).ToList();
|
||||
useSourceResoluton0x0ToolStripMenuItem.Visible = BatchMode;
|
||||
@ -468,14 +467,21 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
}
|
||||
|
||||
var path = Path.GetDirectoryName(videoAndSub.VideoFileName);
|
||||
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(videoAndSub.VideoFileName);
|
||||
var ext = Path.GetExtension(videoAndSub.VideoFileName);
|
||||
VideoFileName = Path.Combine(path, $"{nameNoExt.TrimEnd('.', '.')}{nikseTextBoxSuffix.Text}{ext}");
|
||||
VideoFileName = Path.Combine(path, $"{nameNoExt.TrimEnd('.', '.')}{Configuration.Settings.Tools.GenVideoOutputFileSuffix}{ext}");
|
||||
if (File.Exists(VideoFileName))
|
||||
{
|
||||
for (var i = 2; i < int.MaxValue; i++)
|
||||
{
|
||||
VideoFileName = Path.Combine(path, $"{nameNoExt.TrimEnd('.', '.')}{nikseTextBoxSuffix.Text}_{i}{ext}");
|
||||
VideoFileName = Path.Combine(path, $"{nameNoExt.TrimEnd('.', '.')}{Configuration.Settings.Tools.GenVideoOutputFileSuffix}_{i}{ext}");
|
||||
if (!File.Exists(VideoFileName))
|
||||
{
|
||||
break;
|
||||
@ -2001,8 +2007,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
buttonAddFile.Visible = BatchMode;
|
||||
buttonRemoveFile.Visible = BatchMode;
|
||||
buttonClear.Visible = BatchMode;
|
||||
nikseLabelSuffix.Visible = BatchMode;
|
||||
nikseTextBoxSuffix.Visible = BatchMode;
|
||||
buttonOutputFileSettings.Visible = BatchMode;
|
||||
buttonMode.Text = BatchMode
|
||||
? LanguageSettings.Current.Split.Basic
|
||||
: LanguageSettings.Current.AudioToText.BatchMode;
|
||||
@ -2249,5 +2254,13 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
_batchVideoAndSubList[i].SubtitleFileName = null;
|
||||
}
|
||||
}
|
||||
|
||||
private void buttonOutputFileSettings_Click(object sender, EventArgs e)
|
||||
{
|
||||
using (var form = new GenerateVideoWithHardSubsOutFile())
|
||||
{
|
||||
form.ShowDialog(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
183
src/ui/Forms/GenerateVideoWithHardSubsOutFile.Designer.cs
generated
Normal file
183
src/ui/Forms/GenerateVideoWithHardSubsOutFile.Designer.cs
generated
Normal file
@ -0,0 +1,183 @@
|
||||
namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
partial class GenerateVideoWithHardSubsOutFile
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.radioButtonSaveInOutputFolder = new System.Windows.Forms.RadioButton();
|
||||
this.linkLabelOpenOutputFolder = new System.Windows.Forms.LinkLabel();
|
||||
this.buttonChooseFolder = new System.Windows.Forms.Button();
|
||||
this.textBoxOutputFolder = new Nikse.SubtitleEdit.Controls.NikseTextBox();
|
||||
this.radioButtonSaveInSourceFolder = new System.Windows.Forms.RadioButton();
|
||||
this.labelSuffix = new System.Windows.Forms.Label();
|
||||
this.textBoxSuffix = new Nikse.SubtitleEdit.Controls.NikseTextBox();
|
||||
this.buttonCancel = new System.Windows.Forms.Button();
|
||||
this.buttonOK = new System.Windows.Forms.Button();
|
||||
this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// radioButtonSaveInOutputFolder
|
||||
//
|
||||
this.radioButtonSaveInOutputFolder.AutoSize = true;
|
||||
this.radioButtonSaveInOutputFolder.Location = new System.Drawing.Point(21, 54);
|
||||
this.radioButtonSaveInOutputFolder.Name = "radioButtonSaveInOutputFolder";
|
||||
this.radioButtonSaveInOutputFolder.Size = new System.Drawing.Size(154, 17);
|
||||
this.radioButtonSaveInOutputFolder.TabIndex = 6;
|
||||
this.radioButtonSaveInOutputFolder.Text = "Save in output folder below";
|
||||
this.radioButtonSaveInOutputFolder.UseVisualStyleBackColor = true;
|
||||
this.radioButtonSaveInOutputFolder.CheckedChanged += new System.EventHandler(this.radioButtonSaveInOutputFolder_CheckedChanged);
|
||||
//
|
||||
// linkLabelOpenOutputFolder
|
||||
//
|
||||
this.linkLabelOpenOutputFolder.AutoSize = true;
|
||||
this.linkLabelOpenOutputFolder.Location = new System.Drawing.Point(368, 83);
|
||||
this.linkLabelOpenOutputFolder.Name = "linkLabelOpenOutputFolder";
|
||||
this.linkLabelOpenOutputFolder.Size = new System.Drawing.Size(42, 13);
|
||||
this.linkLabelOpenOutputFolder.TabIndex = 9;
|
||||
this.linkLabelOpenOutputFolder.TabStop = true;
|
||||
this.linkLabelOpenOutputFolder.Text = "Open...";
|
||||
this.linkLabelOpenOutputFolder.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabelOpenOutputFolder_LinkClicked);
|
||||
//
|
||||
// buttonChooseFolder
|
||||
//
|
||||
this.buttonChooseFolder.Enabled = false;
|
||||
this.buttonChooseFolder.Location = new System.Drawing.Point(336, 78);
|
||||
this.buttonChooseFolder.Name = "buttonChooseFolder";
|
||||
this.buttonChooseFolder.Size = new System.Drawing.Size(26, 23);
|
||||
this.buttonChooseFolder.TabIndex = 8;
|
||||
this.buttonChooseFolder.Text = "...";
|
||||
this.buttonChooseFolder.UseVisualStyleBackColor = true;
|
||||
this.buttonChooseFolder.Click += new System.EventHandler(this.buttonChooseFolder_Click);
|
||||
//
|
||||
// textBoxOutputFolder
|
||||
//
|
||||
this.textBoxOutputFolder.Enabled = false;
|
||||
this.textBoxOutputFolder.FocusedColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(120)))), ((int)(((byte)(215)))));
|
||||
this.textBoxOutputFolder.Location = new System.Drawing.Point(28, 81);
|
||||
this.textBoxOutputFolder.Name = "textBoxOutputFolder";
|
||||
this.textBoxOutputFolder.Size = new System.Drawing.Size(302, 20);
|
||||
this.textBoxOutputFolder.TabIndex = 7;
|
||||
//
|
||||
// radioButtonSaveInSourceFolder
|
||||
//
|
||||
this.radioButtonSaveInSourceFolder.AutoSize = true;
|
||||
this.radioButtonSaveInSourceFolder.Checked = true;
|
||||
this.radioButtonSaveInSourceFolder.Location = new System.Drawing.Point(21, 23);
|
||||
this.radioButtonSaveInSourceFolder.Name = "radioButtonSaveInSourceFolder";
|
||||
this.radioButtonSaveInSourceFolder.Size = new System.Drawing.Size(141, 17);
|
||||
this.radioButtonSaveInSourceFolder.TabIndex = 5;
|
||||
this.radioButtonSaveInSourceFolder.TabStop = true;
|
||||
this.radioButtonSaveInSourceFolder.Text = "Save in source file folder";
|
||||
this.radioButtonSaveInSourceFolder.UseVisualStyleBackColor = true;
|
||||
this.radioButtonSaveInSourceFolder.CheckedChanged += new System.EventHandler(this.radioButtonSaveInSourceFolder_CheckedChanged);
|
||||
//
|
||||
// labelSuffix
|
||||
//
|
||||
this.labelSuffix.AutoSize = true;
|
||||
this.labelSuffix.Location = new System.Drawing.Point(21, 135);
|
||||
this.labelSuffix.Name = "labelSuffix";
|
||||
this.labelSuffix.Size = new System.Drawing.Size(79, 13);
|
||||
this.labelSuffix.TabIndex = 11;
|
||||
this.labelSuffix.Text = "File name suffix";
|
||||
//
|
||||
// textBoxSuffix
|
||||
//
|
||||
this.textBoxSuffix.FocusedColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(120)))), ((int)(((byte)(215)))));
|
||||
this.textBoxSuffix.Location = new System.Drawing.Point(21, 151);
|
||||
this.textBoxSuffix.Name = "textBoxSuffix";
|
||||
this.textBoxSuffix.Size = new System.Drawing.Size(309, 20);
|
||||
this.textBoxSuffix.TabIndex = 12;
|
||||
//
|
||||
// buttonCancel
|
||||
//
|
||||
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(349, 214);
|
||||
this.buttonCancel.Name = "buttonCancel";
|
||||
this.buttonCancel.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonCancel.TabIndex = 105;
|
||||
this.buttonCancel.Text = "C&ancel";
|
||||
this.buttonCancel.UseVisualStyleBackColor = true;
|
||||
this.buttonCancel.Click += new System.EventHandler(this.buttonCancel_Click);
|
||||
//
|
||||
// buttonOK
|
||||
//
|
||||
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.buttonOK.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.buttonOK.Location = new System.Drawing.Point(268, 214);
|
||||
this.buttonOK.Name = "buttonOK";
|
||||
this.buttonOK.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonOK.TabIndex = 104;
|
||||
this.buttonOK.Text = "&OK";
|
||||
this.buttonOK.UseVisualStyleBackColor = true;
|
||||
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
|
||||
//
|
||||
// GenerateVideoWithHardSubsOutFile
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(436, 249);
|
||||
this.Controls.Add(this.buttonCancel);
|
||||
this.Controls.Add(this.buttonOK);
|
||||
this.Controls.Add(this.labelSuffix);
|
||||
this.Controls.Add(this.textBoxSuffix);
|
||||
this.Controls.Add(this.radioButtonSaveInOutputFolder);
|
||||
this.Controls.Add(this.linkLabelOpenOutputFolder);
|
||||
this.Controls.Add(this.buttonChooseFolder);
|
||||
this.Controls.Add(this.textBoxOutputFolder);
|
||||
this.Controls.Add(this.radioButtonSaveInSourceFolder);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.KeyPreview = true;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "GenerateVideoWithHardSubsOutFile";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "GenerateVideoWithHardSubsOutFile";
|
||||
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.GenerateVideoWithHardSubsOutFile_KeyDown);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.RadioButton radioButtonSaveInOutputFolder;
|
||||
private System.Windows.Forms.LinkLabel linkLabelOpenOutputFolder;
|
||||
private System.Windows.Forms.Button buttonChooseFolder;
|
||||
private Controls.NikseTextBox textBoxOutputFolder;
|
||||
private System.Windows.Forms.RadioButton radioButtonSaveInSourceFolder;
|
||||
private System.Windows.Forms.Label labelSuffix;
|
||||
private Controls.NikseTextBox textBoxSuffix;
|
||||
private System.Windows.Forms.Button buttonCancel;
|
||||
private System.Windows.Forms.Button buttonOK;
|
||||
private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
|
||||
}
|
||||
}
|
130
src/ui/Forms/GenerateVideoWithHardSubsOutFile.cs
Normal file
130
src/ui/Forms/GenerateVideoWithHardSubsOutFile.cs
Normal file
@ -0,0 +1,130 @@
|
||||
using Nikse.SubtitleEdit.Logic;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using Nikse.SubtitleEdit.Core.Common;
|
||||
|
||||
namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
public partial class GenerateVideoWithHardSubsOutFile : Form
|
||||
{
|
||||
public GenerateVideoWithHardSubsOutFile()
|
||||
{
|
||||
UiUtil.PreInitialize(this);
|
||||
InitializeComponent();
|
||||
UiUtil.FixFonts(this);
|
||||
|
||||
labelSuffix.Text = LanguageSettings.Current.Settings.Suffix;
|
||||
buttonOK.Text = LanguageSettings.Current.General.Ok;
|
||||
buttonCancel.Text = LanguageSettings.Current.General.Cancel;
|
||||
|
||||
if (string.IsNullOrEmpty(Configuration.Settings.Tools.GenVideoOutputFolder) || !Directory.Exists(Configuration.Settings.Tools.GenVideoOutputFolder))
|
||||
{
|
||||
textBoxOutputFolder.Text = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "Output");
|
||||
}
|
||||
else
|
||||
{
|
||||
textBoxOutputFolder.Text = Configuration.Settings.Tools.GenVideoOutputFolder;
|
||||
}
|
||||
|
||||
textBoxSuffix.Text = Configuration.Settings.Tools.GenVideoOutputFileSuffix;
|
||||
if (Configuration.Settings.Tools.GenVideoUseOutputFolder)
|
||||
{
|
||||
radioButtonSaveInOutputFolder.Checked = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
radioButtonSaveInSourceFolder.Checked = true;
|
||||
}
|
||||
|
||||
radioButtonSaveInSourceFolder_CheckedChanged(null, null);
|
||||
}
|
||||
|
||||
private void GenerateVideoWithHardSubsOutFile_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Escape)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
}
|
||||
}
|
||||
|
||||
private void buttonOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (radioButtonSaveInOutputFolder.Checked && string.IsNullOrWhiteSpace(textBoxOutputFolder.Text))
|
||||
{
|
||||
MessageBox.Show("Please choose output folder");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
if (!Directory.Exists(textBoxOutputFolder.Text))
|
||||
{
|
||||
Directory.CreateDirectory(textBoxOutputFolder.Text);
|
||||
}
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
MessageBox.Show("Please choose output folder" + Environment.NewLine + exception.Message);
|
||||
return;
|
||||
}
|
||||
|
||||
Configuration.Settings.Tools.GenVideoOutputFolder = textBoxOutputFolder.Text;
|
||||
Configuration.Settings.Tools.GenVideoOutputFileSuffix = textBoxSuffix.Text;
|
||||
Configuration.Settings.Tools.GenVideoUseOutputFolder = radioButtonSaveInOutputFolder.Checked;
|
||||
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
|
||||
private void buttonCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
}
|
||||
|
||||
private void buttonChooseFolder_Click(object sender, EventArgs e)
|
||||
{
|
||||
folderBrowserDialog1.ShowNewFolderButton = true;
|
||||
if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
textBoxOutputFolder.Text = folderBrowserDialog1.SelectedPath;
|
||||
}
|
||||
}
|
||||
|
||||
private void linkLabelOpenOutputFolder_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
if (!Directory.Exists(textBoxOutputFolder.Text))
|
||||
{
|
||||
try
|
||||
{
|
||||
Directory.CreateDirectory(textBoxOutputFolder.Text);
|
||||
}
|
||||
catch
|
||||
{
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
|
||||
if (Directory.Exists(textBoxOutputFolder.Text))
|
||||
{
|
||||
UiUtil.OpenFolder(textBoxOutputFolder.Text);
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show(string.Format(LanguageSettings.Current.SplitSubtitle.FolderNotFoundX, textBoxOutputFolder.Text));
|
||||
}
|
||||
}
|
||||
|
||||
private void radioButtonSaveInSourceFolder_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
textBoxOutputFolder.Enabled = !radioButtonSaveInSourceFolder.Checked;
|
||||
buttonChooseFolder.Enabled = !radioButtonSaveInSourceFolder.Checked;
|
||||
}
|
||||
|
||||
private void radioButtonSaveInOutputFolder_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
textBoxOutputFolder.Enabled = !radioButtonSaveInSourceFolder.Checked;
|
||||
buttonChooseFolder.Enabled = !radioButtonSaveInSourceFolder.Checked;
|
||||
}
|
||||
}
|
||||
}
|
123
src/ui/Forms/GenerateVideoWithHardSubsOutFile.resx
Normal file
123
src/ui/Forms/GenerateVideoWithHardSubsOutFile.resx
Normal file
@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="folderBrowserDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
@ -385,6 +385,12 @@
|
||||
<Compile Include="Forms\AudioToText\VoskModelDownload.Designer.cs">
|
||||
<DependentUpon>VoskModelDownload.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\GenerateVideoWithHardSubsOutFile.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\GenerateVideoWithHardSubsOutFile.Designer.cs">
|
||||
<DependentUpon>GenerateVideoWithHardSubsOutFile.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\GenerateVideoWithSoftSubsLanguage.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@ -1834,6 +1840,9 @@
|
||||
<EmbeddedResource Include="Forms\GenerateVideoFFmpegPrompt.resx">
|
||||
<DependentUpon>GenerateVideoFFmpegPrompt.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\GenerateVideoWithHardSubsOutFile.resx">
|
||||
<DependentUpon>GenerateVideoWithHardSubsOutFile.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\GenerateVideoWithSoftSubs.resx">
|
||||
<DependentUpon>GenerateVideoWithSoftSubs.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
Loading…
Reference in New Issue
Block a user