mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 03:02:35 +01:00
Add "Toggle forced" to binedit
This commit is contained in:
parent
a5707749dd
commit
359bab90bd
@ -257,6 +257,7 @@ Note: Do check free disk space.</WaveFileMalformed>
|
||||
<CenterSelectedLines>Center selected lines (horizontally, keep vertical position)</CenterSelectedLines>
|
||||
<TopAlignSelectedLines>Top align selected lines (keep horizontal position)</TopAlignSelectedLines>
|
||||
<BottomAlignSelectedLines>Bottom align selected lines (keep horizontal position)</BottomAlignSelectedLines>
|
||||
<ToggleForcedSelectedLines>Toggle "Forced" for selected lines</ToggleForcedSelectedLines>
|
||||
<SizeXY>Size: {0}x{1}</SizeXY>
|
||||
<SetAspectRatio11>Set aspect ratio 1:1</SetAspectRatio11>
|
||||
<ChangeBrightnessTitle>Adjust brightness</ChangeBrightnessTitle>
|
||||
@ -2424,7 +2425,7 @@ Continue?</RestoreDefaultSettingsMsg>
|
||||
<WhiteSpaceCheckReport>Invalid white space found at column {0}.</WhiteSpaceCheckReport>
|
||||
<ReportPrompt>Please see full report here: {0}.</ReportPrompt>
|
||||
<OpenReportInFolder>Open report in folder</OpenReportInFolder>
|
||||
<FoundXIssues>Netflix quality check found {0:#,###} issues.</FoundXIssues>
|
||||
<FoundXIssues>Netflix quality check found {0:#,##0} issues.</FoundXIssues>
|
||||
<CheckOk>Netflix quality check OK :)</CheckOk>
|
||||
<MaximumXCharsPerSecond>Maximum {0} characters per second (incl. white spaces)</MaximumXCharsPerSecond>
|
||||
<MaximumLineLength>Maximum line length ({0})</MaximumLineLength>
|
||||
|
16
src/ui/Forms/BinaryEdit/BinEdit.Designer.cs
generated
16
src/ui/Forms/BinaryEdit/BinEdit.Designer.cs
generated
@ -62,6 +62,7 @@ namespace Nikse.SubtitleEdit.Forms.BinaryEdit
|
||||
this.centerSelectedLineshorizontallyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.topAlignSelectedLinesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.bottomAlignSelectedLinesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toggleforcedForSelectedLinesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.resizeImagesForSelectedLinesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.colorSelectedLinesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
@ -270,7 +271,9 @@ namespace Nikse.SubtitleEdit.Forms.BinaryEdit
|
||||
//
|
||||
this.timeUpDownEndTime.AutoSize = true;
|
||||
this.timeUpDownEndTime.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.timeUpDownEndTime.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(30)))), ((int)(((byte)(30)))));
|
||||
this.timeUpDownEndTime.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);
|
||||
this.timeUpDownEndTime.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(155)))), ((int)(((byte)(155)))), ((int)(((byte)(155)))));
|
||||
this.timeUpDownEndTime.Location = new System.Drawing.Point(74, 50);
|
||||
this.timeUpDownEndTime.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.timeUpDownEndTime.Name = "timeUpDownEndTime";
|
||||
@ -290,7 +293,9 @@ namespace Nikse.SubtitleEdit.Forms.BinaryEdit
|
||||
//
|
||||
this.timeUpDownStartTime.AutoSize = true;
|
||||
this.timeUpDownStartTime.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.timeUpDownStartTime.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(30)))), ((int)(((byte)(30)))), ((int)(((byte)(30)))));
|
||||
this.timeUpDownStartTime.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);
|
||||
this.timeUpDownStartTime.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(155)))), ((int)(((byte)(155)))), ((int)(((byte)(155)))));
|
||||
this.timeUpDownStartTime.Location = new System.Drawing.Point(74, 18);
|
||||
this.timeUpDownStartTime.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.timeUpDownStartTime.Name = "timeUpDownStartTime";
|
||||
@ -415,6 +420,7 @@ namespace Nikse.SubtitleEdit.Forms.BinaryEdit
|
||||
this.centerSelectedLineshorizontallyToolStripMenuItem,
|
||||
this.topAlignSelectedLinesToolStripMenuItem,
|
||||
this.bottomAlignSelectedLinesToolStripMenuItem,
|
||||
this.toggleforcedForSelectedLinesToolStripMenuItem,
|
||||
this.toolStripSeparator7,
|
||||
this.resizeImagesForSelectedLinesToolStripMenuItem,
|
||||
this.colorSelectedLinesToolStripMenuItem,
|
||||
@ -427,7 +433,7 @@ namespace Nikse.SubtitleEdit.Forms.BinaryEdit
|
||||
this.toolStripSeparatorInsertSub,
|
||||
this.insertSubtitleAfterThisLineToolStripMenuItem});
|
||||
this.contextMenuStripListView.Name = "contextMenuStripListView";
|
||||
this.contextMenuStripListView.Size = new System.Drawing.Size(377, 380);
|
||||
this.contextMenuStripListView.Size = new System.Drawing.Size(377, 402);
|
||||
this.contextMenuStripListView.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStripListView_Opening);
|
||||
//
|
||||
// deleteToolStripMenuItem
|
||||
@ -484,6 +490,13 @@ namespace Nikse.SubtitleEdit.Forms.BinaryEdit
|
||||
this.bottomAlignSelectedLinesToolStripMenuItem.Text = "Bottom align selected lines (keep horizontal position)";
|
||||
this.bottomAlignSelectedLinesToolStripMenuItem.Click += new System.EventHandler(this.bottomAlignSelectedLinesToolStripMenuItem_Click);
|
||||
//
|
||||
// toggleforcedForSelectedLinesToolStripMenuItem
|
||||
//
|
||||
this.toggleforcedForSelectedLinesToolStripMenuItem.Name = "toggleforcedForSelectedLinesToolStripMenuItem";
|
||||
this.toggleforcedForSelectedLinesToolStripMenuItem.Size = new System.Drawing.Size(376, 22);
|
||||
this.toggleforcedForSelectedLinesToolStripMenuItem.Text = "Toggle \"forced\" for selected lines";
|
||||
this.toggleforcedForSelectedLinesToolStripMenuItem.Click += new System.EventHandler(this.toggleforcedForSelectedLinesToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator7
|
||||
//
|
||||
this.toolStripSeparator7.Name = "toolStripSeparator7";
|
||||
@ -1048,5 +1061,6 @@ namespace Nikse.SubtitleEdit.Forms.BinaryEdit
|
||||
private System.Windows.Forms.ToolStripMenuItem changeBrightnessForSelectedLinesToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem changeAlphaToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem changeAlphaForSelectedLinesToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem toggleforcedForSelectedLinesToolStripMenuItem;
|
||||
}
|
||||
}
|
@ -245,6 +245,7 @@ namespace Nikse.SubtitleEdit.Forms.BinaryEdit
|
||||
centerSelectedLineshorizontallyToolStripMenuItem.Text = LanguageSettings.Current.BinEdit.CenterSelectedLines;
|
||||
topAlignSelectedLinesToolStripMenuItem.Text = LanguageSettings.Current.BinEdit.TopAlignSelectedLines;
|
||||
bottomAlignSelectedLinesToolStripMenuItem.Text = LanguageSettings.Current.BinEdit.BottomAlignSelectedLines;
|
||||
toggleforcedForSelectedLinesToolStripMenuItem.Text = LanguageSettings.Current.BinEdit.ToggleForcedSelectedLines;
|
||||
resizeImagesForSelectedLinesToolStripMenuItem.Text = LanguageSettings.Current.BinEdit.ResizeBitmapsForSelectedLines;
|
||||
colorSelectedLinesToolStripMenuItem.Text = LanguageSettings.Current.BinEdit.ChangeColorForSelectedLines;
|
||||
changeBrightnessForSelectedLinesToolStripMenuItem.Text = LanguageSettings.Current.BinEdit.ChangeBrightnessForSelectedLines;
|
||||
@ -798,7 +799,7 @@ namespace Nikse.SubtitleEdit.Forms.BinaryEdit
|
||||
var v = comboBoxFrameRate.Items[i].ToString();
|
||||
if (decimal.TryParse(v, NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out var n))
|
||||
{
|
||||
if (Math.Abs(frameRate -n) < 0.01m)
|
||||
if (Math.Abs(frameRate - n) < 0.01m)
|
||||
{
|
||||
comboBoxFrameRate.SelectedIndex = i;
|
||||
return;
|
||||
@ -2798,5 +2799,35 @@ namespace Nikse.SubtitleEdit.Forms.BinaryEdit
|
||||
{
|
||||
ChangeAlpha(true);
|
||||
}
|
||||
|
||||
private void toggleforcedForSelectedLinesToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (subtitleListView1.SelectedItems.Count < 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var idx = subtitleListView1.SelectedItems[0].Index;
|
||||
var selectedIndices = GetIndices(true);
|
||||
var first = true;
|
||||
var toggleValue = true;
|
||||
foreach (var i in selectedIndices)
|
||||
{
|
||||
var sub = _binSubtitles[i];
|
||||
var extra = _extra[i];
|
||||
|
||||
if (first)
|
||||
{
|
||||
toggleValue = !extra.IsForced;
|
||||
first = false;
|
||||
}
|
||||
|
||||
extra.IsForced = toggleValue;
|
||||
if (i == idx)
|
||||
{
|
||||
checkBoxIsForced.Checked = extra.IsForced;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -402,6 +402,7 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
CenterSelectedLines = "Center selected lines (horizontally, keep vertical position)",
|
||||
TopAlignSelectedLines = "Top align selected lines (keep horizontal position)",
|
||||
BottomAlignSelectedLines = "Bottom align selected lines (keep horizontal position)",
|
||||
ToggleForcedSelectedLines = "Toggle \"Forced\" for selected lines",
|
||||
SizeXY = "Size: {0}x{1}",
|
||||
SetAspectRatio11 = "Set aspect ratio 1:1",
|
||||
ChangeBrightnessTitle = "Adjust brightness",
|
||||
|
@ -700,6 +700,9 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
case "BinEdit/BottomAlignSelectedLines":
|
||||
language.BinEdit.BottomAlignSelectedLines = reader.Value;
|
||||
break;
|
||||
case "BinEdit/ToggleForcedSelectedLines":
|
||||
language.BinEdit.ToggleForcedSelectedLines = reader.Value;
|
||||
break;
|
||||
case "BinEdit/SizeXY":
|
||||
language.BinEdit.SizeXY = reader.Value;
|
||||
break;
|
||||
|
@ -271,6 +271,7 @@
|
||||
public string CenterSelectedLines { get; set; }
|
||||
public string TopAlignSelectedLines { get; set; }
|
||||
public string BottomAlignSelectedLines { get; set; }
|
||||
public string ToggleForcedSelectedLines { get; set; }
|
||||
public string SizeXY { get; set; }
|
||||
public string SetAspectRatio11 { get; set; }
|
||||
public string ChangeBrightnessTitle { get; set; }
|
||||
|
Loading…
Reference in New Issue
Block a user