mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 19:22:53 +01:00
Formatting (whitespace only)
This commit is contained in:
parent
7404d17adf
commit
2bb7cf7a91
@ -634,7 +634,6 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
stringFormat.FormatFlags = StringFormatFlags.DirectionVertical;
|
||||
e.Graphics.DrawString(WaveformNotLoadedText, textFont, textBrush, new PointF(1, 10), stringFormat);
|
||||
}
|
||||
|
||||
}
|
||||
textBrush.Dispose();
|
||||
textFont.Dispose();
|
||||
@ -806,7 +805,6 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
e.Graphics.DrawString(text, font, textBrush, new PointF(currentRegionLeft + 3, top));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else if (n > 51)
|
||||
e.Graphics.DrawString("#" + paragraph.Number + " " + paragraph.StartTime.ToShortString(), Font, textBrush, new PointF(currentRegionLeft + 3, Height - 32));
|
||||
@ -1165,7 +1163,6 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
|
||||
private void WaveformMouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
|
||||
if (_wavePeaks == null)
|
||||
return;
|
||||
|
||||
@ -1393,7 +1390,6 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
}
|
||||
NewSelectionParagraph.StartTime.TotalSeconds = startTotalSeconds;
|
||||
NewSelectionParagraph.EndTime.TotalSeconds = endTotalSeconds;
|
||||
|
||||
}
|
||||
}
|
||||
Invalidate();
|
||||
@ -1482,7 +1478,6 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
_mouseMoveStartX = SecondsToXPosition(NewSelectionParagraph.StartTime.TotalSeconds - StartPositionSeconds);
|
||||
_mouseMoveEndX = SecondsToXPosition(NewSelectionParagraph.EndTime.TotalSeconds - StartPositionSeconds);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void WaveformMouseDoubleClick(object sender, MouseEventArgs e)
|
||||
@ -1556,7 +1551,6 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
int diff = Math.Abs(_mouseMoveStartX - e.X);
|
||||
if (_mouseMoveStartX == -1 || _mouseMoveEndX == -1 || diff < 10 && TimeSpan.FromTicks(DateTime.Now.Ticks - _buttonDownTimeTicks).TotalSeconds < 0.25)
|
||||
{
|
||||
|
||||
if (ModifierKeys == Keys.Shift && _selectedParagraph != null)
|
||||
{
|
||||
double seconds = XPositionToSeconds(e.X);
|
||||
@ -1689,7 +1683,6 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
double seconds = ((i - (length / 2)) / (double)_wavePeaks.Header.SampleRate) / _zoomFactor;
|
||||
if (seconds >= 0)
|
||||
{
|
||||
|
||||
StartPositionSeconds = seconds;
|
||||
if (StartPositionSeconds > 1)
|
||||
StartPositionSeconds -= 1;
|
||||
@ -1719,7 +1712,6 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
double seconds = (i + (length / 2)) / (double)_wavePeaks.Header.SampleRate / _zoomFactor;
|
||||
if (seconds >= 0)
|
||||
{
|
||||
|
||||
StartPositionSeconds = seconds;
|
||||
if (StartPositionSeconds > 1)
|
||||
StartPositionSeconds -= 1;
|
||||
|
@ -864,7 +864,6 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
Items[index].UseItemStyleForSubItems = false;
|
||||
Items[index].SubItems[ColumnIndexExtra].BackColor = Color.AntiqueWhite;
|
||||
Items[index].SubItems[ColumnIndexExtra].ForeColor = color;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -915,7 +915,6 @@ namespace Nikse.SubtitleEdit.Controls
|
||||
{
|
||||
HideAllPauseImages();
|
||||
_pictureBoxPauseDown.Visible = true;
|
||||
|
||||
}
|
||||
if (OnButtonClicked != null)
|
||||
OnButtonClicked.Invoke(sender, e);
|
||||
|
@ -76,7 +76,6 @@ namespace Nikse.SubtitleEdit.Forms.DCinema
|
||||
numericUpDownTopBottomMargin.Value = ss.DCinemaBottomMargin;
|
||||
else
|
||||
numericUpDownTopBottomMargin.Value = 8;
|
||||
|
||||
}
|
||||
Utilities.FixLargeFonts(this, buttonCancel);
|
||||
}
|
||||
|
@ -19,13 +19,11 @@ using System.Xml;
|
||||
|
||||
namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
|
||||
public sealed partial class ExportPngXml : PositionAndSizeForm
|
||||
{
|
||||
|
||||
private class MakeBitmapParameter
|
||||
{
|
||||
|
||||
public Bitmap Bitmap { get; set; }
|
||||
public Paragraph P { get; set; }
|
||||
public string Type { get; set; }
|
||||
@ -64,7 +62,6 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
{
|
||||
BackgroundColor = Color.Transparent;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private Subtitle _subtitle;
|
||||
@ -1072,7 +1069,6 @@ $DROP=[DROPVALUE]" + Environment.NewLine + Environment.NewLine +
|
||||
{
|
||||
if (!param.Saved)
|
||||
{
|
||||
|
||||
string numberString = string.Format(Path.GetFileNameWithoutExtension(Path.GetFileName(param.SavDialogFileName)) + "{0:0000}", i);
|
||||
string fileName = numberString + "." + comboBoxImageFormat.Text.ToLower();
|
||||
string fileNameNoPath = Path.GetFileName(fileName);
|
||||
@ -2166,7 +2162,6 @@ $DROP=[DROPVALUE]" + Environment.NewLine + Environment.NewLine +
|
||||
surface.DrawString(text, font, brush, new PointF { X = x - 1, Y = y - 1 - j }, sf);
|
||||
surface.DrawString(text, font, brush, new PointF { X = x - 1, Y = y - 0 - j }, sf);
|
||||
surface.DrawString(text, font, brush, new PointF { X = x - 1, Y = y + 1 - j }, sf);
|
||||
|
||||
}
|
||||
brush.Dispose();
|
||||
brush = new SolidBrush(parameter.SubtitleColor);
|
||||
@ -3819,7 +3814,6 @@ $DROP=[DROPVALUE]" + Environment.NewLine + Environment.NewLine +
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
catch
|
||||
{
|
||||
@ -3839,7 +3833,6 @@ $DROP=[DROPVALUE]" + Environment.NewLine + Environment.NewLine +
|
||||
br.RotateTransform(0);
|
||||
g.FillRectangle(br, rect);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void linkLabelPreview_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
|
@ -275,7 +275,8 @@ namespace Nikse.SubtitleEdit.Logic.Forms
|
||||
}
|
||||
|
||||
string tempArr0QuoteTrimmed = arr[0].TrimEnd('"');
|
||||
if (arr0.Length > 0 && arr1.Length > 1 && !(tempArr0QuoteTrimmed.EndsWith('.') || tempArr0QuoteTrimmed.EndsWith('!') || tempArr0QuoteTrimmed.EndsWith('?') || tempArr0QuoteTrimmed.EndsWith("</i>", StringComparison.Ordinal)) &&
|
||||
if (arr0.Length > 0 && arr1.Length > 1 &&
|
||||
!(tempArr0QuoteTrimmed.EndsWith('.') || tempArr0QuoteTrimmed.EndsWith('!') || tempArr0QuoteTrimmed.EndsWith('?') || tempArr0QuoteTrimmed.EndsWith("</i>", StringComparison.Ordinal)) &&
|
||||
!(new StripableText(arr[1]).Pre.Contains('-')))
|
||||
{
|
||||
insertDash = false;
|
||||
@ -505,28 +506,43 @@ namespace Nikse.SubtitleEdit.Logic.Forms
|
||||
text = st.Pre + text + st.Post;
|
||||
|
||||
if (oldText.TrimStart().StartsWith("- ", StringComparison.Ordinal) && text != null && !text.Contains(Environment.NewLine) &&
|
||||
(oldText.Contains(Environment.NewLine + "- ", StringComparison.Ordinal) || oldText.Contains(Environment.NewLine + " - ", StringComparison.Ordinal) || oldText.Contains(Environment.NewLine + "<i>- ", StringComparison.Ordinal) || oldText.Contains(Environment.NewLine + "<i> - ", StringComparison.Ordinal)))
|
||||
(oldText.Contains(Environment.NewLine + "- ", StringComparison.Ordinal) ||
|
||||
oldText.Contains(Environment.NewLine + " - ", StringComparison.Ordinal) ||
|
||||
oldText.Contains(Environment.NewLine + "<i>- ", StringComparison.Ordinal) ||
|
||||
oldText.Contains(Environment.NewLine + "<i> - ", StringComparison.Ordinal)))
|
||||
{
|
||||
text = text.TrimStart().TrimStart('-').TrimStart();
|
||||
}
|
||||
if (oldText.TrimStart().StartsWith("-", StringComparison.Ordinal) &&
|
||||
!oldText.TrimStart().StartsWith("--", StringComparison.Ordinal) &&
|
||||
text != null && !text.Contains(Environment.NewLine) &&
|
||||
(oldText.Contains(Environment.NewLine + "-", StringComparison.Ordinal) && !(oldText.Contains(Environment.NewLine + "--", StringComparison.Ordinal)) ||
|
||||
oldText.Contains(Environment.NewLine + " - ", StringComparison.Ordinal) || oldText.Contains(Environment.NewLine + "<i>- ", StringComparison.Ordinal) || oldText.Contains(Environment.NewLine + "<i> - ", StringComparison.Ordinal)))
|
||||
(oldText.Contains(Environment.NewLine + "-", StringComparison.Ordinal) && !oldText.Contains(Environment.NewLine + "--", StringComparison.Ordinal) ||
|
||||
oldText.Contains(Environment.NewLine + " - ", StringComparison.Ordinal) ||
|
||||
oldText.Contains(Environment.NewLine + "<i>- ", StringComparison.Ordinal) ||
|
||||
oldText.Contains(Environment.NewLine + "<i> - ", StringComparison.Ordinal)))
|
||||
{
|
||||
text = text.TrimStart().TrimStart('-').TrimStart();
|
||||
}
|
||||
|
||||
if (oldText.TrimStart().StartsWith("<i>- ", StringComparison.Ordinal) && text != null && text.StartsWith("<i>- ", StringComparison.Ordinal) && !text.Contains(Environment.NewLine, StringComparison.Ordinal) &&
|
||||
(oldText.Contains(Environment.NewLine + "- ", StringComparison.Ordinal) || oldText.Contains(Environment.NewLine + " - ", StringComparison.Ordinal) || oldText.Contains(Environment.NewLine + "<i>- ", StringComparison.Ordinal) || oldText.Contains(Environment.NewLine + "<i> - ", StringComparison.Ordinal)))
|
||||
if (oldText.TrimStart().StartsWith("<i>- ", StringComparison.Ordinal) &&
|
||||
text != null && text.StartsWith("<i>- ", StringComparison.Ordinal) && !text.Contains(Environment.NewLine, StringComparison.Ordinal) &&
|
||||
(oldText.Contains(Environment.NewLine + "- ", StringComparison.Ordinal) ||
|
||||
oldText.Contains(Environment.NewLine + " - ", StringComparison.Ordinal) ||
|
||||
oldText.Contains(Environment.NewLine + "<i>- ", StringComparison.Ordinal) ||
|
||||
oldText.Contains(Environment.NewLine + "<i> - ", StringComparison.Ordinal)))
|
||||
{
|
||||
text = text.Remove(3, 2);
|
||||
}
|
||||
|
||||
if (text != null && !text.Contains(Environment.NewLine, StringComparison.Ordinal) &&
|
||||
(oldText.Contains(':') && !text.Contains(':') || oldText.Contains('[') && !text.Contains('[') || oldText.Contains('(') && !text.Contains('(') || oldText.Contains('{') && !text.Contains('{')) &&
|
||||
(oldText.Contains(Environment.NewLine + "- ", StringComparison.Ordinal) || oldText.Contains(Environment.NewLine + " - ", StringComparison.Ordinal) || oldText.Contains(Environment.NewLine + "<i>- ", StringComparison.Ordinal) || oldText.Contains(Environment.NewLine + "<i> - ", StringComparison.Ordinal)))
|
||||
(oldText.Contains(':') && !text.Contains(':') ||
|
||||
oldText.Contains('[') && !text.Contains('[') ||
|
||||
oldText.Contains('(') && !text.Contains('(') ||
|
||||
oldText.Contains('{') && !text.Contains('{')) &&
|
||||
(oldText.Contains(Environment.NewLine + "- ", StringComparison.Ordinal) ||
|
||||
oldText.Contains(Environment.NewLine + " - ", StringComparison.Ordinal) ||
|
||||
oldText.Contains(Environment.NewLine + "<i>- ", StringComparison.Ordinal) ||
|
||||
oldText.Contains(Environment.NewLine + "<i> - ", StringComparison.Ordinal)))
|
||||
{
|
||||
text = text.TrimStart().TrimStart('-').TrimStart();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user