mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2025-02-01 05:21:40 +01:00
Add "Gap" (to next sub) custom list view column - thx Moisés :)
This commit is contained in:
parent
023eba1067
commit
418f7d3e3c
@ -27,6 +27,7 @@
|
||||
<CharsPerSec>Chars/sec</CharsPerSec>
|
||||
<WordsPerMin>Words/min</WordsPerMin>
|
||||
<Actor>Actor</Actor>
|
||||
<Gap>Gap</Gap>
|
||||
<Region>Region</Region>
|
||||
<NumberSymbol>#</NumberSymbol>
|
||||
<Number>Number</Number>
|
||||
@ -1737,7 +1738,6 @@ can edit in same subtitle file (collaboration)</Information>
|
||||
<RemoveBlankLinesWhenOpening>Remove blank lines when opening a subtitle</RemoveBlankLinesWhenOpening>
|
||||
<ShowLineBreaksAs>Show line breaks in list view as</ShowLineBreaksAs>
|
||||
<MainListViewDoubleClickAction>Double-clicking line in main window list view will</MainListViewDoubleClickAction>
|
||||
<MainListViewColumns>List view columns</MainListViewColumns>
|
||||
<MainListViewColumnsInfo>Choose visible list view columns</MainListViewColumnsInfo>
|
||||
<MainListViewNothing>Nothing</MainListViewNothing>
|
||||
<MainListViewVideoGoToPositionAndPause>Go to video position and pause</MainListViewVideoGoToPositionAndPause>
|
||||
@ -1865,6 +1865,10 @@ can edit in same subtitle file (collaboration)</Information>
|
||||
<AdjustStartDownEndUpAndGoToNext>Key down=set start, Key up=set end and go to next</AdjustStartDownEndUpAndGoToNext>
|
||||
<AdjustSelected100MsForward>Move selected lines 100 ms forward</AdjustSelected100MsForward>
|
||||
<AdjustSelected100MsBack>Move selected lines 100 ms back</AdjustSelected100MsBack>
|
||||
<AdjustStartXMsBack>Move start {0} ms back</AdjustStartXMsBack>
|
||||
<AdjustStartXMsForward>Move start {0} ms forward</AdjustStartXMsForward>
|
||||
<AdjustEndXMsBack>Move end {0} ms back</AdjustEndXMsBack>
|
||||
<AdjustEndXMsForward>Move end {0} ms forward</AdjustEndXMsForward>
|
||||
<AdjustSetStartTimeKeepDuration>Set start time, keep duration</AdjustSetStartTimeKeepDuration>
|
||||
<AdjustSetEndAndOffsetTheRest>Set end, offset the rest</AdjustSetEndAndOffsetTheRest>
|
||||
<AdjustSetEndAndOffsetTheRestAndGoToNext>Set end, offset the rest and go to next</AdjustSetEndAndOffsetTheRestAndGoToNext>
|
||||
|
@ -141,6 +141,7 @@ namespace Nikse.SubtitleEdit.Core
|
||||
CharsPerSec = "Chars/sec",
|
||||
WordsPerMin = "Words/min",
|
||||
Actor = "Actor",
|
||||
Gap = "Gap",
|
||||
Region = "Region",
|
||||
NumberSymbol = "#",
|
||||
Number = "Number",
|
||||
@ -2025,7 +2026,6 @@ can edit in same subtitle file (collaboration)",
|
||||
RemoveBlankLinesWhenOpening = "Remove blank lines when opening a subtitle",
|
||||
ShowLineBreaksAs = "Show line breaks in list view as",
|
||||
MainListViewDoubleClickAction = "Double-clicking line in main window list view will",
|
||||
MainListViewColumns = "List view columns",
|
||||
MainListViewColumnsInfo = "Choose visible list view columns",
|
||||
MainListViewNothing = "Nothing",
|
||||
MainListViewVideoGoToPositionAndPause = "Go to video position and pause",
|
||||
@ -2151,6 +2151,10 @@ can edit in same subtitle file (collaboration)",
|
||||
AdjustStartDownEndUpAndGoToNext = "Key down=set start, Key up=set end and go to next",
|
||||
AdjustSelected100MsForward = "Move selected lines 100 ms forward",
|
||||
AdjustSelected100MsBack = "Move selected lines 100 ms back",
|
||||
AdjustStartXMsBack = "Move start {0} ms back",
|
||||
AdjustStartXMsForward = "Move start {0} ms forward",
|
||||
AdjustEndXMsBack = "Move end {0} ms back",
|
||||
AdjustEndXMsForward = "Move end {0} ms forward",
|
||||
AdjustSetStartTimeKeepDuration = "Set start time, keep duration",
|
||||
AdjustSetEndAndOffsetTheRest = "Set end, offset the rest",
|
||||
AdjustSetEndAndOffsetTheRestAndGoToNext = "Set end, offset the rest and go to next",
|
||||
|
@ -130,6 +130,9 @@ namespace Nikse.SubtitleEdit.Core
|
||||
case "General/Actor":
|
||||
language.General.Actor = reader.Value;
|
||||
break;
|
||||
case "General/Gap":
|
||||
language.General.Gap = reader.Value;
|
||||
break;
|
||||
case "General/Region":
|
||||
language.General.Region = reader.Value;
|
||||
break;
|
||||
@ -4660,9 +4663,6 @@ namespace Nikse.SubtitleEdit.Core
|
||||
case "Settings/MainListViewDoubleClickAction":
|
||||
language.Settings.MainListViewDoubleClickAction = reader.Value;
|
||||
break;
|
||||
case "Settings/MainListViewColumns":
|
||||
language.Settings.MainListViewColumns = reader.Value;
|
||||
break;
|
||||
case "Settings/MainListViewColumnsInfo":
|
||||
language.Settings.MainListViewColumnsInfo = reader.Value;
|
||||
break;
|
||||
@ -5044,6 +5044,18 @@ namespace Nikse.SubtitleEdit.Core
|
||||
case "Settings/AdjustSelected100MsBack":
|
||||
language.Settings.AdjustSelected100MsBack = reader.Value;
|
||||
break;
|
||||
case "Settings/AdjustStartXMsBack":
|
||||
language.Settings.AdjustStartXMsBack = reader.Value;
|
||||
break;
|
||||
case "Settings/AdjustStartXMsForward":
|
||||
language.Settings.AdjustStartXMsForward = reader.Value;
|
||||
break;
|
||||
case "Settings/AdjustEndXMsBack":
|
||||
language.Settings.AdjustEndXMsBack = reader.Value;
|
||||
break;
|
||||
case "Settings/AdjustEndXMsForward":
|
||||
language.Settings.AdjustEndXMsForward = reader.Value;
|
||||
break;
|
||||
case "Settings/AdjustSetStartTimeKeepDuration":
|
||||
language.Settings.AdjustSetStartTimeKeepDuration = reader.Value;
|
||||
break;
|
||||
|
@ -31,6 +31,7 @@
|
||||
public string CharsPerSec { get; set; }
|
||||
public string WordsPerMin { get; set; }
|
||||
public string Actor { get; set; }
|
||||
public string Gap { get; set; }
|
||||
public string Region { get; set; }
|
||||
public string NumberSymbol { get; set; }
|
||||
public string Number { get; set; }
|
||||
@ -1903,7 +1904,6 @@
|
||||
public string RemoveBlankLinesWhenOpening { get; set; }
|
||||
public string ShowLineBreaksAs { get; set; }
|
||||
public string MainListViewDoubleClickAction { get; set; }
|
||||
public string MainListViewColumns { get; set; }
|
||||
public string MainListViewColumnsInfo { get; set; }
|
||||
public string MainListViewNothing { get; set; }
|
||||
public string MainListViewVideoGoToPositionAndPause { get; set; }
|
||||
@ -2032,6 +2032,10 @@
|
||||
public string AdjustStartDownEndUpAndGoToNext { get; set; }
|
||||
public string AdjustSelected100MsForward { get; set; }
|
||||
public string AdjustSelected100MsBack { get; set; }
|
||||
public string AdjustStartXMsBack { get; set; }
|
||||
public string AdjustStartXMsForward { get; set; }
|
||||
public string AdjustEndXMsBack { get; set; }
|
||||
public string AdjustEndXMsForward { get; set; }
|
||||
public string AdjustSetStartTimeKeepDuration { get; set; }
|
||||
public string AdjustSetEndAndOffsetTheRest { get; set; }
|
||||
public string AdjustSetEndAndOffsetTheRestAndGoToNext { get; set; }
|
||||
|
@ -105,6 +105,7 @@ namespace Nikse.SubtitleEdit.Core
|
||||
public bool ListViewShowColumnDuration { get; set; }
|
||||
public bool ListViewShowColumnCharsPerSec { get; set; }
|
||||
public bool ListViewShowColumnWordsPerMin { get; set; }
|
||||
public bool ListViewShowColumnGap { get; set; }
|
||||
public bool ListViewShowColumnActor { get; set; }
|
||||
public bool ListViewShowColumnRegion { get; set; }
|
||||
public bool SplitAdvanced { get; set; }
|
||||
@ -204,6 +205,7 @@ namespace Nikse.SubtitleEdit.Core
|
||||
public bool ExportTextNewLineAfterText { get; set; }
|
||||
public bool ExportTextNewLineBetweenSubtitles { get; set; }
|
||||
public bool VideoOffsetKeepTimeCodes { get; set; }
|
||||
public int MoveStartEndMs { get; set; }
|
||||
|
||||
|
||||
public ToolsSettings()
|
||||
@ -284,6 +286,7 @@ namespace Nikse.SubtitleEdit.Core
|
||||
ExportTextNewLineAfterText = true;
|
||||
ExportTextNewLineBetweenSubtitles = true;
|
||||
ImportTextLineBreak = "|";
|
||||
MoveStartEndMs = 100;
|
||||
}
|
||||
|
||||
}
|
||||
@ -644,6 +647,7 @@ namespace Nikse.SubtitleEdit.Core
|
||||
public int ListViewDurationWidth { get; set; }
|
||||
public int ListViewCpsWidth { get; set; }
|
||||
public int ListViewWpmWidth { get; set; }
|
||||
public int ListViewGapWidth { get; set; }
|
||||
public int ListViewActorWidth { get; set; }
|
||||
public int ListViewRegionWidth { get; set; }
|
||||
public int ListViewTextWidth { get; set; }
|
||||
@ -1037,6 +1041,10 @@ namespace Nikse.SubtitleEdit.Core
|
||||
public string MainAdjustSetEnd { get; set; }
|
||||
public string MainAdjustSelected100MsForward { get; set; }
|
||||
public string MainAdjustSelected100MsBack { get; set; }
|
||||
public string MainAdjustStartXMsBack { get; set; }
|
||||
public string MainAdjustStartXMsForward { get; set; }
|
||||
public string MainAdjustEndXMsBack { get; set; }
|
||||
public string MainAdjustEndXMsForward { get; set; }
|
||||
public string MainInsertAfter { get; set; }
|
||||
public string MainTextBoxInsertAfter { get; set; }
|
||||
public string MainTextBoxAutoBreak { get; set; }
|
||||
@ -1709,6 +1717,9 @@ namespace Nikse.SubtitleEdit.Core
|
||||
subNode = node.SelectSingleNode("ListViewWpmWidth");
|
||||
if (subNode != null)
|
||||
settings.General.ListViewWpmWidth = Convert.ToInt32(subNode.InnerText.Trim());
|
||||
subNode = node.SelectSingleNode("ListViewGapWidth");
|
||||
if (subNode != null)
|
||||
settings.General.ListViewGapWidth = Convert.ToInt32(subNode.InnerText.Trim());
|
||||
subNode = node.SelectSingleNode("ListViewActorWidth");
|
||||
if (subNode != null)
|
||||
settings.General.ListViewActorWidth = Convert.ToInt32(subNode.InnerText.Trim());
|
||||
@ -1880,6 +1891,9 @@ namespace Nikse.SubtitleEdit.Core
|
||||
subNode = node.SelectSingleNode("ListViewShowColumnWordsPerMin");
|
||||
if (subNode != null)
|
||||
settings.Tools.ListViewShowColumnWordsPerMin = Convert.ToBoolean(subNode.InnerText);
|
||||
subNode = node.SelectSingleNode("ListViewShowColumnGap");
|
||||
if (subNode != null)
|
||||
settings.Tools.ListViewShowColumnGap = Convert.ToBoolean(subNode.InnerText);
|
||||
subNode = node.SelectSingleNode("ListViewShowColumnActor");
|
||||
if (subNode != null)
|
||||
settings.Tools.ListViewShowColumnActor = Convert.ToBoolean(subNode.InnerText);
|
||||
@ -2177,6 +2191,9 @@ namespace Nikse.SubtitleEdit.Core
|
||||
subNode = node.SelectSingleNode("VideoOffsetKeepTimeCodes");
|
||||
if (subNode != null)
|
||||
settings.Tools.VideoOffsetKeepTimeCodes = Convert.ToBoolean(subNode.InnerText);
|
||||
subNode = node.SelectSingleNode("MoveStartEndMs");
|
||||
if (subNode != null)
|
||||
settings.Tools.MoveStartEndMs = Convert.ToInt32(subNode.InnerText);
|
||||
subNode = node.SelectSingleNode("FindHistory");
|
||||
if (subNode != null)
|
||||
{
|
||||
@ -3083,6 +3100,18 @@ namespace Nikse.SubtitleEdit.Core
|
||||
subNode = node.SelectSingleNode("MainAdjustSelected100MsBack");
|
||||
if (subNode != null)
|
||||
settings.Shortcuts.MainAdjustSelected100MsBack = subNode.InnerText;
|
||||
subNode = node.SelectSingleNode("MainAdjustStartXMsBack");
|
||||
if (subNode != null)
|
||||
settings.Shortcuts.MainAdjustStartXMsBack = subNode.InnerText;
|
||||
subNode = node.SelectSingleNode("MainAdjustStartXMsForward");
|
||||
if (subNode != null)
|
||||
settings.Shortcuts.MainAdjustStartXMsForward = subNode.InnerText;
|
||||
subNode = node.SelectSingleNode("MainAdjustEndXMsBack");
|
||||
if (subNode != null)
|
||||
settings.Shortcuts.MainAdjustEndXMsBack = subNode.InnerText;
|
||||
subNode = node.SelectSingleNode("MainAdjustEndXMsForward");
|
||||
if (subNode != null)
|
||||
settings.Shortcuts.MainAdjustEndXMsForward = subNode.InnerText;
|
||||
subNode = node.SelectSingleNode("MainInsertAfter");
|
||||
if (subNode != null)
|
||||
settings.Shortcuts.MainInsertAfter = subNode.InnerText;
|
||||
@ -3377,6 +3406,7 @@ namespace Nikse.SubtitleEdit.Core
|
||||
textWriter.WriteElementString("ListViewDurationWidth", settings.General.ListViewDurationWidth.ToString(CultureInfo.InvariantCulture));
|
||||
textWriter.WriteElementString("ListViewCpsWidth", settings.General.ListViewCpsWidth.ToString(CultureInfo.InvariantCulture));
|
||||
textWriter.WriteElementString("ListViewWpmWidth", settings.General.ListViewWpmWidth.ToString(CultureInfo.InvariantCulture));
|
||||
textWriter.WriteElementString("ListViewGapWidth", settings.General.ListViewGapWidth.ToString(CultureInfo.InvariantCulture));
|
||||
textWriter.WriteElementString("ListViewActorWidth", settings.General.ListViewActorWidth.ToString(CultureInfo.InvariantCulture));
|
||||
textWriter.WriteElementString("ListViewRegionWidth", settings.General.ListViewRegionWidth.ToString(CultureInfo.InvariantCulture));
|
||||
textWriter.WriteElementString("VlcWaveTranscodeSettings", settings.General.VlcWaveTranscodeSettings);
|
||||
@ -3436,6 +3466,7 @@ namespace Nikse.SubtitleEdit.Core
|
||||
textWriter.WriteElementString("ListViewShowColumnDuration", settings.Tools.ListViewShowColumnDuration.ToString(CultureInfo.InvariantCulture));
|
||||
textWriter.WriteElementString("ListViewShowColumnCharsPerSec", settings.Tools.ListViewShowColumnCharsPerSec.ToString(CultureInfo.InvariantCulture));
|
||||
textWriter.WriteElementString("ListViewShowColumnWordsPerMin", settings.Tools.ListViewShowColumnWordsPerMin.ToString(CultureInfo.InvariantCulture));
|
||||
textWriter.WriteElementString("ListViewShowColumnGap", settings.Tools.ListViewShowColumnGap.ToString(CultureInfo.InvariantCulture));
|
||||
textWriter.WriteElementString("ListViewShowColumnActor", settings.Tools.ListViewShowColumnActor.ToString(CultureInfo.InvariantCulture));
|
||||
textWriter.WriteElementString("ListViewShowColumnRegion", settings.Tools.ListViewShowColumnRegion.ToString(CultureInfo.InvariantCulture));
|
||||
textWriter.WriteElementString("SplitAdvanced", settings.Tools.SplitAdvanced.ToString());
|
||||
@ -3535,6 +3566,7 @@ namespace Nikse.SubtitleEdit.Core
|
||||
textWriter.WriteElementString("ExportTextNewLineAfterText", settings.Tools.ExportTextNewLineAfterText.ToString());
|
||||
textWriter.WriteElementString("ExportTextNewLineBetweenSubtitles", settings.Tools.ExportTextNewLineBetweenSubtitles.ToString());
|
||||
textWriter.WriteElementString("VideoOffsetKeepTimeCodes", settings.Tools.VideoOffsetKeepTimeCodes.ToString());
|
||||
textWriter.WriteElementString("MoveStartEndMs", settings.Tools.MoveStartEndMs.ToString(CultureInfo.InvariantCulture));
|
||||
|
||||
if (settings.Tools.FindHistory != null && settings.Tools.FindHistory.Count > 0)
|
||||
{
|
||||
@ -3860,6 +3892,10 @@ namespace Nikse.SubtitleEdit.Core
|
||||
textWriter.WriteElementString("MainAdjustSetEnd", settings.Shortcuts.MainAdjustSetEnd);
|
||||
textWriter.WriteElementString("MainAdjustSelected100MsForward", settings.Shortcuts.MainAdjustSelected100MsForward);
|
||||
textWriter.WriteElementString("MainAdjustSelected100MsBack", settings.Shortcuts.MainAdjustSelected100MsBack);
|
||||
textWriter.WriteElementString("MainAdjustStartXMsBack", settings.Shortcuts.MainAdjustStartXMsBack);
|
||||
textWriter.WriteElementString("MainAdjustStartXMsForward", settings.Shortcuts.MainAdjustStartXMsForward);
|
||||
textWriter.WriteElementString("MainAdjustEndXMsBack", settings.Shortcuts.MainAdjustEndXMsBack);
|
||||
textWriter.WriteElementString("MainAdjustEndXMsForward", settings.Shortcuts.MainAdjustEndXMsForward);
|
||||
textWriter.WriteElementString("MainInsertAfter", settings.Shortcuts.MainInsertAfter);
|
||||
textWriter.WriteElementString("MainTextBoxInsertAfter", settings.Shortcuts.MainTextBoxInsertAfter);
|
||||
textWriter.WriteElementString("MainTextBoxAutoBreak", settings.Shortcuts.MainTextBoxAutoBreak);
|
||||
|
@ -17,6 +17,7 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
Duration,
|
||||
CharactersPerSeconds,
|
||||
WordsPerMinute,
|
||||
Gap,
|
||||
Actor,
|
||||
Region,
|
||||
Text,
|
||||
@ -38,6 +39,7 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
public int ColumnIndexDuration = -1;
|
||||
public int ColumnIndexCps = -1;
|
||||
public int ColumnIndexWpm = -1;
|
||||
public int ColumnIndexGap = -1;
|
||||
public int ColumnIndexActor = -1;
|
||||
public int ColumnIndexRegion = -1;
|
||||
public int ColumnIndexText = -1;
|
||||
@ -135,6 +137,10 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
if (idx >= 0)
|
||||
Columns[idx].Text = general.WordsPerMin;
|
||||
|
||||
idx = GetColumnIndex(SubtitleColumn.Gap);
|
||||
if (idx >= 0)
|
||||
Columns[idx].Text = general.Gap;
|
||||
|
||||
idx = GetColumnIndex(SubtitleColumn.Actor);
|
||||
if (idx >= 0)
|
||||
Columns[idx].Text = general.Actor;
|
||||
@ -189,6 +195,10 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
if (idx >= 0)
|
||||
Columns[idx].Width = _settings.General.ListViewWpmWidth;
|
||||
|
||||
idx = GetColumnIndex(SubtitleColumn.Gap);
|
||||
if (idx >= 0)
|
||||
Columns[idx].Width = _settings.General.ListViewGapWidth;
|
||||
|
||||
idx = GetColumnIndex(SubtitleColumn.Actor);
|
||||
if (idx >= 0)
|
||||
Columns[idx].Width = _settings.General.ListViewActorWidth;
|
||||
@ -267,6 +277,9 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
case SubtitleColumn.WordsPerMinute:
|
||||
Columns.Add(new ColumnHeader { Width = 65 });
|
||||
break;
|
||||
case SubtitleColumn.Gap:
|
||||
Columns.Add(new ColumnHeader { Width = 60 });
|
||||
break;
|
||||
case SubtitleColumn.Actor:
|
||||
Columns.Add(new ColumnHeader { Width = 80 });
|
||||
break;
|
||||
@ -312,6 +325,7 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
ColumnIndexDuration = GetColumnIndex(SubtitleColumn.Duration);
|
||||
ColumnIndexCps = GetColumnIndex(SubtitleColumn.CharactersPerSeconds);
|
||||
ColumnIndexWpm = GetColumnIndex(SubtitleColumn.WordsPerMinute);
|
||||
ColumnIndexGap = GetColumnIndex(SubtitleColumn.Gap);
|
||||
ColumnIndexActor = GetColumnIndex(SubtitleColumn.Actor);
|
||||
ColumnIndexRegion = GetColumnIndex(SubtitleColumn.Region);
|
||||
ColumnIndexText = GetColumnIndex(SubtitleColumn.Text);
|
||||
@ -425,6 +439,10 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
{
|
||||
Configuration.Settings.General.ListViewWpmWidth = Columns[ColumnIndexWpm].Width;
|
||||
}
|
||||
else if (e.ColumnIndex == ColumnIndexGap)
|
||||
{
|
||||
Configuration.Settings.General.ListViewGapWidth = Columns[ColumnIndexGap].Width;
|
||||
}
|
||||
else if (e.ColumnIndex == ColumnIndexActor)
|
||||
{
|
||||
Configuration.Settings.General.ListViewActorWidth = Columns[ColumnIndexActor].Width;
|
||||
@ -492,6 +510,13 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
Columns[wpmIdx].Width = 65;
|
||||
}
|
||||
|
||||
var gapIdx = GetColumnIndex(SubtitleColumn.Gap);
|
||||
if (gapIdx >= 0)
|
||||
{
|
||||
Columns[gapIdx].Width = 60;
|
||||
Columns[gapIdx].Width = 60;
|
||||
}
|
||||
|
||||
var actorIdx = GetColumnIndex(SubtitleColumn.Actor);
|
||||
if (actorIdx >= 0)
|
||||
{
|
||||
@ -583,6 +608,8 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
cw = 65;
|
||||
else if (column == SubtitleColumn.WordsPerMinute)
|
||||
cw = 70;
|
||||
else if (column == SubtitleColumn.Gap)
|
||||
cw = 60;
|
||||
else if (column == SubtitleColumn.Actor)
|
||||
cw = 70;
|
||||
else if (column == SubtitleColumn.Region)
|
||||
@ -828,12 +855,59 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
}
|
||||
}
|
||||
|
||||
public void ShowGapColumn(string title)
|
||||
{
|
||||
if (GetColumnIndex(SubtitleColumn.Gap) == -1)
|
||||
{
|
||||
var ch = new ColumnHeader { Text = title };
|
||||
if (ColumnIndexWpm >= 0)
|
||||
{
|
||||
SubtitleColumns.Insert(ColumnIndexWpm + 1, SubtitleColumn.Gap);
|
||||
Columns.Insert(ColumnIndexWpm + 1, ch);
|
||||
}
|
||||
else if (ColumnIndexCps >= 0)
|
||||
{
|
||||
SubtitleColumns.Insert(ColumnIndexCps + 1, SubtitleColumn.Gap);
|
||||
Columns.Insert(ColumnIndexCps + 1, ch);
|
||||
}
|
||||
else if (ColumnIndexDuration >= 0)
|
||||
{
|
||||
SubtitleColumns.Insert(ColumnIndexDuration + 1, SubtitleColumn.Gap);
|
||||
Columns.Insert(ColumnIndexDuration + 1, ch);
|
||||
}
|
||||
else if (ColumnIndexEnd >= 0)
|
||||
{
|
||||
SubtitleColumns.Insert(ColumnIndexEnd + 1, SubtitleColumn.Gap);
|
||||
Columns.Insert(ColumnIndexEnd + 1, ch);
|
||||
}
|
||||
else if (ColumnIndexStart >= 0)
|
||||
{
|
||||
SubtitleColumns.Insert(ColumnIndexStart + 1, SubtitleColumn.Gap);
|
||||
Columns.Insert(ColumnIndexStart + 1, ch);
|
||||
}
|
||||
else
|
||||
{
|
||||
SubtitleColumns.Add(SubtitleColumn.Gap);
|
||||
Columns.Add(ch);
|
||||
}
|
||||
UpdateColumnIndexes();
|
||||
Columns[ColumnIndexGap].Width = 80;
|
||||
Columns[ColumnIndexGap].Width = 80;
|
||||
AutoSizeAllColumns(null);
|
||||
}
|
||||
}
|
||||
|
||||
public void ShowActorColumn(string title)
|
||||
{
|
||||
if (GetColumnIndex(SubtitleColumn.Actor) == -1)
|
||||
{
|
||||
var ch = new ColumnHeader { Text = title };
|
||||
if (ColumnIndexWpm >= 0)
|
||||
if (ColumnIndexGap >= 0)
|
||||
{
|
||||
SubtitleColumns.Insert(ColumnIndexGap + 1, SubtitleColumn.Actor);
|
||||
Columns.Insert(ColumnIndexGap + 1, ch);
|
||||
}
|
||||
else if (ColumnIndexWpm >= 0)
|
||||
{
|
||||
SubtitleColumns.Insert(ColumnIndexWpm + 1, SubtitleColumn.Actor);
|
||||
Columns.Insert(ColumnIndexWpm + 1, ch);
|
||||
@ -880,6 +954,11 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
SubtitleColumns.Insert(ColumnIndexActor + 1, SubtitleColumn.Region);
|
||||
Columns.Insert(ColumnIndexActor + 1, ch);
|
||||
}
|
||||
else if (ColumnIndexGap >= 0)
|
||||
{
|
||||
SubtitleColumns.Insert(ColumnIndexGap + 1, SubtitleColumn.Region);
|
||||
Columns.Insert(ColumnIndexGap + 1, ch);
|
||||
}
|
||||
else if (ColumnIndexWpm >= 0)
|
||||
{
|
||||
SubtitleColumns.Insert(ColumnIndexWpm + 1, SubtitleColumn.Region);
|
||||
@ -982,7 +1061,10 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
int i = 0;
|
||||
foreach (Paragraph paragraph in paragraphs)
|
||||
{
|
||||
Add(paragraph, null);
|
||||
Paragraph next = null;
|
||||
if (i + 1 < paragraphs.Count)
|
||||
next = paragraphs[i + 1];
|
||||
Add(paragraph, next, null);
|
||||
SyntaxColorLine(paragraphs, i, paragraph);
|
||||
i++;
|
||||
}
|
||||
@ -1005,7 +1087,10 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
foreach (Paragraph paragraph in paragraphs)
|
||||
{
|
||||
Paragraph alternate = Utilities.GetOriginalParagraph(i, paragraph, paragraphsAlternate);
|
||||
Add(paragraph, alternate);
|
||||
Paragraph next = null;
|
||||
if (i + 1 < paragraphs.Count)
|
||||
next = paragraphs[i + 1];
|
||||
Add(paragraph, next, alternate);
|
||||
SyntaxColorLine(paragraphs, i, paragraph);
|
||||
i++;
|
||||
}
|
||||
@ -1143,7 +1228,7 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
return timeCode.ToDisplayString();
|
||||
}
|
||||
|
||||
private void Add(Paragraph paragraph, Paragraph paragraphAlternate)
|
||||
private void Add(Paragraph paragraph, Paragraph next, Paragraph paragraphAlternate)
|
||||
{
|
||||
var item = new ListViewItem(paragraph.Number.ToString(CultureInfo.InvariantCulture)) { Tag = paragraph, UseItemStyleForSubItems = false };
|
||||
foreach (var column in SubtitleColumns)
|
||||
@ -1165,6 +1250,16 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
case SubtitleColumn.WordsPerMinute:
|
||||
item.SubItems.Add($"{paragraph.WordsPerMinute:0.00}");
|
||||
break;
|
||||
case SubtitleColumn.Gap:
|
||||
if (next == null)
|
||||
{
|
||||
item.SubItems.Add(string.Empty);
|
||||
}
|
||||
else
|
||||
{
|
||||
item.SubItems.Add(new TimeCode(next.StartTime.TotalMilliseconds - paragraph.EndTime.TotalMilliseconds).ToShortDisplayString());
|
||||
}
|
||||
break;
|
||||
case SubtitleColumn.Actor:
|
||||
item.SubItems.Add(paragraph.Actor);
|
||||
break;
|
||||
@ -1297,7 +1392,7 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
}
|
||||
}
|
||||
|
||||
public void SetTimeAndText(int index, Paragraph paragraph)
|
||||
public void SetTimeAndText(int index, Paragraph paragraph, Paragraph next)
|
||||
{
|
||||
if (IsValidIndex(index))
|
||||
{
|
||||
@ -1308,6 +1403,15 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
item.SubItems[ColumnIndexEnd].Text = GetDisplayTime(paragraph.EndTime);
|
||||
if (ColumnIndexDuration >= 0)
|
||||
item.SubItems[ColumnIndexDuration].Text = paragraph.Duration.ToShortDisplayString();
|
||||
if (ColumnIndexGap >= 0)
|
||||
if (next == null)
|
||||
{
|
||||
item.SubItems[ColumnIndexGap].Text = string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
item.SubItems[ColumnIndexGap].Text = new TimeCode(next.StartTime.TotalMilliseconds - paragraph.EndTime.TotalMilliseconds).ToShortDisplayString();
|
||||
}
|
||||
if (ColumnIndexActor >= 0)
|
||||
item.SubItems[ColumnIndexActor].Text = paragraph.Actor;
|
||||
if (ColumnIndexRegion >= 0)
|
||||
@ -1392,7 +1496,7 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
}
|
||||
}
|
||||
|
||||
public void SetDuration(int index, Paragraph paragraph)
|
||||
public void SetDuration(int index, Paragraph paragraph, Paragraph next)
|
||||
{
|
||||
if (IsValidIndex(index))
|
||||
{
|
||||
@ -1401,6 +1505,17 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
item.SubItems[ColumnIndexEnd].Text = GetDisplayTime(paragraph.EndTime);
|
||||
if (ColumnIndexDuration >= 0)
|
||||
item.SubItems[ColumnIndexDuration].Text = paragraph.Duration.ToShortDisplayString();
|
||||
if (ColumnIndexGap >= 0)
|
||||
{
|
||||
if (next == null)
|
||||
{
|
||||
item.SubItems[ColumnIndexGap].Text = string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
item.SubItems[ColumnIndexGap].Text = new TimeCode(next.StartTime.TotalMilliseconds - paragraph.EndTime.TotalMilliseconds).ToShortDisplayString();
|
||||
}
|
||||
}
|
||||
UpdateCpsAndWpm(item, paragraph);
|
||||
}
|
||||
}
|
||||
@ -1436,7 +1551,7 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
}
|
||||
}
|
||||
|
||||
public void SetStartTimeAndDuration(int index, Paragraph paragraph)
|
||||
public void SetStartTimeAndDuration(int index, Paragraph paragraph, Paragraph next)
|
||||
{
|
||||
if (IsValidIndex(index))
|
||||
{
|
||||
@ -1447,6 +1562,17 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
item.SubItems[ColumnIndexEnd].Text = GetDisplayTime(paragraph.EndTime);
|
||||
if (ColumnIndexDuration >= 0)
|
||||
item.SubItems[ColumnIndexDuration].Text = paragraph.Duration.ToShortDisplayString();
|
||||
if (ColumnIndexGap >= 0)
|
||||
{
|
||||
if (next == null)
|
||||
{
|
||||
item.SubItems[ColumnIndexGap].Text = string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
item.SubItems[ColumnIndexGap].Text = new TimeCode(next.StartTime.TotalMilliseconds - paragraph.EndTime.TotalMilliseconds).ToShortDisplayString();
|
||||
}
|
||||
}
|
||||
UpdateCpsAndWpm(item, paragraph);
|
||||
}
|
||||
}
|
||||
|
@ -1102,7 +1102,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
// update _subtitle + listview
|
||||
currentParagraph.EndTime.TotalMilliseconds = currentParagraph.StartTime.TotalMilliseconds + ((double)numericUpDownDuration.Value * TimeCode.BaseUnit);
|
||||
subtitleListView1.SetDuration(firstSelectedIndex, currentParagraph);
|
||||
subtitleListView1.SetDuration(firstSelectedIndex, currentParagraph, _originalSubtitle.GetParagraphOrDefault(firstSelectedIndex + 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1173,7 +1173,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
_originalSubtitle.Paragraphs[_subtitleListViewIndex].EndTime.TotalMilliseconds +=
|
||||
(startTime.TotalMilliseconds - _originalSubtitle.Paragraphs[_subtitleListViewIndex].StartTime.TotalMilliseconds);
|
||||
_originalSubtitle.Paragraphs[_subtitleListViewIndex].StartTime = startTime;
|
||||
subtitleListView1.SetStartTimeAndDuration(_subtitleListViewIndex, _originalSubtitle.Paragraphs[_subtitleListViewIndex]);
|
||||
subtitleListView1.SetStartTimeAndDuration(_subtitleListViewIndex, _originalSubtitle.Paragraphs[_subtitleListViewIndex], _originalSubtitle.GetParagraphOrDefault(_subtitleListViewIndex + 1));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -188,6 +188,10 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
private Keys _mainAdjustSetEnd = Keys.None;
|
||||
private Keys _mainAdjustSelected100MsForward = Keys.None;
|
||||
private Keys _mainAdjustSelected100MsBack = Keys.None;
|
||||
private Keys _mainAdjustAdjustStartXMsBack = Keys.None;
|
||||
private Keys _mainAdjustAdjustStartXMsForward = Keys.None;
|
||||
private Keys _mainAdjustAdjustEndXMsBack = Keys.None;
|
||||
private Keys _mainAdjustAdjustEndXMsForward = Keys.None;
|
||||
private Keys _mainInsertAfter = Keys.None;
|
||||
private Keys _mainInsertBefore = Keys.None;
|
||||
private Keys _mainTextBoxInsertAfter = Keys.None;
|
||||
@ -894,7 +898,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
index = _subtitle.GetIndex(current);
|
||||
|
||||
SubtitleListview1.SetStartTimeAndDuration(index, paragraph);
|
||||
SubtitleListview1.SetStartTimeAndDuration(index, paragraph, _subtitle.GetParagraphOrDefault(index + 1));
|
||||
|
||||
if (index == selectedIndex)
|
||||
{
|
||||
@ -925,7 +929,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
original.StartTime.TotalMilliseconds = paragraph.StartTime.TotalMilliseconds;
|
||||
original.EndTime.TotalMilliseconds = paragraph.EndTime.TotalMilliseconds;
|
||||
}
|
||||
SubtitleListview1.SetStartTimeAndDuration(index, paragraph);
|
||||
SubtitleListview1.SetStartTimeAndDuration(index, paragraph, _subtitle.GetParagraphOrDefault(index + 1));
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -951,7 +955,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
}
|
||||
}
|
||||
|
||||
SubtitleListview1.SetStartTimeAndDuration(index, paragraph);
|
||||
SubtitleListview1.SetStartTimeAndDuration(index, paragraph, _subtitle.GetParagraphOrDefault(index + 1));
|
||||
}
|
||||
beforeParagraph.StartTime.TotalMilliseconds = paragraph.StartTime.TotalMilliseconds;
|
||||
beforeParagraph.EndTime.TotalMilliseconds = paragraph.EndTime.TotalMilliseconds;
|
||||
@ -980,7 +984,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
originalPrev = Utilities.GetOriginalParagraph(index - 1, prev, _subtitleAlternate.Paragraphs);
|
||||
|
||||
prev.EndTime.TotalMilliseconds = prev.EndTime.TotalMilliseconds + (e.Paragraph.StartTime.TotalMilliseconds - beforeParagraph.StartTime.TotalMilliseconds);
|
||||
SubtitleListview1.SetStartTimeAndDuration(index - 1, prev);
|
||||
SubtitleListview1.SetStartTimeAndDuration(index - 1, prev, _subtitle.GetParagraphOrDefault(index));
|
||||
audioVisualizer.Invalidate();
|
||||
|
||||
if (originalPrev != null)
|
||||
@ -1008,7 +1012,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
originalNext = Utilities.GetOriginalParagraph(index + 1, next, _subtitleAlternate.Paragraphs);
|
||||
|
||||
next.StartTime.TotalMilliseconds = next.StartTime.TotalMilliseconds + (e.Paragraph.EndTime.TotalMilliseconds - beforeParagraph.EndTime.TotalMilliseconds);
|
||||
SubtitleListview1.SetStartTimeAndDuration(index + 1, next);
|
||||
SubtitleListview1.SetStartTimeAndDuration(index + 1, next, _subtitle.GetParagraphOrDefault(index + 2));
|
||||
audioVisualizer.Invalidate();
|
||||
|
||||
if (originalNext != null)
|
||||
@ -5427,7 +5431,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
else
|
||||
{
|
||||
_subtitle.Paragraphs[index] = p;
|
||||
SubtitleListview1.SetTimeAndText(index, p);
|
||||
SubtitleListview1.SetTimeAndText(index, p, _subtitle.GetParagraphOrDefault(index + 1));
|
||||
}
|
||||
}
|
||||
NetworkGetSendUpdates(deletes, 0, null);
|
||||
@ -6414,6 +6418,26 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
};
|
||||
cm.Items.Add(contextMenuStripLvHeaderWpmToolStripMenuItem);
|
||||
|
||||
// GAP
|
||||
var contextMenuStripLvHeaderGapToolStripMenuItem = new ToolStripMenuItem(Configuration.Settings.Language.General.Gap);
|
||||
contextMenuStripLvHeaderGapToolStripMenuItem.CheckOnClick = true;
|
||||
contextMenuStripLvHeaderGapToolStripMenuItem.Checked = Configuration.Settings.Tools.ListViewShowColumnWordsPerMin;
|
||||
contextMenuStripLvHeaderGapToolStripMenuItem.Click += (sender2, e2) =>
|
||||
{
|
||||
SubtitleListview1.BeginUpdate();
|
||||
Configuration.Settings.Tools.ListViewShowColumnGap = contextMenuStripLvHeaderGapToolStripMenuItem.Checked;
|
||||
if (Configuration.Settings.Tools.ListViewShowColumnGap)
|
||||
SubtitleListview1.ShowGapColumn(Configuration.Settings.Language.General.Gap);
|
||||
else
|
||||
SubtitleListview1.HideColumn(SubtitleListView.SubtitleColumn.Gap);
|
||||
SaveSubtitleListviewIndices();
|
||||
UiUtil.InitializeSubtitleFont(SubtitleListview1);
|
||||
SubtitleListview1.Fill(_subtitle, _subtitleAlternate);
|
||||
RestoreSubtitleListviewIndices();
|
||||
SubtitleListview1.EndUpdate();
|
||||
};
|
||||
cm.Items.Add(contextMenuStripLvHeaderGapToolStripMenuItem);
|
||||
|
||||
if (formatType == typeof(AdvancedSubStationAlpha) || formatType == typeof(SubStationAlpha))
|
||||
{
|
||||
// ACTOR
|
||||
@ -6546,7 +6570,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
foreach (int index in SubtitleListview1.SelectedIndices)
|
||||
{
|
||||
_subtitle.Paragraphs[index].Region = null;
|
||||
SubtitleListview1.SetTimeAndText(index, _subtitle.Paragraphs[index]);
|
||||
SubtitleListview1.SetTimeAndText(index, _subtitle.Paragraphs[index], _subtitle.GetParagraphOrDefault(index + 1));
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -6614,7 +6638,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
_subtitle.Paragraphs[index].Language = null;
|
||||
_subtitle.Paragraphs[index].Extra = TimedText10.SetExtra(_subtitle.Paragraphs[index]);
|
||||
SubtitleListview1.SetTimeAndText(index, _subtitle.Paragraphs[index]);
|
||||
SubtitleListview1.SetTimeAndText(index, _subtitle.Paragraphs[index], _subtitle.GetParagraphOrDefault(index + 1));
|
||||
}
|
||||
};
|
||||
}
|
||||
@ -6818,7 +6842,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
foreach (int index in SubtitleListview1.SelectedIndices)
|
||||
{
|
||||
_subtitle.Paragraphs[index].Actor = actor;
|
||||
SubtitleListview1.SetTimeAndText(index, _subtitle.Paragraphs[index]);
|
||||
SubtitleListview1.SetTimeAndText(index, _subtitle.Paragraphs[index], _subtitle.GetParagraphOrDefault(index + 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -6832,7 +6856,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
foreach (int index in SubtitleListview1.SelectedIndices)
|
||||
{
|
||||
_subtitle.Paragraphs[index].Region = region;
|
||||
SubtitleListview1.SetTimeAndText(index, _subtitle.Paragraphs[index]);
|
||||
SubtitleListview1.SetTimeAndText(index, _subtitle.Paragraphs[index], _subtitle.GetParagraphOrDefault(index + 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -6918,7 +6942,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
foreach (int index in SubtitleListview1.SelectedIndices)
|
||||
{
|
||||
_subtitle.Paragraphs[index].Actor = actor;
|
||||
SubtitleListview1.SetTimeAndText(index, _subtitle.Paragraphs[index]);
|
||||
SubtitleListview1.SetTimeAndText(index, _subtitle.Paragraphs[index], _subtitle.GetParagraphOrDefault(index + 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -6940,7 +6964,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
foreach (int index in SubtitleListview1.SelectedIndices)
|
||||
{
|
||||
_subtitle.Paragraphs[index].Actor = null;
|
||||
SubtitleListview1.SetTimeAndText(index, _subtitle.Paragraphs[index]);
|
||||
SubtitleListview1.SetTimeAndText(index, _subtitle.Paragraphs[index], _subtitle.GetParagraphOrDefault(index + 1));
|
||||
}
|
||||
}
|
||||
|
||||
@ -7406,7 +7430,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
var dur = last.Duration.TotalMilliseconds;
|
||||
last.StartTime.TotalMilliseconds = startTime.TotalMilliseconds;
|
||||
last.EndTime.TotalMilliseconds = startTime.TotalMilliseconds + dur;
|
||||
SubtitleListview1.SetStartTimeAndDuration(_subtitleListViewIndex, last);
|
||||
SubtitleListview1.SetStartTimeAndDuration(_subtitleListViewIndex, last, _subtitle.GetParagraphOrDefault(_subtitleListViewIndex + 1));
|
||||
showSource = true;
|
||||
}
|
||||
}
|
||||
@ -7415,7 +7439,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
if (duration > 0 && duration < 100000 && Math.Abs(duration - last.Duration.TotalMilliseconds) > 0.5)
|
||||
{
|
||||
last.EndTime.TotalMilliseconds = last.StartTime.TotalMilliseconds + duration;
|
||||
SubtitleListview1.SetDuration(_subtitleListViewIndex, last);
|
||||
SubtitleListview1.SetDuration(_subtitleListViewIndex, last, _subtitle.GetParagraphOrDefault(_subtitleListViewIndex + 1));
|
||||
showSource = true;
|
||||
}
|
||||
|
||||
@ -8156,7 +8180,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
SetDurationInSeconds(duration / TimeCode.BaseUnit);
|
||||
|
||||
p.EndTime.TotalMilliseconds = p.StartTime.TotalMilliseconds + duration;
|
||||
SubtitleListview1.SetDuration(i, p);
|
||||
SubtitleListview1.SetDuration(i, p, _subtitle.GetParagraphOrDefault(i + 1));
|
||||
}
|
||||
|
||||
private void SplitLineToolStripMenuItemClick(object sender, EventArgs e)
|
||||
@ -8953,7 +8977,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
var p = _subtitle.Paragraphs[_subtitleListViewIndex];
|
||||
p.EndTime.TotalMilliseconds += (startTime.TotalMilliseconds - p.StartTime.TotalMilliseconds);
|
||||
p.StartTime = startTime;
|
||||
SubtitleListview1.SetStartTimeAndDuration(_subtitleListViewIndex, p);
|
||||
SubtitleListview1.SetStartTimeAndDuration(_subtitleListViewIndex, p, _subtitle.GetParagraphOrDefault(_subtitleListViewIndex + 1));
|
||||
if (GetCurrentSubtitleFormat().IsFrameBased)
|
||||
{
|
||||
p.CalculateFrameNumbersFromTimeCodes(CurrentFrameRate);
|
||||
@ -9093,7 +9117,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
MakeHistoryForUndoOnlyIfNotResent(string.Format(_language.DisplayTimeAdjustedX, "#" + currentParagraph.Number + ": " + oldDuration + " -> " + temp.Duration));
|
||||
|
||||
currentParagraph.EndTime.TotalMilliseconds = temp.EndTime.TotalMilliseconds;
|
||||
SubtitleListview1.SetDuration(firstSelectedIndex, currentParagraph);
|
||||
SubtitleListview1.SetDuration(firstSelectedIndex, currentParagraph, _subtitle.GetParagraphOrDefault(firstSelectedIndex + 1));
|
||||
|
||||
UpdateOverlapErrors(timeUpDownStartTime.TimeCode);
|
||||
UpdateListViewTextCharactersPerSeconds(labelCharactersPerSecond, currentParagraph);
|
||||
@ -12189,6 +12213,26 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
ShowEarlierOrLater(-100, SelectionChoice.SelectionOnly);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (_mainAdjustAdjustStartXMsBack == e.KeyData)
|
||||
{
|
||||
MoveStartCurrent(-Configuration.Settings.Tools.MoveStartEndMs);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (_mainAdjustAdjustStartXMsForward == e.KeyData)
|
||||
{
|
||||
MoveStartCurrent(Configuration.Settings.Tools.MoveStartEndMs);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (_mainAdjustAdjustEndXMsBack == e.KeyData)
|
||||
{
|
||||
MoveEndCurrent(-Configuration.Settings.Tools.MoveStartEndMs);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (_mainAdjustAdjustEndXMsForward == e.KeyData)
|
||||
{
|
||||
MoveEndCurrent(Configuration.Settings.Tools.MoveStartEndMs);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
else if (mediaPlayer.VideoPlayer != null)
|
||||
{
|
||||
if (_mainAdjustSetStartAndOffsetTheRest == e.KeyData)
|
||||
@ -12252,7 +12296,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
}
|
||||
else if (_mainAdjustSetStartAutoDurationAndGoToNext == e.KeyData)
|
||||
{
|
||||
ShowNextSubtitleLabel();
|
||||
// ShowNextSubtitleLabel();
|
||||
SetCurrentStartAutoDurationAndGotoNext(FirstSelectedIndex);
|
||||
e.SuppressKeyPress = true;
|
||||
}
|
||||
@ -12337,7 +12381,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
p.EndTime = newEndTime;
|
||||
}
|
||||
}
|
||||
SubtitleListview1.SetStartTimeAndDuration(index, _subtitle.Paragraphs[index]);
|
||||
SubtitleListview1.SetStartTimeAndDuration(index, _subtitle.Paragraphs[index], _subtitle.GetParagraphOrDefault(index + 1));
|
||||
SetDurationInSeconds(_subtitle.Paragraphs[index].Duration.TotalSeconds);
|
||||
ButtonInsertNewTextClick(null, null);
|
||||
}
|
||||
@ -12395,6 +12439,84 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
// put new entries above tabs
|
||||
}
|
||||
|
||||
private void MoveStartCurrent(int ms)
|
||||
{
|
||||
var i = _subtitleListViewIndex;
|
||||
if (i < 0 || i >= _subtitle.Paragraphs.Count || ms == 0)
|
||||
return;
|
||||
|
||||
var p = _subtitle.GetParagraphOrDefault(i);
|
||||
if (ms > 0)
|
||||
{
|
||||
if (p.StartTime.TotalMilliseconds + ms + 100 > p.EndTime.TotalMilliseconds)
|
||||
{
|
||||
return; // do not allow duration smaller than 100ms
|
||||
}
|
||||
p.StartTime.TotalMilliseconds = p.StartTime.TotalMilliseconds + ms;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (p.Duration.TotalMilliseconds + Math.Abs(ms) > Configuration.Settings.General.SubtitleMaximumDisplayMilliseconds)
|
||||
return;
|
||||
|
||||
if (p.StartTime.TotalMilliseconds + ms < 0)
|
||||
return;
|
||||
|
||||
var prev = _subtitle.GetParagraphOrDefault(i - 1);
|
||||
if (prev == null || p.StartTime.TotalMilliseconds - (Math.Abs(ms) + Configuration.Settings.General.MinimumMillisecondsBetweenLines) > prev.EndTime.TotalMilliseconds)
|
||||
{
|
||||
p.StartTime.TotalMilliseconds = p.StartTime.TotalMilliseconds + ms;
|
||||
}
|
||||
else
|
||||
{
|
||||
var newStartMs = prev.EndTime.TotalMilliseconds + Configuration.Settings.General.MinimumMillisecondsBetweenLines;
|
||||
if (newStartMs < p.StartTime.TotalMilliseconds)
|
||||
{
|
||||
p.StartTime.TotalMilliseconds = newStartMs;
|
||||
}
|
||||
}
|
||||
}
|
||||
SubtitleListview1.SetDuration(i, p, _subtitle.GetParagraphOrDefault(i + 1));
|
||||
}
|
||||
|
||||
private void MoveEndCurrent(int ms)
|
||||
{
|
||||
var i = _subtitleListViewIndex;
|
||||
if (i < 0 || i >= _subtitle.Paragraphs.Count || ms == 0)
|
||||
return;
|
||||
|
||||
var p = _subtitle.GetParagraphOrDefault(i);
|
||||
if (ms > 0)
|
||||
{
|
||||
if (p.Duration.TotalMilliseconds + ms > Configuration.Settings.General.SubtitleMaximumDisplayMilliseconds)
|
||||
return;
|
||||
|
||||
|
||||
var next = _subtitle.GetParagraphOrDefault(i + 1);
|
||||
if (next == null || p.StartTime.TotalMilliseconds - (Math.Abs(ms) + Configuration.Settings.General.MinimumMillisecondsBetweenLines) < next.StartTime.TotalMilliseconds)
|
||||
{
|
||||
p.EndTime.TotalMilliseconds = p.EndTime.TotalMilliseconds + ms;
|
||||
}
|
||||
else
|
||||
{
|
||||
var newEndMs = next.StartTime.TotalMilliseconds - Configuration.Settings.General.MinimumMillisecondsBetweenLines;
|
||||
if (newEndMs > p.EndTime.TotalMilliseconds)
|
||||
{
|
||||
p.EndTime.TotalMilliseconds = newEndMs;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (p.EndTime.TotalMilliseconds + ms - 100 < p.StartTime.TotalMilliseconds)
|
||||
{
|
||||
return; // do not allow duration smaller than 100ms
|
||||
}
|
||||
p.EndTime.TotalMilliseconds = p.EndTime.TotalMilliseconds + ms;
|
||||
}
|
||||
SubtitleListview1.SetDuration(i, p, _subtitle.GetParagraphOrDefault(i + 1));
|
||||
}
|
||||
|
||||
private void ShowNextSubtitleLabel()
|
||||
{
|
||||
if (audioVisualizer.Visible && audioVisualizer.WavePeaks != null && audioVisualizer.Width > 300 && _subtitleListViewIndex >= 0)
|
||||
@ -12557,7 +12679,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
numericUpDownDuration.ValueChanged -= NumericUpDownDurationValueChanged;
|
||||
_subtitle.Paragraphs[index].EndTime.TotalSeconds = videoPosition;
|
||||
SubtitleListview1.SetDuration(index, _subtitle.Paragraphs[index]);
|
||||
SubtitleListview1.SetDuration(index, _subtitle.Paragraphs[index], _subtitle.GetParagraphOrDefault(index + 1));
|
||||
checkBoxSyncListViewWithVideoWhilePlaying.Checked = oldSync;
|
||||
numericUpDownDuration.Value = (decimal)_subtitle.Paragraphs[index].Duration.TotalSeconds;
|
||||
numericUpDownDuration.ValueChanged += NumericUpDownDurationValueChanged;
|
||||
@ -12568,7 +12690,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
_subtitle.Paragraphs[i].StartTime = new TimeCode(_subtitle.Paragraphs[i].StartTime.TotalMilliseconds + offset);
|
||||
_subtitle.Paragraphs[i].EndTime = new TimeCode(_subtitle.Paragraphs[i].EndTime.TotalMilliseconds + offset);
|
||||
SubtitleListview1.SetDuration(i, _subtitle.Paragraphs[i]);
|
||||
SubtitleListview1.SetDuration(i, _subtitle.Paragraphs[i], _subtitle.GetParagraphOrDefault(i + 1));
|
||||
}
|
||||
}
|
||||
|
||||
@ -14824,7 +14946,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
if (oldParagraph.StartTime.IsMaxTime)
|
||||
p.EndTime.TotalMilliseconds = p.StartTime.TotalMilliseconds + Utilities.GetOptimalDisplayMilliseconds(p.Text);
|
||||
|
||||
SubtitleListview1.SetStartTimeAndDuration(index, p);
|
||||
SubtitleListview1.SetStartTimeAndDuration(index, p, _subtitle.GetParagraphOrDefault(index + 1));
|
||||
timeUpDownStartTime.TimeCode = p.StartTime;
|
||||
timeUpDownStartTime.MaskedTextBox.TextChanged += MaskedTextBoxTextChanged;
|
||||
|
||||
@ -14860,7 +14982,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
if (_subtitle.Paragraphs[index].StartTime.TotalMilliseconds < 0)
|
||||
_subtitle.Paragraphs[index].StartTime.TotalMilliseconds = 0;
|
||||
timeUpDownStartTime.TimeCode = _subtitle.Paragraphs[index].StartTime;
|
||||
SubtitleListview1.SetStartTimeAndDuration(index, _subtitle.Paragraphs[index]);
|
||||
SubtitleListview1.SetStartTimeAndDuration(index, _subtitle.Paragraphs[index], _subtitle.GetParagraphOrDefault(index + 1));
|
||||
timeUpDownStartTime.MaskedTextBox.TextChanged += MaskedTextBoxTextChanged;
|
||||
}
|
||||
else
|
||||
@ -14869,7 +14991,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
if (_subtitle.Paragraphs[index].Duration.TotalMilliseconds < Configuration.Settings.General.SubtitleMinimumDisplayMilliseconds)
|
||||
_subtitle.Paragraphs[index].Duration.TotalMilliseconds = Configuration.Settings.General.SubtitleMinimumDisplayMilliseconds;
|
||||
}
|
||||
SubtitleListview1.SetStartTimeAndDuration(index, _subtitle.Paragraphs[index]);
|
||||
SubtitleListview1.SetStartTimeAndDuration(index, _subtitle.Paragraphs[index], _subtitle.GetParagraphOrDefault(index + 1));
|
||||
SetDurationInSeconds(_subtitle.Paragraphs[index].Duration.TotalSeconds);
|
||||
}
|
||||
}
|
||||
@ -14962,7 +15084,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
}
|
||||
SetDurationInSeconds(duration / TimeCode.BaseUnit);
|
||||
currentParagraph.EndTime.TotalMilliseconds = currentParagraph.StartTime.TotalMilliseconds + duration;
|
||||
SubtitleListview1.SetDuration(firstSelectedIndex, currentParagraph);
|
||||
SubtitleListview1.SetDuration(firstSelectedIndex, currentParagraph, _subtitle.GetParagraphOrDefault(firstSelectedIndex + 1));
|
||||
}
|
||||
catch
|
||||
{
|
||||
@ -15165,7 +15287,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
p.StartTime.TotalMilliseconds += adjustMilliseconds;
|
||||
p.EndTime.TotalMilliseconds += adjustMilliseconds;
|
||||
SubtitleListview1.SetStartTimeAndDuration(i, p);
|
||||
SubtitleListview1.SetStartTimeAndDuration(i, p, _subtitle.GetParagraphOrDefault(i + 1));
|
||||
}
|
||||
}
|
||||
|
||||
@ -15568,7 +15690,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
_subtitle.Paragraphs[index].StartTime.TotalSeconds = videoPosition;
|
||||
_subtitle.Paragraphs[index].EndTime.TotalMilliseconds = _subtitle.Paragraphs[index].StartTime.TotalMilliseconds + Utilities.GetOptimalDisplayMilliseconds(_subtitle.Paragraphs[index].Text);
|
||||
SubtitleListview1.SetStartTimeAndDuration(index, _subtitle.Paragraphs[index]);
|
||||
SubtitleListview1.SetStartTimeAndDuration(index, _subtitle.Paragraphs[index], _subtitle.GetParagraphOrDefault(index + 1));
|
||||
checkBoxSyncListViewWithVideoWhilePlaying.Checked = oldSync;
|
||||
timeUpDownStartTime.MaskedTextBox.TextChanged += MaskedTextBoxTextChanged;
|
||||
return;
|
||||
@ -15576,7 +15698,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
_subtitle.Paragraphs[index].StartTime = new TimeCode(_subtitle.Paragraphs[index].StartTime.TotalMilliseconds - offset);
|
||||
_subtitle.Paragraphs[index].EndTime = new TimeCode(_subtitle.Paragraphs[index].EndTime.TotalMilliseconds - offset);
|
||||
SubtitleListview1.SetStartTimeAndDuration(index, _subtitle.Paragraphs[index]);
|
||||
SubtitleListview1.SetStartTimeAndDuration(index, _subtitle.Paragraphs[index], _subtitle.GetParagraphOrDefault(index + 1));
|
||||
|
||||
for (int i = index + 1; i < SubtitleListview1.Items.Count; i++)
|
||||
{
|
||||
@ -15584,7 +15706,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
_subtitle.Paragraphs[i].StartTime = new TimeCode(_subtitle.Paragraphs[i].StartTime.TotalMilliseconds - offset);
|
||||
_subtitle.Paragraphs[i].EndTime = new TimeCode(_subtitle.Paragraphs[i].EndTime.TotalMilliseconds - offset);
|
||||
SubtitleListview1.SetStartTimeAndDuration(i, _subtitle.Paragraphs[i]);
|
||||
SubtitleListview1.SetStartTimeAndDuration(i, _subtitle.Paragraphs[i], _subtitle.GetParagraphOrDefault(i + 1));
|
||||
}
|
||||
}
|
||||
|
||||
@ -15639,14 +15761,14 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
if (_subtitle.Paragraphs[index].StartTime.TotalMilliseconds < 0)
|
||||
_subtitle.Paragraphs[index].StartTime.TotalMilliseconds = 0;
|
||||
timeUpDownStartTime.TimeCode = _subtitle.Paragraphs[index].StartTime;
|
||||
SubtitleListview1.SetStartTimeAndDuration(index, _subtitle.Paragraphs[index]);
|
||||
SubtitleListview1.SetStartTimeAndDuration(index, _subtitle.Paragraphs[index], _subtitle.GetParagraphOrDefault(index + 1));
|
||||
timeUpDownStartTime.MaskedTextBox.TextChanged += MaskedTextBoxTextChanged;
|
||||
}
|
||||
else
|
||||
{
|
||||
_subtitle.Paragraphs[index].EndTime = TimeCode.FromSeconds(videoPosition);
|
||||
}
|
||||
SubtitleListview1.SetDuration(index, _subtitle.Paragraphs[index]);
|
||||
SubtitleListview1.SetDuration(index, _subtitle.Paragraphs[index], _subtitle.GetParagraphOrDefault(index + 1));
|
||||
SetDurationInSeconds(_subtitle.Paragraphs[index].Duration.TotalSeconds);
|
||||
|
||||
if (index + 1 < _subtitle.Paragraphs.Count)
|
||||
@ -15663,7 +15785,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
ShowSource();
|
||||
}
|
||||
if (!_subtitle.Paragraphs[index + 1].StartTime.IsMaxTime)
|
||||
SubtitleListview1.SetStartTimeAndDuration(index + 1, _subtitle.Paragraphs[index + 1]);
|
||||
SubtitleListview1.SetStartTimeAndDuration(index + 1, _subtitle.Paragraphs[index + 1], _subtitle.GetParagraphOrDefault(index + 1));
|
||||
SubtitleListview1.SelectIndexAndEnsureVisible(index + 1, true);
|
||||
}
|
||||
_makeHistoryPaused = false;
|
||||
@ -15975,6 +16097,10 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
_mainAdjustSetEnd = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainAdjustSetEnd);
|
||||
_mainAdjustSelected100MsForward = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainAdjustSelected100MsForward);
|
||||
_mainAdjustSelected100MsBack = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainAdjustSelected100MsBack);
|
||||
_mainAdjustAdjustStartXMsBack = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainAdjustStartXMsBack);
|
||||
_mainAdjustAdjustStartXMsForward = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainAdjustStartXMsForward);
|
||||
_mainAdjustAdjustEndXMsBack = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainAdjustEndXMsBack);
|
||||
_mainAdjustAdjustEndXMsForward = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainAdjustEndXMsForward);
|
||||
_mainInsertAfter = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainInsertAfter);
|
||||
_mainInsertBefore = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainInsertBefore);
|
||||
_mainTextBoxInsertAfter = UiUtil.GetKeys(Configuration.Settings.Shortcuts.MainTextBoxInsertAfter);
|
||||
@ -17558,7 +17684,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
p.StartTime.TotalMilliseconds = update.StartMilliseconds;
|
||||
p.EndTime.TotalMilliseconds = update.EndMilliseconds;
|
||||
p.Text = update.Text;
|
||||
SubtitleListview1.SetTimeAndText(update.Index, p);
|
||||
SubtitleListview1.SetTimeAndText(update.Index, p, _subtitle.GetParagraphOrDefault(update.Index + 1));
|
||||
_networkSession.AppendToLog(string.Format(_language.NetworkUpdate, update.User.UserName, update.User.Ip, update.Index, UiUtil.GetListViewTextFromString(update.Text)));
|
||||
_networkSession.AddToWsUserLog(update.User, update.Index, update.Action, true);
|
||||
updateListViewStatus = true;
|
||||
@ -18595,6 +18721,15 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
if (p == null)
|
||||
return;
|
||||
|
||||
double videoPosition = mediaPlayer.CurrentPosition;
|
||||
if (prev != null && Math.Abs(prev.StartTime.TotalSeconds - videoPosition) < 0.3)
|
||||
{
|
||||
ShowStatus("Subtitle already here");
|
||||
return;
|
||||
}
|
||||
|
||||
ShowNextSubtitleLabel();
|
||||
|
||||
if (mediaPlayer.VideoPlayer == null || string.IsNullOrEmpty(_videoFileName))
|
||||
{
|
||||
MessageBox.Show(_languageGeneral.NoVideoLoaded);
|
||||
@ -18605,7 +18740,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
timeUpDownStartTime.MaskedTextBox.TextChanged -= MaskedTextBoxTextChanged;
|
||||
var oldParagraph = new Paragraph(_subtitle.Paragraphs[index]);
|
||||
double videoPosition = mediaPlayer.CurrentPosition;
|
||||
if (!mediaPlayer.IsPaused)
|
||||
videoPosition -= Configuration.Settings.General.SetStartEndHumanDelay / TimeCode.BaseUnit;
|
||||
|
||||
@ -18622,7 +18756,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
prev.EndTime.TotalMilliseconds = _subtitle.Paragraphs[index].StartTime.TotalMilliseconds - minDiff;
|
||||
}
|
||||
_subtitle.Paragraphs[index].EndTime.TotalMilliseconds = _subtitle.Paragraphs[index].StartTime.TotalMilliseconds + duration;
|
||||
SubtitleListview1.SetStartTimeAndDuration(index, _subtitle.Paragraphs[index]);
|
||||
SubtitleListview1.SetStartTimeAndDuration(index, _subtitle.Paragraphs[index], _subtitle.GetParagraphOrDefault(index + 1));
|
||||
timeUpDownStartTime.TimeCode = _subtitle.Paragraphs[index].StartTime;
|
||||
timeUpDownStartTime.MaskedTextBox.TextChanged += MaskedTextBoxTextChanged;
|
||||
UpdateOriginalTimeCodes(oldParagraph);
|
||||
@ -18658,13 +18792,13 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
if (p.StartTime.TotalMilliseconds < 0)
|
||||
p.StartTime.TotalMilliseconds = 0;
|
||||
timeUpDownStartTime.TimeCode = p.StartTime;
|
||||
SubtitleListview1.SetStartTimeAndDuration(index, p);
|
||||
SubtitleListview1.SetStartTimeAndDuration(index, p, _subtitle.GetParagraphOrDefault(index + 1));
|
||||
timeUpDownStartTime.MaskedTextBox.TextChanged += MaskedTextBoxTextChanged;
|
||||
}
|
||||
if (p.Duration.TotalSeconds < 0 || p.Duration.TotalSeconds > 10)
|
||||
p.EndTime.TotalMilliseconds = p.StartTime.TotalMilliseconds + Utilities.GetOptimalDisplayMilliseconds(p.Text);
|
||||
|
||||
SubtitleListview1.SetStartTimeAndDuration(index, p);
|
||||
SubtitleListview1.SetStartTimeAndDuration(index, p, _subtitle.GetParagraphOrDefault(index + 1));
|
||||
|
||||
SetDurationInSeconds(_subtitle.Paragraphs[index].Duration.TotalSeconds + 0.001);
|
||||
if (next != null)
|
||||
@ -18678,7 +18812,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
oldDuration = Utilities.GetOptimalDisplayMilliseconds(p.Text);
|
||||
next.StartTime.TotalMilliseconds = p.EndTime.TotalMilliseconds + addMilliseconds;
|
||||
next.EndTime.TotalMilliseconds = next.StartTime.TotalMilliseconds + oldDuration;
|
||||
SubtitleListview1.SetStartTimeAndDuration(index + 1, next);
|
||||
SubtitleListview1.SetStartTimeAndDuration(index + 1, next, _subtitle.GetParagraphOrDefault(index + 2));
|
||||
SubtitleListview1.SelectIndexAndEnsureVisible(index + 1);
|
||||
}
|
||||
audioVisualizer.Invalidate();
|
||||
|
@ -9076,7 +9076,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
|
||||
Paragraph currentP = _subtitle.Paragraphs[index];
|
||||
currentP.StartTime.TotalMilliseconds = newP.StartTime.TotalMilliseconds;
|
||||
currentP.EndTime.TotalMilliseconds = newP.EndTime.TotalMilliseconds;
|
||||
subtitleListView1.SetStartTimeAndDuration(index, currentP);
|
||||
subtitleListView1.SetStartTimeAndDuration(index, currentP, _subtitle.GetParagraphOrDefault(index + 1));
|
||||
index++;
|
||||
}
|
||||
}
|
||||
|
@ -38,6 +38,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
comboBoxFrameRate.Items.Add((29.97).ToString());
|
||||
comboBoxFrameRate.Items.Add((30.0).ToString());
|
||||
comboBoxFrameRate.Items.Add((59.94).ToString());
|
||||
comboBoxFrameRate.Items.Add((60).ToString());
|
||||
if (Math.Abs(Configuration.Settings.General.CurrentFrameRate - 23.976) < 0.1)
|
||||
comboBoxFrameRate.SelectedIndex = 0;
|
||||
else if (Math.Abs(Configuration.Settings.General.CurrentFrameRate - 24) < 0.1)
|
||||
@ -50,6 +51,8 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
comboBoxFrameRate.SelectedIndex = 4;
|
||||
else if (Math.Abs(Configuration.Settings.General.CurrentFrameRate - 59.94) < 0.1)
|
||||
comboBoxFrameRate.SelectedIndex = 5;
|
||||
else if (Math.Abs(Configuration.Settings.General.CurrentFrameRate - 60) < 0.1)
|
||||
comboBoxFrameRate.SelectedIndex = 6;
|
||||
else
|
||||
comboBoxFrameRate.SelectedIndex = 3;
|
||||
}
|
||||
|
39
src/Forms/Settings.Designer.cs
generated
39
src/Forms/Settings.Designer.cs
generated
@ -35,8 +35,6 @@
|
||||
this.groupBoxMiscellaneous = new System.Windows.Forms.GroupBox();
|
||||
this.numericUpDownMaxWordsMin = new System.Windows.Forms.NumericUpDown();
|
||||
this.labelMaxWordsPerMin = new System.Windows.Forms.Label();
|
||||
this.labelListviewColumns = new System.Windows.Forms.Label();
|
||||
this.buttonListviewColumns = new System.Windows.Forms.Button();
|
||||
this.numericUpDownMaxNumberOfLines = new System.Windows.Forms.NumericUpDown();
|
||||
this.labelMaxLines = new System.Windows.Forms.Label();
|
||||
this.comboBoxAutoBackupDeleteAfter = new System.Windows.Forms.ComboBox();
|
||||
@ -469,8 +467,6 @@
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.groupBoxMiscellaneous.Controls.Add(this.numericUpDownMaxWordsMin);
|
||||
this.groupBoxMiscellaneous.Controls.Add(this.labelMaxWordsPerMin);
|
||||
this.groupBoxMiscellaneous.Controls.Add(this.labelListviewColumns);
|
||||
this.groupBoxMiscellaneous.Controls.Add(this.buttonListviewColumns);
|
||||
this.groupBoxMiscellaneous.Controls.Add(this.numericUpDownMaxNumberOfLines);
|
||||
this.groupBoxMiscellaneous.Controls.Add(this.labelMaxLines);
|
||||
this.groupBoxMiscellaneous.Controls.Add(this.comboBoxAutoBackupDeleteAfter);
|
||||
@ -561,25 +557,6 @@
|
||||
this.labelMaxWordsPerMin.TabIndex = 49;
|
||||
this.labelMaxWordsPerMin.Text = "Max. words/min";
|
||||
//
|
||||
// labelListviewColumns
|
||||
//
|
||||
this.labelListviewColumns.AutoSize = true;
|
||||
this.labelListviewColumns.Location = new System.Drawing.Point(439, 342);
|
||||
this.labelListviewColumns.Name = "labelListviewColumns";
|
||||
this.labelListviewColumns.Size = new System.Drawing.Size(86, 13);
|
||||
this.labelListviewColumns.TabIndex = 48;
|
||||
this.labelListviewColumns.Text = "Listview columns";
|
||||
//
|
||||
// buttonListviewColumns
|
||||
//
|
||||
this.buttonListviewColumns.Location = new System.Drawing.Point(441, 358);
|
||||
this.buttonListviewColumns.Name = "buttonListviewColumns";
|
||||
this.buttonListviewColumns.Size = new System.Drawing.Size(372, 23);
|
||||
this.buttonListviewColumns.TabIndex = 43;
|
||||
this.buttonListviewColumns.Text = "#, Start time, End time, duration, cps, wpm, text";
|
||||
this.buttonListviewColumns.UseVisualStyleBackColor = true;
|
||||
this.buttonListviewColumns.Click += new System.EventHandler(this.buttonListviewColumns_Click);
|
||||
//
|
||||
// numericUpDownMaxNumberOfLines
|
||||
//
|
||||
this.numericUpDownMaxNumberOfLines.Location = new System.Drawing.Point(205, 270);
|
||||
@ -620,7 +597,7 @@
|
||||
"1 month",
|
||||
"3 months",
|
||||
"6 months"});
|
||||
this.comboBoxAutoBackupDeleteAfter.Location = new System.Drawing.Point(707, 397);
|
||||
this.comboBoxAutoBackupDeleteAfter.Location = new System.Drawing.Point(707, 357);
|
||||
this.comboBoxAutoBackupDeleteAfter.Name = "comboBoxAutoBackupDeleteAfter";
|
||||
this.comboBoxAutoBackupDeleteAfter.Size = new System.Drawing.Size(88, 21);
|
||||
this.comboBoxAutoBackupDeleteAfter.TabIndex = 45;
|
||||
@ -628,7 +605,7 @@
|
||||
// labelAutoBackupDeleteAfter
|
||||
//
|
||||
this.labelAutoBackupDeleteAfter.AutoSize = true;
|
||||
this.labelAutoBackupDeleteAfter.Location = new System.Drawing.Point(639, 400);
|
||||
this.labelAutoBackupDeleteAfter.Location = new System.Drawing.Point(639, 360);
|
||||
this.labelAutoBackupDeleteAfter.Name = "labelAutoBackupDeleteAfter";
|
||||
this.labelAutoBackupDeleteAfter.Size = new System.Drawing.Size(65, 13);
|
||||
this.labelAutoBackupDeleteAfter.TabIndex = 46;
|
||||
@ -637,7 +614,7 @@
|
||||
// checkBoxCheckForUpdates
|
||||
//
|
||||
this.checkBoxCheckForUpdates.AutoSize = true;
|
||||
this.checkBoxCheckForUpdates.Location = new System.Drawing.Point(441, 427);
|
||||
this.checkBoxCheckForUpdates.Location = new System.Drawing.Point(441, 397);
|
||||
this.checkBoxCheckForUpdates.Name = "checkBoxCheckForUpdates";
|
||||
this.checkBoxCheckForUpdates.Size = new System.Drawing.Size(114, 17);
|
||||
this.checkBoxCheckForUpdates.TabIndex = 46;
|
||||
@ -964,7 +941,7 @@
|
||||
"Every minute",
|
||||
"Every 5 minutes",
|
||||
"Every 15 minutes"});
|
||||
this.comboBoxAutoBackup.Location = new System.Drawing.Point(512, 397);
|
||||
this.comboBoxAutoBackup.Location = new System.Drawing.Point(512, 357);
|
||||
this.comboBoxAutoBackup.Name = "comboBoxAutoBackup";
|
||||
this.comboBoxAutoBackup.Size = new System.Drawing.Size(121, 21);
|
||||
this.comboBoxAutoBackup.TabIndex = 44;
|
||||
@ -972,7 +949,7 @@
|
||||
// labelAutoBackup
|
||||
//
|
||||
this.labelAutoBackup.AutoSize = true;
|
||||
this.labelAutoBackup.Location = new System.Drawing.Point(438, 400);
|
||||
this.labelAutoBackup.Location = new System.Drawing.Point(438, 360);
|
||||
this.labelAutoBackup.Name = "labelAutoBackup";
|
||||
this.labelAutoBackup.Size = new System.Drawing.Size(68, 13);
|
||||
this.labelAutoBackup.TabIndex = 43;
|
||||
@ -1016,7 +993,7 @@
|
||||
"UTF-7",
|
||||
"UTF-8",
|
||||
"Unicode"});
|
||||
this.comboBoxListViewDoubleClickEvent.Location = new System.Drawing.Point(441, 311);
|
||||
this.comboBoxListViewDoubleClickEvent.Location = new System.Drawing.Point(441, 314);
|
||||
this.comboBoxListViewDoubleClickEvent.Name = "comboBoxListViewDoubleClickEvent";
|
||||
this.comboBoxListViewDoubleClickEvent.Size = new System.Drawing.Size(332, 21);
|
||||
this.comboBoxListViewDoubleClickEvent.TabIndex = 42;
|
||||
@ -1024,7 +1001,7 @@
|
||||
// labelListViewDoubleClickEvent
|
||||
//
|
||||
this.labelListViewDoubleClickEvent.AutoSize = true;
|
||||
this.labelListViewDoubleClickEvent.Location = new System.Drawing.Point(438, 295);
|
||||
this.labelListViewDoubleClickEvent.Location = new System.Drawing.Point(438, 298);
|
||||
this.labelListViewDoubleClickEvent.Name = "labelListViewDoubleClickEvent";
|
||||
this.labelListViewDoubleClickEvent.Size = new System.Drawing.Size(227, 13);
|
||||
this.labelListViewDoubleClickEvent.TabIndex = 41;
|
||||
@ -4425,8 +4402,6 @@
|
||||
private System.Windows.Forms.PictureBox pictureBoxNetflixQualityCheck;
|
||||
private System.Windows.Forms.CheckBox checkBoxNetflixQualityCheck;
|
||||
private System.Windows.Forms.CheckBox checkBoxWaveformSetVideoPosMoveStartEnd;
|
||||
private System.Windows.Forms.Button buttonListviewColumns;
|
||||
private System.Windows.Forms.Label labelListviewColumns;
|
||||
private System.Windows.Forms.CheckBox checkBoxWaveformShowWpm;
|
||||
private System.Windows.Forms.CheckBox checkBoxWaveformShowCps;
|
||||
private System.Windows.Forms.NumericUpDown numericUpDownMaxWordsMin;
|
||||
|
@ -334,8 +334,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
labelShowLineBreaksAs.Text = language.ShowLineBreaksAs;
|
||||
textBoxShowLineBreaksAs.Left = labelShowLineBreaksAs.Left + labelShowLineBreaksAs.Width;
|
||||
labelListViewDoubleClickEvent.Text = language.MainListViewDoubleClickAction;
|
||||
labelListviewColumns.Text = language.MainListViewColumns;
|
||||
buttonListviewColumns.Text = GetListViewColumns();
|
||||
labelAutoBackup.Text = language.AutoBackup;
|
||||
labelAutoBackupDeleteAfter.Text = language.AutoBackupDeleteAfter;
|
||||
comboBoxAutoBackup.Left = labelAutoBackup.Left + labelAutoBackup.Width + 3;
|
||||
@ -838,6 +836,10 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
AddNode(adjustNode, Configuration.Settings.Language.Main.VideoControls.SetEndTime, nameof(Configuration.Settings.Shortcuts.MainAdjustSetEnd));
|
||||
AddNode(adjustNode, language.AdjustSelected100MsForward, nameof(Configuration.Settings.Shortcuts.MainAdjustSelected100MsForward));
|
||||
AddNode(adjustNode, language.AdjustSelected100MsBack, nameof(Configuration.Settings.Shortcuts.MainAdjustSelected100MsBack));
|
||||
AddNode(adjustNode, string.Format(language.AdjustStartXMsBack, Configuration.Settings.Tools.MoveStartEndMs), nameof(Configuration.Settings.Shortcuts.MainAdjustStartXMsBack));
|
||||
AddNode(adjustNode, string.Format(language.AdjustStartXMsForward, Configuration.Settings.Tools.MoveStartEndMs), nameof(Configuration.Settings.Shortcuts.MainAdjustStartXMsForward));
|
||||
AddNode(adjustNode, string.Format(language.AdjustEndXMsBack, Configuration.Settings.Tools.MoveStartEndMs), nameof(Configuration.Settings.Shortcuts.MainAdjustEndXMsBack));
|
||||
AddNode(adjustNode, string.Format(language.AdjustEndXMsForward, Configuration.Settings.Tools.MoveStartEndMs), nameof(Configuration.Settings.Shortcuts.MainAdjustEndXMsForward));
|
||||
AddNode(adjustNode, language.AdjustSetEndAndOffsetTheRest, nameof(Configuration.Settings.Shortcuts.MainAdjustSetEndAndOffsetTheRest));
|
||||
AddNode(adjustNode, language.AdjustSetEndAndOffsetTheRestAndGoToNext, nameof(Configuration.Settings.Shortcuts.MainAdjustSetEndAndOffsetTheRestAndGoToNext));
|
||||
AddNode(adjustNode, language.AdjustExtendCurrentSubtitle, nameof(Configuration.Settings.Shortcuts.GeneralExtendCurrentSubtitle));
|
||||
@ -2434,21 +2436,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
checkBoxSyntaxColorTextMoreThanTwoLines.Text = string.Format(Configuration.Settings.Language.Settings.SyntaxColorTextMoreThanMaxLines, numericUpDownMaxNumberOfLines.Value);
|
||||
}
|
||||
|
||||
private void buttonListviewColumns_Click(object sender, EventArgs e)
|
||||
{
|
||||
using (var form = new SettingsListViewColumns())
|
||||
{
|
||||
if (form.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
Configuration.Settings.Tools.ListViewShowColumnEndTime = form.ShowEndTime;
|
||||
Configuration.Settings.Tools.ListViewShowColumnDuration = form.ShowDuration;
|
||||
Configuration.Settings.Tools.ListViewShowColumnCharsPerSec = form.ShowCps;
|
||||
Configuration.Settings.Tools.ListViewShowColumnWordsPerMin = form.ShowWpm;
|
||||
buttonListviewColumns.Text = GetListViewColumns();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void radioButtonVideoPlayerMPV_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
checkBoxMpvHandlesPreviewText.Enabled = radioButtonVideoPlayerMPV.Checked;
|
||||
|
202
src/Forms/SettingsListViewColumns.Designer.cs
generated
202
src/Forms/SettingsListViewColumns.Designer.cs
generated
@ -1,202 +0,0 @@
|
||||
namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
partial class SettingsListViewColumns
|
||||
{
|
||||
/// <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.buttonCancel = new System.Windows.Forms.Button();
|
||||
this.buttonOK = new System.Windows.Forms.Button();
|
||||
this.checkBoxShowCps = new System.Windows.Forms.CheckBox();
|
||||
this.labelInfo = new System.Windows.Forms.Label();
|
||||
this.checkBoxShowWpm = new System.Windows.Forms.CheckBox();
|
||||
this.checkBoxShowText = new System.Windows.Forms.CheckBox();
|
||||
this.checkBoxShowNumber = new System.Windows.Forms.CheckBox();
|
||||
this.checkBoxShowStartTime = new System.Windows.Forms.CheckBox();
|
||||
this.checkBoxShowEndTime = new System.Windows.Forms.CheckBox();
|
||||
this.checkBoxShowDuration = new System.Windows.Forms.CheckBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// buttonCancel
|
||||
//
|
||||
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonCancel.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.buttonCancel.Location = new System.Drawing.Point(241, 207);
|
||||
this.buttonCancel.Name = "buttonCancel";
|
||||
this.buttonCancel.Size = new System.Drawing.Size(75, 21);
|
||||
this.buttonCancel.TabIndex = 6;
|
||||
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.ImeMode = System.Windows.Forms.ImeMode.NoControl;
|
||||
this.buttonOK.Location = new System.Drawing.Point(160, 207);
|
||||
this.buttonOK.Name = "buttonOK";
|
||||
this.buttonOK.Size = new System.Drawing.Size(75, 21);
|
||||
this.buttonOK.TabIndex = 5;
|
||||
this.buttonOK.Text = "&OK";
|
||||
this.buttonOK.UseVisualStyleBackColor = true;
|
||||
this.buttonOK.Click += new System.EventHandler(this.buttonOK_Click);
|
||||
//
|
||||
// checkBoxShowCps
|
||||
//
|
||||
this.checkBoxShowCps.AutoSize = true;
|
||||
this.checkBoxShowCps.Location = new System.Drawing.Point(44, 142);
|
||||
this.checkBoxShowCps.Name = "checkBoxShowCps";
|
||||
this.checkBoxShowCps.Size = new System.Drawing.Size(99, 17);
|
||||
this.checkBoxShowCps.TabIndex = 34;
|
||||
this.checkBoxShowCps.Text = "Characters/sec";
|
||||
this.checkBoxShowCps.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// labelInfo
|
||||
//
|
||||
this.labelInfo.AutoSize = true;
|
||||
this.labelInfo.Location = new System.Drawing.Point(23, 21);
|
||||
this.labelInfo.Name = "labelInfo";
|
||||
this.labelInfo.Size = new System.Drawing.Size(208, 13);
|
||||
this.labelInfo.TabIndex = 35;
|
||||
this.labelInfo.Text = "Choose visible columns for subtitle list view";
|
||||
//
|
||||
// checkBoxShowWpm
|
||||
//
|
||||
this.checkBoxShowWpm.AutoSize = true;
|
||||
this.checkBoxShowWpm.Location = new System.Drawing.Point(44, 165);
|
||||
this.checkBoxShowWpm.Name = "checkBoxShowWpm";
|
||||
this.checkBoxShowWpm.Size = new System.Drawing.Size(78, 17);
|
||||
this.checkBoxShowWpm.TabIndex = 36;
|
||||
this.checkBoxShowWpm.Text = "Words/min";
|
||||
this.checkBoxShowWpm.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBoxShowText
|
||||
//
|
||||
this.checkBoxShowText.AutoSize = true;
|
||||
this.checkBoxShowText.Checked = true;
|
||||
this.checkBoxShowText.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.checkBoxShowText.Enabled = false;
|
||||
this.checkBoxShowText.Location = new System.Drawing.Point(44, 188);
|
||||
this.checkBoxShowText.Name = "checkBoxShowText";
|
||||
this.checkBoxShowText.Size = new System.Drawing.Size(47, 17);
|
||||
this.checkBoxShowText.TabIndex = 37;
|
||||
this.checkBoxShowText.Text = "Text";
|
||||
this.checkBoxShowText.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBoxShowNumber
|
||||
//
|
||||
this.checkBoxShowNumber.AutoSize = true;
|
||||
this.checkBoxShowNumber.Checked = true;
|
||||
this.checkBoxShowNumber.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.checkBoxShowNumber.Enabled = false;
|
||||
this.checkBoxShowNumber.Location = new System.Drawing.Point(44, 50);
|
||||
this.checkBoxShowNumber.Name = "checkBoxShowNumber";
|
||||
this.checkBoxShowNumber.Size = new System.Drawing.Size(63, 17);
|
||||
this.checkBoxShowNumber.TabIndex = 38;
|
||||
this.checkBoxShowNumber.Text = "Number";
|
||||
this.checkBoxShowNumber.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBoxShowStartTime
|
||||
//
|
||||
this.checkBoxShowStartTime.AutoSize = true;
|
||||
this.checkBoxShowStartTime.Checked = true;
|
||||
this.checkBoxShowStartTime.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.checkBoxShowStartTime.Enabled = false;
|
||||
this.checkBoxShowStartTime.Location = new System.Drawing.Point(44, 73);
|
||||
this.checkBoxShowStartTime.Name = "checkBoxShowStartTime";
|
||||
this.checkBoxShowStartTime.Size = new System.Drawing.Size(70, 17);
|
||||
this.checkBoxShowStartTime.TabIndex = 39;
|
||||
this.checkBoxShowStartTime.Text = "Start time";
|
||||
this.checkBoxShowStartTime.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBoxShowEndTime
|
||||
//
|
||||
this.checkBoxShowEndTime.AutoSize = true;
|
||||
this.checkBoxShowEndTime.Checked = true;
|
||||
this.checkBoxShowEndTime.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.checkBoxShowEndTime.Location = new System.Drawing.Point(44, 96);
|
||||
this.checkBoxShowEndTime.Name = "checkBoxShowEndTime";
|
||||
this.checkBoxShowEndTime.Size = new System.Drawing.Size(71, 17);
|
||||
this.checkBoxShowEndTime.TabIndex = 40;
|
||||
this.checkBoxShowEndTime.Text = "End Time";
|
||||
this.checkBoxShowEndTime.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// checkBoxShowDuration
|
||||
//
|
||||
this.checkBoxShowDuration.AutoSize = true;
|
||||
this.checkBoxShowDuration.Checked = true;
|
||||
this.checkBoxShowDuration.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.checkBoxShowDuration.Location = new System.Drawing.Point(44, 119);
|
||||
this.checkBoxShowDuration.Name = "checkBoxShowDuration";
|
||||
this.checkBoxShowDuration.Size = new System.Drawing.Size(66, 17);
|
||||
this.checkBoxShowDuration.TabIndex = 41;
|
||||
this.checkBoxShowDuration.Text = "Duration";
|
||||
this.checkBoxShowDuration.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// SettingsListViewColumns
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(328, 240);
|
||||
this.Controls.Add(this.checkBoxShowDuration);
|
||||
this.Controls.Add(this.checkBoxShowEndTime);
|
||||
this.Controls.Add(this.checkBoxShowStartTime);
|
||||
this.Controls.Add(this.checkBoxShowNumber);
|
||||
this.Controls.Add(this.checkBoxShowText);
|
||||
this.Controls.Add(this.checkBoxShowWpm);
|
||||
this.Controls.Add(this.labelInfo);
|
||||
this.Controls.Add(this.checkBoxShowCps);
|
||||
this.Controls.Add(this.buttonCancel);
|
||||
this.Controls.Add(this.buttonOK);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.KeyPreview = true;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "SettingsListViewColumns";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Listview columns";
|
||||
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.SettingsListViewColumns_KeyDown);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button buttonCancel;
|
||||
private System.Windows.Forms.Button buttonOK;
|
||||
private System.Windows.Forms.CheckBox checkBoxShowCps;
|
||||
private System.Windows.Forms.Label labelInfo;
|
||||
private System.Windows.Forms.CheckBox checkBoxShowWpm;
|
||||
private System.Windows.Forms.CheckBox checkBoxShowText;
|
||||
private System.Windows.Forms.CheckBox checkBoxShowNumber;
|
||||
private System.Windows.Forms.CheckBox checkBoxShowStartTime;
|
||||
private System.Windows.Forms.CheckBox checkBoxShowEndTime;
|
||||
private System.Windows.Forms.CheckBox checkBoxShowDuration;
|
||||
}
|
||||
}
|
@ -1,60 +0,0 @@
|
||||
using Nikse.SubtitleEdit.Core;
|
||||
using Nikse.SubtitleEdit.Logic;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
public sealed partial class SettingsListViewColumns : Form
|
||||
{
|
||||
public bool ShowEndTime { get; set; }
|
||||
public bool ShowDuration { get; set; }
|
||||
public bool ShowCps { get; set; }
|
||||
public bool ShowWpm { get; set; }
|
||||
|
||||
public SettingsListViewColumns()
|
||||
{
|
||||
UiUtil.PreInitialize(this);
|
||||
InitializeComponent();
|
||||
UiUtil.FixFonts(this);
|
||||
checkBoxShowCps.Checked = Configuration.Settings.Tools.ListViewShowColumnCharsPerSec;
|
||||
checkBoxShowWpm.Checked = Configuration.Settings.Tools.ListViewShowColumnWordsPerMin;
|
||||
|
||||
checkBoxShowNumber.Text = Configuration.Settings.Language.General.NumberSymbol;
|
||||
checkBoxShowStartTime.Text = Configuration.Settings.Language.General.StartTime;
|
||||
checkBoxShowEndTime.Text = Configuration.Settings.Language.General.EndTime;
|
||||
checkBoxShowDuration.Text = Configuration.Settings.Language.General.Duration;
|
||||
checkBoxShowCps.Text = Configuration.Settings.Language.General.CharsPerSec;
|
||||
checkBoxShowWpm.Text = Configuration.Settings.Language.General.WordsPerMin;
|
||||
checkBoxShowText.Text = Configuration.Settings.Language.General.Text;
|
||||
|
||||
labelInfo.Text = Configuration.Settings.Language.Settings.MainListViewColumnsInfo;
|
||||
Text = Configuration.Settings.Language.Settings.MainListViewColumns;
|
||||
|
||||
buttonOK.Text = Configuration.Settings.Language.General.Ok;
|
||||
buttonCancel.Text = Configuration.Settings.Language.General.Cancel;
|
||||
UiUtil.FixLargeFonts(this, buttonOK);
|
||||
}
|
||||
|
||||
private void SettingsListViewColumns_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Escape)
|
||||
DialogResult = DialogResult.Cancel;
|
||||
}
|
||||
|
||||
private void buttonOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
ShowEndTime = checkBoxShowEndTime.Checked;
|
||||
ShowDuration = checkBoxShowDuration.Checked;
|
||||
ShowCps = checkBoxShowCps.Checked;
|
||||
ShowWpm = checkBoxShowWpm.Checked;
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
|
||||
private void buttonCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -1,120 +0,0 @@
|
||||
<?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>
|
||||
</root>
|
@ -151,7 +151,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
var p = new Paragraph();
|
||||
p.StartTime.TotalMilliseconds = _synchronizationPoints[i].TotalMilliseconds;
|
||||
p.EndTime.TotalMilliseconds = p.StartTime.TotalMilliseconds + _subtitle.Paragraphs[i].Duration.TotalMilliseconds;
|
||||
SubtitleListview1.SetStartTimeAndDuration(i, p);
|
||||
SubtitleListview1.SetStartTimeAndDuration(i, p, _subtitle.GetParagraphOrDefault(i + 1));
|
||||
|
||||
var item = new ListBoxSyncPoint { Index = i, Text = _subtitle.Paragraphs[i].Number + " - " + p.StartTime };
|
||||
listBoxSyncPoints.Items.Add(item);
|
||||
@ -162,7 +162,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
SubtitleListview1.SetBackgroundColor(i, SubtitleListview1.BackColor);
|
||||
SubtitleListview1.SetNumber(i, _subtitle.Paragraphs[i].Number.ToString(CultureInfo.InvariantCulture));
|
||||
SubtitleListview1.SetStartTimeAndDuration(i, _subtitle.Paragraphs[i]);
|
||||
SubtitleListview1.SetStartTimeAndDuration(i, _subtitle.Paragraphs[i], _subtitle.GetParagraphOrDefault(i + 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -605,12 +605,6 @@
|
||||
<Compile Include="Forms\Settings.Designer.cs">
|
||||
<DependentUpon>Settings.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\SettingsListViewColumns.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\SettingsListViewColumns.Designer.cs">
|
||||
<DependentUpon>SettingsListViewColumns.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\SettingsMpv.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@ -1196,9 +1190,6 @@
|
||||
<DependentUpon>Settings.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\SettingsListViewColumns.resx">
|
||||
<DependentUpon>SettingsListViewColumns.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\SettingsMpv.resx">
|
||||
<DependentUpon>SettingsMpv.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
Loading…
x
Reference in New Issue
Block a user