mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-26 23:12:38 +02:00
Added optional list view columns "chars/sec" + "words/min"
This commit is contained in:
parent
82b71e80de
commit
80245e5e3b
@ -24,6 +24,8 @@
|
||||
<StartTime>Start time</StartTime>
|
||||
<EndTime>End time</EndTime>
|
||||
<Duration>Duration</Duration>
|
||||
<CharsPerSec>Chars/sec</CharsPerSec>
|
||||
<WordsPerMin>Words/min</WordsPerMin>
|
||||
<NumberSymbol>#</NumberSymbol>
|
||||
<Number>Number</Number>
|
||||
<Text>Text</Text>
|
||||
@ -1703,6 +1705,8 @@ 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>
|
||||
<MainListViewVideoGoToPositionAndPlay>Go to video position and play</MainListViewVideoGoToPositionAndPlay>
|
||||
|
@ -136,6 +136,8 @@ namespace Nikse.SubtitleEdit.Core
|
||||
StartTime = "Start time",
|
||||
EndTime = "End time",
|
||||
Duration = "Duration",
|
||||
CharsPerSec = "Chars/sec",
|
||||
WordsPerMin = "Words/min",
|
||||
NumberSymbol = "#",
|
||||
Number = "Number",
|
||||
Text = "Text",
|
||||
@ -1987,6 +1989,8 @@ 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",
|
||||
MainListViewVideoGoToPositionAndPlay = "Go to video position and play",
|
||||
|
@ -121,6 +121,12 @@ namespace Nikse.SubtitleEdit.Core
|
||||
case "General/Duration":
|
||||
language.General.Duration = reader.Value;
|
||||
break;
|
||||
case "General/CharsPerSec":
|
||||
language.General.CharsPerSec = reader.Value;
|
||||
break;
|
||||
case "General/WordsPerMin":
|
||||
language.General.WordsPerMin = reader.Value;
|
||||
break;
|
||||
case "General/NumberSymbol":
|
||||
language.General.NumberSymbol = reader.Value;
|
||||
break;
|
||||
@ -4558,6 +4564,12 @@ 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;
|
||||
case "Settings/MainListViewNothing":
|
||||
language.Settings.MainListViewNothing = reader.Value;
|
||||
break;
|
||||
|
@ -28,6 +28,8 @@
|
||||
public string StartTime { get; set; }
|
||||
public string EndTime { get; set; }
|
||||
public string Duration { get; set; }
|
||||
public string CharsPerSec { get; set; }
|
||||
public string WordsPerMin { get; set; }
|
||||
public string NumberSymbol { get; set; }
|
||||
public string Number { get; set; }
|
||||
public string Text { get; set; }
|
||||
@ -1865,6 +1867,8 @@
|
||||
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; }
|
||||
public string MainListViewVideoGoToPositionAndPlay { get; set; }
|
||||
|
@ -101,6 +101,8 @@ namespace Nikse.SubtitleEdit.Core
|
||||
public int ListViewSyntaxMoreThanXLinesX { get; set; }
|
||||
public Color ListViewSyntaxErrorColor { get; set; }
|
||||
public Color ListViewUnfocusedSelectedColor { get; set; }
|
||||
public bool ListViewShowColumnCharsPerSec { get; set; }
|
||||
public bool ListViewShowColumnWordsPerMin { get; set; }
|
||||
public bool SplitAdvanced { get; set; }
|
||||
public string SplitOutputFolder { get; set; }
|
||||
public int SplitNumberOfParts { get; set; }
|
||||
@ -122,7 +124,7 @@ namespace Nikse.SubtitleEdit.Core
|
||||
public string BatchConvertFormat { get; set; }
|
||||
public string BatchConvertAssStyles { get; set; }
|
||||
public string BatchConvertSsaStyles { get; set; }
|
||||
public string BatchConvertExportCustomTextTemplate { get; set; }
|
||||
public string BatchConvertExportCustomTextTemplate { get; set; }
|
||||
public string ModifySelectionText { get; set; }
|
||||
public string ModifySelectionRule { get; set; }
|
||||
public bool ModifySelectionCaseSensitive { get; set; }
|
||||
@ -532,6 +534,7 @@ namespace Nikse.SubtitleEdit.Core
|
||||
public bool AutoWrapLineWhileTyping { get; set; }
|
||||
public double SubtitleMaximumCharactersPerSeconds { get; set; }
|
||||
public double SubtitleOptimalCharactersPerSeconds { get; set; }
|
||||
public double SubtitleMaximumWordsPerMinute { get; set; }
|
||||
public string SpellCheckLanguage { get; set; }
|
||||
public string VideoPlayer { get; set; }
|
||||
public int VideoPlayerDefaultVolume { get; set; }
|
||||
@ -570,6 +573,8 @@ namespace Nikse.SubtitleEdit.Core
|
||||
public int ListViewStartWidth { get; set; }
|
||||
public int ListViewEndWidth { get; set; }
|
||||
public int ListViewDurationWidth { get; set; }
|
||||
public int ListViewCpsWidth { get; set; }
|
||||
public int ListViewWpmWidth { get; set; }
|
||||
public int ListViewTextWidth { get; set; }
|
||||
public string VlcWaveTranscodeSettings { get; set; }
|
||||
public string VlcLocation { get; set; }
|
||||
@ -638,6 +643,7 @@ namespace Nikse.SubtitleEdit.Core
|
||||
AutoWrapLineWhileTyping = false;
|
||||
SubtitleMaximumCharactersPerSeconds = 25.0;
|
||||
SubtitleOptimalCharactersPerSeconds = 15.0;
|
||||
SubtitleMaximumWordsPerMinute = 300;
|
||||
SpellCheckLanguage = null;
|
||||
VideoPlayer = string.Empty;
|
||||
VideoPlayerDefaultVolume = 75;
|
||||
@ -669,7 +675,7 @@ namespace Nikse.SubtitleEdit.Core
|
||||
OpenSubtitleExtraExtensions = "*.mp4;*.m4v;*.mkv;*.ts"; // matroska/mp4/m4v files (can contain subtitles)
|
||||
ListViewColumnsRememberSize = true;
|
||||
VlcWaveTranscodeSettings = "acodec=s16l"; // "acodec=s16l,channels=1,ab=64,samplerate=8000";
|
||||
if(Configuration.IsRunningOnLinux())
|
||||
if (Configuration.IsRunningOnLinux())
|
||||
MpvVideoOutput = "vaapi"; // mpv "vo" option
|
||||
else
|
||||
MpvVideoOutput = "direct3d_shaders";
|
||||
@ -1473,6 +1479,9 @@ namespace Nikse.SubtitleEdit.Core
|
||||
subNode = node.SelectSingleNode("SubtitleOptimalCharactersPerSeconds");
|
||||
if (subNode != null)
|
||||
settings.General.SubtitleOptimalCharactersPerSeconds = Convert.ToDouble(subNode.InnerText, CultureInfo.InvariantCulture);
|
||||
subNode = node.SelectSingleNode("SubtitleMaximumWordsPerMinute");
|
||||
if (subNode != null)
|
||||
settings.General.SubtitleMaximumWordsPerMinute = Convert.ToDouble(subNode.InnerText, CultureInfo.InvariantCulture);
|
||||
subNode = node.SelectSingleNode("SpellCheckLanguage");
|
||||
if (subNode != null)
|
||||
settings.General.SpellCheckLanguage = subNode.InnerText;
|
||||
@ -1587,6 +1596,12 @@ namespace Nikse.SubtitleEdit.Core
|
||||
subNode = node.SelectSingleNode("ListViewDurationWidth");
|
||||
if (subNode != null)
|
||||
settings.General.ListViewDurationWidth = Convert.ToInt32(subNode.InnerText.Trim());
|
||||
subNode = node.SelectSingleNode("ListViewCpsWidth");
|
||||
if (subNode != null)
|
||||
settings.General.ListViewCpsWidth = Convert.ToInt32(subNode.InnerText.Trim());
|
||||
subNode = node.SelectSingleNode("ListViewWpmWidth");
|
||||
if (subNode != null)
|
||||
settings.General.ListViewWpmWidth = Convert.ToInt32(subNode.InnerText.Trim());
|
||||
subNode = node.SelectSingleNode("ListViewTextWidth");
|
||||
if (subNode != null)
|
||||
settings.General.ListViewTextWidth = Convert.ToInt32(subNode.InnerText.Trim());
|
||||
@ -1737,6 +1752,12 @@ namespace Nikse.SubtitleEdit.Core
|
||||
subNode = node.SelectSingleNode("ListViewUnfocusedSelectedColor");
|
||||
if (subNode != null)
|
||||
settings.Tools.ListViewUnfocusedSelectedColor = Color.FromArgb(int.Parse(subNode.InnerText));
|
||||
subNode = node.SelectSingleNode("ListViewShowColumnCharsPerSec");
|
||||
if (subNode != null)
|
||||
settings.Tools.ListViewShowColumnCharsPerSec = Convert.ToBoolean(subNode.InnerText);
|
||||
subNode = node.SelectSingleNode("ListViewShowColumnWordsPerMin");
|
||||
if (subNode != null)
|
||||
settings.Tools.ListViewShowColumnWordsPerMin = Convert.ToBoolean(subNode.InnerText);
|
||||
subNode = node.SelectSingleNode("SplitAdvanced");
|
||||
if (subNode != null)
|
||||
settings.Tools.SplitAdvanced = Convert.ToBoolean(subNode.InnerText);
|
||||
@ -2266,7 +2287,7 @@ namespace Nikse.SubtitleEdit.Core
|
||||
settings.VideoControls.WaveformListViewFocusOnMouseEnter = Convert.ToBoolean(subNode.InnerText);
|
||||
subNode = node.SelectSingleNode("WaveformSetVideoPositionOnMoveStartEnd");
|
||||
if (subNode != null)
|
||||
settings.VideoControls.WaveformSetVideoPositionOnMoveStartEnd = Convert.ToBoolean(subNode.InnerText);
|
||||
settings.VideoControls.WaveformSetVideoPositionOnMoveStartEnd = Convert.ToBoolean(subNode.InnerText);
|
||||
subNode = node.SelectSingleNode("WaveformBorderHitMs");
|
||||
if (subNode != null)
|
||||
settings.VideoControls.WaveformBorderHitMs = Convert.ToInt32(subNode.InnerText);
|
||||
@ -3061,6 +3082,7 @@ namespace Nikse.SubtitleEdit.Core
|
||||
textWriter.WriteElementString("AutoWrapLineWhileTyping", settings.General.AutoWrapLineWhileTyping.ToString());
|
||||
textWriter.WriteElementString("SubtitleMaximumCharactersPerSeconds", settings.General.SubtitleMaximumCharactersPerSeconds.ToString(CultureInfo.InvariantCulture));
|
||||
textWriter.WriteElementString("SubtitleOptimalCharactersPerSeconds", settings.General.SubtitleOptimalCharactersPerSeconds.ToString(CultureInfo.InvariantCulture));
|
||||
textWriter.WriteElementString("SubtitleMaximumWordsPerMinute", settings.General.SubtitleMaximumWordsPerMinute.ToString(CultureInfo.InvariantCulture));
|
||||
textWriter.WriteElementString("SpellCheckLanguage", settings.General.SpellCheckLanguage);
|
||||
textWriter.WriteElementString("VideoPlayer", settings.General.VideoPlayer);
|
||||
textWriter.WriteElementString("VideoPlayerDefaultVolume", settings.General.VideoPlayerDefaultVolume.ToString(CultureInfo.InvariantCulture));
|
||||
@ -3099,6 +3121,8 @@ namespace Nikse.SubtitleEdit.Core
|
||||
textWriter.WriteElementString("ListViewStartWidth", settings.General.ListViewStartWidth.ToString(CultureInfo.InvariantCulture));
|
||||
textWriter.WriteElementString("ListViewEndWidth", settings.General.ListViewEndWidth.ToString(CultureInfo.InvariantCulture));
|
||||
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("ListViewTextWidth", settings.General.ListViewTextWidth.ToString(CultureInfo.InvariantCulture));
|
||||
textWriter.WriteElementString("VlcWaveTranscodeSettings", settings.General.VlcWaveTranscodeSettings);
|
||||
textWriter.WriteElementString("VlcLocation", settings.General.VlcLocation);
|
||||
@ -3152,6 +3176,8 @@ namespace Nikse.SubtitleEdit.Core
|
||||
textWriter.WriteElementString("ListViewSyntaxColorOverlap", settings.Tools.ListViewSyntaxColorOverlap.ToString());
|
||||
textWriter.WriteElementString("ListViewSyntaxErrorColor", settings.Tools.ListViewSyntaxErrorColor.ToArgb().ToString(CultureInfo.InvariantCulture));
|
||||
textWriter.WriteElementString("ListViewUnfocusedSelectedColor", settings.Tools.ListViewUnfocusedSelectedColor.ToArgb().ToString(CultureInfo.InvariantCulture));
|
||||
textWriter.WriteElementString("ListViewShowColumnCharsPerSec", settings.Tools.ListViewShowColumnCharsPerSec.ToString(CultureInfo.InvariantCulture));
|
||||
textWriter.WriteElementString("ListViewShowColumnWordsPerMin", settings.Tools.ListViewShowColumnWordsPerMin.ToString(CultureInfo.InvariantCulture));
|
||||
textWriter.WriteElementString("SplitAdvanced", settings.Tools.SplitAdvanced.ToString());
|
||||
textWriter.WriteElementString("SplitOutputFolder", settings.Tools.SplitOutputFolder);
|
||||
textWriter.WriteElementString("SplitNumberOfParts", settings.Tools.SplitNumberOfParts.ToString(CultureInfo.InvariantCulture));
|
||||
@ -3172,7 +3198,7 @@ namespace Nikse.SubtitleEdit.Core
|
||||
textWriter.WriteElementString("BatchConvertFormat", settings.Tools.BatchConvertFormat);
|
||||
textWriter.WriteElementString("BatchConvertAssStyles", settings.Tools.BatchConvertAssStyles);
|
||||
textWriter.WriteElementString("BatchConvertSsaStyles", settings.Tools.BatchConvertSsaStyles);
|
||||
textWriter.WriteElementString("BatchConvertExportCustomTextTemplate", settings.Tools.BatchConvertExportCustomTextTemplate);
|
||||
textWriter.WriteElementString("BatchConvertExportCustomTextTemplate", settings.Tools.BatchConvertExportCustomTextTemplate);
|
||||
textWriter.WriteElementString("ModifySelectionRule", settings.Tools.ModifySelectionRule);
|
||||
textWriter.WriteElementString("ModifySelectionText", settings.Tools.ModifySelectionText);
|
||||
textWriter.WriteElementString("ModifySelectionCaseSensitive", settings.Tools.ModifySelectionCaseSensitive.ToString());
|
||||
@ -3347,7 +3373,7 @@ namespace Nikse.SubtitleEdit.Core
|
||||
textWriter.WriteElementString("WaveformAllowOverlap", settings.VideoControls.WaveformAllowOverlap.ToString());
|
||||
textWriter.WriteElementString("WaveformFocusOnMouseEnter", settings.VideoControls.WaveformFocusOnMouseEnter.ToString());
|
||||
textWriter.WriteElementString("WaveformListViewFocusOnMouseEnter", settings.VideoControls.WaveformListViewFocusOnMouseEnter.ToString());
|
||||
textWriter.WriteElementString("WaveformSetVideoPositionOnMoveStartEnd", settings.VideoControls.WaveformSetVideoPositionOnMoveStartEnd.ToString());
|
||||
textWriter.WriteElementString("WaveformSetVideoPositionOnMoveStartEnd", settings.VideoControls.WaveformSetVideoPositionOnMoveStartEnd.ToString());
|
||||
textWriter.WriteElementString("WaveformBorderHitMs", settings.VideoControls.WaveformBorderHitMs.ToString(CultureInfo.InvariantCulture));
|
||||
textWriter.WriteElementString("WaveformGridColor", settings.VideoControls.WaveformGridColor.ToArgb().ToString(CultureInfo.InvariantCulture));
|
||||
textWriter.WriteElementString("WaveformColor", settings.VideoControls.WaveformColor.ToArgb().ToString(CultureInfo.InvariantCulture));
|
||||
|
@ -9,15 +9,39 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
{
|
||||
public sealed class SubtitleListView : ListView
|
||||
{
|
||||
public const int ColumnIndexNumber = 0;
|
||||
public const int ColumnIndexStart = 1;
|
||||
public const int ColumnIndexEnd = 2;
|
||||
public const int ColumnIndexDuration = 3;
|
||||
public const int ColumnIndexText = 4;
|
||||
public const int ColumnIndexTextAlternate = 5;
|
||||
public int ColumnIndexExtra = 5;
|
||||
public enum SubtitleColumn
|
||||
{
|
||||
Number,
|
||||
Start,
|
||||
End,
|
||||
Duration,
|
||||
CharactersPerSeconds,
|
||||
WordsPerMinute,
|
||||
Text,
|
||||
TextAlternate,
|
||||
Extra,
|
||||
Network
|
||||
}
|
||||
|
||||
private int _firstVisibleIndex = -1;
|
||||
private List<SubtitleColumn> SubtitleColumns { get; }
|
||||
|
||||
public int GetColumnIndex(SubtitleColumn column)
|
||||
{
|
||||
return SubtitleColumns.IndexOf(column);
|
||||
}
|
||||
|
||||
public int ColumnIndexNumber = -1;
|
||||
public int ColumnIndexStart = -1;
|
||||
public int ColumnIndexEnd = -1;
|
||||
public int ColumnIndexDuration = -1;
|
||||
public int ColumnIndexCps = -1;
|
||||
public int ColumnIndexWpm = -1;
|
||||
public int ColumnIndexText = -1;
|
||||
public int ColumnIndexTextAlternate = -1;
|
||||
public int ColumnIndexExtra = -1;
|
||||
public int ColumnIndexNetwork = -1;
|
||||
|
||||
public bool IsAlternateTextColumnVisible;
|
||||
private string _lineSeparatorString = " || ";
|
||||
|
||||
private Font _subtitleFont = new Font("Tahoma", 8.25F);
|
||||
@ -30,10 +54,7 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
set
|
||||
{
|
||||
_subtitleFontName = value;
|
||||
if (SubtitleFontBold)
|
||||
_subtitleFont = new Font(_subtitleFontName, SubtitleFontSize, FontStyle.Bold);
|
||||
else
|
||||
_subtitleFont = new Font(_subtitleFontName, SubtitleFontSize);
|
||||
_subtitleFont = new Font(_subtitleFontName, SubtitleFontSize, GetFontStyle());
|
||||
}
|
||||
}
|
||||
|
||||
@ -61,26 +82,42 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsAlternateTextColumnVisible { get; private set; }
|
||||
public bool IsExtraColumnVisible { get; private set; }
|
||||
public bool DisplayExtraFromExtra { get; set; }
|
||||
public bool UseSyntaxColoring { get; set; }
|
||||
private Settings _settings;
|
||||
private bool _saveColumnWidthChanges;
|
||||
|
||||
public int FirstVisibleIndex
|
||||
{
|
||||
get { return _firstVisibleIndex; }
|
||||
set { _firstVisibleIndex = value; }
|
||||
}
|
||||
public int FirstVisibleIndex { get; set; } = -1;
|
||||
|
||||
public void InitializeLanguage(LanguageStructure.General general, Settings settings)
|
||||
{
|
||||
Columns[ColumnIndexNumber].Text = general.NumberSymbol;
|
||||
Columns[ColumnIndexStart].Text = general.StartTime;
|
||||
Columns[ColumnIndexEnd].Text = general.EndTime;
|
||||
Columns[ColumnIndexDuration].Text = general.Duration;
|
||||
Columns[ColumnIndexText].Text = general.Text;
|
||||
int idx = GetColumnIndex(SubtitleColumn.Number);
|
||||
if (idx >= 0)
|
||||
Columns[idx].Text = general.NumberSymbol;
|
||||
|
||||
idx = GetColumnIndex(SubtitleColumn.Start);
|
||||
if (idx >= 0)
|
||||
Columns[idx].Text = general.StartTime;
|
||||
|
||||
idx = GetColumnIndex(SubtitleColumn.End);
|
||||
if (idx >= 0)
|
||||
Columns[idx].Text = general.EndTime;
|
||||
|
||||
idx = GetColumnIndex(SubtitleColumn.Duration);
|
||||
if (idx >= 0)
|
||||
Columns[idx].Text = general.Duration;
|
||||
|
||||
idx = GetColumnIndex(SubtitleColumn.CharactersPerSeconds);
|
||||
if (idx >= 0)
|
||||
Columns[idx].Text = general.CharsPerSec;
|
||||
|
||||
idx = GetColumnIndex(SubtitleColumn.WordsPerMinute);
|
||||
if (idx >= 0)
|
||||
Columns[idx].Text = general.WordsPerMin;
|
||||
|
||||
idx = GetColumnIndex(SubtitleColumn.Text);
|
||||
if (idx >= 0)
|
||||
Columns[idx].Text = general.Text;
|
||||
|
||||
if (settings.General.ListViewLineSeparatorString != null)
|
||||
_lineSeparatorString = settings.General.ListViewLineSeparatorString;
|
||||
|
||||
@ -99,26 +136,58 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
if (_settings != null && _settings.General.ListViewColumnsRememberSize && _settings.General.ListViewNumberWidth > 1 &&
|
||||
_settings.General.ListViewStartWidth > 1 && _settings.General.ListViewEndWidth > 1 && _settings.General.ListViewDurationWidth > 1)
|
||||
{
|
||||
Columns[ColumnIndexNumber].Width = _settings.General.ListViewNumberWidth;
|
||||
Columns[ColumnIndexStart].Width = _settings.General.ListViewStartWidth;
|
||||
Columns[ColumnIndexEnd].Width = _settings.General.ListViewEndWidth;
|
||||
Columns[ColumnIndexDuration].Width = _settings.General.ListViewDurationWidth;
|
||||
Columns[ColumnIndexText].Width = _settings.General.ListViewTextWidth;
|
||||
int idx = GetColumnIndex(SubtitleColumn.Number);
|
||||
if (idx >= 0)
|
||||
Columns[idx].Width = _settings.General.ListViewNumberWidth;
|
||||
|
||||
idx = GetColumnIndex(SubtitleColumn.Start);
|
||||
if (idx >= 0)
|
||||
Columns[idx].Width = _settings.General.ListViewStartWidth;
|
||||
|
||||
idx = GetColumnIndex(SubtitleColumn.End);
|
||||
if (idx >= 0)
|
||||
Columns[idx].Width = _settings.General.ListViewEndWidth;
|
||||
|
||||
idx = GetColumnIndex(SubtitleColumn.Duration);
|
||||
if (idx >= 0)
|
||||
Columns[idx].Width = _settings.General.ListViewDurationWidth;
|
||||
|
||||
idx = GetColumnIndex(SubtitleColumn.CharactersPerSeconds);
|
||||
if (idx >= 0)
|
||||
Columns[idx].Width = _settings.General.ListViewCpsWidth;
|
||||
|
||||
idx = GetColumnIndex(SubtitleColumn.WordsPerMinute);
|
||||
if (idx >= 0)
|
||||
Columns[idx].Width = _settings.General.ListViewWpmWidth;
|
||||
|
||||
idx = GetColumnIndex(SubtitleColumn.Text);
|
||||
if (idx >= 0)
|
||||
Columns[idx].Width = _settings.General.ListViewTextWidth;
|
||||
|
||||
_saveColumnWidthChanges = true;
|
||||
}
|
||||
else
|
||||
else if (parentForm != null)
|
||||
{
|
||||
using (var graphics = parentForm.CreateGraphics())
|
||||
{
|
||||
var timestampSizeF = graphics.MeasureString(new TimeCode(0, 0, 33, 527).ToDisplayString(), Font);
|
||||
var timestampWidth = (int)(timestampSizeF.Width + 0.5) + 11;
|
||||
Columns[ColumnIndexStart].Width = timestampWidth;
|
||||
Columns[ColumnIndexEnd].Width = timestampWidth;
|
||||
Columns[ColumnIndexDuration].Width = (int)(timestampWidth * 0.8);
|
||||
|
||||
var idx = GetColumnIndex(SubtitleColumn.Start);
|
||||
if (idx >= 0)
|
||||
Columns[ColumnIndexStart].Width = timestampWidth;
|
||||
|
||||
idx = GetColumnIndex(SubtitleColumn.End);
|
||||
if (idx >= 0)
|
||||
Columns[ColumnIndexEnd].Width = timestampWidth;
|
||||
|
||||
idx = GetColumnIndex(SubtitleColumn.Duration);
|
||||
if (idx >= 0)
|
||||
Columns[ColumnIndexEnd].Width = (int)(timestampWidth * 0.8);
|
||||
}
|
||||
}
|
||||
|
||||
SubtitleListViewResize(this, null);
|
||||
SubtitleListViewLastColumnFill(this, null);
|
||||
}
|
||||
|
||||
public SubtitleListView()
|
||||
@ -126,19 +195,57 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
DoubleBuffered = true;
|
||||
UseSyntaxColoring = true;
|
||||
Font = new Font("Tahoma", 8.25F, FontStyle.Regular, GraphicsUnit.Point, 0);
|
||||
Columns.AddRange(new[]
|
||||
|
||||
SubtitleColumns = new List<SubtitleColumn>
|
||||
{
|
||||
new ColumnHeader { Text="#", Width=55 },
|
||||
new ColumnHeader { Width = 80 },
|
||||
new ColumnHeader { Width = 80 },
|
||||
new ColumnHeader { Width= 55 },
|
||||
new ColumnHeader { Width = -2 } // -2 = as rest of space (300)
|
||||
});
|
||||
SubtitleListViewResize(this, null);
|
||||
SubtitleColumn.Number,
|
||||
SubtitleColumn.Start,
|
||||
SubtitleColumn.End,
|
||||
SubtitleColumn.Duration,
|
||||
SubtitleColumn.Text
|
||||
};
|
||||
UpdateColumnIndexes();
|
||||
|
||||
foreach (var c in SubtitleColumns)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
case SubtitleColumn.Number:
|
||||
Columns.Add(new ColumnHeader { Width = 55 });
|
||||
break;
|
||||
case SubtitleColumn.Start:
|
||||
Columns.Add(new ColumnHeader { Width = 80 });
|
||||
break;
|
||||
case SubtitleColumn.End:
|
||||
Columns.Add(new ColumnHeader { Width = 80 });
|
||||
break;
|
||||
case SubtitleColumn.Duration:
|
||||
Columns.Add(new ColumnHeader { Width = 55 });
|
||||
break;
|
||||
case SubtitleColumn.CharactersPerSeconds:
|
||||
Columns.Add(new ColumnHeader { Width = 55 });
|
||||
break;
|
||||
case SubtitleColumn.WordsPerMinute:
|
||||
Columns.Add(new ColumnHeader { Width = 55 });
|
||||
break;
|
||||
case SubtitleColumn.Text:
|
||||
Columns.Add(new ColumnHeader { Width = 300 });
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// add optional columns
|
||||
if (Configuration.Settings != null && Configuration.Settings.Tools.ListViewShowColumnCharsPerSec)
|
||||
ShowCharsSecColumn(Configuration.Settings.Language.General.CharsPerSec);
|
||||
|
||||
if (Configuration.Settings != null && Configuration.Settings.Tools.ListViewShowColumnWordsPerMin)
|
||||
ShowWordsMinColumn(Configuration.Settings.Language.General.WordsPerMin);
|
||||
|
||||
SubtitleListViewLastColumnFill(this, null);
|
||||
|
||||
FullRowSelect = true;
|
||||
View = View.Details;
|
||||
Resize += SubtitleListViewResize;
|
||||
Resize += SubtitleListViewLastColumnFill;
|
||||
GridLines = true;
|
||||
ColumnWidthChanged += SubtitleListViewColumnWidthChanged;
|
||||
OwnerDraw = true;
|
||||
@ -147,6 +254,20 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
DrawColumnHeader += SubtitleListView_DrawColumnHeader;
|
||||
}
|
||||
|
||||
private void UpdateColumnIndexes()
|
||||
{
|
||||
ColumnIndexNumber = GetColumnIndex(SubtitleColumn.Number);
|
||||
ColumnIndexStart = GetColumnIndex(SubtitleColumn.Start);
|
||||
ColumnIndexEnd = GetColumnIndex(SubtitleColumn.End);
|
||||
ColumnIndexDuration = GetColumnIndex(SubtitleColumn.Duration);
|
||||
ColumnIndexCps = GetColumnIndex(SubtitleColumn.CharactersPerSeconds);
|
||||
ColumnIndexWpm = GetColumnIndex(SubtitleColumn.WordsPerMinute);
|
||||
ColumnIndexText = GetColumnIndex(SubtitleColumn.Text);
|
||||
ColumnIndexTextAlternate = GetColumnIndex(SubtitleColumn.TextAlternate);
|
||||
ColumnIndexExtra = GetColumnIndex(SubtitleColumn.Extra);
|
||||
ColumnIndexNetwork = GetColumnIndex(SubtitleColumn.Network);
|
||||
}
|
||||
|
||||
private void SubtitleListView_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
|
||||
{
|
||||
e.DrawDefault = true;
|
||||
@ -192,8 +313,8 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
for (int i = 0; i < Columns.Count; i++)
|
||||
w += Columns[i].Width;
|
||||
|
||||
int extra = 0;
|
||||
int extra2 = 0;
|
||||
int extra;
|
||||
int extra2;
|
||||
if (!IsVerticalScrollbarVisible())
|
||||
{
|
||||
// no vertical scrollbar
|
||||
@ -210,12 +331,8 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
var rect = new Rectangle(w - (e.Bounds.Left + e.Bounds.Width + 2) + extra, e.Bounds.Top, e.Bounds.Width, e.Bounds.Height);
|
||||
if (Configuration.Settings != null)
|
||||
{
|
||||
if (backgroundColor == BackColor)
|
||||
backgroundColor = Configuration.Settings.Tools.ListViewUnfocusedSelectedColor;
|
||||
else
|
||||
{
|
||||
backgroundColor = GetCustomColor(backgroundColor);
|
||||
}
|
||||
backgroundColor = backgroundColor == BackColor ? Configuration.Settings.Tools.ListViewUnfocusedSelectedColor : GetCustomColor(backgroundColor);
|
||||
|
||||
var sb = new SolidBrush(backgroundColor);
|
||||
e.Graphics.FillRectangle(sb, rect);
|
||||
}
|
||||
@ -232,12 +349,7 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
Rectangle rect = e.Bounds;
|
||||
if (Configuration.Settings != null)
|
||||
{
|
||||
if (backgroundColor == BackColor)
|
||||
backgroundColor = Configuration.Settings.Tools.ListViewUnfocusedSelectedColor;
|
||||
else
|
||||
{
|
||||
backgroundColor = GetCustomColor(backgroundColor);
|
||||
}
|
||||
backgroundColor = backgroundColor == BackColor ? Configuration.Settings.Tools.ListViewUnfocusedSelectedColor : GetCustomColor(backgroundColor);
|
||||
var sb = new SolidBrush(backgroundColor);
|
||||
e.Graphics.FillRectangle(sb, rect);
|
||||
}
|
||||
@ -282,116 +394,221 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
{
|
||||
if (_settings != null && _saveColumnWidthChanges)
|
||||
{
|
||||
switch (e.ColumnIndex)
|
||||
if (e.ColumnIndex == ColumnIndexNumber)
|
||||
{
|
||||
case ColumnIndexNumber:
|
||||
Configuration.Settings.General.ListViewNumberWidth = Columns[ColumnIndexNumber].Width;
|
||||
break;
|
||||
case ColumnIndexStart:
|
||||
Configuration.Settings.General.ListViewStartWidth = Columns[ColumnIndexStart].Width;
|
||||
break;
|
||||
case ColumnIndexEnd:
|
||||
Configuration.Settings.General.ListViewEndWidth = Columns[ColumnIndexEnd].Width;
|
||||
break;
|
||||
case ColumnIndexDuration:
|
||||
Configuration.Settings.General.ListViewDurationWidth = Columns[ColumnIndexDuration].Width;
|
||||
break;
|
||||
case ColumnIndexText:
|
||||
Configuration.Settings.General.ListViewTextWidth = Columns[ColumnIndexText].Width;
|
||||
break;
|
||||
Configuration.Settings.General.ListViewNumberWidth = Columns[ColumnIndexNumber].Width;
|
||||
}
|
||||
else if (e.ColumnIndex == ColumnIndexStart)
|
||||
{
|
||||
Configuration.Settings.General.ListViewStartWidth = Columns[ColumnIndexStart].Width;
|
||||
}
|
||||
else if (e.ColumnIndex == ColumnIndexEnd)
|
||||
{
|
||||
Configuration.Settings.General.ListViewEndWidth = Columns[ColumnIndexEnd].Width;
|
||||
}
|
||||
else if (e.ColumnIndex == ColumnIndexDuration)
|
||||
{
|
||||
Configuration.Settings.General.ListViewDurationWidth = Columns[ColumnIndexDuration].Width;
|
||||
}
|
||||
else if (e.ColumnIndex == ColumnIndexCps)
|
||||
{
|
||||
Configuration.Settings.General.ListViewCpsWidth = Columns[ColumnIndexCps].Width;
|
||||
}
|
||||
else if (e.ColumnIndex == ColumnIndexWpm)
|
||||
{
|
||||
Configuration.Settings.General.ListViewWpmWidth = Columns[ColumnIndexWpm].Width;
|
||||
}
|
||||
if (e.ColumnIndex == ColumnIndexText)
|
||||
{
|
||||
Configuration.Settings.General.ListViewTextWidth = Columns[ColumnIndexText].Width;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void AutoSizeAllColumns(Form parentForm)
|
||||
{
|
||||
if (_settings != null && _settings.General.ListViewColumnsRememberSize && _settings.General.ListViewNumberWidth > 1)
|
||||
Columns[ColumnIndexNumber].Width = _settings.General.ListViewNumberWidth;
|
||||
else
|
||||
Columns[ColumnIndexNumber].Width = 55;
|
||||
|
||||
InitializeTimestampColumnWidths(parentForm);
|
||||
|
||||
int length = Columns[ColumnIndexNumber].Width + Columns[ColumnIndexStart].Width + Columns[ColumnIndexEnd].Width + Columns[ColumnIndexDuration].Width;
|
||||
int lengthAvailable = Width - length;
|
||||
|
||||
int numberOfRestColumns = 1;
|
||||
if (IsAlternateTextColumnVisible)
|
||||
numberOfRestColumns++;
|
||||
if (IsExtraColumnVisible)
|
||||
numberOfRestColumns++;
|
||||
|
||||
if (IsAlternateTextColumnVisible && !IsExtraColumnVisible)
|
||||
// resize "number column"
|
||||
var numberIdx = GetColumnIndex(SubtitleColumn.Number);
|
||||
if (numberIdx > 0)
|
||||
{
|
||||
if (_settings != null && _settings.General.ListViewColumnsRememberSize && _settings.General.ListViewNumberWidth > 1 &&
|
||||
_settings.General.ListViewStartWidth > 1 && _settings.General.ListViewEndWidth > 1 && _settings.General.ListViewDurationWidth > 1)
|
||||
{
|
||||
int restWidth = lengthAvailable - 15 - Columns[ColumnIndexText].Width;
|
||||
if (restWidth > 0)
|
||||
Columns[ColumnIndexTextAlternate].Width = restWidth;
|
||||
}
|
||||
if (_settings != null && _settings.General.ListViewColumnsRememberSize && _settings.General.ListViewNumberWidth > 1)
|
||||
Columns[numberIdx].Width = _settings.General.ListViewNumberWidth;
|
||||
else
|
||||
Columns[numberIdx].Width = 55;
|
||||
}
|
||||
|
||||
int w = 0;
|
||||
for (int index = 0; index < SubtitleColumns.Count; index++)
|
||||
{
|
||||
var column = SubtitleColumns[index];
|
||||
int cw = Columns[index].Width;
|
||||
if (cw < 55 || column == SubtitleColumn.Extra || column == SubtitleColumn.Network)
|
||||
{
|
||||
int restWidth = (lengthAvailable / 2) - 15;
|
||||
Columns[ColumnIndexText].Width = restWidth;
|
||||
Columns[ColumnIndexTextAlternate].Width = restWidth;
|
||||
cw = 55;
|
||||
if (column != SubtitleColumn.Number)
|
||||
cw = 120;
|
||||
Columns[index].Width = cw;
|
||||
Columns[index].Width = cw;
|
||||
Columns[index].Width = cw;
|
||||
}
|
||||
if (column != SubtitleColumn.Text && column != SubtitleColumn.TextAlternate)
|
||||
w += cw;
|
||||
}
|
||||
else if (!IsAlternateTextColumnVisible && !IsExtraColumnVisible)
|
||||
|
||||
int lengthAvailable = Width - w;
|
||||
if (ColumnIndexTextAlternate >= 0)
|
||||
{
|
||||
int restWidth = lengthAvailable - 23;
|
||||
Columns[ColumnIndexText].Width = restWidth;
|
||||
}
|
||||
else if (!IsAlternateTextColumnVisible && IsExtraColumnVisible)
|
||||
{
|
||||
int restWidth = lengthAvailable - 15;
|
||||
Columns[ColumnIndexText].Width = (int)(restWidth * 0.6);
|
||||
Columns[ColumnIndexExtra].Width = (int)(restWidth * 0.4);
|
||||
}
|
||||
else
|
||||
{
|
||||
int restWidth = lengthAvailable - 15;
|
||||
Columns[ColumnIndexText].Width = (int)(restWidth * 0.4);
|
||||
Columns[ColumnIndexTextAlternate].Width = (int)(restWidth * 0.4);
|
||||
Columns[ColumnIndexExtra].Width = (int)(restWidth * 0.2);
|
||||
lengthAvailable = lengthAvailable / 2;
|
||||
Columns[ColumnIndexTextAlternate].Width = lengthAvailable;
|
||||
Columns[ColumnIndexTextAlternate].Width = lengthAvailable;
|
||||
Columns[ColumnIndexTextAlternate].Width = lengthAvailable;
|
||||
}
|
||||
Columns[ColumnIndexText].Width = lengthAvailable;
|
||||
Columns[ColumnIndexText].Width = lengthAvailable;
|
||||
Columns[ColumnIndexText].Width = lengthAvailable;
|
||||
SubtitleListViewLastColumnFill(this, null);
|
||||
}
|
||||
|
||||
public void ShowAlternateTextColumn(string text)
|
||||
public void ShowAlternateTextColumn(string title)
|
||||
{
|
||||
if (!IsAlternateTextColumnVisible)
|
||||
if (GetColumnIndex(SubtitleColumn.TextAlternate) == -1)
|
||||
{
|
||||
ColumnIndexExtra = ColumnIndexTextAlternate + 1;
|
||||
if (IsExtraColumnVisible)
|
||||
if (ColumnIndexText >= 0)
|
||||
{
|
||||
Columns.Insert(ColumnIndexTextAlternate, new ColumnHeader { Text = text, Width = -2 });
|
||||
SubtitleColumns.Insert(ColumnIndexText + 1, SubtitleColumn.TextAlternate);
|
||||
Columns.Insert(ColumnIndexText + 1, new ColumnHeader { Text = title });
|
||||
}
|
||||
else
|
||||
{
|
||||
Columns.Add(new ColumnHeader { Text = text, Width = -2 });
|
||||
SubtitleColumns.Add(SubtitleColumn.TextAlternate);
|
||||
Columns.Add(new ColumnHeader { Text = title });
|
||||
}
|
||||
|
||||
int length = Columns[ColumnIndexNumber].Width + Columns[ColumnIndexStart].Width + Columns[ColumnIndexEnd].Width + Columns[ColumnIndexDuration].Width;
|
||||
int lengthAvailable = Width - length;
|
||||
Columns[ColumnIndexText].Width = (lengthAvailable / 2) - 15;
|
||||
Columns[ColumnIndexTextAlternate].Width = -2;
|
||||
|
||||
UpdateColumnIndexes();
|
||||
Columns[ColumnIndexTextAlternate].Width = 300;
|
||||
Columns[ColumnIndexTextAlternate].Width = 300;
|
||||
Columns[ColumnIndexTextAlternate].Width = 300;
|
||||
IsAlternateTextColumnVisible = true;
|
||||
AutoSizeAllColumns(null);
|
||||
}
|
||||
}
|
||||
|
||||
public void HideAlternateTextColumn()
|
||||
public void ShowExtraColumn(string title)
|
||||
{
|
||||
if (IsAlternateTextColumnVisible)
|
||||
if (GetColumnIndex(SubtitleColumn.Extra) == -1)
|
||||
{
|
||||
IsAlternateTextColumnVisible = false;
|
||||
Columns.RemoveAt(ColumnIndexTextAlternate);
|
||||
ColumnIndexExtra = ColumnIndexTextAlternate;
|
||||
SubtitleListViewResize(null, null);
|
||||
if (ColumnIndexNetwork >= 0)
|
||||
{
|
||||
SubtitleColumns.Insert(ColumnIndexNetwork, SubtitleColumn.Extra);
|
||||
Columns.Insert(ColumnIndexNetwork, new ColumnHeader { Text = title, Width = 120 });
|
||||
}
|
||||
else
|
||||
{
|
||||
SubtitleColumns.Add(SubtitleColumn.Extra);
|
||||
Columns.Add(new ColumnHeader { Text = title, Width = 120 });
|
||||
}
|
||||
UpdateColumnIndexes();
|
||||
Columns[ColumnIndexExtra].Width = 120;
|
||||
Columns[ColumnIndexExtra].Width = 120;
|
||||
Columns[ColumnIndexExtra].Width = 120;
|
||||
AutoSizeAllColumns(null);
|
||||
}
|
||||
}
|
||||
|
||||
private void SubtitleListViewResize(object sender, EventArgs e)
|
||||
public void ShowNetworkColumn(string title)
|
||||
{
|
||||
if (GetColumnIndex(SubtitleColumn.Network) == -1)
|
||||
{
|
||||
SubtitleColumns.Add(SubtitleColumn.Network);
|
||||
Columns.Add(new ColumnHeader { Text = title, Width = 120 });
|
||||
UpdateColumnIndexes();
|
||||
AutoSizeAllColumns(null);
|
||||
}
|
||||
}
|
||||
|
||||
public void ShowCharsSecColumn(string title)
|
||||
{
|
||||
if (GetColumnIndex(SubtitleColumn.CharactersPerSeconds) == -1)
|
||||
{
|
||||
if (ColumnIndexDuration >= 0)
|
||||
{
|
||||
SubtitleColumns.Insert(ColumnIndexDuration + 1, SubtitleColumn.CharactersPerSeconds);
|
||||
Columns.Insert(ColumnIndexDuration + 1, new ColumnHeader { Text = title, Width = 90 });
|
||||
}
|
||||
else if (ColumnIndexEnd >= 0)
|
||||
{
|
||||
SubtitleColumns.Insert(ColumnIndexEnd + 1, SubtitleColumn.CharactersPerSeconds);
|
||||
Columns.Insert(ColumnIndexEnd + 1, new ColumnHeader { Text = title, Width = 90 });
|
||||
}
|
||||
else if (ColumnIndexStart >= 0)
|
||||
{
|
||||
SubtitleColumns.Insert(ColumnIndexStart + 1, SubtitleColumn.CharactersPerSeconds);
|
||||
Columns.Insert(ColumnIndexStart + 1, new ColumnHeader { Text = title, Width = 90 });
|
||||
}
|
||||
else
|
||||
{
|
||||
SubtitleColumns.Add(SubtitleColumn.CharactersPerSeconds);
|
||||
Columns.Add(new ColumnHeader { Text = title, Width = 90 });
|
||||
}
|
||||
UpdateColumnIndexes();
|
||||
Columns[ColumnIndexCps].Width = 90;
|
||||
Columns[ColumnIndexCps].Width = 90;
|
||||
Columns[ColumnIndexCps].Width = 90;
|
||||
AutoSizeAllColumns(null);
|
||||
}
|
||||
}
|
||||
|
||||
public void ShowWordsMinColumn(string title)
|
||||
{
|
||||
if (GetColumnIndex(SubtitleColumn.WordsPerMinute) == -1)
|
||||
{
|
||||
if (ColumnIndexCps >= 0)
|
||||
{
|
||||
SubtitleColumns.Insert(ColumnIndexCps + 1, SubtitleColumn.WordsPerMinute);
|
||||
Columns.Insert(ColumnIndexCps + 1, new ColumnHeader { Text = title, Width = 120 });
|
||||
}
|
||||
else if (ColumnIndexDuration >= 0)
|
||||
{
|
||||
SubtitleColumns.Insert(ColumnIndexDuration + 1, SubtitleColumn.WordsPerMinute);
|
||||
Columns.Insert(ColumnIndexDuration + 1, new ColumnHeader { Text = title, Width = 120 });
|
||||
}
|
||||
else if (ColumnIndexEnd >= 0)
|
||||
{
|
||||
SubtitleColumns.Insert(ColumnIndexEnd + 1, SubtitleColumn.WordsPerMinute);
|
||||
Columns.Insert(ColumnIndexEnd + 1, new ColumnHeader { Text = title, Width = 120 });
|
||||
}
|
||||
else if (ColumnIndexStart >= 0)
|
||||
{
|
||||
SubtitleColumns.Insert(ColumnIndexStart + 1, SubtitleColumn.WordsPerMinute);
|
||||
Columns.Insert(ColumnIndexStart + 1, new ColumnHeader { Text = title, Width = 120 });
|
||||
}
|
||||
else
|
||||
{
|
||||
SubtitleColumns.Add(SubtitleColumn.CharactersPerSeconds);
|
||||
Columns.Add(new ColumnHeader { Text = title, Width = 120 });
|
||||
}
|
||||
UpdateColumnIndexes();
|
||||
Columns[ColumnIndexWpm].Width = 120;
|
||||
Columns[ColumnIndexWpm].Width = 120;
|
||||
Columns[ColumnIndexWpm].Width = 120;
|
||||
AutoSizeAllColumns(null);
|
||||
}
|
||||
}
|
||||
|
||||
public void HideColumn(SubtitleColumn column)
|
||||
{
|
||||
var idx = GetColumnIndex(column);
|
||||
if (idx >= 0)
|
||||
{
|
||||
SubtitleColumns.RemoveAt(idx);
|
||||
Columns.RemoveAt(idx);
|
||||
UpdateColumnIndexes();
|
||||
AutoSizeAllColumns(null);
|
||||
}
|
||||
}
|
||||
|
||||
private void SubtitleListViewLastColumnFill(object sender, EventArgs e)
|
||||
{
|
||||
int width = 0;
|
||||
for (int i = 0; i < Columns.Count - 1; i++)
|
||||
@ -441,9 +658,7 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
int i = 0;
|
||||
foreach (Paragraph paragraph in paragraphs)
|
||||
{
|
||||
Add(paragraph);
|
||||
if (DisplayExtraFromExtra && IsExtraColumnVisible && Items[i].SubItems.Count > ColumnIndexExtra)
|
||||
Items[i].SubItems[ColumnIndexExtra].Text = paragraph.Extra;
|
||||
Add(paragraph, null);
|
||||
SyntaxColorLine(paragraphs, i, paragraph);
|
||||
i++;
|
||||
}
|
||||
@ -465,12 +680,8 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
int i = 0;
|
||||
foreach (Paragraph paragraph in paragraphs)
|
||||
{
|
||||
Add(paragraph);
|
||||
Paragraph alternate = Utilities.GetOriginalParagraph(i, paragraph, paragraphsAlternate);
|
||||
if (alternate != null)
|
||||
SetAlternateText(i, alternate.Text);
|
||||
if (DisplayExtraFromExtra && IsExtraColumnVisible)
|
||||
SetExtraText(i, paragraph.Extra, ForeColor);
|
||||
Add(paragraph, alternate);
|
||||
SyntaxColorLine(paragraphs, i, paragraph);
|
||||
i++;
|
||||
}
|
||||
@ -500,7 +711,21 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
{
|
||||
item.UseItemStyleForSubItems = false;
|
||||
item.SubItems[ColumnIndexDuration].BackColor = BackColor;
|
||||
if (ColumnIndexCps >= 0)
|
||||
{
|
||||
item.SubItems[ColumnIndexCps].BackColor = BackColor;
|
||||
}
|
||||
if (ColumnIndexWpm >= 0)
|
||||
{
|
||||
item.SubItems[ColumnIndexWpm].BackColor = BackColor;
|
||||
}
|
||||
}
|
||||
|
||||
if (ColumnIndexWpm >= 0 && paragraph.WordsPerMinute > Configuration.Settings.General.SubtitleMaximumWordsPerMinute)
|
||||
{
|
||||
item.SubItems[ColumnIndexWpm].BackColor = Configuration.Settings.Tools.ListViewSyntaxErrorColor;
|
||||
}
|
||||
|
||||
bool durationChanged = false;
|
||||
if (_settings.Tools.ListViewSyntaxColorDurationSmall)
|
||||
{
|
||||
@ -509,6 +734,10 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
{
|
||||
item.SubItems[ColumnIndexDuration].BackColor = Configuration.Settings.Tools.ListViewSyntaxErrorColor;
|
||||
durationChanged = true;
|
||||
if (ColumnIndexCps >= 0)
|
||||
{
|
||||
item.SubItems[ColumnIndexCps].BackColor = Configuration.Settings.Tools.ListViewSyntaxErrorColor;
|
||||
}
|
||||
}
|
||||
else if (paragraph.Duration.TotalMilliseconds < Configuration.Settings.General.SubtitleMinimumDisplayMilliseconds)
|
||||
{
|
||||
@ -518,7 +747,6 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
}
|
||||
if (_settings.Tools.ListViewSyntaxColorDurationBig)
|
||||
{
|
||||
// double charactersPerSecond = Utilities.GetCharactersPerSecond(paragraph);
|
||||
if (paragraph.Duration.TotalMilliseconds > Configuration.Settings.General.SubtitleMaximumDisplayMilliseconds)
|
||||
{
|
||||
item.SubItems[ColumnIndexDuration].BackColor = Configuration.Settings.Tools.ListViewSyntaxErrorColor;
|
||||
@ -557,7 +785,7 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
return;
|
||||
}
|
||||
}
|
||||
s = s.Replace(Environment.NewLine, string.Empty); // we don't count new line in total length... correct?
|
||||
s = s.Replace(Environment.NewLine, string.Empty); // we don't count new line in total length
|
||||
if (s.Length <= Configuration.Settings.General.SubtitleLineMaximumLength * noOfLines)
|
||||
{
|
||||
if (noOfLines > Configuration.Settings.Tools.ListViewSyntaxMoreThanXLinesX && _settings.Tools.ListViewSyntaxMoreThanXLines)
|
||||
@ -587,13 +815,43 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
return timeCode.ToDisplayString();
|
||||
}
|
||||
|
||||
private void Add(Paragraph paragraph)
|
||||
private void Add(Paragraph paragraph, Paragraph paragraphAlternate)
|
||||
{
|
||||
var item = new ListViewItem(paragraph.Number.ToString(CultureInfo.InvariantCulture)) { Tag = paragraph, UseItemStyleForSubItems = false };
|
||||
item.SubItems.Add(GetDisplayTime(paragraph.StartTime));
|
||||
item.SubItems.Add(GetDisplayTime(paragraph.EndTime));
|
||||
item.SubItems.Add(paragraph.Duration.ToShortDisplayString());
|
||||
item.SubItems.Add(paragraph.Text.Replace(Environment.NewLine, _lineSeparatorString));
|
||||
foreach (var column in SubtitleColumns)
|
||||
{
|
||||
switch (column)
|
||||
{
|
||||
case SubtitleColumn.Start:
|
||||
item.SubItems.Add(GetDisplayTime(paragraph.StartTime));
|
||||
break;
|
||||
case SubtitleColumn.End:
|
||||
item.SubItems.Add(GetDisplayTime(paragraph.EndTime));
|
||||
break;
|
||||
case SubtitleColumn.Duration:
|
||||
item.SubItems.Add(paragraph.Duration.ToShortDisplayString());
|
||||
break;
|
||||
case SubtitleColumn.CharactersPerSeconds:
|
||||
item.SubItems.Add($"{Utilities.GetCharactersPerSecond(paragraph):00.00}");
|
||||
break;
|
||||
case SubtitleColumn.WordsPerMinute:
|
||||
item.SubItems.Add($"{paragraph.WordsPerMinute:000.00}");
|
||||
break;
|
||||
case SubtitleColumn.Text:
|
||||
item.SubItems.Add(paragraph.Text.Replace(Environment.NewLine, _lineSeparatorString));
|
||||
break;
|
||||
case SubtitleColumn.TextAlternate:
|
||||
var text = paragraphAlternate != null ? paragraphAlternate.Text : string.Empty;
|
||||
item.SubItems.Add(text.Replace(Environment.NewLine, _lineSeparatorString));
|
||||
break;
|
||||
case SubtitleColumn.Extra:
|
||||
item.SubItems.Add(paragraph.Extra);
|
||||
break;
|
||||
case SubtitleColumn.Network:
|
||||
item.SubItems.Add(string.Empty);
|
||||
break;
|
||||
}
|
||||
}
|
||||
item.Font = new Font(_subtitleFontName, SubtitleFontSize, GetFontStyle());
|
||||
Items.Add(item);
|
||||
}
|
||||
@ -653,8 +911,9 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
if (p == null)
|
||||
return;
|
||||
|
||||
foreach (ListViewItem item in Items)
|
||||
for (int index = 0; index < Items.Count; index++)
|
||||
{
|
||||
ListViewItem item = Items[index];
|
||||
if (item.Text == p.Number.ToString(CultureInfo.InvariantCulture) &&
|
||||
item.SubItems[ColumnIndexStart].Text == GetDisplayTime(p.StartTime) &&
|
||||
item.SubItems[ColumnIndexEnd].Text == GetDisplayTime(p.EndTime) &&
|
||||
@ -684,15 +943,22 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
|
||||
public string GetTextAlternate(int index)
|
||||
{
|
||||
if (IsValidIndex(index) && IsAlternateTextColumnVisible)
|
||||
if (IsValidIndex(index) && ColumnIndexTextAlternate >= 0)
|
||||
return Items[index].SubItems[ColumnIndexTextAlternate].Text.Replace(_lineSeparatorString, Environment.NewLine);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public void SetText(int index, string text)
|
||||
{
|
||||
if (IsValidIndex(index))
|
||||
Items[index].SubItems[ColumnIndexText].Text = text.Replace(Environment.NewLine, _lineSeparatorString);
|
||||
{
|
||||
ListViewItem item = Items[index];
|
||||
item.SubItems[ColumnIndexText].Text = text.Replace(Environment.NewLine, _lineSeparatorString);
|
||||
var paragraph = item.Tag as Paragraph;
|
||||
if (paragraph != null)
|
||||
UpdateCpsAndWpm(item, paragraph);
|
||||
}
|
||||
}
|
||||
|
||||
public void SetTimeAndText(int index, Paragraph paragraph)
|
||||
@ -704,51 +970,19 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
item.SubItems[ColumnIndexEnd].Text = GetDisplayTime(paragraph.EndTime);
|
||||
item.SubItems[ColumnIndexDuration].Text = paragraph.Duration.ToShortDisplayString();
|
||||
item.SubItems[ColumnIndexText].Text = paragraph.Text.Replace(Environment.NewLine, _lineSeparatorString);
|
||||
UpdateCpsAndWpm(item, paragraph);
|
||||
}
|
||||
}
|
||||
|
||||
public void ShowExtraColumn(string title)
|
||||
private void UpdateCpsAndWpm(ListViewItem item, Paragraph paragraph)
|
||||
{
|
||||
if (!IsExtraColumnVisible)
|
||||
if (ColumnIndexCps >= 0)
|
||||
{
|
||||
Columns.Add(new ColumnHeader { Text = title, Width = 80 });
|
||||
int length = Columns[ColumnIndexNumber].Width + Columns[ColumnIndexStart].Width + Columns[ColumnIndexEnd].Width + Columns[ColumnIndexDuration].Width;
|
||||
int lengthAvailable = Width - length;
|
||||
if (IsAlternateTextColumnVisible)
|
||||
{
|
||||
int part = lengthAvailable / 5;
|
||||
ColumnIndexExtra = ColumnIndexTextAlternate + 1;
|
||||
Columns[ColumnIndexText].Width = part * 2;
|
||||
Columns[ColumnIndexTextAlternate].Width = part * 2;
|
||||
Columns[ColumnIndexExtra].Width = part;
|
||||
}
|
||||
else
|
||||
{
|
||||
int part = lengthAvailable / 6;
|
||||
Columns[ColumnIndexText].Width = part * 4;
|
||||
Columns[ColumnIndexTextAlternate].Width = part * 2;
|
||||
}
|
||||
IsExtraColumnVisible = true;
|
||||
item.SubItems[ColumnIndexCps].Text = $"{Utilities.GetCharactersPerSecond(paragraph):00.00}";
|
||||
}
|
||||
}
|
||||
|
||||
public void HideExtraColumn()
|
||||
{
|
||||
if (IsExtraColumnVisible)
|
||||
if (ColumnIndexWpm >= 0)
|
||||
{
|
||||
IsExtraColumnVisible = false;
|
||||
ColumnIndexExtra = ColumnIndexTextAlternate;
|
||||
if (IsAlternateTextColumnVisible)
|
||||
ColumnIndexExtra++;
|
||||
for (int i = 0; i < Items.Count; i++)
|
||||
{
|
||||
if (Items[i].SubItems.Count == ColumnIndexExtra + 1)
|
||||
{
|
||||
Items[i].SubItems.RemoveAt(ColumnIndexExtra);
|
||||
}
|
||||
}
|
||||
Columns.RemoveAt(ColumnIndexExtra);
|
||||
SubtitleListViewResize(null, null);
|
||||
item.SubItems[ColumnIndexWpm].Text = $"{paragraph.WordsPerMinute:000.00}";
|
||||
}
|
||||
}
|
||||
|
||||
@ -756,15 +990,13 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
{
|
||||
if (IsValidIndex(index))
|
||||
{
|
||||
ColumnIndexExtra = ColumnIndexTextAlternate;
|
||||
if (IsAlternateTextColumnVisible)
|
||||
ColumnIndexExtra++;
|
||||
if (!IsExtraColumnVisible)
|
||||
if (GetColumnIndex(SubtitleColumn.Extra) == -1)
|
||||
{
|
||||
ShowExtraColumn(string.Empty);
|
||||
}
|
||||
while (ColumnIndexExtra >= Items[index].SubItems.Count)
|
||||
Items[index].SubItems.Add(string.Empty);
|
||||
|
||||
Items[index].SubItems[ColumnIndexExtra].Text = text;
|
||||
Items[index].UseItemStyleForSubItems = false;
|
||||
Items[index].SubItems[ColumnIndexExtra].BackColor = Color.AntiqueWhite;
|
||||
@ -772,18 +1004,38 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
}
|
||||
}
|
||||
|
||||
public void SetNetworkText(int index, string text, Color color)
|
||||
{
|
||||
if (IsValidIndex(index))
|
||||
{
|
||||
if (GetColumnIndex(SubtitleColumn.Network) == -1)
|
||||
{
|
||||
ShowNetworkColumn(string.Empty);
|
||||
}
|
||||
while (ColumnIndexNetwork >= Items[index].SubItems.Count)
|
||||
Items[index].SubItems.Add(string.Empty);
|
||||
|
||||
Items[index].SubItems[ColumnIndexNetwork].Text = text;
|
||||
Items[index].UseItemStyleForSubItems = false;
|
||||
Items[index].SubItems[ColumnIndexNetwork].BackColor = Color.AntiqueWhite;
|
||||
Items[index].SubItems[ColumnIndexNetwork].ForeColor = color;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetAlternateText(int index, string text)
|
||||
{
|
||||
if (IsValidIndex(index) && Columns.Count >= ColumnIndexTextAlternate + 1)
|
||||
{
|
||||
if (Items[index].SubItems.Count <= ColumnIndexTextAlternate)
|
||||
if (GetColumnIndex(SubtitleColumn.TextAlternate) == -1)
|
||||
{
|
||||
Items[index].SubItems.Add(text.Replace(Environment.NewLine, _lineSeparatorString));
|
||||
}
|
||||
else
|
||||
{
|
||||
Items[index].SubItems[ColumnIndexTextAlternate].Text = text.Replace(Environment.NewLine, _lineSeparatorString);
|
||||
ShowAlternateTextColumn(string.Empty);
|
||||
}
|
||||
while (ColumnIndexTextAlternate >= Items[index].SubItems.Count)
|
||||
Items[index].SubItems.Add(string.Empty);
|
||||
|
||||
Items[index].SubItems[ColumnIndexTextAlternate].Text = text.Replace(Environment.NewLine, _lineSeparatorString);
|
||||
Items[index].UseItemStyleForSubItems = false;
|
||||
Items[index].SubItems[ColumnIndexTextAlternate].BackColor = Color.AntiqueWhite;
|
||||
}
|
||||
}
|
||||
|
||||
@ -794,6 +1046,7 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
ListViewItem item = Items[index];
|
||||
item.SubItems[ColumnIndexEnd].Text = GetDisplayTime(paragraph.EndTime);
|
||||
item.SubItems[ColumnIndexDuration].Text = paragraph.Duration.ToShortDisplayString();
|
||||
UpdateCpsAndWpm(item, paragraph);
|
||||
}
|
||||
}
|
||||
|
||||
@ -834,6 +1087,7 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
item.SubItems[ColumnIndexStart].Text = GetDisplayTime(paragraph.StartTime);
|
||||
item.SubItems[ColumnIndexEnd].Text = GetDisplayTime(paragraph.EndTime);
|
||||
item.SubItems[ColumnIndexDuration].Text = paragraph.Duration.ToShortDisplayString();
|
||||
UpdateCpsAndWpm(item, paragraph);
|
||||
}
|
||||
}
|
||||
|
||||
@ -898,41 +1152,17 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
Columns[ColumnIndexEnd].Width = 0;
|
||||
Columns[ColumnIndexDuration].Width = 0;
|
||||
Columns[ColumnIndexText].Width = 0;
|
||||
}
|
||||
|
||||
public void ShowAllColumns()
|
||||
{
|
||||
if (_settings != null && _settings.General.ListViewColumnsRememberSize && _settings.General.ListViewNumberWidth > 1 &&
|
||||
_settings.General.ListViewStartWidth > 1 && _settings.General.ListViewEndWidth > 1 && _settings.General.ListViewDurationWidth > 1)
|
||||
{
|
||||
Columns[ColumnIndexNumber].Width = _settings.General.ListViewNumberWidth;
|
||||
Columns[ColumnIndexStart].Width = _settings.General.ListViewStartWidth;
|
||||
Columns[ColumnIndexEnd].Width = _settings.General.ListViewEndWidth;
|
||||
Columns[ColumnIndexDuration].Width = _settings.General.ListViewDurationWidth;
|
||||
Columns[ColumnIndexText].Width = _settings.General.ListViewTextWidth;
|
||||
Columns[IsAlternateTextColumnVisible ? ColumnIndexTextAlternate : ColumnIndexText].Width = -2;
|
||||
return;
|
||||
}
|
||||
|
||||
Columns[ColumnIndexNumber].Width = 45;
|
||||
Columns[ColumnIndexEnd].Width = 80;
|
||||
Columns[ColumnIndexDuration].Width = 55;
|
||||
if (IsAlternateTextColumnVisible)
|
||||
{
|
||||
Columns[ColumnIndexText].Width = 250;
|
||||
Columns[ColumnIndexTextAlternate].Width = -2;
|
||||
}
|
||||
else
|
||||
{
|
||||
Columns[ColumnIndexText].Width = -2;
|
||||
}
|
||||
if (ColumnIndexCps >= 0)
|
||||
Columns[ColumnIndexCps].Width = 0;
|
||||
if (ColumnIndexWpm >= 0)
|
||||
Columns[ColumnIndexWpm].Width = 0;
|
||||
}
|
||||
|
||||
public void SetCustomResize(EventHandler handler)
|
||||
{
|
||||
if (handler == null)
|
||||
return;
|
||||
Resize -= SubtitleListViewResize;
|
||||
Resize -= SubtitleListViewLastColumnFill;
|
||||
Resize += handler;
|
||||
}
|
||||
|
||||
|
1
src/Forms/ApplyDurationLimits.Designer.cs
generated
1
src/Forms/ApplyDurationLimits.Designer.cs
generated
@ -223,7 +223,6 @@
|
||||
this.subtitleListView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.subtitleListView1.DisplayExtraFromExtra = false;
|
||||
this.subtitleListView1.FirstVisibleIndex = -1;
|
||||
this.subtitleListView1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.subtitleListView1.FullRowSelect = true;
|
||||
|
2
src/Forms/Compare.Designer.cs
generated
2
src/Forms/Compare.Designer.cs
generated
@ -250,7 +250,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
// subtitleListView2
|
||||
//
|
||||
this.subtitleListView2.AllowDrop = true;
|
||||
this.subtitleListView2.DisplayExtraFromExtra = false;
|
||||
this.subtitleListView2.FirstVisibleIndex = -1;
|
||||
this.subtitleListView2.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.subtitleListView2.FullRowSelect = true;
|
||||
@ -274,7 +273,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
// subtitleListView1
|
||||
//
|
||||
this.subtitleListView1.AllowDrop = true;
|
||||
this.subtitleListView1.DisplayExtraFromExtra = false;
|
||||
this.subtitleListView1.FirstVisibleIndex = -1;
|
||||
this.subtitleListView1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.subtitleListView1.FullRowSelect = true;
|
||||
|
@ -300,8 +300,8 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
else if (FixWhitespace(p1.Text) != FixWhitespace(p2.Text))
|
||||
{
|
||||
addIndexToDifferences = true;
|
||||
subtitleListView1.SetBackgroundColor(index, Color.LightGreen, SubtitleListView.ColumnIndexText);
|
||||
subtitleListView2.SetBackgroundColor(index, Color.LightGreen, SubtitleListView.ColumnIndexText);
|
||||
subtitleListView1.SetBackgroundColor(index, Color.LightGreen, subtitleListView1.ColumnIndexText);
|
||||
subtitleListView2.SetBackgroundColor(index, Color.LightGreen, subtitleListView2.ColumnIndexText);
|
||||
}
|
||||
if (addIndexToDifferences)
|
||||
{
|
||||
@ -338,8 +338,8 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
addIndexToDifferences = true;
|
||||
subtitleListView1.SetBackgroundColor(index, Color.LightGreen);
|
||||
subtitleListView2.SetBackgroundColor(index, Color.LightGreen);
|
||||
subtitleListView1.SetBackgroundColor(index, subtitleListView1.BackColor, SubtitleListView.ColumnIndexNumber);
|
||||
subtitleListView2.SetBackgroundColor(index, subtitleListView2.BackColor, SubtitleListView.ColumnIndexNumber);
|
||||
subtitleListView1.SetBackgroundColor(index, subtitleListView1.BackColor, subtitleListView1.ColumnIndexNumber);
|
||||
subtitleListView2.SetBackgroundColor(index, subtitleListView2.BackColor, subtitleListView2.ColumnIndexNumber);
|
||||
}
|
||||
else if (columnsAlike < 4)
|
||||
{
|
||||
@ -347,34 +347,34 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
// Start time
|
||||
if (Math.Abs(p1.StartTime.TotalMilliseconds - p2.StartTime.TotalMilliseconds) > tolerance)
|
||||
{
|
||||
subtitleListView1.SetBackgroundColor(index, Color.LightGreen, SubtitleListView.ColumnIndexStart);
|
||||
subtitleListView2.SetBackgroundColor(index, Color.LightGreen, SubtitleListView.ColumnIndexStart);
|
||||
subtitleListView1.SetBackgroundColor(index, Color.LightGreen, subtitleListView1.ColumnIndexStart);
|
||||
subtitleListView2.SetBackgroundColor(index, Color.LightGreen, subtitleListView2.ColumnIndexStart);
|
||||
}
|
||||
// End time
|
||||
if (Math.Abs(p1.EndTime.TotalMilliseconds - p2.EndTime.TotalMilliseconds) > tolerance)
|
||||
{
|
||||
subtitleListView1.SetBackgroundColor(index, Color.LightGreen, SubtitleListView.ColumnIndexEnd);
|
||||
subtitleListView2.SetBackgroundColor(index, Color.LightGreen, SubtitleListView.ColumnIndexEnd);
|
||||
subtitleListView1.SetBackgroundColor(index, Color.LightGreen, subtitleListView1.ColumnIndexEnd);
|
||||
subtitleListView2.SetBackgroundColor(index, Color.LightGreen, subtitleListView2.ColumnIndexEnd);
|
||||
}
|
||||
// Duration
|
||||
if (Math.Abs(p1.Duration.TotalMilliseconds - p2.Duration.TotalMilliseconds) > tolerance)
|
||||
{
|
||||
subtitleListView1.SetBackgroundColor(index, Color.LightGreen, SubtitleListView.ColumnIndexDuration);
|
||||
subtitleListView2.SetBackgroundColor(index, Color.LightGreen, SubtitleListView.ColumnIndexDuration);
|
||||
subtitleListView1.SetBackgroundColor(index, Color.LightGreen, subtitleListView1.ColumnIndexDuration);
|
||||
subtitleListView2.SetBackgroundColor(index, Color.LightGreen, subtitleListView2.ColumnIndexDuration);
|
||||
}
|
||||
// Text
|
||||
if (FixWhitespace(p1.Text.Trim()) != FixWhitespace(p2.Text.Trim()))
|
||||
{
|
||||
subtitleListView1.SetBackgroundColor(index, Color.LightGreen, SubtitleListView.ColumnIndexText);
|
||||
subtitleListView2.SetBackgroundColor(index, Color.LightGreen, SubtitleListView.ColumnIndexText);
|
||||
subtitleListView1.SetBackgroundColor(index, Color.LightGreen, subtitleListView1.ColumnIndexText);
|
||||
subtitleListView2.SetBackgroundColor(index, Color.LightGreen, subtitleListView2.ColumnIndexText);
|
||||
}
|
||||
}
|
||||
// Number
|
||||
if (p1.Number != p2.Number)
|
||||
{
|
||||
addIndexToDifferences = true;
|
||||
subtitleListView1.SetBackgroundColor(index, Color.FromArgb(255, 200, 100), SubtitleListView.ColumnIndexNumber);
|
||||
subtitleListView2.SetBackgroundColor(index, Color.FromArgb(255, 200, 100), SubtitleListView.ColumnIndexNumber);
|
||||
subtitleListView1.SetBackgroundColor(index, Color.FromArgb(255, 200, 100), subtitleListView1.ColumnIndexNumber);
|
||||
subtitleListView2.SetBackgroundColor(index, Color.FromArgb(255, 200, 100), subtitleListView2.ColumnIndexNumber);
|
||||
}
|
||||
}
|
||||
if (addIndexToDifferences)
|
||||
@ -395,12 +395,12 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
if (!onlyTextDiff)
|
||||
{
|
||||
listView.SetBackgroundColor(i, Color.FromArgb(255, 200, 100), SubtitleListView.ColumnIndexNumber);
|
||||
listView.SetBackgroundColor(i, Color.LightGreen, SubtitleListView.ColumnIndexStart);
|
||||
listView.SetBackgroundColor(i, Color.LightGreen, SubtitleListView.ColumnIndexEnd);
|
||||
listView.SetBackgroundColor(i, Color.LightGreen, SubtitleListView.ColumnIndexDuration);
|
||||
listView.SetBackgroundColor(i, Color.FromArgb(255, 200, 100), listView.ColumnIndexNumber);
|
||||
listView.SetBackgroundColor(i, Color.LightGreen, listView.ColumnIndexStart);
|
||||
listView.SetBackgroundColor(i, Color.LightGreen, listView.ColumnIndexEnd);
|
||||
listView.SetBackgroundColor(i, Color.LightGreen, listView.ColumnIndexDuration);
|
||||
}
|
||||
listView.SetBackgroundColor(i, Color.LightGreen, SubtitleListView.ColumnIndexText);
|
||||
listView.SetBackgroundColor(i, Color.LightGreen, listView.ColumnIndexText);
|
||||
}
|
||||
}
|
||||
|
||||
|
1
src/Forms/DurationsBridgeGaps.Designer.cs
generated
1
src/Forms/DurationsBridgeGaps.Designer.cs
generated
@ -69,7 +69,6 @@
|
||||
// SubtitleListview1
|
||||
//
|
||||
this.SubtitleListview1.AllowDrop = true;
|
||||
this.SubtitleListview1.DisplayExtraFromExtra = false;
|
||||
this.SubtitleListview1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.SubtitleListview1.FirstVisibleIndex = -1;
|
||||
this.SubtitleListview1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
|
@ -30,7 +30,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
SubtitleListview1.InitializeLanguage(Configuration.Settings.Language.General, Configuration.Settings);
|
||||
UiUtil.InitializeSubtitleFont(SubtitleListview1);
|
||||
SubtitleListview1.ShowExtraColumn(Configuration.Settings.Language.DurationsBridgeGaps.GapToNext);
|
||||
SubtitleListview1.DisplayExtraFromExtra = true;
|
||||
SubtitleListview1.AutoSizeAllColumns(this);
|
||||
|
||||
labelBridgePart1.Text = Configuration.Settings.Language.DurationsBridgeGaps.BridgeGapsSmallerThanXPart1;
|
||||
|
1
src/Forms/FindSubtitleLine.Designer.cs
generated
1
src/Forms/FindSubtitleLine.Designer.cs
generated
@ -96,7 +96,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
this.subtitleListView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.subtitleListView1.DisplayExtraFromExtra = false;
|
||||
this.subtitleListView1.FirstVisibleIndex = -1;
|
||||
this.subtitleListView1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.subtitleListView1.FullRowSelect = true;
|
||||
|
1
src/Forms/FixCommonErrors.Designer.cs
generated
1
src/Forms/FixCommonErrors.Designer.cs
generated
@ -400,7 +400,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.subtitleListView1.ContextMenuStrip = this.contextMenuStripListview;
|
||||
this.subtitleListView1.DisplayExtraFromExtra = false;
|
||||
this.subtitleListView1.FirstVisibleIndex = -1;
|
||||
this.subtitleListView1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.subtitleListView1.FullRowSelect = true;
|
||||
|
2
src/Forms/GoogleTranslate.Designer.cs
generated
2
src/Forms/GoogleTranslate.Designer.cs
generated
@ -142,7 +142,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
//
|
||||
// subtitleListViewTo
|
||||
//
|
||||
this.subtitleListViewTo.DisplayExtraFromExtra = false;
|
||||
this.subtitleListViewTo.FirstVisibleIndex = -1;
|
||||
this.subtitleListViewTo.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.subtitleListViewTo.FullRowSelect = true;
|
||||
@ -164,7 +163,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
//
|
||||
// subtitleListViewFrom
|
||||
//
|
||||
this.subtitleListViewFrom.DisplayExtraFromExtra = false;
|
||||
this.subtitleListViewFrom.FirstVisibleIndex = -1;
|
||||
this.subtitleListViewFrom.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.subtitleListViewFrom.FullRowSelect = true;
|
||||
|
1
src/Forms/ImportText.Designer.cs
generated
1
src/Forms/ImportText.Designer.cs
generated
@ -466,7 +466,6 @@
|
||||
this.SubtitleListview1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.SubtitleListview1.DisplayExtraFromExtra = false;
|
||||
this.SubtitleListview1.FirstVisibleIndex = -1;
|
||||
this.SubtitleListview1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.SubtitleListview1.FullRowSelect = true;
|
||||
|
1
src/Forms/ImportUnknownFormat.Designer.cs
generated
1
src/Forms/ImportUnknownFormat.Designer.cs
generated
@ -91,7 +91,6 @@
|
||||
this.SubtitleListview1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.SubtitleListview1.DisplayExtraFromExtra = false;
|
||||
this.SubtitleListview1.FirstVisibleIndex = -1;
|
||||
this.SubtitleListview1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.SubtitleListview1.FullRowSelect = true;
|
||||
|
1
src/Forms/Main.Designer.cs
generated
1
src/Forms/Main.Designer.cs
generated
@ -3897,7 +3897,6 @@
|
||||
//
|
||||
this.SubtitleListview1.AllowDrop = true;
|
||||
this.SubtitleListview1.ContextMenuStrip = this.contextMenuStripListview;
|
||||
this.SubtitleListview1.DisplayExtraFromExtra = false;
|
||||
this.SubtitleListview1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.SubtitleListview1.FirstVisibleIndex = -1;
|
||||
this.SubtitleListview1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
|
@ -260,8 +260,8 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
}
|
||||
else if (comboBoxSubtitleFormats.Items.Count == 1)
|
||||
{
|
||||
SubtitleListview1.HideColumn(SubtitleListView.SubtitleColumn.Extra);
|
||||
SetFormatTo(format);
|
||||
SubtitleListview1.ShowAllColumns();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2775,7 +2775,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
_subtitle = s1;
|
||||
_subtitleAlternate = s2;
|
||||
_subtitleAlternateFileName = _fileName;
|
||||
SubtitleListview1.HideExtraColumn();
|
||||
SubtitleListview1.HideColumn(SubtitleListView.SubtitleColumn.Extra);
|
||||
SubtitleListview1.ShowAlternateTextColumn(classes[1]);
|
||||
_splitDualSami = true;
|
||||
}
|
||||
@ -3631,8 +3631,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
RemoveAlternate(true);
|
||||
_splitDualSami = false;
|
||||
|
||||
SubtitleListview1.HideExtraColumn();
|
||||
SubtitleListview1.DisplayExtraFromExtra = false;
|
||||
SubtitleListview1.HideColumn(SubtitleListView.SubtitleColumn.Extra);
|
||||
|
||||
ComboBoxSubtitleFormatsSelectedIndexChanged(null, null);
|
||||
|
||||
@ -3722,9 +3721,13 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
SubtitleListview1.Fill(_subtitle, _subtitleAlternate);
|
||||
RestoreSubtitleListviewIndices();
|
||||
|
||||
if (_oldSubtitleFormat.HasStyleSupport && _networkSession == null)
|
||||
if (_oldSubtitleFormat.HasStyleSupport)
|
||||
{
|
||||
SubtitleListview1.HideExtraColumn();
|
||||
SubtitleListview1.HideColumn(SubtitleListView.SubtitleColumn.Extra);
|
||||
}
|
||||
if (_networkSession == null)
|
||||
{
|
||||
SubtitleListview1.HideColumn(SubtitleListView.SubtitleColumn.Network);
|
||||
}
|
||||
// Recalculate time.
|
||||
if (!_oldSubtitleFormat.IsFrameBased && format.IsFrameBased)
|
||||
@ -3737,14 +3740,13 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
}
|
||||
}
|
||||
ShowSource();
|
||||
SubtitleListview1.DisplayExtraFromExtra = false;
|
||||
if (format != null)
|
||||
{
|
||||
ShowStatus(string.Format(_language.ConvertedToX, format.FriendlyName));
|
||||
_oldSubtitleFormat = format;
|
||||
Configuration.Settings.General.LastSaveAsFormat = format.Name;
|
||||
|
||||
if (format.HasStyleSupport && _networkSession == null)
|
||||
if (format.HasStyleSupport)
|
||||
{
|
||||
var styles = new List<string>();
|
||||
var formatType = format.GetType();
|
||||
@ -3775,7 +3777,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
else
|
||||
SubtitleListview1.ShowExtraColumn(_languageGeneral.Style);
|
||||
|
||||
SubtitleListview1.DisplayExtraFromExtra = true;
|
||||
SubtitleListview1.Fill(_subtitle, _subtitleAlternate);
|
||||
}
|
||||
}
|
||||
@ -3860,6 +3861,15 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
settings.ShowDialog(this);
|
||||
}
|
||||
|
||||
if (Configuration.Settings.Tools.ListViewShowColumnCharsPerSec)
|
||||
SubtitleListview1.ShowCharsSecColumn(Configuration.Settings.Language.General.CharsPerSec);
|
||||
else
|
||||
SubtitleListview1.HideColumn(SubtitleListView.SubtitleColumn.CharactersPerSeconds);
|
||||
if (Configuration.Settings.Tools.ListViewShowColumnWordsPerMin)
|
||||
SubtitleListview1.ShowWordsMinColumn(Configuration.Settings.Language.General.WordsPerMin);
|
||||
else
|
||||
SubtitleListview1.HideColumn(SubtitleListView.SubtitleColumn.WordsPerMinute);
|
||||
|
||||
try
|
||||
{ // can have some problems with fonts...
|
||||
UiUtil.InitializeSubtitleFont(textBoxSource);
|
||||
@ -9233,12 +9243,11 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
if (_networkSession == null)
|
||||
{
|
||||
SubtitleListview1.ShowExtraColumn(_languageGeneral.Style);
|
||||
SubtitleListview1.DisplayExtraFromExtra = true;
|
||||
}
|
||||
}
|
||||
else if (_networkSession == null && SubtitleListview1.IsExtraColumnVisible)
|
||||
else if (_networkSession == null)
|
||||
{
|
||||
SubtitleListview1.HideExtraColumn();
|
||||
SubtitleListview1.HideColumn(SubtitleListView.SubtitleColumn.Extra);
|
||||
}
|
||||
comboBoxSubtitleFormats.SelectedIndexChanged -= ComboBoxSubtitleFormatsSelectedIndexChanged;
|
||||
SetCurrentFormat(format);
|
||||
@ -9304,9 +9313,9 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
}
|
||||
}
|
||||
|
||||
if (_networkSession == null && SubtitleListview1.IsExtraColumnVisible)
|
||||
if (_networkSession == null)
|
||||
{
|
||||
SubtitleListview1.HideExtraColumn();
|
||||
SubtitleListview1.HideColumn(SubtitleListView.SubtitleColumn.Extra);
|
||||
}
|
||||
comboBoxSubtitleFormats.SelectedIndexChanged -= ComboBoxSubtitleFormatsSelectedIndexChanged;
|
||||
SetCurrentFormat(Configuration.Settings.General.DefaultSubtitleFormat);
|
||||
@ -12286,9 +12295,9 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
for (int i = idx; i < _subtitle.Paragraphs.Count - 1; i++)
|
||||
{
|
||||
var item = SubtitleListview1.Items[i];
|
||||
if (item.SubItems[SubtitleListView.ColumnIndexDuration].BackColor == Configuration.Settings.Tools.ListViewSyntaxErrorColor ||
|
||||
item.SubItems[SubtitleListView.ColumnIndexText].BackColor == Configuration.Settings.Tools.ListViewSyntaxErrorColor ||
|
||||
item.SubItems[SubtitleListView.ColumnIndexStart].BackColor == Configuration.Settings.Tools.ListViewSyntaxErrorColor)
|
||||
if (item.SubItems[SubtitleListview1.ColumnIndexDuration].BackColor == Configuration.Settings.Tools.ListViewSyntaxErrorColor ||
|
||||
item.SubItems[SubtitleListview1.ColumnIndexText].BackColor == Configuration.Settings.Tools.ListViewSyntaxErrorColor ||
|
||||
item.SubItems[SubtitleListview1.ColumnIndexStart].BackColor == Configuration.Settings.Tools.ListViewSyntaxErrorColor)
|
||||
{
|
||||
SubtitleListview1.SelectIndexAndEnsureVisible(i, true);
|
||||
return;
|
||||
@ -13159,7 +13168,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
if (SubtitleListview1.IsAlternateTextColumnVisible)
|
||||
{
|
||||
SubtitleListview1.HideAlternateTextColumn();
|
||||
SubtitleListview1.HideColumn(SubtitleListView.SubtitleColumn.TextAlternate);
|
||||
SubtitleListview1.AutoSizeAllColumns(this);
|
||||
_subtitleAlternate = new Subtitle();
|
||||
_subtitleAlternateFileName = null;
|
||||
@ -16293,16 +16302,11 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
networkNew.Initialize(_networkSession, _fileName);
|
||||
if (networkNew.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
if (GetCurrentSubtitleFormat().HasStyleSupport)
|
||||
{
|
||||
SubtitleListview1.HideExtraColumn();
|
||||
}
|
||||
|
||||
_networkSession.AppendToLog(string.Format(_language.XStartedSessionYAtZ, _networkSession.CurrentUser.UserName, _networkSession.SessionId, DateTime.Now.ToLongTimeString()));
|
||||
toolStripStatusNetworking.Visible = true;
|
||||
toolStripStatusNetworking.Text = _language.NetworkMode;
|
||||
EnableDisableControlsNotWorkingInNetworkMode(false);
|
||||
SubtitleListview1.ShowExtraColumn(_language.UserAndAction);
|
||||
SubtitleListview1.ShowNetworkColumn(_language.UserAndAction);
|
||||
SubtitleListview1.AutoSizeAllColumns(this);
|
||||
TimerWebServiceTick(null, null);
|
||||
}
|
||||
@ -16333,7 +16337,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
toolStripStatusNetworking.Text = _language.NetworkMode;
|
||||
EnableDisableControlsNotWorkingInNetworkMode(false);
|
||||
_networkSession.AppendToLog(string.Format(_language.XStartedSessionYAtZ, _networkSession.CurrentUser.UserName, _networkSession.SessionId, DateTime.Now.ToLongTimeString()));
|
||||
SubtitleListview1.ShowExtraColumn(_language.UserAndAction);
|
||||
SubtitleListview1.ShowNetworkColumn(_language.UserAndAction);
|
||||
SubtitleListview1.AutoSizeAllColumns(this);
|
||||
_subtitleListViewIndex = -1;
|
||||
_oldSelectedParagraph = null;
|
||||
@ -16460,7 +16464,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
_networkSession = null;
|
||||
EnableDisableControlsNotWorkingInNetworkMode(true);
|
||||
toolStripStatusNetworking.Visible = false;
|
||||
SubtitleListview1.HideExtraColumn();
|
||||
SubtitleListview1.HideColumn(SubtitleListView.SubtitleColumn.Network);
|
||||
_networkChat = null;
|
||||
return;
|
||||
}
|
||||
@ -16764,7 +16768,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
SubtitleListview1.BeginUpdate();
|
||||
foreach (UpdateLogEntry entry in _networkSession.UpdateLog)
|
||||
SubtitleListview1.SetExtraText(entry.Index, entry.ToString(), Utilities.GetColorFromUserName(entry.UserName));
|
||||
SubtitleListview1.SetNetworkText(entry.Index, entry.ToString(), Utilities.GetColorFromUserName(entry.UserName));
|
||||
SubtitleListview1.EndUpdate();
|
||||
}
|
||||
|
||||
@ -16783,18 +16787,8 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
_networkSession = null;
|
||||
EnableDisableControlsNotWorkingInNetworkMode(true);
|
||||
toolStripStatusNetworking.Visible = false;
|
||||
SubtitleListview1.HideExtraColumn();
|
||||
SubtitleListview1.HideColumn(SubtitleListView.SubtitleColumn.Network);
|
||||
_networkChat = null;
|
||||
|
||||
var format = GetCurrentSubtitleFormat();
|
||||
if (format.HasStyleSupport && _networkSession == null)
|
||||
{
|
||||
if (format.GetType() == typeof(Sami) || format.GetType() == typeof(SamiModern))
|
||||
SubtitleListview1.ShowExtraColumn(_languageGeneral.Class);
|
||||
else
|
||||
SubtitleListview1.ShowExtraColumn(_languageGeneral.Style);
|
||||
SubtitleListview1.DisplayExtraFromExtra = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void toolStripMenuItemNetworking_DropDownOpening(object sender, EventArgs e)
|
||||
@ -17446,7 +17440,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
if (removeFromListView)
|
||||
{
|
||||
SubtitleListview1.HideAlternateTextColumn();
|
||||
SubtitleListview1.HideColumn(SubtitleListView.SubtitleColumn.TextAlternate);
|
||||
SubtitleListview1.AutoSizeAllColumns(this);
|
||||
_subtitleAlternate = new Subtitle();
|
||||
_subtitleAlternateFileName = null;
|
||||
|
1
src/Forms/MergeDoubleLines.Designer.cs
generated
1
src/Forms/MergeDoubleLines.Designer.cs
generated
@ -159,7 +159,6 @@
|
||||
this.SubtitleListview1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.SubtitleListview1.DisplayExtraFromExtra = false;
|
||||
this.SubtitleListview1.FirstVisibleIndex = -1;
|
||||
this.SubtitleListview1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.SubtitleListview1.FullRowSelect = true;
|
||||
|
1
src/Forms/MergeShortLines.Designer.cs
generated
1
src/Forms/MergeShortLines.Designer.cs
generated
@ -201,7 +201,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
this.SubtitleListview1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.SubtitleListview1.DisplayExtraFromExtra = false;
|
||||
this.SubtitleListview1.FirstVisibleIndex = -1;
|
||||
this.SubtitleListview1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.SubtitleListview1.FullRowSelect = true;
|
||||
|
1
src/Forms/MergeTextWithSameTimeCodes.Designer.cs
generated
1
src/Forms/MergeTextWithSameTimeCodes.Designer.cs
generated
@ -156,7 +156,6 @@
|
||||
this.SubtitleListview1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.SubtitleListview1.DisplayExtraFromExtra = false;
|
||||
this.SubtitleListview1.FirstVisibleIndex = -1;
|
||||
this.SubtitleListview1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.SubtitleListview1.FullRowSelect = true;
|
||||
|
@ -62,7 +62,6 @@
|
||||
this.SubtitleListview1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.SubtitleListview1.DisplayExtraFromExtra = false;
|
||||
this.SubtitleListview1.FirstVisibleIndex = -1;
|
||||
this.SubtitleListview1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.SubtitleListview1.FullRowSelect = true;
|
||||
|
1
src/Forms/SetSyncPoint.Designer.cs
generated
1
src/Forms/SetSyncPoint.Designer.cs
generated
@ -90,7 +90,6 @@
|
||||
this.subtitleListView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.subtitleListView1.DisplayExtraFromExtra = false;
|
||||
this.subtitleListView1.FirstVisibleIndex = -1;
|
||||
this.subtitleListView1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.subtitleListView1.FullRowSelect = true;
|
||||
|
115
src/Forms/Settings.Designer.cs
generated
115
src/Forms/Settings.Designer.cs
generated
@ -33,6 +33,8 @@
|
||||
this.tabControlSettings = new System.Windows.Forms.TabControl();
|
||||
this.tabPageGeneral = new System.Windows.Forms.TabPage();
|
||||
this.groupBoxMiscellaneous = new System.Windows.Forms.GroupBox();
|
||||
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();
|
||||
@ -394,7 +396,7 @@
|
||||
//
|
||||
this.buttonOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.buttonOK.Location = new System.Drawing.Point(697, 502);
|
||||
this.buttonOK.Location = new System.Drawing.Point(697, 513);
|
||||
this.buttonOK.Name = "buttonOK";
|
||||
this.buttonOK.Size = new System.Drawing.Size(75, 21);
|
||||
this.buttonOK.TabIndex = 0;
|
||||
@ -406,7 +408,7 @@
|
||||
//
|
||||
this.buttonCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.buttonCancel.Location = new System.Drawing.Point(778, 502);
|
||||
this.buttonCancel.Location = new System.Drawing.Point(778, 513);
|
||||
this.buttonCancel.Name = "buttonCancel";
|
||||
this.buttonCancel.Size = new System.Drawing.Size(75, 21);
|
||||
this.buttonCancel.TabIndex = 1;
|
||||
@ -432,7 +434,7 @@
|
||||
this.tabControlSettings.Location = new System.Drawing.Point(13, 13);
|
||||
this.tabControlSettings.Name = "tabControlSettings";
|
||||
this.tabControlSettings.SelectedIndex = 0;
|
||||
this.tabControlSettings.Size = new System.Drawing.Size(840, 483);
|
||||
this.tabControlSettings.Size = new System.Drawing.Size(840, 494);
|
||||
this.tabControlSettings.TabIndex = 2;
|
||||
this.tabControlSettings.SelectedIndexChanged += new System.EventHandler(this.TabControlSettingsSelectedIndexChanged);
|
||||
//
|
||||
@ -442,7 +444,7 @@
|
||||
this.tabPageGeneral.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPageGeneral.Name = "tabPageGeneral";
|
||||
this.tabPageGeneral.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPageGeneral.Size = new System.Drawing.Size(832, 457);
|
||||
this.tabPageGeneral.Size = new System.Drawing.Size(832, 468);
|
||||
this.tabPageGeneral.TabIndex = 0;
|
||||
this.tabPageGeneral.Text = "General";
|
||||
this.tabPageGeneral.UseVisualStyleBackColor = true;
|
||||
@ -452,6 +454,8 @@
|
||||
this.groupBoxMiscellaneous.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.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);
|
||||
@ -506,11 +510,30 @@
|
||||
this.groupBoxMiscellaneous.Controls.Add(this.labelDefaultFrameRate);
|
||||
this.groupBoxMiscellaneous.Location = new System.Drawing.Point(6, 6);
|
||||
this.groupBoxMiscellaneous.Name = "groupBoxMiscellaneous";
|
||||
this.groupBoxMiscellaneous.Size = new System.Drawing.Size(819, 445);
|
||||
this.groupBoxMiscellaneous.Size = new System.Drawing.Size(819, 456);
|
||||
this.groupBoxMiscellaneous.TabIndex = 0;
|
||||
this.groupBoxMiscellaneous.TabStop = false;
|
||||
this.groupBoxMiscellaneous.Text = "Miscellaneous";
|
||||
//
|
||||
// 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, 248);
|
||||
@ -551,7 +574,7 @@
|
||||
"1 month",
|
||||
"3 months",
|
||||
"6 months"});
|
||||
this.comboBoxAutoBackupDeleteAfter.Location = new System.Drawing.Point(707, 352);
|
||||
this.comboBoxAutoBackupDeleteAfter.Location = new System.Drawing.Point(707, 397);
|
||||
this.comboBoxAutoBackupDeleteAfter.Name = "comboBoxAutoBackupDeleteAfter";
|
||||
this.comboBoxAutoBackupDeleteAfter.Size = new System.Drawing.Size(88, 21);
|
||||
this.comboBoxAutoBackupDeleteAfter.TabIndex = 45;
|
||||
@ -559,7 +582,7 @@
|
||||
// labelAutoBackupDeleteAfter
|
||||
//
|
||||
this.labelAutoBackupDeleteAfter.AutoSize = true;
|
||||
this.labelAutoBackupDeleteAfter.Location = new System.Drawing.Point(639, 355);
|
||||
this.labelAutoBackupDeleteAfter.Location = new System.Drawing.Point(639, 400);
|
||||
this.labelAutoBackupDeleteAfter.Name = "labelAutoBackupDeleteAfter";
|
||||
this.labelAutoBackupDeleteAfter.Size = new System.Drawing.Size(65, 13);
|
||||
this.labelAutoBackupDeleteAfter.TabIndex = 46;
|
||||
@ -568,7 +591,7 @@
|
||||
// checkBoxCheckForUpdates
|
||||
//
|
||||
this.checkBoxCheckForUpdates.AutoSize = true;
|
||||
this.checkBoxCheckForUpdates.Location = new System.Drawing.Point(441, 394);
|
||||
this.checkBoxCheckForUpdates.Location = new System.Drawing.Point(441, 427);
|
||||
this.checkBoxCheckForUpdates.Name = "checkBoxCheckForUpdates";
|
||||
this.checkBoxCheckForUpdates.Size = new System.Drawing.Size(114, 17);
|
||||
this.checkBoxCheckForUpdates.TabIndex = 46;
|
||||
@ -895,7 +918,7 @@
|
||||
"Every minute",
|
||||
"Every 5 minutes",
|
||||
"Every 15 minutes"});
|
||||
this.comboBoxAutoBackup.Location = new System.Drawing.Point(512, 352);
|
||||
this.comboBoxAutoBackup.Location = new System.Drawing.Point(512, 397);
|
||||
this.comboBoxAutoBackup.Name = "comboBoxAutoBackup";
|
||||
this.comboBoxAutoBackup.Size = new System.Drawing.Size(121, 21);
|
||||
this.comboBoxAutoBackup.TabIndex = 44;
|
||||
@ -903,7 +926,7 @@
|
||||
// labelAutoBackup
|
||||
//
|
||||
this.labelAutoBackup.AutoSize = true;
|
||||
this.labelAutoBackup.Location = new System.Drawing.Point(438, 355);
|
||||
this.labelAutoBackup.Location = new System.Drawing.Point(438, 400);
|
||||
this.labelAutoBackup.Name = "labelAutoBackup";
|
||||
this.labelAutoBackup.Size = new System.Drawing.Size(68, 13);
|
||||
this.labelAutoBackup.TabIndex = 43;
|
||||
@ -1114,7 +1137,7 @@
|
||||
this.tabPageToolBar.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPageToolBar.Name = "tabPageToolBar";
|
||||
this.tabPageToolBar.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPageToolBar.Size = new System.Drawing.Size(832, 457);
|
||||
this.tabPageToolBar.Size = new System.Drawing.Size(832, 468);
|
||||
this.tabPageToolBar.TabIndex = 7;
|
||||
this.tabPageToolBar.Text = "Toolbar ";
|
||||
this.tabPageToolBar.UseVisualStyleBackColor = true;
|
||||
@ -1126,7 +1149,7 @@
|
||||
this.groupBox2.Controls.Add(this.checkBoxShowFrameRate);
|
||||
this.groupBox2.Location = new System.Drawing.Point(7, 248);
|
||||
this.groupBox2.Name = "groupBox2";
|
||||
this.groupBox2.Size = new System.Drawing.Size(818, 200);
|
||||
this.groupBox2.Size = new System.Drawing.Size(818, 214);
|
||||
this.groupBox2.TabIndex = 35;
|
||||
this.groupBox2.TabStop = false;
|
||||
//
|
||||
@ -1519,7 +1542,7 @@
|
||||
this.tabPageVideoPlayer.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPageVideoPlayer.Name = "tabPageVideoPlayer";
|
||||
this.tabPageVideoPlayer.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPageVideoPlayer.Size = new System.Drawing.Size(832, 457);
|
||||
this.tabPageVideoPlayer.Size = new System.Drawing.Size(832, 468);
|
||||
this.tabPageVideoPlayer.TabIndex = 2;
|
||||
this.tabPageVideoPlayer.Text = "Video player";
|
||||
this.tabPageVideoPlayer.UseVisualStyleBackColor = true;
|
||||
@ -1549,7 +1572,7 @@
|
||||
this.groupBoxMainWindowVideoControls.Controls.Add(this.comboBoxCustomSearch1);
|
||||
this.groupBoxMainWindowVideoControls.Location = new System.Drawing.Point(7, 239);
|
||||
this.groupBoxMainWindowVideoControls.Name = "groupBoxMainWindowVideoControls";
|
||||
this.groupBoxMainWindowVideoControls.Size = new System.Drawing.Size(819, 209);
|
||||
this.groupBoxMainWindowVideoControls.Size = new System.Drawing.Size(819, 223);
|
||||
this.groupBoxMainWindowVideoControls.TabIndex = 15;
|
||||
this.groupBoxMainWindowVideoControls.TabStop = false;
|
||||
this.groupBoxMainWindowVideoControls.Text = "Main window video controls";
|
||||
@ -2036,7 +2059,7 @@
|
||||
this.tabPageWaveform.Controls.Add(this.groupBoxWaveformAppearence);
|
||||
this.tabPageWaveform.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPageWaveform.Name = "tabPageWaveform";
|
||||
this.tabPageWaveform.Size = new System.Drawing.Size(832, 457);
|
||||
this.tabPageWaveform.Size = new System.Drawing.Size(832, 468);
|
||||
this.tabPageWaveform.TabIndex = 6;
|
||||
this.tabPageWaveform.Text = "Waveform/spectrogram";
|
||||
this.tabPageWaveform.UseVisualStyleBackColor = true;
|
||||
@ -2049,7 +2072,7 @@
|
||||
this.groupBox3.Controls.Add(this.textBoxFFmpegPath);
|
||||
this.groupBox3.Controls.Add(this.labelFFmpegPath);
|
||||
this.groupBox3.Controls.Add(this.checkBoxUseFFmpeg);
|
||||
this.groupBox3.Location = new System.Drawing.Point(406, 345);
|
||||
this.groupBox3.Location = new System.Drawing.Point(406, 363);
|
||||
this.groupBox3.Name = "groupBox3";
|
||||
this.groupBox3.Size = new System.Drawing.Size(419, 102);
|
||||
this.groupBox3.TabIndex = 3;
|
||||
@ -2099,7 +2122,7 @@
|
||||
this.groupBoxSpectrogram.Controls.Add(this.labelSpectrogramAppearance);
|
||||
this.groupBoxSpectrogram.Controls.Add(this.comboBoxSpectrogramAppearance);
|
||||
this.groupBoxSpectrogram.Controls.Add(this.checkBoxGenerateSpectrogram);
|
||||
this.groupBoxSpectrogram.Location = new System.Drawing.Point(6, 236);
|
||||
this.groupBoxSpectrogram.Location = new System.Drawing.Point(6, 254);
|
||||
this.groupBoxSpectrogram.Name = "groupBoxSpectrogram";
|
||||
this.groupBoxSpectrogram.Size = new System.Drawing.Size(819, 103);
|
||||
this.groupBoxSpectrogram.TabIndex = 1;
|
||||
@ -2141,7 +2164,7 @@
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.buttonWaveformsFolderEmpty);
|
||||
this.groupBox1.Controls.Add(this.labelWaveformsFolderInfo);
|
||||
this.groupBox1.Location = new System.Drawing.Point(6, 345);
|
||||
this.groupBox1.Location = new System.Drawing.Point(6, 363);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(394, 102);
|
||||
this.groupBox1.TabIndex = 2;
|
||||
@ -2194,7 +2217,7 @@
|
||||
this.groupBoxWaveformAppearence.Controls.Add(this.checkBoxWaveformShowGrid);
|
||||
this.groupBoxWaveformAppearence.Location = new System.Drawing.Point(6, 6);
|
||||
this.groupBoxWaveformAppearence.Name = "groupBoxWaveformAppearence";
|
||||
this.groupBoxWaveformAppearence.Size = new System.Drawing.Size(819, 224);
|
||||
this.groupBoxWaveformAppearence.Size = new System.Drawing.Size(819, 242);
|
||||
this.groupBoxWaveformAppearence.TabIndex = 0;
|
||||
this.groupBoxWaveformAppearence.TabStop = false;
|
||||
this.groupBoxWaveformAppearence.Text = "Waveform appearance";
|
||||
@ -2443,7 +2466,7 @@
|
||||
this.tabPageTools.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPageTools.Name = "tabPageTools";
|
||||
this.tabPageTools.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPageTools.Size = new System.Drawing.Size(832, 457);
|
||||
this.tabPageTools.Size = new System.Drawing.Size(832, 468);
|
||||
this.tabPageTools.TabIndex = 5;
|
||||
this.tabPageTools.Text = "Tools";
|
||||
this.tabPageTools.UseVisualStyleBackColor = true;
|
||||
@ -2460,7 +2483,7 @@
|
||||
this.groupBoxBing.Controls.Add(this.label1);
|
||||
this.groupBoxBing.Location = new System.Drawing.Point(374, 259);
|
||||
this.groupBoxBing.Name = "groupBoxBing";
|
||||
this.groupBoxBing.Size = new System.Drawing.Size(451, 189);
|
||||
this.groupBoxBing.Size = new System.Drawing.Size(451, 203);
|
||||
this.groupBoxBing.TabIndex = 6;
|
||||
this.groupBoxBing.TabStop = false;
|
||||
this.groupBoxBing.Text = "Bing translator";
|
||||
@ -2523,7 +2546,7 @@
|
||||
this.groupBoxToolsMisc.Controls.Add(this.checkBoxUseDoNotBreakAfterList);
|
||||
this.groupBoxToolsMisc.Location = new System.Drawing.Point(7, 331);
|
||||
this.groupBoxToolsMisc.Name = "groupBoxToolsMisc";
|
||||
this.groupBoxToolsMisc.Size = new System.Drawing.Size(361, 120);
|
||||
this.groupBoxToolsMisc.Size = new System.Drawing.Size(361, 131);
|
||||
this.groupBoxToolsMisc.TabIndex = 4;
|
||||
this.groupBoxToolsMisc.TabStop = false;
|
||||
this.groupBoxToolsMisc.Text = "Misc";
|
||||
@ -2778,7 +2801,7 @@
|
||||
this.tabPageWordLists.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPageWordLists.Name = "tabPageWordLists";
|
||||
this.tabPageWordLists.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPageWordLists.Size = new System.Drawing.Size(832, 457);
|
||||
this.tabPageWordLists.Size = new System.Drawing.Size(832, 468);
|
||||
this.tabPageWordLists.TabIndex = 3;
|
||||
this.tabPageWordLists.Text = "Word lists";
|
||||
this.tabPageWordLists.UseVisualStyleBackColor = true;
|
||||
@ -2797,7 +2820,7 @@
|
||||
this.groupBoxWordLists.Controls.Add(this.comboBoxWordListLanguage);
|
||||
this.groupBoxWordLists.Location = new System.Drawing.Point(6, 6);
|
||||
this.groupBoxWordLists.Name = "groupBoxWordLists";
|
||||
this.groupBoxWordLists.Size = new System.Drawing.Size(819, 445);
|
||||
this.groupBoxWordLists.Size = new System.Drawing.Size(819, 456);
|
||||
this.groupBoxWordLists.TabIndex = 2;
|
||||
this.groupBoxWordLists.TabStop = false;
|
||||
this.groupBoxWordLists.Text = "Word lists";
|
||||
@ -2805,7 +2828,7 @@
|
||||
// linkLabelOpenDictionaryFolder
|
||||
//
|
||||
this.linkLabelOpenDictionaryFolder.AutoSize = true;
|
||||
this.linkLabelOpenDictionaryFolder.Location = new System.Drawing.Point(6, 419);
|
||||
this.linkLabelOpenDictionaryFolder.Location = new System.Drawing.Point(6, 413);
|
||||
this.linkLabelOpenDictionaryFolder.Name = "linkLabelOpenDictionaryFolder";
|
||||
this.linkLabelOpenDictionaryFolder.Size = new System.Drawing.Size(126, 13);
|
||||
this.linkLabelOpenDictionaryFolder.TabIndex = 29;
|
||||
@ -3034,7 +3057,7 @@
|
||||
this.tabPageSsaStyle.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPageSsaStyle.Name = "tabPageSsaStyle";
|
||||
this.tabPageSsaStyle.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPageSsaStyle.Size = new System.Drawing.Size(832, 457);
|
||||
this.tabPageSsaStyle.Size = new System.Drawing.Size(832, 468);
|
||||
this.tabPageSsaStyle.TabIndex = 1;
|
||||
this.tabPageSsaStyle.Text = "SSA style";
|
||||
this.tabPageSsaStyle.UseVisualStyleBackColor = true;
|
||||
@ -3049,7 +3072,7 @@
|
||||
this.groupBoxSsaStyle.Controls.Add(this.groupBoxPreview);
|
||||
this.groupBoxSsaStyle.Location = new System.Drawing.Point(6, 6);
|
||||
this.groupBoxSsaStyle.Name = "groupBoxSsaStyle";
|
||||
this.groupBoxSsaStyle.Size = new System.Drawing.Size(819, 442);
|
||||
this.groupBoxSsaStyle.Size = new System.Drawing.Size(819, 456);
|
||||
this.groupBoxSsaStyle.TabIndex = 0;
|
||||
this.groupBoxSsaStyle.TabStop = false;
|
||||
this.groupBoxSsaStyle.Text = "Sub Station Alpha style";
|
||||
@ -3299,7 +3322,7 @@
|
||||
this.groupBoxPreview.Controls.Add(this.pictureBoxPreview);
|
||||
this.groupBoxPreview.Location = new System.Drawing.Point(6, 114);
|
||||
this.groupBoxPreview.Name = "groupBoxPreview";
|
||||
this.groupBoxPreview.Size = new System.Drawing.Size(807, 322);
|
||||
this.groupBoxPreview.Size = new System.Drawing.Size(807, 336);
|
||||
this.groupBoxPreview.TabIndex = 10;
|
||||
this.groupBoxPreview.TabStop = false;
|
||||
this.groupBoxPreview.Text = "Preview";
|
||||
@ -3309,7 +3332,7 @@
|
||||
this.pictureBoxPreview.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.pictureBoxPreview.Location = new System.Drawing.Point(3, 17);
|
||||
this.pictureBoxPreview.Name = "pictureBoxPreview";
|
||||
this.pictureBoxPreview.Size = new System.Drawing.Size(801, 302);
|
||||
this.pictureBoxPreview.Size = new System.Drawing.Size(801, 316);
|
||||
this.pictureBoxPreview.TabIndex = 0;
|
||||
this.pictureBoxPreview.TabStop = false;
|
||||
//
|
||||
@ -3320,7 +3343,7 @@
|
||||
this.tabPageNetwork.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPageNetwork.Name = "tabPageNetwork";
|
||||
this.tabPageNetwork.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPageNetwork.Size = new System.Drawing.Size(832, 457);
|
||||
this.tabPageNetwork.Size = new System.Drawing.Size(832, 468);
|
||||
this.tabPageNetwork.TabIndex = 4;
|
||||
this.tabPageNetwork.Text = "Network";
|
||||
this.tabPageNetwork.UseVisualStyleBackColor = true;
|
||||
@ -3334,7 +3357,7 @@
|
||||
this.groupBoxNetworkSession.Controls.Add(this.labelNetworkSessionNewMessageSound);
|
||||
this.groupBoxNetworkSession.Location = new System.Drawing.Point(6, 189);
|
||||
this.groupBoxNetworkSession.Name = "groupBoxNetworkSession";
|
||||
this.groupBoxNetworkSession.Size = new System.Drawing.Size(819, 259);
|
||||
this.groupBoxNetworkSession.Size = new System.Drawing.Size(819, 273);
|
||||
this.groupBoxNetworkSession.TabIndex = 30;
|
||||
this.groupBoxNetworkSession.TabStop = false;
|
||||
this.groupBoxNetworkSession.Text = "Network session settings";
|
||||
@ -3465,7 +3488,7 @@
|
||||
this.tabPageShortcuts.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPageShortcuts.Name = "tabPageShortcuts";
|
||||
this.tabPageShortcuts.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPageShortcuts.Size = new System.Drawing.Size(832, 457);
|
||||
this.tabPageShortcuts.Size = new System.Drawing.Size(832, 468);
|
||||
this.tabPageShortcuts.TabIndex = 8;
|
||||
this.tabPageShortcuts.Text = "Shortcuts";
|
||||
this.tabPageShortcuts.UseVisualStyleBackColor = true;
|
||||
@ -3485,7 +3508,7 @@
|
||||
this.groupBoxShortcuts.Controls.Add(this.labelShortcut);
|
||||
this.groupBoxShortcuts.Location = new System.Drawing.Point(6, 6);
|
||||
this.groupBoxShortcuts.Name = "groupBoxShortcuts";
|
||||
this.groupBoxShortcuts.Size = new System.Drawing.Size(819, 445);
|
||||
this.groupBoxShortcuts.Size = new System.Drawing.Size(819, 456);
|
||||
this.groupBoxShortcuts.TabIndex = 2;
|
||||
this.groupBoxShortcuts.TabStop = false;
|
||||
this.groupBoxShortcuts.Text = "Shortcuts";
|
||||
@ -3629,7 +3652,7 @@
|
||||
"F22",
|
||||
"F23",
|
||||
"F24"});
|
||||
this.comboBoxShortcutKey.Location = new System.Drawing.Point(353, 418);
|
||||
this.comboBoxShortcutKey.Location = new System.Drawing.Point(353, 427);
|
||||
this.comboBoxShortcutKey.Name = "comboBoxShortcutKey";
|
||||
this.comboBoxShortcutKey.Size = new System.Drawing.Size(92, 21);
|
||||
this.comboBoxShortcutKey.TabIndex = 4;
|
||||
@ -3639,7 +3662,7 @@
|
||||
// labelShortcutKey
|
||||
//
|
||||
this.labelShortcutKey.AutoSize = true;
|
||||
this.labelShortcutKey.Location = new System.Drawing.Point(322, 420);
|
||||
this.labelShortcutKey.Location = new System.Drawing.Point(322, 429);
|
||||
this.labelShortcutKey.Name = "labelShortcutKey";
|
||||
this.labelShortcutKey.Size = new System.Drawing.Size(25, 13);
|
||||
this.labelShortcutKey.TabIndex = 35;
|
||||
@ -3649,7 +3672,7 @@
|
||||
//
|
||||
this.checkBoxShortcutsShift.AutoSize = true;
|
||||
this.checkBoxShortcutsShift.Enabled = false;
|
||||
this.checkBoxShortcutsShift.Location = new System.Drawing.Point(245, 420);
|
||||
this.checkBoxShortcutsShift.Location = new System.Drawing.Point(245, 429);
|
||||
this.checkBoxShortcutsShift.Name = "checkBoxShortcutsShift";
|
||||
this.checkBoxShortcutsShift.Size = new System.Drawing.Size(48, 17);
|
||||
this.checkBoxShortcutsShift.TabIndex = 3;
|
||||
@ -3661,7 +3684,7 @@
|
||||
//
|
||||
this.checkBoxShortcutsAlt.AutoSize = true;
|
||||
this.checkBoxShortcutsAlt.Enabled = false;
|
||||
this.checkBoxShortcutsAlt.Location = new System.Drawing.Point(176, 420);
|
||||
this.checkBoxShortcutsAlt.Location = new System.Drawing.Point(176, 429);
|
||||
this.checkBoxShortcutsAlt.Name = "checkBoxShortcutsAlt";
|
||||
this.checkBoxShortcutsAlt.Size = new System.Drawing.Size(39, 17);
|
||||
this.checkBoxShortcutsAlt.TabIndex = 2;
|
||||
@ -3673,7 +3696,7 @@
|
||||
//
|
||||
this.checkBoxShortcutsControl.AutoSize = true;
|
||||
this.checkBoxShortcutsControl.Enabled = false;
|
||||
this.checkBoxShortcutsControl.Location = new System.Drawing.Point(89, 420);
|
||||
this.checkBoxShortcutsControl.Location = new System.Drawing.Point(89, 429);
|
||||
this.checkBoxShortcutsControl.Name = "checkBoxShortcutsControl";
|
||||
this.checkBoxShortcutsControl.Size = new System.Drawing.Size(61, 17);
|
||||
this.checkBoxShortcutsControl.TabIndex = 1;
|
||||
@ -3684,7 +3707,7 @@
|
||||
// buttonUpdateShortcut
|
||||
//
|
||||
this.buttonUpdateShortcut.Enabled = false;
|
||||
this.buttonUpdateShortcut.Location = new System.Drawing.Point(485, 417);
|
||||
this.buttonUpdateShortcut.Location = new System.Drawing.Point(485, 426);
|
||||
this.buttonUpdateShortcut.Name = "buttonUpdateShortcut";
|
||||
this.buttonUpdateShortcut.Size = new System.Drawing.Size(111, 23);
|
||||
this.buttonUpdateShortcut.TabIndex = 5;
|
||||
@ -3700,14 +3723,14 @@
|
||||
this.treeViewShortcuts.HideSelection = false;
|
||||
this.treeViewShortcuts.Location = new System.Drawing.Point(16, 21);
|
||||
this.treeViewShortcuts.Name = "treeViewShortcuts";
|
||||
this.treeViewShortcuts.Size = new System.Drawing.Size(797, 389);
|
||||
this.treeViewShortcuts.Size = new System.Drawing.Size(797, 400);
|
||||
this.treeViewShortcuts.TabIndex = 0;
|
||||
this.treeViewShortcuts.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeViewShortcuts_AfterSelect);
|
||||
//
|
||||
// labelShortcut
|
||||
//
|
||||
this.labelShortcut.AutoSize = true;
|
||||
this.labelShortcut.Location = new System.Drawing.Point(15, 420);
|
||||
this.labelShortcut.Location = new System.Drawing.Point(15, 429);
|
||||
this.labelShortcut.Name = "labelShortcut";
|
||||
this.labelShortcut.Size = new System.Drawing.Size(52, 13);
|
||||
this.labelShortcut.TabIndex = 3;
|
||||
@ -3719,7 +3742,7 @@
|
||||
this.tabPageSyntaxColoring.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPageSyntaxColoring.Name = "tabPageSyntaxColoring";
|
||||
this.tabPageSyntaxColoring.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPageSyntaxColoring.Size = new System.Drawing.Size(832, 457);
|
||||
this.tabPageSyntaxColoring.Size = new System.Drawing.Size(832, 468);
|
||||
this.tabPageSyntaxColoring.TabIndex = 9;
|
||||
this.tabPageSyntaxColoring.Text = "Syntax coloring";
|
||||
this.tabPageSyntaxColoring.UseVisualStyleBackColor = true;
|
||||
@ -3738,7 +3761,7 @@
|
||||
this.groupBoxListViewSyntaxColoring.Controls.Add(this.panelListViewSyntaxColorError);
|
||||
this.groupBoxListViewSyntaxColoring.Location = new System.Drawing.Point(6, 6);
|
||||
this.groupBoxListViewSyntaxColoring.Name = "groupBoxListViewSyntaxColoring";
|
||||
this.groupBoxListViewSyntaxColoring.Size = new System.Drawing.Size(820, 445);
|
||||
this.groupBoxListViewSyntaxColoring.Size = new System.Drawing.Size(820, 456);
|
||||
this.groupBoxListViewSyntaxColoring.TabIndex = 0;
|
||||
this.groupBoxListViewSyntaxColoring.TabStop = false;
|
||||
this.groupBoxListViewSyntaxColoring.Text = "List view syntax coloring";
|
||||
@ -3816,7 +3839,7 @@
|
||||
//
|
||||
this.labelStatus.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.labelStatus.AutoSize = true;
|
||||
this.labelStatus.Location = new System.Drawing.Point(12, 510);
|
||||
this.labelStatus.Location = new System.Drawing.Point(12, 521);
|
||||
this.labelStatus.Name = "labelStatus";
|
||||
this.labelStatus.Size = new System.Drawing.Size(60, 13);
|
||||
this.labelStatus.TabIndex = 3;
|
||||
@ -3830,7 +3853,7 @@
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(865, 535);
|
||||
this.ClientSize = new System.Drawing.Size(865, 546);
|
||||
this.Controls.Add(this.labelStatus);
|
||||
this.Controls.Add(this.tabControlSettings);
|
||||
this.Controls.Add(this.buttonCancel);
|
||||
@ -4240,5 +4263,7 @@
|
||||
private System.Windows.Forms.NumericUpDown numericUpDownMaxNumberOfLines;
|
||||
private System.Windows.Forms.Label labelMaxLines;
|
||||
private System.Windows.Forms.CheckBox checkBoxWaveformSetVideoPosMoveStartEnd;
|
||||
private System.Windows.Forms.Button buttonListviewColumns;
|
||||
private System.Windows.Forms.Label labelListviewColumns;
|
||||
}
|
||||
}
|
@ -31,6 +31,9 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
private OcrFixReplaceList _ocrFixReplaceList;
|
||||
private readonly string _oldVlcLocation;
|
||||
private readonly string _oldVlcLocationRelative;
|
||||
private readonly bool _oldListViewShowCps;
|
||||
private readonly bool _oldListViewShowWpm;
|
||||
|
||||
private readonly Dictionary<ShortcutHelper, string> _newShortcuts = new Dictionary<ShortcutHelper, string>();
|
||||
|
||||
private class ComboBoxLanguage
|
||||
@ -314,6 +317,8 @@ 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;
|
||||
@ -864,9 +869,27 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
_oldVlcLocation = gs.VlcLocation;
|
||||
_oldVlcLocationRelative = gs.VlcLocationRelative;
|
||||
|
||||
_oldListViewShowCps = Configuration.Settings.Tools.ListViewShowColumnCharsPerSec;
|
||||
_oldListViewShowWpm = Configuration.Settings.Tools.ListViewShowColumnWordsPerMin;
|
||||
|
||||
labelPlatform.Text = (IntPtr.Size * 8) + "-bit";
|
||||
}
|
||||
|
||||
private string GetListViewColumns()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append(Configuration.Settings.Language.General.NumberSymbol + ", ");
|
||||
sb.Append(Configuration.Settings.Language.General.StartTime + ", ");
|
||||
sb.Append(Configuration.Settings.Language.General.EndTime + ", ");
|
||||
sb.Append(Configuration.Settings.Language.General.Duration + ", ");
|
||||
if (Configuration.Settings.Tools.ListViewShowColumnCharsPerSec)
|
||||
sb.Append(Configuration.Settings.Language.General.CharsPerSec + ", ");
|
||||
if (Configuration.Settings.Tools.ListViewShowColumnWordsPerMin)
|
||||
sb.Append(Configuration.Settings.Language.General.WordsPerMin + ", ");
|
||||
sb.Append(Configuration.Settings.Language.General.Text + ", ");
|
||||
return sb.ToString().TrimEnd().TrimEnd(',');
|
||||
}
|
||||
|
||||
private void AddNode(TreeNode node, string text, string shortcut, bool isMenuItem = false)
|
||||
{
|
||||
var prop = Configuration.Settings.Shortcuts.GetType().GetProperty(shortcut);
|
||||
@ -2191,6 +2214,9 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
Configuration.Settings.General.VlcLocation = _oldVlcLocation;
|
||||
Configuration.Settings.General.VlcLocationRelative = _oldVlcLocationRelative;
|
||||
Configuration.Settings.Tools.ListViewShowColumnCharsPerSec = _oldListViewShowCps;
|
||||
Configuration.Settings.Tools.ListViewShowColumnWordsPerMin = _oldListViewShowWpm;
|
||||
|
||||
DialogResult = DialogResult.Cancel;
|
||||
}
|
||||
|
||||
@ -2339,5 +2365,19 @@ 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.ListViewShowColumnCharsPerSec = form.ShowCps;
|
||||
Configuration.Settings.Tools.ListViewShowColumnWordsPerMin = form.ShowWpm;
|
||||
buttonListviewColumns.Text = GetListViewColumns();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
204
src/Forms/SettingsListViewColumns.Designer.cs
generated
Normal file
204
src/Forms/SettingsListViewColumns.Designer.cs
generated
Normal file
@ -0,0 +1,204 @@
|
||||
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.Enabled = false;
|
||||
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.Enabled = false;
|
||||
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;
|
||||
}
|
||||
}
|
54
src/Forms/SettingsListViewColumns.cs
Normal file
54
src/Forms/SettingsListViewColumns.cs
Normal file
@ -0,0 +1,54 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using Nikse.SubtitleEdit.Core;
|
||||
using Nikse.SubtitleEdit.Logic;
|
||||
|
||||
namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
public sealed partial class SettingsListViewColumns : Form
|
||||
{
|
||||
public bool ShowCps { get; set; }
|
||||
public bool ShowWpm { get; set; }
|
||||
|
||||
public SettingsListViewColumns()
|
||||
{
|
||||
InitializeComponent();
|
||||
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)
|
||||
{
|
||||
ShowCps = checkBoxShowCps.Checked;
|
||||
ShowWpm = checkBoxShowWpm.Checked;
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
|
||||
private void buttonCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
120
src/Forms/SettingsListViewColumns.resx
Normal file
120
src/Forms/SettingsListViewColumns.resx
Normal file
@ -0,0 +1,120 @@
|
||||
<?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>
|
1
src/Forms/SplitLongLines.Designer.cs
generated
1
src/Forms/SplitLongLines.Designer.cs
generated
@ -249,7 +249,6 @@
|
||||
this.SubtitleListview1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.SubtitleListview1.DisplayExtraFromExtra = false;
|
||||
this.SubtitleListview1.FirstVisibleIndex = -1;
|
||||
this.SubtitleListview1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.SubtitleListview1.FullRowSelect = true;
|
||||
|
2
src/Forms/SyncPointsSync.Designer.cs
generated
2
src/Forms/SyncPointsSync.Designer.cs
generated
@ -113,7 +113,6 @@
|
||||
//
|
||||
this.subtitleListView2.AllowDrop = true;
|
||||
this.subtitleListView2.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.subtitleListView2.DisplayExtraFromExtra = false;
|
||||
this.subtitleListView2.FirstVisibleIndex = -1;
|
||||
this.subtitleListView2.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.subtitleListView2.FullRowSelect = true;
|
||||
@ -180,7 +179,6 @@
|
||||
this.SubtitleListview1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.SubtitleListview1.DisplayExtraFromExtra = false;
|
||||
this.SubtitleListview1.FirstVisibleIndex = -1;
|
||||
this.SubtitleListview1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.SubtitleListview1.FullRowSelect = true;
|
||||
|
1
src/Forms/VobSubOcr.Designer.cs
generated
1
src/Forms/VobSubOcr.Designer.cs
generated
@ -1473,7 +1473,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.subtitleListView1.ContextMenuStrip = this.contextMenuStripListview;
|
||||
this.subtitleListView1.DisplayExtraFromExtra = false;
|
||||
this.subtitleListView1.FirstVisibleIndex = -1;
|
||||
this.subtitleListView1.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.subtitleListView1.FullRowSelect = true;
|
||||
|
@ -585,6 +585,12 @@
|
||||
<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>
|
||||
@ -1152,6 +1158,9 @@
|
||||
<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…
Reference in New Issue
Block a user