mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 03:02:35 +01:00
Work on #8334
This commit is contained in:
parent
31e92dcfbc
commit
7e623130e6
@ -1020,6 +1020,8 @@ We leverage the intrinsic rhythm of the image.</CreateSimpleChainingToolTip>
|
||||
<AlignRight>Align right</AlignRight>
|
||||
<GetStartPosition>Get start position</GetStartPosition>
|
||||
<GetEndPosition>Get end position</GetEndPosition>
|
||||
<UseSource>Use source</UseSource>
|
||||
<UseSourceResolution>Use source resolution</UseSourceResolution>
|
||||
</GenerateVideoWithBurnedInSubs>
|
||||
<GenerateVideoWithEmbeddedSubs>
|
||||
<Title>Generate video with added/removed embedded subtitles</Title>
|
||||
|
56
src/ui/Forms/GenerateVideoWithHardSubs.Designer.cs
generated
56
src/ui/Forms/GenerateVideoWithHardSubs.Designer.cs
generated
@ -37,6 +37,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
this.buttonCancel = new System.Windows.Forms.Button();
|
||||
this.timer1 = new System.Windows.Forms.Timer(this.components);
|
||||
this.groupBoxSettings = new System.Windows.Forms.GroupBox();
|
||||
this.videoPlayerContainer1 = new Nikse.SubtitleEdit.Controls.VideoPlayerContainer();
|
||||
this.buttonClear = new System.Windows.Forms.Button();
|
||||
this.panelForeColor = new System.Windows.Forms.Panel();
|
||||
this.nikseLabelOutputFileFolder = new System.Windows.Forms.Label();
|
||||
@ -109,7 +110,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.deleteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.clearToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.videoPlayerContainer1 = new Nikse.SubtitleEdit.Controls.VideoPlayerContainer();
|
||||
this.buttonOutputFileSettings = new System.Windows.Forms.Button();
|
||||
this.buttonPreview = new System.Windows.Forms.Button();
|
||||
this.linkLabelHelp = new System.Windows.Forms.LinkLabel();
|
||||
@ -239,6 +239,31 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
this.groupBoxSettings.TabStop = false;
|
||||
this.groupBoxSettings.Text = "Settings";
|
||||
//
|
||||
// videoPlayerContainer1
|
||||
//
|
||||
this.videoPlayerContainer1.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.videoPlayerContainer1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(18)))), ((int)(((byte)(18)))), ((int)(((byte)(18)))));
|
||||
this.videoPlayerContainer1.Chapters = null;
|
||||
this.videoPlayerContainer1.CurrentPosition = 0D;
|
||||
this.videoPlayerContainer1.FontSizeFactor = 1F;
|
||||
this.videoPlayerContainer1.LastParagraph = null;
|
||||
this.videoPlayerContainer1.Location = new System.Drawing.Point(430, 313);
|
||||
this.videoPlayerContainer1.Name = "videoPlayerContainer1";
|
||||
this.videoPlayerContainer1.ShowFullscreenButton = true;
|
||||
this.videoPlayerContainer1.ShowMuteButton = true;
|
||||
this.videoPlayerContainer1.ShowStopButton = true;
|
||||
this.videoPlayerContainer1.Size = new System.Drawing.Size(431, 226);
|
||||
this.videoPlayerContainer1.SubtitleText = "";
|
||||
this.videoPlayerContainer1.TabIndex = 110;
|
||||
this.videoPlayerContainer1.TextRightToLeft = System.Windows.Forms.RightToLeft.No;
|
||||
this.videoPlayerContainer1.UsingFrontCenterAudioChannelOnly = false;
|
||||
this.videoPlayerContainer1.VideoHeight = 0;
|
||||
this.videoPlayerContainer1.VideoPlayer = null;
|
||||
this.videoPlayerContainer1.VideoWidth = 0;
|
||||
this.videoPlayerContainer1.Volume = 0D;
|
||||
//
|
||||
// buttonClear
|
||||
//
|
||||
this.buttonClear.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
@ -1389,31 +1414,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
this.clearToolStripMenuItem.Text = "Clear";
|
||||
this.clearToolStripMenuItem.Click += new System.EventHandler(this.clearToolStripMenuItem_Click);
|
||||
//
|
||||
// videoPlayerContainer1
|
||||
//
|
||||
this.videoPlayerContainer1.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.videoPlayerContainer1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(18)))), ((int)(((byte)(18)))), ((int)(((byte)(18)))));
|
||||
this.videoPlayerContainer1.Chapters = null;
|
||||
this.videoPlayerContainer1.CurrentPosition = 0D;
|
||||
this.videoPlayerContainer1.FontSizeFactor = 1F;
|
||||
this.videoPlayerContainer1.LastParagraph = null;
|
||||
this.videoPlayerContainer1.Location = new System.Drawing.Point(430, 313);
|
||||
this.videoPlayerContainer1.Name = "videoPlayerContainer1";
|
||||
this.videoPlayerContainer1.ShowFullscreenButton = true;
|
||||
this.videoPlayerContainer1.ShowMuteButton = true;
|
||||
this.videoPlayerContainer1.ShowStopButton = true;
|
||||
this.videoPlayerContainer1.Size = new System.Drawing.Size(431, 226);
|
||||
this.videoPlayerContainer1.SubtitleText = "";
|
||||
this.videoPlayerContainer1.TabIndex = 110;
|
||||
this.videoPlayerContainer1.TextRightToLeft = System.Windows.Forms.RightToLeft.No;
|
||||
this.videoPlayerContainer1.UsingFrontCenterAudioChannelOnly = false;
|
||||
this.videoPlayerContainer1.VideoHeight = 0;
|
||||
this.videoPlayerContainer1.VideoPlayer = null;
|
||||
this.videoPlayerContainer1.VideoWidth = 0;
|
||||
this.videoPlayerContainer1.Volume = 0D;
|
||||
//
|
||||
// buttonOutputFileSettings
|
||||
//
|
||||
this.buttonOutputFileSettings.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
@ -1468,14 +1468,14 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
this.x352ToolStripMenuItem,
|
||||
this.x272ToolStripMenuItem});
|
||||
this.contextMenuStripRes.Name = "contextMenuStripRes";
|
||||
this.contextMenuStripRes.Size = new System.Drawing.Size(221, 356);
|
||||
this.contextMenuStripRes.Size = new System.Drawing.Size(221, 378);
|
||||
this.contextMenuStripRes.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStripRes_Opening);
|
||||
//
|
||||
// useSourceResolutionToolStripMenuItem
|
||||
//
|
||||
this.useSourceResolutionToolStripMenuItem.Name = "useSourceResolutionToolStripMenuItem";
|
||||
this.useSourceResolutionToolStripMenuItem.Size = new System.Drawing.Size(220, 22);
|
||||
this.useSourceResolutionToolStripMenuItem.Text = "Use source resoluton";
|
||||
this.useSourceResolutionToolStripMenuItem.Text = "Use source resolution";
|
||||
this.useSourceResolutionToolStripMenuItem.Click += new System.EventHandler(this.useSourceResolutionToolStripMenuItem_Click);
|
||||
//
|
||||
// x2160ToolStripMenuItem
|
||||
|
@ -106,6 +106,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
buttonRemoveFile.Text = LanguageSettings.Current.DvdSubRip.Remove;
|
||||
buttonClear.Text = LanguageSettings.Current.DvdSubRip.Clear;
|
||||
buttonAddFile.Text = LanguageSettings.Current.DvdSubRip.Add;
|
||||
useSourceResolutionToolStripMenuItem.Text = LanguageSettings.Current.GenerateVideoWithBurnedInSubs.UseSourceResolution;
|
||||
|
||||
progressBar1.Visible = false;
|
||||
labelPleaseWait.Visible = false;
|
||||
@ -1943,7 +1944,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
private void buttonCutTo_Click(object sender, EventArgs e)
|
||||
{
|
||||
var timeSpan = new TimeSpan((int)numericUpDownCutFromHours.Value, (int)numericUpDownCutToMinutes.Value, (int)numericUpDownCutFromSeconds.Value);
|
||||
using (var form = new GetVideoPosition(_assaSubtitle, _inputVideoFileName, _videoInfo, timeSpan, LanguageSettings.Current.GenerateVideoWithBurnedInSubs.GetStartPosition))
|
||||
using (var form = new GetVideoPosition(_assaSubtitle, _inputVideoFileName, _videoInfo, timeSpan, LanguageSettings.Current.GenerateVideoWithBurnedInSubs.GetEndPosition))
|
||||
{
|
||||
if (form.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
@ -2430,15 +2431,27 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
numericUpDownHeight.Visible = false;
|
||||
|
||||
labelX.Left = numericUpDownWidth.Left;
|
||||
labelX.Text = "Use source";
|
||||
if (BatchMode)
|
||||
{
|
||||
labelX.Text = LanguageSettings.Current.GenerateVideoWithBurnedInSubs.UseSource;
|
||||
|
||||
numericUpDownWidth.Value = 0;
|
||||
numericUpDownHeight.Value = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
labelX.Text = $"{LanguageSettings.Current.GenerateVideoWithBurnedInSubs.UseSource} ({_videoInfo.Width}x{_videoInfo.Height})";
|
||||
|
||||
numericUpDownWidth.Value = _videoInfo.Width;
|
||||
numericUpDownHeight.Value = _videoInfo.Height;
|
||||
}
|
||||
}
|
||||
|
||||
private void contextMenuStripRes_Opening(object sender, System.ComponentModel.CancelEventArgs e)
|
||||
{
|
||||
useSourceResolutionToolStripMenuItem.Visible = BatchMode;
|
||||
useSourceResolutionToolStripMenuItem.Visible =
|
||||
BatchMode ||
|
||||
(_videoInfo != null && !string.IsNullOrEmpty(_inputVideoFileName));
|
||||
}
|
||||
|
||||
private void listViewBatch_ColumnClick(object sender, ColumnClickEventArgs e)
|
||||
|
@ -1275,6 +1275,8 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
AlignRight = "Align right",
|
||||
GetStartPosition = "Get start position",
|
||||
GetEndPosition = "Get end position",
|
||||
UseSource = "Use source",
|
||||
UseSourceResolution = "Use source resolution",
|
||||
};
|
||||
|
||||
GenerateVideoWithEmbeddedSubs = new LanguageStructure.GenerateVideoWithEmbeddedSubs
|
||||
|
@ -2701,6 +2701,12 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
case "GenerateVideoWithBurnedInSubs/GetEndPosition":
|
||||
language.GenerateVideoWithBurnedInSubs.GetEndPosition = reader.Value;
|
||||
break;
|
||||
case "GenerateVideoWithBurnedInSubs/UseSource":
|
||||
language.GenerateVideoWithBurnedInSubs.UseSource = reader.Value;
|
||||
break;
|
||||
case "GenerateVideoWithBurnedInSubs/UseSourceResolution":
|
||||
language.GenerateVideoWithBurnedInSubs.UseSourceResolution = reader.Value;
|
||||
break;
|
||||
case "GenerateVideoWithEmbeddedSubs/Title":
|
||||
language.GenerateVideoWithEmbeddedSubs.Title = reader.Value;
|
||||
break;
|
||||
|
@ -1095,6 +1095,8 @@
|
||||
public string AlignRight { get; set; }
|
||||
public string GetStartPosition { get; set; }
|
||||
public string GetEndPosition { get; set; }
|
||||
public string UseSource { get; set; }
|
||||
public string UseSourceResolution { get; set; }
|
||||
}
|
||||
|
||||
public class GenerateVideoWithEmbeddedSubs
|
||||
|
Loading…
Reference in New Issue
Block a user