mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-23 03:33:18 +01:00
ran tabspace
git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@1608 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
parent
6bf8829764
commit
fcf4866579
@ -333,7 +333,7 @@ namespace Nikse.SubtitleEdit.Controls
|
|||||||
List<Paragraph> selectedParagraphs = new List<Paragraph>();
|
List<Paragraph> selectedParagraphs = new List<Paragraph>();
|
||||||
foreach (int index in _selectedIndices)
|
foreach (int index in _selectedIndices)
|
||||||
{
|
{
|
||||||
Paragraph p = _subtitle.GetParagraphOrDefault(index);
|
Paragraph p = _subtitle.GetParagraphOrDefault(index);
|
||||||
if (p != null)
|
if (p != null)
|
||||||
{
|
{
|
||||||
p = new Paragraph(p);
|
p = new Paragraph(p);
|
||||||
|
@ -3135,7 +3135,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
Utilities.InitializeSubtitleFont(textBoxListViewText);
|
Utilities.InitializeSubtitleFont(textBoxListViewText);
|
||||||
Utilities.InitializeSubtitleFont(textBoxListViewTextAlternate);
|
Utilities.InitializeSubtitleFont(textBoxListViewTextAlternate);
|
||||||
Utilities.InitializeSubtitleFont(SubtitleListview1);
|
Utilities.InitializeSubtitleFont(SubtitleListview1);
|
||||||
InitializeToolbar();
|
InitializeToolbar();
|
||||||
}
|
}
|
||||||
catch (Exception exception)
|
catch (Exception exception)
|
||||||
{
|
{
|
||||||
@ -4275,7 +4275,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
_subtitle.Paragraphs[index] = p;
|
_subtitle.Paragraphs[index] = p;
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
deletes.Reverse();
|
deletes.Reverse();
|
||||||
@ -7727,7 +7727,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
_subtitle.Header = _subtitle.Header.Trim() + Environment.NewLine +
|
_subtitle.Header = _subtitle.Header.Trim() + Environment.NewLine +
|
||||||
Environment.NewLine +
|
Environment.NewLine +
|
||||||
"[Events]" + Environment.NewLine +
|
"[Events]" + Environment.NewLine +
|
||||||
"Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text" + Environment.NewLine;
|
"Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text" + Environment.NewLine;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -7758,7 +7758,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
idx = text.IndexOf(',');
|
idx = text.IndexOf(',');
|
||||||
text = text.Insert(idx, "," + start + "," + end);
|
text = text.Insert(idx, "," + start + "," + end);
|
||||||
lines.Add(text);
|
lines.Add(text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
format.LoadSubtitle(_subtitle, lines, fileName);
|
format.LoadSubtitle(_subtitle, lines, fileName);
|
||||||
}
|
}
|
||||||
@ -13568,7 +13568,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
updates = _networkSession.GetUpdates(out message, out numberOfLines);
|
updates = _networkSession.GetUpdates(out message, out numberOfLines);
|
||||||
numberOfRetries = 0;
|
numberOfRetries = 0;
|
||||||
}
|
}
|
||||||
catch (Exception exception)
|
catch (Exception exception)
|
||||||
{
|
{
|
||||||
@ -15263,7 +15263,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
int lineBreakPos = textBox.Text.IndexOf(Environment.NewLine);
|
int lineBreakPos = textBox.Text.IndexOf(Environment.NewLine);
|
||||||
int pos = textBox.SelectionStart;
|
int pos = textBox.SelectionStart;
|
||||||
var s = Utilities.RemoveHtmlTags(textBox.Text, true).Replace(Environment.NewLine, string.Empty); // we don't count new line in total length... correct?
|
var s = Utilities.RemoveHtmlTags(textBox.Text, true).Replace(Environment.NewLine, string.Empty); // we don't count new line in total length... correct?
|
||||||
int totalLength = s.Length;
|
int totalLength = s.Length;
|
||||||
string totalL = " " + string.Format(_languageGeneral.TotalLengthX, totalLength);
|
string totalL = " " + string.Format(_languageGeneral.TotalLengthX, totalLength);
|
||||||
if (lineBreakPos == -1 || pos <= lineBreakPos)
|
if (lineBreakPos == -1 || pos <= lineBreakPos)
|
||||||
{
|
{
|
||||||
@ -15777,7 +15777,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
_subtitle.Header = styles.Header;
|
_subtitle.Header = styles.Header;
|
||||||
var styleList = AdvancedSubStationAlpha.GetStylesFromHeader(_subtitle.Header);
|
var styleList = AdvancedSubStationAlpha.GetStylesFromHeader(_subtitle.Header);
|
||||||
if (styleList.Count > 0)
|
if (styleList.Count > 0)
|
||||||
{
|
{
|
||||||
for (int i=0; i<_subtitle.Paragraphs.Count; i++)
|
for (int i=0; i<_subtitle.Paragraphs.Count; i++)
|
||||||
{
|
{
|
||||||
Paragraph p = _subtitle.Paragraphs[i];
|
Paragraph p = _subtitle.Paragraphs[i];
|
||||||
@ -15787,7 +15787,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
SubtitleListview1.SetExtraText(i, p.Extra, SubtitleListview1.ForeColor);
|
SubtitleListview1.SetExtraText(i, p.Extra, SubtitleListview1.ForeColor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -109,7 +109,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
{
|
{
|
||||||
for (int i = 0; i < _subtitle.Paragraphs.Count; i++)
|
for (int i = 0; i < _subtitle.Paragraphs.Count; i++)
|
||||||
{
|
{
|
||||||
if ((radioButtonSubtractFromSelection.Checked || radioButtonIntersect.Checked) && _subtitleListView.Items[i].Selected ||
|
if ((radioButtonSubtractFromSelection.Checked || radioButtonIntersect.Checked) && _subtitleListView.Items[i].Selected ||
|
||||||
!radioButtonSubtractFromSelection.Checked && !radioButtonIntersect.Checked)
|
!radioButtonSubtractFromSelection.Checked && !radioButtonIntersect.Checked)
|
||||||
{
|
{
|
||||||
Paragraph p = _subtitle.Paragraphs[i];
|
Paragraph p = _subtitle.Paragraphs[i];
|
||||||
|
@ -399,7 +399,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
|
|
||||||
_bluRaySubtitlesOriginal = subtitles;
|
_bluRaySubtitlesOriginal = subtitles;
|
||||||
|
|
||||||
groupBoxImagePalette.Visible = false;
|
groupBoxImagePalette.Visible = false;
|
||||||
|
|
||||||
Text = Configuration.Settings.Language.VobSubOcr.TitleBluRay;
|
Text = Configuration.Settings.Language.VobSubOcr.TitleBluRay;
|
||||||
if (!string.IsNullOrEmpty(fileName))
|
if (!string.IsNullOrEmpty(fileName))
|
||||||
@ -1995,10 +1995,10 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
Bitmap unItaliced = new Bitmap(bmp.Width + left + 4, bmp.Height);
|
Bitmap unItaliced = new Bitmap(bmp.Width + left + 4, bmp.Height);
|
||||||
|
|
||||||
Point[] destinationPoints = {
|
Point[] destinationPoints = {
|
||||||
new Point(0, 0), // destination for upper-left point of original
|
new Point(0, 0), // destination for upper-left point of original
|
||||||
new Point(bmp.Width, 0), // destination for upper-right point of original
|
new Point(bmp.Width, 0), // destination for upper-right point of original
|
||||||
new Point(left, bmp.Height) // destination for lower-left point of original
|
new Point(left, bmp.Height) // destination for lower-left point of original
|
||||||
};
|
};
|
||||||
|
|
||||||
using (var g = Graphics.FromImage(unItaliced))
|
using (var g = Graphics.FromImage(unItaliced))
|
||||||
{
|
{
|
||||||
@ -4011,7 +4011,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
{
|
{
|
||||||
var form = new VobSubOcrSetItalicFactor(GetSubtitleBitmap(_selectedIndex), _unItalicFactor);
|
var form = new VobSubOcrSetItalicFactor(GetSubtitleBitmap(_selectedIndex), _unItalicFactor);
|
||||||
form.ShowDialog(this);
|
form.ShowDialog(this);
|
||||||
_unItalicFactor = form.GetUnItalicFactor();
|
_unItalicFactor = form.GetUnItalicFactor();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ namespace Nikse.SubtitleEdit.Forms
|
|||||||
private void numericUpDown1_ValueChanged(object sender, EventArgs e)
|
private void numericUpDown1_ValueChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
pictureBoxSubtitleImage.Image = VobSubOcr.UnItalic(_bmp, (double)numericUpDown1.Value);
|
pictureBoxSubtitleImage.Image = VobSubOcr.UnItalic(_bmp, (double)numericUpDown1.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal double GetUnItalicFactor()
|
internal double GetUnItalicFactor()
|
||||||
{
|
{
|
||||||
|
@ -2288,7 +2288,7 @@ namespace Nikse.SubtitleEdit.Logic
|
|||||||
textWriter.WriteElementString("MainToolsBeamer", settings.Shortcuts.MainToolsBeamer);
|
textWriter.WriteElementString("MainToolsBeamer", settings.Shortcuts.MainToolsBeamer);
|
||||||
textWriter.WriteElementString("MainToolsToggleTranslationOriginalInPreviews", settings.Shortcuts.MainEditToggleTranslationOriginalInPreviews);
|
textWriter.WriteElementString("MainToolsToggleTranslationOriginalInPreviews", settings.Shortcuts.MainEditToggleTranslationOriginalInPreviews);
|
||||||
textWriter.WriteElementString("MainEditInverseSelection", settings.Shortcuts.MainEditInverseSelection);
|
textWriter.WriteElementString("MainEditInverseSelection", settings.Shortcuts.MainEditInverseSelection);
|
||||||
textWriter.WriteElementString("MainEditModifySelection", settings.Shortcuts.MainEditModifySelection);
|
textWriter.WriteElementString("MainEditModifySelection", settings.Shortcuts.MainEditModifySelection);
|
||||||
textWriter.WriteElementString("MainVideoPause", settings.Shortcuts.MainVideoPause);
|
textWriter.WriteElementString("MainVideoPause", settings.Shortcuts.MainVideoPause);
|
||||||
textWriter.WriteElementString("MainVideoPlayPauseToggle", settings.Shortcuts.MainVideoPlayPauseToggle);
|
textWriter.WriteElementString("MainVideoPlayPauseToggle", settings.Shortcuts.MainVideoPlayPauseToggle);
|
||||||
textWriter.WriteElementString("MainVideoShowHideVideo", settings.Shortcuts.MainVideoShowHideVideo);
|
textWriter.WriteElementString("MainVideoShowHideVideo", settings.Shortcuts.MainVideoShowHideVideo);
|
||||||
|
@ -58,7 +58,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
|||||||
string[] arr = line.Split();
|
string[] arr = line.Split();
|
||||||
var timeCode = arr[arr.Length - 1];
|
var timeCode = arr[arr.Length - 1];
|
||||||
if (regexTimeCodesAM.Match(timeCode).Success || regexTimeCodesPM.Match(timeCode).Success)
|
if (regexTimeCodesAM.Match(timeCode).Success || regexTimeCodesPM.Match(timeCode).Success)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
arr = timeCode.Substring(0, 10).Split(':');
|
arr = timeCode.Substring(0, 10).Split(':');
|
||||||
@ -71,7 +71,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
|||||||
p = new Paragraph();
|
p = new Paragraph();
|
||||||
p.StartTime = new TimeCode(hours, minutes, seconds, FramesToMillisecondsMax999(frames));
|
p.StartTime = new TimeCode(hours, minutes, seconds, FramesToMillisecondsMax999(frames));
|
||||||
p.Text = s.Substring(0, s.IndexOf(timeCode)).Trim();
|
p.Text = s.Substring(0, s.IndexOf(timeCode)).Trim();
|
||||||
subtitle.Paragraphs.Add(p);
|
subtitle.Paragraphs.Add(p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
|
@ -112,7 +112,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
|||||||
public override void RemoveNativeFormatting(Subtitle subtitle)
|
public override void RemoveNativeFormatting(Subtitle subtitle)
|
||||||
{
|
{
|
||||||
foreach (Paragraph p in subtitle.Paragraphs)
|
foreach (Paragraph p in subtitle.Paragraphs)
|
||||||
{
|
{
|
||||||
if (p.Text.IndexOf("<") >= 0)
|
if (p.Text.IndexOf("<") >= 0)
|
||||||
{
|
{
|
||||||
string text = p.Text;
|
string text = p.Text;
|
||||||
@ -167,7 +167,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
|
|||||||
text = text.Remove(indexOfTag, indexOfEnd - indexOfTag + 1);
|
text = text.Remove(indexOfTag, indexOfEnd - indexOfTag + 1);
|
||||||
text = text.Replace("</" + tag + ">", string.Empty);
|
text = text.Replace("</" + tag + ">", string.Empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
@ -705,7 +705,7 @@ namespace Nikse.SubtitleEdit.Logic
|
|||||||
control.ForeColor = gs.SubtitleFontColor;
|
control.ForeColor = gs.SubtitleFontColor;
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user