mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-25 12:44:46 +01:00
Work on #8272
This commit is contained in:
parent
2ffed9b2b9
commit
6947faeba2
952
src/ui/Forms/GenerateVideoWithHardSubs.Designer.cs
generated
952
src/ui/Forms/GenerateVideoWithHardSubs.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@ -42,6 +42,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
public bool BatchMode { get; set; }
|
public bool BatchMode { get; set; }
|
||||||
public string BatchInfo { get; set; }
|
public string BatchInfo { get; set; }
|
||||||
private readonly List<BatchVideoAndSub> _batchVideoAndSubList;
|
private readonly List<BatchVideoAndSub> _batchVideoAndSubList;
|
||||||
|
private const int ListViewBatchSubItemIndexColumnVideoSize = 2;
|
||||||
private const int ListViewBatchSubItemIndexColumnSubtitleFile = 3;
|
private const int ListViewBatchSubItemIndexColumnSubtitleFile = 3;
|
||||||
private const int ListViewBatchSubItemIndexColumnStatus = 4;
|
private const int ListViewBatchSubItemIndexColumnStatus = 4;
|
||||||
|
|
||||||
@ -2109,11 +2110,25 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Cursor = Cursors.WaitCursor;
|
||||||
|
Application.DoEvents();
|
||||||
|
for (var i = 0; i < listViewBatch.Columns.Count; i++)
|
||||||
|
{
|
||||||
|
ListViewSorter.SetSortArrow(listViewBatch.Columns[i], SortOrder.None);
|
||||||
|
}
|
||||||
|
|
||||||
foreach (var fileName in openFileDialog1.FileNames)
|
foreach (var fileName in openFileDialog1.FileNames)
|
||||||
{
|
{
|
||||||
AddInputFile(fileName);
|
AddInputFile(fileName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
Cursor = Cursors.Default;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AddInputFile(string fileName)
|
private void AddInputFile(string fileName)
|
||||||
@ -2163,9 +2178,9 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
item.SubtitleFileFileSizeInBytes = new FileInfo(subFileName).Length;
|
item.SubtitleFileFileSizeInBytes = new FileInfo(subFileName).Length;
|
||||||
}
|
}
|
||||||
|
|
||||||
var width = 0;
|
|
||||||
var height = 0;
|
|
||||||
var mediaInfo = FfmpegMediaInfo.Parse(fileName);
|
var mediaInfo = FfmpegMediaInfo.Parse(fileName);
|
||||||
|
int width;
|
||||||
|
int height;
|
||||||
if (mediaInfo.VideoWidth > 0 && mediaInfo.VideoHeight > 0)
|
if (mediaInfo.VideoWidth > 0 && mediaInfo.VideoHeight > 0)
|
||||||
{
|
{
|
||||||
width = mediaInfo.VideoWidth;
|
width = mediaInfo.VideoWidth;
|
||||||
@ -2390,9 +2405,42 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
useSourceResolutionToolStripMenuItem.Visible = BatchMode;
|
useSourceResolutionToolStripMenuItem.Visible = BatchMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void nikseLabelOutputFileFolder_Click(object sender, EventArgs e)
|
private void listViewBatch_ColumnClick(object sender, ColumnClickEventArgs e)
|
||||||
{
|
{
|
||||||
|
if (_converting || listViewBatch.Items.Count == 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var lv = (ListView)sender;
|
||||||
|
if (!(lv.ListViewItemSorter is ListViewSorter sorter))
|
||||||
|
{
|
||||||
|
sorter = new ListViewSorter
|
||||||
|
{
|
||||||
|
ColumnNumber = e.Column,
|
||||||
|
IsDisplayFileSize = e.Column == ListViewBatchSubItemIndexColumnVideoSize,
|
||||||
|
};
|
||||||
|
lv.ListViewItemSorter = sorter;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (e.Column == sorter.ColumnNumber)
|
||||||
|
{
|
||||||
|
sorter.Descending = !sorter.Descending; // inverse sort direction
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sorter.ColumnNumber = e.Column;
|
||||||
|
}
|
||||||
|
|
||||||
|
lv.Sort();
|
||||||
|
|
||||||
|
ListViewSorter.SetSortArrow(listViewBatch.Columns[e.Column], sorter.Descending ? SortOrder.Descending : SortOrder.Ascending);
|
||||||
|
|
||||||
|
_batchVideoAndSubList.Clear();
|
||||||
|
foreach (ListViewItem item in listViewBatch.Items)
|
||||||
|
{
|
||||||
|
_batchVideoAndSubList.Add((BatchVideoAndSub)item.Tag);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user