List view column context menu + endtime/duration optional - thx darnn :)

Fix #2238
This commit is contained in:
Nikolaj Olsson 2017-02-23 08:52:49 +01:00
parent f49d31dcba
commit 4d6bd2fac4
12 changed files with 523 additions and 160 deletions

View File

@ -1064,6 +1064,7 @@ Note: Do check free disk space.</WaveFileMalformed>
<ShowHideVideo>Show/hide video</ShowHideVideo>
</ToolBar>
<ContextMenu>
<SizeAllColumnsToFit>Size all columns to fit</SizeAllColumnsToFit>
<AdvancedSubStationAlphaSetStyle>Advanced Sub Station Alpha - set style</AdvancedSubStationAlphaSetStyle>
<SubStationAlphaSetStyle>Sub Station Alpha - set style</SubStationAlphaSetStyle>
<SubStationAlphaStyles>Sub Station Alpha styles...</SubStationAlphaStyles>

View File

@ -1564,6 +1564,7 @@ namespace Nikse.SubtitleEdit.Core
ContextMenu = new LanguageStructure.Main.MainMenu.ListViewContextMenu
{
SizeAllColumnsToFit = "Size all columns to fit",
AdvancedSubStationAlphaSetStyle = "Advanced Sub Station Alpha - set style",
SubStationAlphaSetStyle = "Sub Station Alpha - set style",
AdvancedSubStationAlphaStyles = "Advanced Sub Station Alpha styles...",

View File

@ -3598,6 +3598,9 @@ namespace Nikse.SubtitleEdit.Core
case "Main/Menu/ToolBar/ShowHideVideo":
language.Main.Menu.ToolBar.ShowHideVideo = reader.Value;
break;
case "Main/Menu/ContextMenu/SizeAllColumnsToFit":
language.Main.Menu.ContextMenu.SizeAllColumnsToFit = reader.Value;
break;
case "Main/Menu/ContextMenu/AdvancedSubStationAlphaSetStyle":
language.Main.Menu.ContextMenu.AdvancedSubStationAlphaSetStyle = reader.Value;
break;

View File

@ -1428,6 +1428,7 @@
public class ListViewContextMenu
{
public string SizeAllColumnsToFit { get; set; }
public string AdvancedSubStationAlphaSetStyle { get; set; }
public string SubStationAlphaSetStyle { get; set; }
public string SubStationAlphaStyles { get; set; }

View File

@ -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 ListViewShowColumnEndTime { get; set; }
public bool ListViewShowColumnDuration { get; set; }
public bool ListViewShowColumnCharsPerSec { get; set; }
public bool ListViewShowColumnWordsPerMin { get; set; }
public bool SplitAdvanced { get; set; }
@ -215,6 +217,8 @@ namespace Nikse.SubtitleEdit.Core
ListViewSyntaxMoreThanXLinesX = 2;
ListViewSyntaxErrorColor = Color.FromArgb(255, 180, 150);
ListViewUnfocusedSelectedColor = Color.LightBlue;
ListViewShowColumnEndTime = true;
ListViewShowColumnDuration = true;
SplitAdvanced = false;
SplitNumberOfParts = 3;
SplitVia = "Lines";
@ -1769,6 +1773,12 @@ namespace Nikse.SubtitleEdit.Core
subNode = node.SelectSingleNode("ListViewUnfocusedSelectedColor");
if (subNode != null)
settings.Tools.ListViewUnfocusedSelectedColor = Color.FromArgb(int.Parse(subNode.InnerText));
subNode = node.SelectSingleNode("ListViewShowColumnEndTime");
if (subNode != null)
settings.Tools.ListViewShowColumnEndTime = Convert.ToBoolean(subNode.InnerText);
subNode = node.SelectSingleNode("ListViewShowColumnDuration");
if (subNode != null)
settings.Tools.ListViewShowColumnDuration = Convert.ToBoolean(subNode.InnerText);
subNode = node.SelectSingleNode("ListViewShowColumnCharsPerSec");
if (subNode != null)
settings.Tools.ListViewShowColumnCharsPerSec = Convert.ToBoolean(subNode.InnerText);
@ -3210,6 +3220,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("ListViewShowColumnEndTime", settings.Tools.ListViewShowColumnEndTime.ToString(CultureInfo.InvariantCulture));
textWriter.WriteElementString("ListViewShowColumnDuration", settings.Tools.ListViewShowColumnDuration.ToString(CultureInfo.InvariantCulture));
textWriter.WriteElementString("ListViewShowColumnCharsPerSec", settings.Tools.ListViewShowColumnCharsPerSec.ToString(CultureInfo.InvariantCulture));
textWriter.WriteElementString("ListViewShowColumnWordsPerMin", settings.Tools.ListViewShowColumnWordsPerMin.ToString(CultureInfo.InvariantCulture));
textWriter.WriteElementString("SplitAdvanced", settings.Tools.SplitAdvanced.ToString());

View File

@ -27,6 +27,7 @@ namespace Nikse.SubtitleEdit.Controls
public Paragraph BeforeParagraph { get; set; }
public MouseDownParagraphType MouseDownParagraphType { get; set; }
public bool MovePreviousOrNext { get; set; }
public double AdjustMs { get; set; }
public ParagraphEventArgs(Paragraph p)
{
Paragraph = p;
@ -352,7 +353,7 @@ namespace Nikse.SubtitleEdit.Controls
return;
const double additionalSeconds = 15.0; // Helps when scrolling
double startThresholdMilliseconds = (StartPositionSeconds - additionalSeconds) * TimeCode.BaseUnit;
double startThresholdMilliseconds = (_startPositionSeconds - additionalSeconds) * TimeCode.BaseUnit;
double endThresholdMilliseconds = (EndPositionSeconds + additionalSeconds) * TimeCode.BaseUnit;
for (int i = 0; i < subtitle.Paragraphs.Count; i++)
@ -447,17 +448,20 @@ namespace Nikse.SubtitleEdit.Controls
}
}
//private Stopwatch _sw;
//private readonly List<long> _ticks = new List<long>();
internal void WaveformPaint(object sender, PaintEventArgs e)
{
//_sw = Stopwatch.StartNew();
Graphics graphics = e.Graphics;
if (_wavePeaks != null)
{
bool showSpectrogram = IsSpectrogramAvailable && ShowSpectrogram;
bool showSpectrogramOnly = showSpectrogram && !ShowWaveform;
bool showSpectrogram = _showSpectrogram && IsSpectrogramAvailable;
bool showSpectrogramOnly = showSpectrogram && !_showWaveform;
int waveformHeight = Height - (showSpectrogram ? SpectrogramDisplayHeight : 0);
// background
DrawBackground(graphics);
graphics.Clear(BackgroundColor);
// grid lines
if (ShowGridLines && !showSpectrogramOnly)
@ -472,38 +476,40 @@ namespace Nikse.SubtitleEdit.Controls
}
// waveform
if (ShowWaveform)
if (_showWaveform)
{
using (var penNormal = new Pen(Color))
using (var penSelected = new Pen(SelectedColor)) // selected paragraph
{
var isSelectedHelper = new IsSelectedHelper(_allSelectedParagraphs, _wavePeaks.SampleRate);
int baseHeight = (int)(_wavePeaks.HighestPeak / VerticalZoomFactor);
int baseHeight = (int)(_wavePeaks.HighestPeak / _verticalZoomFactor);
int halfWaveformHeight = waveformHeight / 2;
Func<float, float> calculateY = value =>
Func<double, float> calculateY = value =>
{
float offset = (value / baseHeight) * halfWaveformHeight;
var offset = (value / baseHeight) * halfWaveformHeight;
if (offset > halfWaveformHeight)
offset = halfWaveformHeight;
if (offset < -halfWaveformHeight)
offset = -halfWaveformHeight;
return halfWaveformHeight - offset;
return (float)(halfWaveformHeight - offset);
};
var div = _wavePeaks.SampleRate / _zoomFactor;
for (int x = 0; x < Width; x++)
{
float pos = (float)RelativeXPositionToSeconds(x) * _wavePeaks.SampleRate;
var pos = (x / div + _startPositionSeconds) * _wavePeaks.SampleRate;
int pos0 = (int)pos;
int pos1 = pos0 + 1;
int pos1 = pos0;
pos1++;
if (pos1 >= _wavePeaks.Peaks.Count)
break;
float pos1Weight = pos - pos0;
float pos0Weight = 1F - pos1Weight;
var pos1Weight = pos - pos0;
var pos0Weight = 1F - pos1Weight;
var peak0 = _wavePeaks.Peaks[pos0];
var peak1 = _wavePeaks.Peaks[pos1];
float max = peak0.Max * pos0Weight + peak1.Max * pos1Weight;
float min = peak0.Min * pos0Weight + peak1.Min * pos1Weight;
float yMax = calculateY(max);
float yMin = Math.Max(calculateY(min), yMax + 0.1F);
var max = peak0.Max * pos0Weight + peak1.Max * pos1Weight;
var min = peak0.Min * pos0Weight + peak1.Min * pos1Weight;
var yMax = calculateY(max);
var yMin = Math.Max(calculateY(min), yMax + 0.1F);
var pen = isSelectedHelper.IsSelected(pos0) ? penSelected : penNormal;
graphics.DrawLine(pen, x, yMax, x, yMin);
}
@ -516,8 +522,7 @@ namespace Nikse.SubtitleEdit.Controls
DrawTimeLine(graphics, waveformHeight);
}
int currentPositionPos = SecondsToXPosition(_currentVideoPositionSeconds - StartPositionSeconds);
int currentPositionPos = SecondsToXPosition(_currentVideoPositionSeconds - _startPositionSeconds);
bool currentPosDone = false;
// scene changes
@ -529,7 +534,7 @@ namespace Nikse.SubtitleEdit.Controls
while (index < _sceneChanges.Count)
{
double time = _sceneChanges[index++];
int pos = SecondsToXPosition(time - StartPositionSeconds);
int pos = SecondsToXPosition(time - _startPositionSeconds);
if (pos > 0 && pos < Width)
{
if (Math.Abs(currentPositionPos - pos) < 0.01)
@ -555,19 +560,18 @@ namespace Nikse.SubtitleEdit.Controls
}
// current video position
if (_currentVideoPositionSeconds > 0 && !currentPosDone)
if (_currentVideoPositionSeconds > 0 && !currentPosDone && currentPositionPos > 0 && currentPositionPos < Width)
{
if (currentPositionPos > 0 && currentPositionPos < Width)
{
using (var p = new Pen(Color.Turquoise))
graphics.DrawLine(p, currentPositionPos, 0, currentPositionPos, Height);
}
using (var p = new Pen(Color.Turquoise))
graphics.DrawLine(p, currentPositionPos, 0, currentPositionPos, Height);
}
// paragraphs
var startPositionMilliseconds = _startPositionSeconds * 1000.0;
var endPositionMilliseconds = RelativeXPositionToSeconds(Width) * 1000.0;
foreach (Paragraph p in _displayableParagraphs)
{
if (p.EndTime.TotalSeconds >= StartPositionSeconds && p.StartTime.TotalSeconds <= EndPositionSeconds)
if (p.EndTime.TotalMilliseconds >= startPositionMilliseconds && p.StartTime.TotalMilliseconds <= endPositionMilliseconds)
{
DrawParagraph(p, graphics);
}
@ -576,8 +580,8 @@ namespace Nikse.SubtitleEdit.Controls
// current selection
if (NewSelectionParagraph != null)
{
int currentRegionLeft = SecondsToXPosition(NewSelectionParagraph.StartTime.TotalSeconds - StartPositionSeconds);
int currentRegionRight = SecondsToXPosition(NewSelectionParagraph.EndTime.TotalSeconds - StartPositionSeconds);
int currentRegionLeft = SecondsToXPosition(NewSelectionParagraph.StartTime.TotalSeconds - _startPositionSeconds);
int currentRegionRight = SecondsToXPosition(NewSelectionParagraph.EndTime.TotalSeconds - _startPositionSeconds);
int currentRegionWidth = currentRegionRight - currentRegionLeft;
if (currentRegionRight >= 0 && currentRegionLeft <= Width)
{
@ -594,7 +598,7 @@ namespace Nikse.SubtitleEdit.Controls
}
else
{
DrawBackground(graphics);
graphics.Clear(BackgroundColor);
if (ShowGridLines)
{
@ -620,11 +624,9 @@ namespace Nikse.SubtitleEdit.Controls
using (var p = new Pen(SelectedColor))
graphics.DrawRectangle(p, new Rectangle(0, 0, Width - 1, Height - 1));
}
}
private void DrawBackground(Graphics graphics)
{
graphics.Clear(BackgroundColor);
//_sw.Stop();
//_ticks.Add(_sw.ElapsedMilliseconds);
//e.Graphics.DrawString("X = " + _ticks.Average().ToString(), Font, new SolidBrush(Color.Cyan), 100, 130);
}
private void DrawGridLines(Graphics graphics, int imageHeight)
@ -642,12 +644,12 @@ namespace Nikse.SubtitleEdit.Controls
}
else
{
double interval = ZoomFactor >= 0.4 ?
double interval = _zoomFactor >= 0.4 ?
0.1 * _wavePeaks.SampleRate * _zoomFactor : // a pixel is 0.1 second
1.0 * _wavePeaks.SampleRate * _zoomFactor; // a pixel is 1.0 second
using (var pen = new Pen(new SolidBrush(GridColor)))
{
for (double i = SecondsToXPosition(StartPositionSeconds) % ((int)Math.Round(interval)); i < Width; i += interval)
for (double i = SecondsToXPosition(_startPositionSeconds) % ((int)Math.Round(interval)); i < Width; i += interval)
{
var j = (int)Math.Round(i);
graphics.DrawLine(pen, j, 0, j, imageHeight);
@ -663,7 +665,7 @@ namespace Nikse.SubtitleEdit.Controls
private void DrawTimeLine(Graphics graphics, int imageHeight)
{
double seconds = Math.Ceiling(StartPositionSeconds) - StartPositionSeconds;
double seconds = Math.Ceiling(_startPositionSeconds) - _startPositionSeconds;
int position = SecondsToXPosition(seconds);
using (var pen = new Pen(TextColor))
using (var textBrush = new SolidBrush(TextColor))
@ -672,10 +674,10 @@ namespace Nikse.SubtitleEdit.Controls
while (position < Width)
{
var n = _zoomFactor * _wavePeaks.SampleRate;
if (n > 38 || (int)Math.Round(StartPositionSeconds + seconds) % 5 == 0)
if (n > 38 || (int)Math.Round(_startPositionSeconds + seconds) % 5 == 0)
{
graphics.DrawLine(pen, position, imageHeight, position, imageHeight - 10);
graphics.DrawString(GetDisplayTime(StartPositionSeconds + seconds), textFont, textBrush, new PointF(position + 2, imageHeight - 13));
graphics.DrawString(GetDisplayTime(_startPositionSeconds + seconds), textFont, textBrush, new PointF(position + 2, imageHeight - 13));
}
seconds += 0.5;
@ -702,8 +704,8 @@ namespace Nikse.SubtitleEdit.Controls
private void DrawParagraph(Paragraph paragraph, Graphics graphics)
{
int currentRegionLeft = SecondsToXPosition(paragraph.StartTime.TotalSeconds - StartPositionSeconds);
int currentRegionRight = SecondsToXPosition(paragraph.EndTime.TotalSeconds - StartPositionSeconds);
int currentRegionLeft = SecondsToXPosition(paragraph.StartTime.TotalSeconds - _startPositionSeconds);
int currentRegionRight = SecondsToXPosition(paragraph.EndTime.TotalSeconds - _startPositionSeconds);
int currentRegionWidth = currentRegionRight - currentRegionLeft;
// background
@ -770,7 +772,7 @@ namespace Nikse.SubtitleEdit.Controls
private double RelativeXPositionToSeconds(int x)
{
return StartPositionSeconds + ((double)x / _wavePeaks.SampleRate) / _zoomFactor;
return _startPositionSeconds + (double)x / _wavePeaks.SampleRate / _zoomFactor;
}
private int SecondsToXPosition(double seconds)
@ -815,20 +817,20 @@ namespace Nikse.SubtitleEdit.Controls
_mouseDownParagraph.StartTime.TotalMilliseconds = milliseconds;
NewSelectionParagraph.StartTime.TotalMilliseconds = milliseconds;
_mouseMoveStartX = e.X;
_mouseMoveEndX = SecondsToXPosition(NewSelectionParagraph.EndTime.TotalSeconds - StartPositionSeconds);
_mouseMoveEndX = SecondsToXPosition(NewSelectionParagraph.EndTime.TotalSeconds - _startPositionSeconds);
}
else
{
if (_mouseDownParagraph != null)
_mouseDownParagraph.EndTime.TotalMilliseconds = milliseconds;
NewSelectionParagraph.EndTime.TotalMilliseconds = milliseconds;
_mouseMoveStartX = SecondsToXPosition(NewSelectionParagraph.StartTime.TotalSeconds - StartPositionSeconds);
_mouseMoveStartX = SecondsToXPosition(NewSelectionParagraph.StartTime.TotalSeconds - _startPositionSeconds);
_mouseMoveEndX = e.X;
}
SetMinMaxViaSeconds(seconds);
}
else if (SetParagrapBorderHit(milliseconds, _selectedParagraph) ||
SetParagrapBorderHit(milliseconds, _displayableParagraphs))
SetParagrapBorderHit(milliseconds, _displayableParagraphs))
{
if (_mouseDownParagraph != null)
oldMouseDownParagraph = new Paragraph(_mouseDownParagraph);
@ -891,8 +893,6 @@ namespace Nikse.SubtitleEdit.Controls
if (_subtitle != null && _mouseDownParagraph != null)
{
int curIdx = _subtitle.Paragraphs.IndexOf(_mouseDownParagraph);
//if (curIdx > 0)
// _gapAtStart = _subtitle.Paragraphs[curIdx].StartTime.TotalMilliseconds - _subtitle.Paragraphs[curIdx - 1].EndTime.TotalMilliseconds;
if (curIdx > 0 && oldMouseDownParagraph != null)
_gapAtStart = oldMouseDownParagraph.StartTime.TotalMilliseconds - _subtitle.Paragraphs[curIdx - 1].EndTime.TotalMilliseconds;
}
@ -902,8 +902,6 @@ namespace Nikse.SubtitleEdit.Controls
if (_subtitle != null && _mouseDownParagraph != null)
{
int curIdx = _subtitle.Paragraphs.IndexOf(_mouseDownParagraph);
//if (curIdx >= 0 && curIdx < _subtitle.Paragraphs.Count - 1)
// _gapAtStart = _subtitle.Paragraphs[curIdx + 1].StartTime.TotalMilliseconds - _subtitle.Paragraphs[curIdx].EndTime.TotalMilliseconds;
if (curIdx >= 0 && curIdx < _subtitle.Paragraphs.Count - 1 && oldMouseDownParagraph != null)
_gapAtStart = _subtitle.Paragraphs[curIdx + 1].StartTime.TotalMilliseconds - oldMouseDownParagraph.EndTime.TotalMilliseconds;
}
@ -1110,13 +1108,7 @@ namespace Nikse.SubtitleEdit.Controls
}
}
private bool AllowMovePrevOrNext
{
get
{
return _gapAtStart >= 0 && _gapAtStart < 500 && ModifierKeys == Keys.Alt;
}
}
private bool AllowMovePrevOrNext => _gapAtStart >= 0 && _gapAtStart < 500 && ModifierKeys == Keys.Alt;
private void WaveformMouseMove(object sender, MouseEventArgs e)
{
@ -1124,7 +1116,7 @@ namespace Nikse.SubtitleEdit.Controls
return;
int oldMouseMoveLastX = _mouseMoveLastX;
if (e.X < 0 && StartPositionSeconds > 0.1 && _mouseDown)
if (e.X < 0 && _startPositionSeconds > 0.1 && _mouseDown)
{
if (e.X < _mouseMoveLastX)
{
@ -1133,24 +1125,21 @@ namespace Nikse.SubtitleEdit.Controls
{
_mouseMoveEndX = 0;
_mouseMoveStartX += (int)(_wavePeaks.SampleRate * 0.1);
OnPositionSelected?.Invoke(this, new ParagraphEventArgs(StartPositionSeconds, null));
OnPositionSelected?.Invoke(this, new ParagraphEventArgs(_startPositionSeconds, null));
}
}
_mouseMoveLastX = e.X;
Invalidate();
return;
}
if (e.X > Width && StartPositionSeconds + 0.1 < _wavePeaks.LengthInSeconds && _mouseDown)
if (e.X > Width && _startPositionSeconds + 0.1 < _wavePeaks.LengthInSeconds && _mouseDown)
{
//if (e.X > _mouseMoveLastX) // not much room for moving mouse cursor, so just scroll right
StartPositionSeconds += 0.1;
if (_mouseDownParagraph == null)
{
StartPositionSeconds += 0.1;
if (_mouseDownParagraph == null)
{
_mouseMoveEndX = Width;
_mouseMoveStartX -= (int)(_wavePeaks.SampleRate * 0.1);
OnPositionSelected?.Invoke(this, new ParagraphEventArgs(StartPositionSeconds, null));
}
_mouseMoveEndX = Width;
_mouseMoveStartX -= (int)(_wavePeaks.SampleRate * 0.1);
OnPositionSelected?.Invoke(this, new ParagraphEventArgs(_startPositionSeconds, null));
}
_mouseMoveLastX = e.X;
Invalidate();
@ -1295,6 +1284,7 @@ namespace Nikse.SubtitleEdit.Controls
{
double durationMilliseconds = _mouseDownParagraph.Duration.TotalMilliseconds;
var oldStart = _mouseDownParagraph.StartTime.TotalMilliseconds;
_mouseDownParagraph.StartTime.TotalMilliseconds = milliseconds - _moveWholeStartDifferenceMilliseconds;
_mouseDownParagraph.EndTime.TotalMilliseconds = _mouseDownParagraph.StartTime.TotalMilliseconds + durationMilliseconds;
@ -1308,8 +1298,7 @@ namespace Nikse.SubtitleEdit.Controls
_mouseDownParagraph.StartTime.TotalMilliseconds = _wholeParagraphMinMilliseconds + 1;
_mouseDownParagraph.EndTime.TotalMilliseconds = _mouseDownParagraph.StartTime.TotalMilliseconds + durationMilliseconds;
}
OnTimeChanged?.Invoke(this, new ParagraphEventArgs(seconds, _mouseDownParagraph, _oldParagraph));
OnTimeChanged?.Invoke(this, new ParagraphEventArgs(seconds, _mouseDownParagraph, _oldParagraph, _mouseDownParagraphType) { AdjustMs = _mouseDownParagraph.StartTime.TotalMilliseconds - oldStart });
}
}
else
@ -1428,8 +1417,8 @@ namespace Nikse.SubtitleEdit.Controls
if (NewSelectionParagraph != null)
{
_mouseMoveStartX = SecondsToXPosition(NewSelectionParagraph.StartTime.TotalSeconds - StartPositionSeconds);
_mouseMoveEndX = SecondsToXPosition(NewSelectionParagraph.EndTime.TotalSeconds - StartPositionSeconds);
_mouseMoveStartX = SecondsToXPosition(NewSelectionParagraph.StartTime.TotalSeconds - _startPositionSeconds);
_mouseMoveEndX = SecondsToXPosition(NewSelectionParagraph.EndTime.TotalSeconds - _startPositionSeconds);
}
}
@ -1454,15 +1443,15 @@ namespace Nikse.SubtitleEdit.Controls
{
seconds = p.StartTime.TotalSeconds;
double endSeconds = p.EndTime.TotalSeconds;
if (seconds < StartPositionSeconds)
if (seconds < _startPositionSeconds)
{
StartPositionSeconds = (p.StartTime.TotalSeconds) + 0.1; // move earlier - show whole selected paragraph
_startPositionSeconds = (p.StartTime.TotalSeconds) + 0.1; // move earlier - show whole selected paragraph
}
else if (endSeconds > EndPositionSeconds)
{
double newStartPos = StartPositionSeconds + (endSeconds - EndPositionSeconds); // move later, so whole selected paragraph is visible
double newStartPos = _startPositionSeconds + (endSeconds - EndPositionSeconds); // move later, so whole selected paragraph is visible
if (newStartPos < seconds) // but only if visibile screen is wide enough
StartPositionSeconds = newStartPos;
_startPositionSeconds = newStartPos;
}
}
@ -1570,20 +1559,20 @@ namespace Nikse.SubtitleEdit.Controls
}
else if (e.Modifiers == Keys.None && e.KeyCode == Keys.Z)
{
if (StartPositionSeconds > 0.1)
if (_startPositionSeconds > 0.1)
{
StartPositionSeconds -= 0.1;
OnPositionSelected?.Invoke(this, new ParagraphEventArgs(StartPositionSeconds, null));
OnPositionSelected?.Invoke(this, new ParagraphEventArgs(_startPositionSeconds, null));
Invalidate();
e.SuppressKeyPress = true;
}
}
else if (e.Modifiers == Keys.None && e.KeyCode == Keys.X)
{
if (StartPositionSeconds + 0.1 < _wavePeaks.LengthInSeconds)
if (_startPositionSeconds + 0.1 < _wavePeaks.LengthInSeconds)
{
StartPositionSeconds += 0.1;
OnPositionSelected?.Invoke(this, new ParagraphEventArgs(StartPositionSeconds, null));
OnPositionSelected?.Invoke(this, new ParagraphEventArgs(_startPositionSeconds, null));
Invalidate();
e.SuppressKeyPress = true;
}
@ -1623,7 +1612,7 @@ namespace Nikse.SubtitleEdit.Controls
if (seconds >= 0)
{
StartPositionSeconds = seconds;
if (StartPositionSeconds > 1)
if (_startPositionSeconds > 1)
StartPositionSeconds -= 1;
OnSingleClick?.Invoke(this, new ParagraphEventArgs(seconds, null));
Invalidate();
@ -1653,7 +1642,7 @@ namespace Nikse.SubtitleEdit.Controls
if (seconds >= 0)
{
StartPositionSeconds = seconds;
if (StartPositionSeconds > 1)
if (_startPositionSeconds > 1)
StartPositionSeconds -= 1;
else
StartPositionSeconds = 0;
@ -1727,9 +1716,9 @@ namespace Nikse.SubtitleEdit.Controls
{
StartPositionSeconds += delta / 256.0;
_lastMouseWheelScroll = DateTime.UtcNow.Ticks; // nixe
if (_currentVideoPositionSeconds < StartPositionSeconds || _currentVideoPositionSeconds >= EndPositionSeconds)
if (_currentVideoPositionSeconds < _startPositionSeconds || _currentVideoPositionSeconds >= EndPositionSeconds)
{
OnPositionSelected?.Invoke(this, new ParagraphEventArgs(StartPositionSeconds, null));
OnPositionSelected?.Invoke(this, new ParagraphEventArgs(_startPositionSeconds, null));
}
}
Invalidate();
@ -1777,11 +1766,11 @@ namespace Nikse.SubtitleEdit.Controls
private void DrawSpectrogram(Graphics graphics)
{
int width = (int)Math.Round((EndPositionSeconds - StartPositionSeconds) / _spectrogram.SampleDuration);
int width = (int)Math.Round((EndPositionSeconds - _startPositionSeconds) / _spectrogram.SampleDuration);
using (var bmpCombined = new Bitmap(width, _spectrogram.FftSize / 2))
using (var gfxCombined = Graphics.FromImage(bmpCombined))
{
int left = (int)Math.Round(StartPositionSeconds / _spectrogram.SampleDuration);
int left = (int)Math.Round(_startPositionSeconds / _spectrogram.SampleDuration);
int offset = 0;
int imageIndex = left / _spectrogram.ImageWidth;
while (offset < width && imageIndex < _spectrogram.Images.Count)
@ -1792,7 +1781,7 @@ namespace Nikse.SubtitleEdit.Controls
offset += w;
imageIndex++;
}
int displayHeight = ShowWaveform ? SpectrogramDisplayHeight : Height;
int displayHeight = _showWaveform ? SpectrogramDisplayHeight : Height;
graphics.DrawImage(bmpCombined, new Rectangle(0, Height - displayHeight, Width, displayHeight));
}
}

View File

@ -48,7 +48,8 @@ namespace Nikse.SubtitleEdit.Controls
private string _subtitleFontName = "Tahoma";
public override bool RightToLeftLayout {
public override bool RightToLeftLayout
{
get { return base.RightToLeftLayout; }
set
{
@ -153,7 +154,7 @@ namespace Nikse.SubtitleEdit.Controls
_settings = settings;
}
public void InitializeTimestampColumnWidths(Form parentForm)
public void InitializeTimestampColumnWidths(Control parentForm)
{
if (_settings != null && _settings.General.ListViewColumnsRememberSize && _settings.General.ListViewNumberWidth > 1 &&
_settings.General.ListViewStartWidth > 1 && _settings.General.ListViewEndWidth > 1 && _settings.General.ListViewDurationWidth > 1)
@ -235,7 +236,7 @@ namespace Nikse.SubtitleEdit.Controls
switch (c)
{
case SubtitleColumn.Number:
Columns.Add(new ColumnHeader { Width = 55 });
Columns.Add(new ColumnHeader { Width = 50 });
break;
case SubtitleColumn.Start:
Columns.Add(new ColumnHeader { Width = 80 });
@ -247,10 +248,10 @@ namespace Nikse.SubtitleEdit.Controls
Columns.Add(new ColumnHeader { Width = 55 });
break;
case SubtitleColumn.CharactersPerSeconds:
Columns.Add(new ColumnHeader { Width = 55 });
Columns.Add(new ColumnHeader { Width = 60 });
break;
case SubtitleColumn.WordsPerMinute:
Columns.Add(new ColumnHeader { Width = 55 });
Columns.Add(new ColumnHeader { Width = 65 });
break;
case SubtitleColumn.Text:
Columns.Add(new ColumnHeader { Width = 300 });
@ -258,7 +259,12 @@ namespace Nikse.SubtitleEdit.Controls
}
}
// add optional columns
if (Configuration.Settings != null && !Configuration.Settings.Tools.ListViewShowColumnEndTime)
HideColumn(SubtitleColumn.End);
if (Configuration.Settings != null && !Configuration.Settings.Tools.ListViewShowColumnDuration)
HideColumn(SubtitleColumn.Duration);
if (Configuration.Settings != null && Configuration.Settings.Tools.ListViewShowColumnCharsPerSec)
ShowCharsSecColumn(Configuration.Settings.Language.General.CharsPerSec);
@ -360,8 +366,6 @@ namespace Nikse.SubtitleEdit.Controls
{
if (!Focused && (e.State & ListViewItemStates.Selected) != 0)
{
//Rectangle r = new Rectangle(e.Bounds.Left + 1, e.Bounds.Top + 1, e.Bounds.Width - 2, e.Bounds.Height - 2);
//e.Graphics.FillRectangle(Brushes.LightGoldenrodYellow, r);
if (e.Item.Focused)
e.DrawFocusRectangle();
}
@ -406,18 +410,121 @@ namespace Nikse.SubtitleEdit.Controls
}
}
public void AutoSizeColumns()
{
var numberIdx = GetColumnIndex(SubtitleColumn.Number);
if (numberIdx >= 0)
{
Columns[numberIdx].Width = 50;
Columns[numberIdx].Width = 50;
}
var startIdx = GetColumnIndex(SubtitleColumn.Start);
var endIdx = GetColumnIndex(SubtitleColumn.End);
var durationIdx = GetColumnIndex(SubtitleColumn.Duration);
int timeStampWidth;
try
{
using (var graphics = CreateGraphics())
{
var timestampSizeF = graphics.MeasureString(new TimeCode(0, 0, 33, 527).ToDisplayString(), Font);
timeStampWidth = (int)(timestampSizeF.Width + 0.5) + 11;
}
}
catch
{
timeStampWidth = 65;
}
if (startIdx >= 0)
{
Columns[startIdx].Width = timeStampWidth;
}
if (endIdx >= 0)
{
Columns[endIdx].Width = timeStampWidth;
}
if (durationIdx >= 0)
{
Columns[durationIdx].Width = (int)(timeStampWidth * 0.8);
}
var cpsIdx = GetColumnIndex(SubtitleColumn.CharactersPerSeconds);
if (cpsIdx >= 0)
{
Columns[cpsIdx].Width = 60;
Columns[cpsIdx].Width = 60;
}
var wpmIdx = GetColumnIndex(SubtitleColumn.WordsPerMinute);
if (wpmIdx >= 0)
{
Columns[wpmIdx].Width = 65;
Columns[wpmIdx].Width = 65;
}
int w = 0;
for (int index = 0; index < SubtitleColumns.Count; index++)
{
var column = SubtitleColumns[index];
int cw = Columns[index].Width;
if (column != SubtitleColumn.Text && column != SubtitleColumn.TextAlternate)
w += cw;
}
int lengthAvailable = Width - w;
if (ColumnIndexTextAlternate >= 0)
{
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 AutoSizeAllColumns(Form parentForm)
{
InitializeTimestampColumnWidths(parentForm);
// resize "number column"
var numberIdx = GetColumnIndex(SubtitleColumn.Number);
if (numberIdx > 0)
if (numberIdx >= 0)
{
if (_settings != null && _settings.General.ListViewColumnsRememberSize && _settings.General.ListViewNumberWidth > 1)
Columns[numberIdx].Width = _settings.General.ListViewNumberWidth;
else
Columns[numberIdx].Width = 55;
Columns[numberIdx].Width = 50;
}
var startIdx = GetColumnIndex(SubtitleColumn.Start);
var endIdx = GetColumnIndex(SubtitleColumn.End);
int timeStampWidth;
try
{
using (var graphics = CreateGraphics())
{
var timestampSizeF = graphics.MeasureString(new TimeCode(0, 0, 33, 527).ToDisplayString(), Font);
timeStampWidth = (int)(timestampSizeF.Width + 0.5) + 11;
}
}
catch
{
timeStampWidth = 65;
}
if (startIdx >= 0)
{
if (_settings != null && _settings.General.ListViewColumnsRememberSize && _settings.General.ListViewStartWidth > 1)
Columns[startIdx].Width = _settings.General.ListViewStartWidth;
else
Columns[startIdx].Width = timeStampWidth;
}
if (endIdx >= 0)
{
if (_settings != null && _settings.General.ListViewColumnsRememberSize && _settings.General.ListViewEndWidth > 1)
Columns[endIdx].Width = _settings.General.ListViewEndWidth;
else
Columns[endIdx].Width = timeStampWidth;
}
int w = 0;
@ -433,7 +540,7 @@ namespace Nikse.SubtitleEdit.Controls
else if (column == SubtitleColumn.WordsPerMinute)
cw = 70;
else if (column != SubtitleColumn.Number)
cw = 120;
cw = 120;
Columns[index].Width = cw;
Columns[index].Width = cw;
Columns[index].Width = cw;
@ -456,6 +563,91 @@ namespace Nikse.SubtitleEdit.Controls
SubtitleListViewLastColumnFill(this, null);
}
public void ShowEndColumn(string title)
{
if (GetColumnIndex(SubtitleColumn.End) == -1)
{
var ch = new ColumnHeader { Text = title, TextAlign = RightToLeftLayout ? HorizontalAlignment.Right : HorizontalAlignment.Left };
if (ColumnIndexStart >= 0)
{
SubtitleColumns.Insert(ColumnIndexStart + 1, SubtitleColumn.End);
Columns.Insert(ColumnIndexStart + 1, ch);
}
else if (ColumnIndexNumber >= 0)
{
SubtitleColumns.Insert(ColumnIndexNumber + 1, SubtitleColumn.End);
Columns.Insert(ColumnIndexStart + 1, ch);
}
else
{
SubtitleColumns.Add(SubtitleColumn.End);
Columns.Insert(0, ch);
}
UpdateColumnIndexes();
try
{
using (var graphics = Parent.CreateGraphics())
{
var timestampSizeF = graphics.MeasureString(new TimeCode(0, 0, 33, 527).ToDisplayString(), Font);
var timestampWidth = (int)(timestampSizeF.Width + 0.5) + 11;
Columns[ColumnIndexEnd].Width = timestampWidth;
}
}
catch
{
Columns[ColumnIndexEnd].Width = 65;
}
AutoSizeAllColumns(null);
}
}
public void ShowDurationColumn(string title)
{
if (GetColumnIndex(SubtitleColumn.Duration) == -1)
{
var ch = new ColumnHeader { Text = title, TextAlign = RightToLeftLayout ? HorizontalAlignment.Right : HorizontalAlignment.Left };
if (ColumnIndexEnd >= 0)
{
SubtitleColumns.Insert(ColumnIndexEnd + 1, SubtitleColumn.Duration);
Columns.Insert(ColumnIndexEnd + 1, ch);
}
else if (ColumnIndexStart >= 0)
{
SubtitleColumns.Insert(ColumnIndexStart + 1, SubtitleColumn.Duration);
Columns.Insert(ColumnIndexStart + 1, ch);
}
else if (ColumnIndexNumber >= 0)
{
SubtitleColumns.Insert(ColumnIndexNumber + 1, SubtitleColumn.Duration);
Columns.Insert(ColumnIndexStart + 1, ch);
}
else
{
SubtitleColumns.Add(SubtitleColumn.Duration);
Columns.Insert(0, ch);
}
UpdateColumnIndexes();
try
{
using (var graphics = Parent.CreateGraphics())
{
var timestampSizeF = graphics.MeasureString(new TimeCode(0, 0, 33, 527).ToDisplayString(), Font);
var timestampWidth = (int)(timestampSizeF.Width + 0.5) + 11;
Columns[ColumnIndexDuration].Width = (int)(timestampWidth * 0.8);
}
}
catch
{
Columns[ColumnIndexDuration].Width = 55;
}
AutoSizeAllColumns(null);
}
}
public void ShowAlternateTextColumn(string title)
{
if (GetColumnIndex(SubtitleColumn.TextAlternate) == -1)
@ -724,7 +916,7 @@ namespace Nikse.SubtitleEdit.Controls
{
item.SubItems[ColumnIndexCps].BackColor = Configuration.Settings.Tools.ListViewSyntaxErrorColor;
}
else
else if (ColumnIndexDuration >= 0)
{
item.SubItems[ColumnIndexDuration].BackColor = Configuration.Settings.Tools.ListViewSyntaxErrorColor;
durationChanged = true;
@ -732,7 +924,10 @@ namespace Nikse.SubtitleEdit.Controls
}
else if (paragraph.Duration.TotalMilliseconds < Configuration.Settings.General.SubtitleMinimumDisplayMilliseconds)
{
item.SubItems[ColumnIndexDuration].BackColor = Configuration.Settings.Tools.ListViewSyntaxErrorColor;
if (ColumnIndexDuration >= 0)
{
item.SubItems[ColumnIndexDuration].BackColor = Configuration.Settings.Tools.ListViewSyntaxErrorColor;
}
durationChanged = true;
}
}
@ -740,14 +935,17 @@ namespace Nikse.SubtitleEdit.Controls
{
if (paragraph.Duration.TotalMilliseconds > Configuration.Settings.General.SubtitleMaximumDisplayMilliseconds)
{
item.SubItems[ColumnIndexDuration].BackColor = Configuration.Settings.Tools.ListViewSyntaxErrorColor;
if (ColumnIndexDuration >= 0)
{
item.SubItems[ColumnIndexDuration].BackColor = Configuration.Settings.Tools.ListViewSyntaxErrorColor;
}
durationChanged = true;
}
}
if (!durationChanged && item.SubItems[ColumnIndexDuration].BackColor != BackColor)
if (ColumnIndexDuration >= 0 && !durationChanged && item.SubItems[ColumnIndexDuration].BackColor != BackColor)
item.SubItems[ColumnIndexDuration].BackColor = BackColor;
if (_settings.Tools.ListViewSyntaxColorOverlap && i > 0 && i < paragraphs.Count)
if (_settings.Tools.ListViewSyntaxColorOverlap && i > 0 && i < paragraphs.Count && ColumnIndexEnd >= 0)
{
Paragraph prev = paragraphs[i - 1];
if (paragraph.StartTime.TotalMilliseconds < prev.EndTime.TotalMilliseconds)

View File

@ -809,12 +809,31 @@ namespace Nikse.SubtitleEdit.Forms
if (beforeParagraph == null)
beforeParagraph = paragraph;
if (beforeParagraph.StartTime.TotalMilliseconds == paragraph.StartTime.TotalMilliseconds &&
beforeParagraph.EndTime.TotalMilliseconds == paragraph.EndTime.TotalMilliseconds)
if (Math.Abs(beforeParagraph.StartTime.TotalMilliseconds - paragraph.StartTime.TotalMilliseconds) < 0.01 &&
Math.Abs(beforeParagraph.EndTime.TotalMilliseconds - paragraph.EndTime.TotalMilliseconds) < 0.01)
_makeHistoryPaused = true;
int selectedIndex = FirstSelectedIndex;
int index = _subtitle.Paragraphs.IndexOf(paragraph);
// TODO: Moving selected lines
//if (e.MouseDownParagraphType == AudioVisualizer.MouseDownParagraphType.Whole && SubtitleListview1.SelectedIndices.Count > 1)
//{
// foreach (int idx in SubtitleListview1.SelectedIndices)
// {
// var p = _subtitle.Paragraphs[idx];
// if (p != paragraph)
// {
// var dur = p.Duration.TotalMilliseconds;
// p.StartTime.TotalMilliseconds += e.AdjustMs;
// p.EndTime.TotalMilliseconds += e.AdjustMs;
// SubtitleListview1.SetStartTimeAndDuration(idx, p);
// }
// }
//}
if (index == _subtitleListViewIndex)
{
// Make history item for rollback (change paragraph back for history + change again)
@ -3883,6 +3902,8 @@ namespace Nikse.SubtitleEdit.Forms
Configuration.Settings.Tools.ListViewSyntaxErrorColor.ToArgb();
var oldAllowEditOfOriginalSubtitle = Configuration.Settings.General.AllowEditOfOriginalSubtitle;
var oldShowColumnEndTime = Configuration.Settings.Tools.ListViewShowColumnEndTime;
var oldShowcolumnDuration = Configuration.Settings.Tools.ListViewShowColumnDuration;
var oldShowColumnCharsPerSec = Configuration.Settings.Tools.ListViewShowColumnCharsPerSec;
var oldShowWordsMinColumn = Configuration.Settings.Tools.ListViewShowColumnWordsPerMin;
using (var settings = new Settings())
@ -3938,13 +3959,26 @@ namespace Nikse.SubtitleEdit.Forms
Configuration.Settings.General.SubtitleFontColor.ToArgb() +
Configuration.Settings.General.SubtitleBackgroundColor.ToArgb() ||
oldSyntaxColoring != newSyntaxColoring ||
oldShowColumnEndTime != Configuration.Settings.Tools.ListViewShowColumnEndTime ||
oldShowcolumnDuration != Configuration.Settings.Tools.ListViewShowColumnDuration ||
oldShowColumnCharsPerSec != Configuration.Settings.Tools.ListViewShowColumnCharsPerSec ||
oldShowWordsMinColumn != Configuration.Settings.Tools.ListViewShowColumnWordsPerMin)
{
if (Configuration.Settings.Tools.ListViewShowColumnEndTime)
SubtitleListview1.ShowEndColumn(Configuration.Settings.Language.General.EndTime);
else
SubtitleListview1.HideColumn(SubtitleListView.SubtitleColumn.End);
if (Configuration.Settings.Tools.ListViewShowColumnDuration)
SubtitleListview1.ShowDurationColumn(Configuration.Settings.Language.General.Duration);
else
SubtitleListview1.HideColumn(SubtitleListView.SubtitleColumn.Duration);
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
@ -6104,6 +6138,105 @@ namespace Nikse.SubtitleEdit.Forms
private void ContextMenuStripListviewOpening(object sender, System.ComponentModel.CancelEventArgs e)
{
var coordinates = SubtitleListview1.PointToClient(Cursor.Position);
var hitTest = SubtitleListview1.HitTest(coordinates);
if (coordinates.Y < 19 || (hitTest.Item != null && hitTest.Item.Index == 0 && coordinates.Y < hitTest.Item.Position.Y))
{
e.Cancel = true;
var cm = new ContextMenuStrip();
var contextMenuStripLvHeaderResizeToolStripMenuItem = new ToolStripMenuItem(Configuration.Settings.Language.Main.Menu.ContextMenu.SizeAllColumnsToFit);
contextMenuStripLvHeaderResizeToolStripMenuItem.Click += (sender2, e2) =>
{
SubtitleListview1.AutoSizeColumns();
};
cm.Items.Add(contextMenuStripLvHeaderResizeToolStripMenuItem);
cm.Items.Add(new ToolStripSeparator());
// End time
var contextMenuStripLvHeaderEndTimeToolStripMenuItem = new ToolStripMenuItem(Configuration.Settings.Language.General.EndTime);
contextMenuStripLvHeaderEndTimeToolStripMenuItem.CheckOnClick = true;
contextMenuStripLvHeaderEndTimeToolStripMenuItem.Checked = Configuration.Settings.Tools.ListViewShowColumnEndTime;
contextMenuStripLvHeaderEndTimeToolStripMenuItem.Click += (sender2, e2) =>
{
SubtitleListview1.BeginUpdate();
Configuration.Settings.Tools.ListViewShowColumnEndTime = contextMenuStripLvHeaderEndTimeToolStripMenuItem.Checked;
if (Configuration.Settings.Tools.ListViewShowColumnEndTime)
SubtitleListview1.ShowEndColumn(Configuration.Settings.Language.General.EndTime);
else
SubtitleListview1.HideColumn(SubtitleListView.SubtitleColumn.End);
SaveSubtitleListviewIndices();
UiUtil.InitializeSubtitleFont(SubtitleListview1);
SubtitleListview1.Fill(_subtitle, _subtitleAlternate);
RestoreSubtitleListviewIndices();
SubtitleListview1.EndUpdate();
};
cm.Items.Add(contextMenuStripLvHeaderEndTimeToolStripMenuItem);
// Duration
var contextMenuStripLvHeaderDurationToolStripMenuItem = new ToolStripMenuItem(Configuration.Settings.Language.General.Duration);
contextMenuStripLvHeaderDurationToolStripMenuItem.CheckOnClick = true;
contextMenuStripLvHeaderDurationToolStripMenuItem.Checked = Configuration.Settings.Tools.ListViewShowColumnDuration;
contextMenuStripLvHeaderDurationToolStripMenuItem.Click += (sender2, e2) =>
{
SubtitleListview1.BeginUpdate();
Configuration.Settings.Tools.ListViewShowColumnDuration = contextMenuStripLvHeaderDurationToolStripMenuItem.Checked;
if (Configuration.Settings.Tools.ListViewShowColumnDuration)
SubtitleListview1.ShowDurationColumn(Configuration.Settings.Language.General.Duration);
else
SubtitleListview1.HideColumn(SubtitleListView.SubtitleColumn.Duration);
SaveSubtitleListviewIndices();
UiUtil.InitializeSubtitleFont(SubtitleListview1);
SubtitleListview1.Fill(_subtitle, _subtitleAlternate);
RestoreSubtitleListviewIndices();
SubtitleListview1.EndUpdate();
};
cm.Items.Add(contextMenuStripLvHeaderDurationToolStripMenuItem);
// CPS
var contextMenuStripLvHeaderCpsToolStripMenuItem = new ToolStripMenuItem(Configuration.Settings.Language.General.CharsPerSec);
contextMenuStripLvHeaderCpsToolStripMenuItem.CheckOnClick = true;
contextMenuStripLvHeaderCpsToolStripMenuItem.Checked = Configuration.Settings.Tools.ListViewShowColumnCharsPerSec;
contextMenuStripLvHeaderCpsToolStripMenuItem.Click += (sender2, e2) =>
{
SubtitleListview1.BeginUpdate();
Configuration.Settings.Tools.ListViewShowColumnCharsPerSec = contextMenuStripLvHeaderCpsToolStripMenuItem.Checked;
if (Configuration.Settings.Tools.ListViewShowColumnCharsPerSec)
SubtitleListview1.ShowCharsSecColumn(Configuration.Settings.Language.General.CharsPerSec);
else
SubtitleListview1.HideColumn(SubtitleListView.SubtitleColumn.CharactersPerSeconds);
SaveSubtitleListviewIndices();
UiUtil.InitializeSubtitleFont(SubtitleListview1);
SubtitleListview1.Fill(_subtitle, _subtitleAlternate);
RestoreSubtitleListviewIndices();
SubtitleListview1.EndUpdate();
};
cm.Items.Add(contextMenuStripLvHeaderCpsToolStripMenuItem);
// WPM
var contextMenuStripLvHeaderWpmToolStripMenuItem = new ToolStripMenuItem(Configuration.Settings.Language.General.WordsPerMin);
contextMenuStripLvHeaderWpmToolStripMenuItem.CheckOnClick = true;
contextMenuStripLvHeaderWpmToolStripMenuItem.Checked = Configuration.Settings.Tools.ListViewShowColumnWordsPerMin;
contextMenuStripLvHeaderWpmToolStripMenuItem.Click += (sender2, e2) =>
{
SubtitleListview1.BeginUpdate();
Configuration.Settings.Tools.ListViewShowColumnWordsPerMin = contextMenuStripLvHeaderWpmToolStripMenuItem.Checked;
if (Configuration.Settings.Tools.ListViewShowColumnWordsPerMin)
SubtitleListview1.ShowWordsMinColumn(Configuration.Settings.Language.General.WordsPerMin);
else
SubtitleListview1.HideColumn(SubtitleListView.SubtitleColumn.WordsPerMinute);
SaveSubtitleListviewIndices();
UiUtil.InitializeSubtitleFont(SubtitleListview1);
SubtitleListview1.Fill(_subtitle, _subtitleAlternate);
RestoreSubtitleListviewIndices();
SubtitleListview1.EndUpdate();
};
cm.Items.Add(contextMenuStripLvHeaderWpmToolStripMenuItem);
cm.Show(SubtitleListview1, coordinates);
return;
}
var format = GetCurrentSubtitleFormat();
var formatType = format.GetType();
toolStripMenuItemSetLanguage.Visible = false;
@ -8694,11 +8827,26 @@ namespace Nikse.SubtitleEdit.Forms
{
if (Configuration.Settings.General.ListViewColumnsRememberSize)
{
Configuration.Settings.General.ListViewNumberWidth = SubtitleListview1.Columns[0].Width;
Configuration.Settings.General.ListViewStartWidth = SubtitleListview1.Columns[1].Width;
Configuration.Settings.General.ListViewEndWidth = SubtitleListview1.Columns[2].Width;
Configuration.Settings.General.ListViewDurationWidth = SubtitleListview1.Columns[3].Width;
Configuration.Settings.General.ListViewTextWidth = SubtitleListview1.Columns[4].Width;
if (SubtitleListview1.ColumnIndexNumber >= 0)
Configuration.Settings.General.ListViewNumberWidth = SubtitleListview1.Columns[SubtitleListview1.ColumnIndexNumber].Width;
if (SubtitleListview1.ColumnIndexStart >= 0)
Configuration.Settings.General.ListViewStartWidth = SubtitleListview1.Columns[SubtitleListview1.ColumnIndexStart].Width;
if (SubtitleListview1.ColumnIndexEnd >= 0)
Configuration.Settings.General.ListViewEndWidth = SubtitleListview1.Columns[SubtitleListview1.ColumnIndexEnd].Width;
if (SubtitleListview1.ColumnIndexDuration >= 0)
Configuration.Settings.General.ListViewDurationWidth = SubtitleListview1.Columns[SubtitleListview1.ColumnIndexDuration].Width;
if (SubtitleListview1.ColumnIndexCps >= 0)
Configuration.Settings.General.ListViewCpsWidth = SubtitleListview1.Columns[SubtitleListview1.ColumnIndexCps].Width;
if (SubtitleListview1.ColumnIndexWpm >= 0)
Configuration.Settings.General.ListViewWpmWidth = SubtitleListview1.Columns[SubtitleListview1.ColumnIndexWpm].Width;
if (SubtitleListview1.ColumnIndexText >= 0)
Configuration.Settings.General.ListViewTextWidth = SubtitleListview1.Columns[SubtitleListview1.ColumnIndexText].Width;
}
}

View File

@ -118,10 +118,10 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>728, 17</value>
<value>934, 17</value>
</metadata>
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
<value>217, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="toolStripButtonFileNew.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
@ -370,31 +370,31 @@
<data name="toolStripButtonRemoveTextForHi.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
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
</value>
</data>
<data name="toolStripButtonVisualSync.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
@ -614,25 +614,25 @@
</value>
</data>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>116, 17</value>
<value>322, 17</value>
</metadata>
<metadata name="contextMenuStripListview.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 56</value>
<value>459, 56</value>
</metadata>
<metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>467, 17</value>
<value>673, 17</value>
</metadata>
<metadata name="saveFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>844, 17</value>
<value>1050, 17</value>
</metadata>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1337, 17</value>
<value>372, 56</value>
</metadata>
<metadata name="colorDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>607, 17</value>
<value>813, 17</value>
</metadata>
<metadata name="fontDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>380, 55</value>
<value>825, 56</value>
</metadata>
<data name="audioVisualizer.SceneChanges" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
@ -644,7 +644,10 @@
</value>
</data>
<metadata name="toolStripWaveControls.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>208, 56</value>
<value>650, 56</value>
</metadata>
<metadata name="toolStripWaveControls.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>650, 56</value>
</metadata>
<data name="toolStripButtonWaveformZoomOut.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
@ -721,38 +724,38 @@
</value>
</data>
<metadata name="ShowSubtitleTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>485, 56</value>
<value>941, 56</value>
</metadata>
<metadata name="timerAutoDuration.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>633, 58</value>
<value>17, 95</value>
</metadata>
<metadata name="timerAutoContinue.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>974, 65</value>
<value>354, 95</value>
</metadata>
<metadata name="timerStillTyping.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1137, 69</value>
<value>510, 95</value>
</metadata>
<metadata name="timerWaveform.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1264, 68</value>
<value>647, 95</value>
</metadata>
<metadata name="contextMenuStripWaveform.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1130, 17</value>
<value>167, 56</value>
</metadata>
<metadata name="contextMenuStripTextBoxListView.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>231, 17</value>
<value>437, 17</value>
</metadata>
<metadata name="contextMenuStripEmpty.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>782, 62</value>
<value>171, 95</value>
</metadata>
<metadata name="imageListPlayRate.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>980, 17</value>
<value>17, 56</value>
</metadata>
<data name="imageListPlayRate.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD2
CAAAAk1TRnQBSQFMAgEBAgEAAZgBIwGYASMBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
CAAAAk1TRnQBSQFMAgEBAgEAAaABIwGgASMBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
@ -794,10 +797,13 @@
</value>
</data>
<metadata name="timerTextUndo.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 95</value>
<value>783, 95</value>
</metadata>
<metadata name="timerAlternateTextUndo.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>150, 95</value>
<value>916, 95</value>
</metadata>
<metadata name="contextMenuStripLvHeader.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>71</value>

View File

@ -2406,6 +2406,8 @@ namespace Nikse.SubtitleEdit.Forms
{
if (form.ShowDialog(this) == DialogResult.OK)
{
Configuration.Settings.Tools.ListViewShowColumnEndTime = form.ShowEndTime;
Configuration.Settings.Tools.ListViewShowColumnDuration = form.ShowDuration;
Configuration.Settings.Tools.ListViewShowColumnCharsPerSec = form.ShowCps;
Configuration.Settings.Tools.ListViewShowColumnWordsPerMin = form.ShowWpm;
buttonListviewColumns.Text = GetListViewColumns();

View File

@ -137,7 +137,6 @@
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);
@ -150,7 +149,6 @@
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);

View File

@ -7,6 +7,8 @@ namespace Nikse.SubtitleEdit.Forms
{
public sealed partial class SettingsListViewColumns : Form
{
public bool ShowEndTime { get; set; }
public bool ShowDuration { get; set; }
public bool ShowCps { get; set; }
public bool ShowWpm { get; set; }
@ -40,6 +42,8 @@ namespace Nikse.SubtitleEdit.Forms
private void buttonOK_Click(object sender, EventArgs e)
{
ShowEndTime = checkBoxShowEndTime.Checked;
ShowDuration = checkBoxShowDuration.Checked;
ShowCps = checkBoxShowCps.Checked;
ShowWpm = checkBoxShowWpm.Checked;
DialogResult = DialogResult.OK;