Ran CodeMaid.

This commit is contained in:
XhmikosR 2016-01-24 12:51:04 +02:00
parent e709c67ec1
commit f13d7c1b81
482 changed files with 739 additions and 742 deletions

View File

@ -1,7 +1,7 @@
using System; using Nikse.SubtitleEdit.Core.VobSub;
using System;
using System.IO; using System.IO;
using System.Text; using System.Text;
using Nikse.SubtitleEdit.Core.VobSub;
namespace Nikse.SubtitleEdit.Core.ContainerFormats.MaterialExchangeFormat namespace Nikse.SubtitleEdit.Core.ContainerFormats.MaterialExchangeFormat
{ {

View File

@ -1,5 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.IO; using System.IO;
namespace Nikse.SubtitleEdit.Core.ContainerFormats.MaterialExchangeFormat namespace Nikse.SubtitleEdit.Core.ContainerFormats.MaterialExchangeFormat

View File

@ -1,9 +1,9 @@
using System; using Nikse.SubtitleEdit.Core.ContainerFormats.Ebml;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using Nikse.SubtitleEdit.Core.ContainerFormats.Ebml;
namespace Nikse.SubtitleEdit.Core.ContainerFormats.Matroska namespace Nikse.SubtitleEdit.Core.ContainerFormats.Matroska
{ {

View File

@ -1,9 +1,9 @@
using System; using Nikse.SubtitleEdit.Core.SubtitleFormats;
using Nikse.SubtitleEdit.Core.VobSub;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Text; using System.Text;
using Nikse.SubtitleEdit.Core.SubtitleFormats;
using Nikse.SubtitleEdit.Core.VobSub;
namespace Nikse.SubtitleEdit.Core.ContainerFormats.Mp4.Boxes namespace Nikse.SubtitleEdit.Core.ContainerFormats.Mp4.Boxes
{ {

View File

@ -1,7 +1,7 @@
using System; using Nikse.SubtitleEdit.Core.ContainerFormats.Mp4.Boxes;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using Nikse.SubtitleEdit.Core.ContainerFormats.Mp4.Boxes;
namespace Nikse.SubtitleEdit.Core.ContainerFormats.Mp4 namespace Nikse.SubtitleEdit.Core.ContainerFormats.Mp4
{ {

View File

@ -1,11 +1,11 @@
// Ripped from http://www.codeproject.com/KB/recipes/DetectEncoding.aspx // Ripped from http://www.codeproject.com/KB/recipes/DetectEncoding.aspx
using Nikse.SubtitleEdit.Core.DetectEncoding.Multilang;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Text; using System.Text;
using Nikse.SubtitleEdit.Core.DetectEncoding.Multilang;
namespace Nikse.SubtitleEdit.Core.DetectEncoding namespace Nikse.SubtitleEdit.Core.DetectEncoding
{ {

View File

@ -18,6 +18,7 @@ namespace Nikse.SubtitleEdit.Core.Forms
private int _successCount; private int _successCount;
public string Error { get; set; } public string Error { get; set; }
public bool Done public bool Done
{ {
get get
@ -25,6 +26,7 @@ namespace Nikse.SubtitleEdit.Core.Forms
return _successCount == 1; return _successCount == 1;
} }
} }
public string LatestVersionNumber { get; set; } public string LatestVersionNumber { get; set; }
public string LatestChangeLog { get; set; } public string LatestChangeLog { get; set; }

View File

@ -1,6 +1,6 @@
using System.Collections.Generic; using Nikse.SubtitleEdit.Core.SubtitleFormats;
using System.Collections.Generic;
using System.Text; using System.Text;
using Nikse.SubtitleEdit.Core.SubtitleFormats;
namespace Nikse.SubtitleEdit.Core.Forms.FixCommonErrors namespace Nikse.SubtitleEdit.Core.Forms.FixCommonErrors
{ {
@ -42,6 +42,7 @@ namespace Nikse.SubtitleEdit.Core.Forms.FixCommonErrors
} }
private string _language = "en"; private string _language = "en";
public string Language public string Language
{ {
get { return _language; } get { return _language; }
@ -54,6 +55,7 @@ namespace Nikse.SubtitleEdit.Core.Forms.FixCommonErrors
} }
private Encoding _encoding = Encoding.UTF8; private Encoding _encoding = Encoding.UTF8;
public Encoding Encoding public Encoding Encoding
{ {
get { return _encoding; } get { return _encoding; }

View File

@ -1,5 +1,4 @@
 namespace Nikse.SubtitleEdit.Core.Forms.FixCommonErrors
namespace Nikse.SubtitleEdit.Core.Forms.FixCommonErrors
{ {
public class FixHyphensAdd : IFixCommonError public class FixHyphensAdd : IFixCommonError
{ {

View File

@ -1,5 +1,4 @@
 namespace Nikse.SubtitleEdit.Core.Forms.FixCommonErrors
namespace Nikse.SubtitleEdit.Core.Forms.FixCommonErrors
{ {
public class FixHyphensRemove : IFixCommonError public class FixHyphensRemove : IFixCommonError
{ {

View File

@ -1,6 +1,6 @@
using System.Collections.Generic; using Nikse.SubtitleEdit.Core.SubtitleFormats;
using System.Collections.Generic;
using System.Text; using System.Text;
using Nikse.SubtitleEdit.Core.SubtitleFormats;
namespace Nikse.SubtitleEdit.Core.Forms.FixCommonErrors namespace Nikse.SubtitleEdit.Core.Forms.FixCommonErrors
{ {

View File

@ -1,7 +1,4 @@
using System; namespace Nikse.SubtitleEdit.Core.Forms.FixCommonErrors
using System.Text.RegularExpressions;
namespace Nikse.SubtitleEdit.Core.Forms.FixCommonErrors
{ {
public class RemoveSpaceBetweenNumbers : IFixCommonError public class RemoveSpaceBetweenNumbers : IFixCommonError
{ {

View File

@ -661,7 +661,6 @@ namespace Nikse.SubtitleEdit.Core.Forms
text = "<i>" + text.Remove(0, removeText.Length).TrimStart(' '); text = "<i>" + text.Remove(0, removeText.Length).TrimStart(' ');
} }
if (oldText != text) if (oldText != text)
{ {
// insert spaces before "-" // insert spaces before "-"

View File

@ -1364,6 +1364,7 @@
//translation helper //translation helper
public string AutoRepeat { get; set; } public string AutoRepeat { get; set; }
public string AutoRepeatOn { get; set; } public string AutoRepeatOn { get; set; }
public string AutoRepeatCount { get; set; } public string AutoRepeatCount { get; set; }
public string AutoContinue { get; set; } public string AutoContinue { get; set; }
@ -1383,6 +1384,7 @@
// create/adjust // create/adjust
public string InsertNewSubtitleAtVideoPosition { get; set; } public string InsertNewSubtitleAtVideoPosition { get; set; }
public string Auto { get; set; } public string Auto { get; set; }
public string PlayFromJustBeforeText { get; set; } public string PlayFromJustBeforeText { get; set; }
public string Pause { get; set; } public string Pause { get; set; }

View File

@ -1,10 +1,10 @@
using System; using Nikse.SubtitleEdit.Core.VobSub;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing; using System.Drawing;
using System.Drawing.Imaging; using System.Drawing.Imaging;
using System.IO; using System.IO;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using Nikse.SubtitleEdit.Core.VobSub;
namespace Nikse.SubtitleEdit.Core namespace Nikse.SubtitleEdit.Core
{ {

View File

@ -1,5 +1,5 @@
using System.Security; using Microsoft.Win32;
using Microsoft.Win32; using System.Security;
namespace Nikse.SubtitleEdit.Core namespace Nikse.SubtitleEdit.Core
{ {

View File

@ -1,8 +1,8 @@
using System; using Nikse.SubtitleEdit.Core.Interfaces;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using Nikse.SubtitleEdit.Core.Interfaces;
namespace Nikse.SubtitleEdit.Core namespace Nikse.SubtitleEdit.Core
{ {

View File

@ -1,7 +1,7 @@
using System; using Nikse.SubtitleEdit.Core.SubtitleFormats;
using System;
using System.Drawing; using System.Drawing;
using System.Text; using System.Text;
using Nikse.SubtitleEdit.Core.SubtitleFormats;
namespace Nikse.SubtitleEdit.Core namespace Nikse.SubtitleEdit.Core
{ {

View File

@ -110,7 +110,6 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
header[2082] = 0x01; header[2082] = 0x01;
header[2085] = 0x01; header[2085] = 0x01;
// Microsoft Sans Serif // Microsoft Sans Serif
header[2088] = 0x4d; header[2088] = 0x4d;
header[2089] = 0x69; header[2089] = 0x69;

View File

@ -717,7 +717,6 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
_languageIdLine2 = LanguageIdRussian; _languageIdLine2 = LanguageIdRussian;
} }
// Chinese // Chinese
else if (_languageIdLine1 == LanguageIdChineseSimplified) else if (_languageIdLine1 == LanguageIdChineseSimplified)
{ {
@ -730,7 +729,6 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
_languageIdLine2 = LanguageIdChineseTraditional; _languageIdLine2 = LanguageIdChineseTraditional;
} }
int i = 455; int i = 455;
int lastNumber = -1; int lastNumber = -1;
while (i < buffer.Length - 20) while (i < buffer.Length - 20)

View File

@ -148,7 +148,6 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
text = text.Remove(0, 5); text = text.Remove(0, 5);
} }
// special language codes... // special language codes...
text = text.Replace("ÔA", "Á"); text = text.Replace("ÔA", "Á");
text = text.Replace("ÔE", "É"); text = text.Replace("ÔE", "É");

View File

@ -13,7 +13,7 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
public class Ebu : SubtitleFormat public class Ebu : SubtitleFormat
{ {
const string LanguageCodeChinese = "75"; private const string LanguageCodeChinese = "75";
public interface IEbuUiHelper public interface IEbuUiHelper
{ {
@ -1162,7 +1162,6 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
sb.Append("<u>"); sb.Append("<u>");
else if (b == underlineOff && header.LanguageCode != LanguageCodeChinese) else if (b == underlineOff && header.LanguageCode != LanguageCodeChinese)
sb.Append("</u>"); sb.Append("</u>");
else if (b == 0xd3 && header.CharacterCodeTableNumber == "00") // Latin else if (b == 0xd3 && header.CharacterCodeTableNumber == "00") // Latin
{ {
sb.Append("©"); sb.Append("©");

View File

@ -1,8 +1,8 @@
using System; using Nikse.SubtitleEdit.Core.Enums;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using Nikse.SubtitleEdit.Core.Enums;
namespace Nikse.SubtitleEdit.Core.SubtitleFormats namespace Nikse.SubtitleEdit.Core.SubtitleFormats
{ {

View File

@ -130,7 +130,6 @@ Format: Marked, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
if (!string.IsNullOrEmpty(p.MarginV) && Utilities.IsInteger(p.MarginV)) if (!string.IsNullOrEmpty(p.MarginV) && Utilities.IsInteger(p.MarginV))
marginV = p.MarginV.PadLeft(4, '0'); marginV = p.MarginV.PadLeft(4, '0');
string effect = ""; string effect = "";
if (!string.IsNullOrEmpty(p.Effect)) if (!string.IsNullOrEmpty(p.Effect))
effect = p.Effect; effect = p.Effect;

View File

@ -1,11 +1,11 @@
using System; using Nikse.SubtitleEdit.Core.BluRaySup;
using Nikse.SubtitleEdit.Core.TransportStream;
using Nikse.SubtitleEdit.Core.VobSub;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing; using System.Drawing;
using System.IO; using System.IO;
using System.Text; using System.Text;
using Nikse.SubtitleEdit.Core.BluRaySup;
using Nikse.SubtitleEdit.Core.TransportStream;
using Nikse.SubtitleEdit.Core.VobSub;
using Helper = Nikse.SubtitleEdit.Core.TransportStream.Helper; using Helper = Nikse.SubtitleEdit.Core.TransportStream.Helper;
namespace Nikse.SubtitleEdit.Core.SubtitleFormats namespace Nikse.SubtitleEdit.Core.SubtitleFormats
@ -422,7 +422,6 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
} }
} }
public abstract class SubtitleRegionContent public abstract class SubtitleRegionContent
{ {
public int EscapeCode { get; set; } public int EscapeCode { get; set; }
@ -803,22 +802,28 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
var fontOutlineThickness = buffer[idx + 2]; var fontOutlineThickness = buffer[idx + 2];
switch (fontStyle) switch (fontStyle)
{ {
case 1: region.Texts.Add("<b>"); case 1:
region.Texts.Add("<b>");
endStyle = "</b>"; endStyle = "</b>";
break; break;
case 2: region.Texts.Add("<i>"); case 2:
region.Texts.Add("<i>");
endStyle = "</i>"; endStyle = "</i>";
break; break;
case 3: region.Texts.Add("<b><i>"); case 3:
region.Texts.Add("<b><i>");
endStyle = "</i></b>"; endStyle = "</i></b>";
break; break;
case 5: region.Texts.Add("<b>"); case 5:
region.Texts.Add("<b>");
endStyle = "</b>"; endStyle = "</b>";
break; break;
case 6: region.Texts.Add("<i>"); case 6:
region.Texts.Add("<i>");
endStyle = "</i>"; endStyle = "</i>";
break; break;
case 7: region.Texts.Add("<b><i>"); case 7:
region.Texts.Add("<b><i>");
endStyle = "</i></b>"; endStyle = "</i></b>";
break; break;
} }

View File

@ -1,7 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using Nikse.SubtitleEdit.Core;
namespace Nikse.SubtitleEdit.Core.SubtitleFormats namespace Nikse.SubtitleEdit.Core.SubtitleFormats
{ {

View File

@ -72,7 +72,6 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
if (!rtf.StartsWith("{\\rtf")) if (!rtf.StartsWith("{\\rtf"))
return; return;
lines = rtf.FromRtf().SplitToLines().ToList(); lines = rtf.FromRtf().SplitToLines().ToList();
_errorCount = 0; _errorCount = 0;
Paragraph p = null; Paragraph p = null;

View File

@ -1,5 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.Text; using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;

View File

@ -1,5 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.Text; using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;

View File

@ -11,6 +11,7 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
private static readonly Regex RegexTimeCodes = new Regex(@"^\d\d\:\d\d\:\d\d\s+\d+ ", RegexOptions.Compiled); private static readonly Regex RegexTimeCodes = new Regex(@"^\d\d\:\d\d\:\d\d\s+\d+ ", RegexOptions.Compiled);
private static readonly Regex RegexNumberAndText = new Regex(@"^\d+ [^ ]+", RegexOptions.Compiled); private static readonly Regex RegexNumberAndText = new Regex(@"^\d+ [^ ]+", RegexOptions.Compiled);
public override string Extension public override string Extension
{ {
get { return ".txt"; } get { return ".txt"; }

View File

@ -9,6 +9,7 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
{ {
private static readonly Regex RegexTimeCodes = new Regex(@"^\d\d\:\d\d\:\d\d\t[^ ]+", RegexOptions.Compiled); private static readonly Regex RegexTimeCodes = new Regex(@"^\d\d\:\d\d\:\d\d\t[^ ]+", RegexOptions.Compiled);
public override string Extension public override string Extension
{ {
get { return ".txt"; } get { return ".txt"; }

View File

@ -1,5 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.Text; using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;

View File

@ -10,6 +10,7 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
//7:00:01:27AM //7:00:01:27AM
private static readonly Regex regexTimeCodesAM = new Regex(@"^\d\:\d\d\:\d\d\:\d\dAM", RegexOptions.Compiled); private static readonly Regex regexTimeCodesAM = new Regex(@"^\d\:\d\d\:\d\d\:\d\dAM", RegexOptions.Compiled);
private static readonly Regex regexTimeCodesPM = new Regex(@"^\d\:\d\d\:\d\d\:\d\dPM", RegexOptions.Compiled); private static readonly Regex regexTimeCodesPM = new Regex(@"^\d\:\d\d\:\d\d\:\d\dPM", RegexOptions.Compiled);
public override string Extension public override string Extension
{ {
get { return ".pst"; } get { return ".pst"; }

View File

@ -9,6 +9,7 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
{ {
//7:00:01:27AM //7:00:01:27AM
private static Regex regexTimeCodes = new Regex(@"^\d\:\d\d\:\d\d\:\d\d\t", RegexOptions.Compiled); private static Regex regexTimeCodes = new Regex(@"^\d\:\d\d\:\d\d\:\d\d\t", RegexOptions.Compiled);
public override string Extension public override string Extension
{ {
get { return ".txt"; } get { return ".txt"; }

View File

@ -8,6 +8,7 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
{ {
private static readonly Regex RegexTimeCodes = new Regex(@"^\d\d\:\d\d\:\d\d\:\d\d [^ ]+", RegexOptions.Compiled); private static readonly Regex RegexTimeCodes = new Regex(@"^\d\d\:\d\d\:\d\d\:\d\d [^ ]+", RegexOptions.Compiled);
public override string Extension public override string Extension
{ {
get { return ".txt"; } get { return ".txt"; }

View File

@ -11,6 +11,7 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
public static readonly Regex RegexTimeCodes2 = new Regex(@"^\d\d\:\d\d\:\d\d.+\d\d\:\d\d\:\d\d$", RegexOptions.Compiled); public static readonly Regex RegexTimeCodes2 = new Regex(@"^\d\d\:\d\d\:\d\d.+\d\d\:\d\d\:\d\d$", RegexOptions.Compiled);
private static readonly Regex RegexStartOnly = new Regex(@"^\d\d\:\d\d\:\d\d\t.+$", RegexOptions.Compiled); private static readonly Regex RegexStartOnly = new Regex(@"^\d\d\:\d\d\:\d\d\t.+$", RegexOptions.Compiled);
private static readonly Regex RegexEndOnly = new Regex(@"\d\d\:\d\d\:\d\d$", RegexOptions.Compiled); private static readonly Regex RegexEndOnly = new Regex(@"\d\d\:\d\d\:\d\d$", RegexOptions.Compiled);
public override string Extension public override string Extension
{ {
get { return ".txt"; } get { return ".txt"; }

View File

@ -5,7 +5,7 @@ using System.Xml;
namespace Nikse.SubtitleEdit.Core.SubtitleFormats namespace Nikse.SubtitleEdit.Core.SubtitleFormats
{ {
class UnknownSubtitle78 : SubtitleFormat internal class UnknownSubtitle78 : SubtitleFormat
{ {
public override string Extension public override string Extension
{ {

View File

@ -42,7 +42,6 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
//0 = Height (0=bottom, 5=middle, 9=top) //0 = Height (0=bottom, 5=middle, 9=top)
//N or I or B = Normal or Italic or Bold //N or I or B = Normal or Italic or Bold
const string paragraphWriteFormat = "SUB [{0} {1} {2}>{3}]{4}{5}"; const string paragraphWriteFormat = "SUB [{0} {1} {2}>{3}]{4}{5}";
var sb = new StringBuilder(); var sb = new StringBuilder();
foreach (Paragraph p in subtitle.Paragraphs) foreach (Paragraph p in subtitle.Paragraphs)

View File

@ -119,7 +119,6 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
globalFileInfoNode.Attributes["StopTime"].InnerText = lastTimeCode.ToHHMMSSFF(); globalFileInfoNode.Attributes["StopTime"].InnerText = lastTimeCode.ToHHMMSSFF();
globalFileInfoNode.Attributes["NumberOfCaptions"].InnerText = subtitle.Paragraphs.Count.ToString(CultureInfo.InvariantCulture); globalFileInfoNode.Attributes["NumberOfCaptions"].InnerText = subtitle.Paragraphs.Count.ToString(CultureInfo.InvariantCulture);
var fileBodyNode = xml.DocumentElement.SelectSingleNode("FileBody"); var fileBodyNode = xml.DocumentElement.SelectSingleNode("FileBody");
foreach (Paragraph p in subtitle.Paragraphs) foreach (Paragraph p in subtitle.Paragraphs)
{ {

View File

@ -1,8 +1,8 @@
using System; using Nikse.SubtitleEdit.Core.Enums;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using System.Xml; using System.Xml;
using Nikse.SubtitleEdit.Core.Enums;
namespace Nikse.SubtitleEdit.Core.SubtitleFormats namespace Nikse.SubtitleEdit.Core.SubtitleFormats
{ {

View File

@ -1,6 +1,6 @@
using System; using Nikse.SubtitleEdit.Core.SubtitleFormats;
using System;
using System.Globalization; using System.Globalization;
using Nikse.SubtitleEdit.Core.SubtitleFormats;
namespace Nikse.SubtitleEdit.Core namespace Nikse.SubtitleEdit.Core
{ {

View File

@ -1,9 +1,9 @@
using System; using Nikse.SubtitleEdit.Core.BluRaySup;
using Nikse.SubtitleEdit.Core.VobSub;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Text; using System.Text;
using Nikse.SubtitleEdit.Core.BluRaySup;
using Nikse.SubtitleEdit.Core.VobSub;
namespace Nikse.SubtitleEdit.Core.TransportStream namespace Nikse.SubtitleEdit.Core.TransportStream
{ {
@ -20,8 +20,10 @@ namespace Nikse.SubtitleEdit.Core.TransportStream
public long TotalNumberOfPrivateStream1Continuation0 { get; private set; } public long TotalNumberOfPrivateStream1Continuation0 { get; private set; }
public List<int> SubtitlePacketIds { get; private set; } public List<int> SubtitlePacketIds { get; private set; }
public List<Packet> SubtitlePackets { get; private set; } public List<Packet> SubtitlePackets { get; private set; }
// public List<Packet> ProgramAssociationTables { get; private set; } // public List<Packet> ProgramAssociationTables { get; private set; }
private Dictionary<int, List<DvbSubPes>> SubtitlesLookup { get; set; } private Dictionary<int, List<DvbSubPes>> SubtitlesLookup { get; set; }
private Dictionary<int, List<TransportStreamSubtitle>> DvbSubtitlesLookup { get; set; } private Dictionary<int, List<TransportStreamSubtitle>> DvbSubtitlesLookup { get; set; }
public bool IsM2TransportStream { get; private set; } public bool IsM2TransportStream { get; private set; }
public ulong FirstVideoPts { get; private set; } public ulong FirstVideoPts { get; private set; }

View File

@ -5,6 +5,7 @@ namespace Nikse.SubtitleEdit.Core.TransportStream
public class TransportStreamSubtitle public class TransportStreamSubtitle
{ {
private ulong _startMilliseconds; private ulong _startMilliseconds;
public ulong StartMilliseconds public ulong StartMilliseconds
{ {
get get
@ -20,6 +21,7 @@ namespace Nikse.SubtitleEdit.Core.TransportStream
} }
private ulong _endMilliseconds; private ulong _endMilliseconds;
public ulong EndMilliseconds public ulong EndMilliseconds
{ {
get get

View File

@ -1,7 +1,7 @@
using System; using Nikse.SubtitleEdit.Core.SubtitleFormats;
using System;
using System.Text; using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using Nikse.SubtitleEdit.Core.SubtitleFormats;
namespace Nikse.SubtitleEdit.Core namespace Nikse.SubtitleEdit.Core
{ {

View File

@ -177,8 +177,6 @@ namespace Nikse.SubtitleEdit.Core
return string.Format("{0:0.0} gb", (float)fileSize / (1024 * 1024 * 1024)); return string.Format("{0:0.0} gb", (float)fileSize / (1024 * 1024 * 1024));
} }
/// <summary> /// <summary>
/// Downloads the requested resource as a <see cref="String"/> using the configured <see cref="WebProxy"/>. /// Downloads the requested resource as a <see cref="String"/> using the configured <see cref="WebProxy"/>.
/// </summary> /// </summary>
@ -907,7 +905,6 @@ namespace Nikse.SubtitleEdit.Core
return sb.ToString(); return sb.ToString();
} }
public static bool IsValidRegex(string testPattern) public static bool IsValidRegex(string testPattern)
{ {
if (string.IsNullOrEmpty(testPattern)) if (string.IsNullOrEmpty(testPattern))

View File

@ -58,6 +58,7 @@ namespace Nikse.SubtitleEdit.Core
/// Size of sound data /// Size of sound data
/// </summary> /// </summary>
public uint DataChunkSize { get; private set; } public uint DataChunkSize { get; private set; }
public int DataStartPosition { get; private set; } public int DataStartPosition { get; private set; }
public WaveHeader(Stream stream) public WaveHeader(Stream stream)

View File

@ -109,6 +109,7 @@ namespace Nikse.SubtitleEdit.Controls
public const double ZoomMinimum = 0.1; public const double ZoomMinimum = 0.1;
public const double ZoomMaximum = 2.5; public const double ZoomMaximum = 2.5;
private double _zoomFactor = 1.0; // 1.0=no zoom private double _zoomFactor = 1.0; // 1.0=no zoom
public double ZoomFactor public double ZoomFactor
{ {
get get
@ -133,6 +134,7 @@ namespace Nikse.SubtitleEdit.Controls
public const double VerticalZoomMinimum = 1.0; public const double VerticalZoomMinimum = 1.0;
public const double VerticalZoomMaximum = 20.0; public const double VerticalZoomMaximum = 20.0;
private double _verticalZoomFactor = 1.0; // 1.0=no zoom private double _verticalZoomFactor = 1.0; // 1.0=no zoom
public double VerticalZoomFactor public double VerticalZoomFactor
{ {
get get
@ -181,6 +183,7 @@ namespace Nikse.SubtitleEdit.Controls
} }
private bool _showSpectrogram; private bool _showSpectrogram;
public bool ShowSpectrogram public bool ShowSpectrogram
{ {
get get
@ -200,6 +203,7 @@ namespace Nikse.SubtitleEdit.Controls
public bool AllowOverlap { get; set; } public bool AllowOverlap { get; set; }
private bool _showWaveform; private bool _showWaveform;
public bool ShowWaveform public bool ShowWaveform
{ {
get get
@ -217,6 +221,7 @@ namespace Nikse.SubtitleEdit.Controls
} }
private double _startPositionSeconds; private double _startPositionSeconds;
public double StartPositionSeconds public double StartPositionSeconds
{ {
get get

View File

@ -23,6 +23,7 @@ namespace Nikse.SubtitleEdit.Controls
private Font _subtitleFont = new Font("Tahoma", 8.25F); private Font _subtitleFont = new Font("Tahoma", 8.25F);
private string _subtitleFontName = "Tahoma"; private string _subtitleFontName = "Tahoma";
public string SubtitleFontName public string SubtitleFontName
{ {
get { return _subtitleFontName; } get { return _subtitleFontName; }
@ -37,6 +38,7 @@ namespace Nikse.SubtitleEdit.Controls
} }
private bool _subtitleFontBold; private bool _subtitleFontBold;
public bool SubtitleFontBold public bool SubtitleFontBold
{ {
get { return _subtitleFontBold; } get { return _subtitleFontBold; }
@ -51,6 +53,7 @@ namespace Nikse.SubtitleEdit.Controls
} }
private int _subtitleFontSize = 8; private int _subtitleFontSize = 8;
public int SubtitleFontSize public int SubtitleFontSize
{ {
get { return _subtitleFontSize; } get { return _subtitleFontSize; }

View File

@ -1,6 +1,6 @@
using System.Collections.Generic; using Nikse.SubtitleEdit.Core;
using Nikse.SubtitleEdit.Core;
using System; using System;
using System.Collections.Generic;
using System.Globalization; using System.Globalization;
using System.Windows.Forms; using System.Windows.Forms;

View File

@ -247,7 +247,6 @@ namespace Nikse.SubtitleEdit.Forms
Application.DoEvents(); Application.DoEvents();
} }
// check for delay in matroska files // check for delay in matroska files
var audioTrackNames = new List<string>(); var audioTrackNames = new List<string>();
var mkvAudioTrackNumbers = new Dictionary<int, int>(); var mkvAudioTrackNumbers = new Dictionary<int, int>();

View File

@ -15,6 +15,7 @@ namespace Nikse.SubtitleEdit.Forms
private HashSet<string> _notAllowedFixes = new HashSet<string>(); private HashSet<string> _notAllowedFixes = new HashSet<string>();
private Dictionary<string, string> _fixedText = new Dictionary<string, string>(); private Dictionary<string, string> _fixedText = new Dictionary<string, string>();
public Dictionary<string, string> FixedText public Dictionary<string, string> FixedText
{ {
get { return _fixedText; } get { return _fixedText; }

View File

@ -854,7 +854,8 @@ namespace Nikse.SubtitleEdit.Forms
if (first) if (first)
{ {
first = false; first = false;
} else }
else
{ {
if (prev.EndTime.TotalMilliseconds >= p.StartTime.TotalMilliseconds) if (prev.EndTime.TotalMilliseconds >= p.StartTime.TotalMilliseconds)
prev.EndTime.TotalMilliseconds = p.StartTime.TotalMilliseconds - 1; prev.EndTime.TotalMilliseconds = p.StartTime.TotalMilliseconds - 1;

View File

@ -1,7 +1,7 @@
using Nikse.SubtitleEdit.Core; using Nikse.SubtitleEdit.Core;
using Nikse.SubtitleEdit.Core.Forms;
using System; using System;
using System.Windows.Forms; using System.Windows.Forms;
using Nikse.SubtitleEdit.Core.Forms;
namespace Nikse.SubtitleEdit.Forms namespace Nikse.SubtitleEdit.Forms
{ {

View File

@ -1,9 +1,9 @@
using Nikse.SubtitleEdit.Core; using Nikse.SubtitleEdit.Core;
using Nikse.SubtitleEdit.Logic;
using System; using System;
using System.IO; using System.IO;
using System.Text; using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
using Nikse.SubtitleEdit.Logic;
namespace Nikse.SubtitleEdit.Forms namespace Nikse.SubtitleEdit.Forms
{ {

View File

@ -15,12 +15,14 @@ namespace Nikse.SubtitleEdit.Forms
private class TranslationInfo : IEquatable<TranslationInfo> private class TranslationInfo : IEquatable<TranslationInfo>
{ {
private readonly string _cultureName; private readonly string _cultureName;
public string CultureName public string CultureName
{ {
get { return _cultureName; } get { return _cultureName; }
} }
private readonly string _displayName; private readonly string _displayName;
public string DisplayName public string DisplayName
{ {
get { return _displayName; } get { return _displayName; }

View File

@ -1,8 +1,8 @@
using System; using Nikse.SubtitleEdit.Core;
using Nikse.SubtitleEdit.Logic;
using System;
using System.Globalization; using System.Globalization;
using System.Windows.Forms; using System.Windows.Forms;
using Nikse.SubtitleEdit.Core;
using Nikse.SubtitleEdit.Logic;
namespace Nikse.SubtitleEdit.Forms.DCinema namespace Nikse.SubtitleEdit.Forms.DCinema
{ {

View File

@ -1,8 +1,8 @@
using System; using Nikse.SubtitleEdit.Core;
using Nikse.SubtitleEdit.Logic;
using System;
using System.Globalization; using System.Globalization;
using System.Windows.Forms; using System.Windows.Forms;
using Nikse.SubtitleEdit.Core;
using Nikse.SubtitleEdit.Logic;
namespace Nikse.SubtitleEdit.Forms.DCinema namespace Nikse.SubtitleEdit.Forms.DCinema
{ {

View File

@ -134,7 +134,8 @@ namespace Nikse.SubtitleEdit.Forms
{ {
count++; count++;
var presentationSegmentNode = new TreeNode(string.Format("Segment {0}: {1} -- > {2}", count, var presentationSegmentNode = new TreeNode(string.Format("Segment {0}: {1} -- > {2}", count,
new TimeCode(segment.StartPtsMilliseconds), new TimeCode(segment.EndPtsMilliseconds))) { Tag = segment }; new TimeCode(segment.StartPtsMilliseconds), new TimeCode(segment.EndPtsMilliseconds)))
{ Tag = segment };
presentationSegmentsNode.Nodes.Add(presentationSegmentNode); presentationSegmentsNode.Nodes.Add(presentationSegmentNode);
foreach (var subtitleRegion in segment.Regions) foreach (var subtitleRegion in segment.Regions)

View File

@ -1,10 +1,10 @@
using Nikse.SubtitleEdit.Core; using Nikse.SubtitleEdit.Core;
using Nikse.SubtitleEdit.Core.Enums; using Nikse.SubtitleEdit.Core.Enums;
using Nikse.SubtitleEdit.Logic;
using System; using System;
using System.Drawing; using System.Drawing;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Windows.Forms; using System.Windows.Forms;
using Nikse.SubtitleEdit.Logic;
namespace Nikse.SubtitleEdit.Forms namespace Nikse.SubtitleEdit.Forms
{ {

View File

@ -2,6 +2,7 @@
using Nikse.SubtitleEdit.Core.Dictionaries; using Nikse.SubtitleEdit.Core.Dictionaries;
using Nikse.SubtitleEdit.Core.Forms.FixCommonErrors; using Nikse.SubtitleEdit.Core.Forms.FixCommonErrors;
using Nikse.SubtitleEdit.Core.SubtitleFormats; using Nikse.SubtitleEdit.Core.SubtitleFormats;
using Nikse.SubtitleEdit.Logic;
using Nikse.SubtitleEdit.Logic.Ocr; using Nikse.SubtitleEdit.Logic.Ocr;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
@ -10,7 +11,6 @@ using System.Globalization;
using System.IO; using System.IO;
using System.Text; using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
using Nikse.SubtitleEdit.Logic;
namespace Nikse.SubtitleEdit.Forms namespace Nikse.SubtitleEdit.Forms
{ {

View File

@ -31,6 +31,7 @@ namespace Nikse.SubtitleEdit.Forms
private FormattingType[] _formattingTypes; private FormattingType[] _formattingTypes;
private Encoding _screenScrapingEncoding; private Encoding _screenScrapingEncoding;
public Encoding ScreenScrapingEncoding public Encoding ScreenScrapingEncoding
{ {
get { return _screenScrapingEncoding; } get { return _screenScrapingEncoding; }

View File

@ -1,9 +1,9 @@
using System.Text.RegularExpressions; using Nikse.SubtitleEdit.Core;
using Nikse.SubtitleEdit.Core;
using System; using System;
using System.IO;
using System.Windows.Forms;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO;
using System.Text.RegularExpressions;
using System.Windows.Forms;
namespace Nikse.SubtitleEdit.Forms namespace Nikse.SubtitleEdit.Forms
{ {

View File

@ -443,7 +443,6 @@ namespace Nikse.SubtitleEdit.Forms
buttonCustomUrl2.Text = Configuration.Settings.VideoControls.CustomSearchText2; buttonCustomUrl2.Text = Configuration.Settings.VideoControls.CustomSearchText2;
buttonCustomUrl2.Visible = Configuration.Settings.VideoControls.CustomSearchUrl2.Length > 1; buttonCustomUrl2.Visible = Configuration.Settings.VideoControls.CustomSearchUrl2.Length > 1;
if (fileName.Length > 0 && File.Exists(fileName)) if (fileName.Length > 0 && File.Exists(fileName))
{ {
OpenSubtitle(fileName, null); OpenSubtitle(fileName, null);
@ -1903,7 +1902,6 @@ namespace Nikse.SubtitleEdit.Forms
} }
} }
if (format == null) if (format == null)
{ {
var cavena890 = new Cavena890(); var cavena890 = new Cavena890();
@ -2505,7 +2503,6 @@ namespace Nikse.SubtitleEdit.Forms
} }
} }
// Try to use a generic subtitle format parser (guessing subtitle format) // Try to use a generic subtitle format parser (guessing subtitle format)
try try
{ {

View File

@ -1,10 +1,10 @@
using Nikse.SubtitleEdit.Core; using Nikse.SubtitleEdit.Core;
using Nikse.SubtitleEdit.Core.Enums;
using Nikse.SubtitleEdit.Logic;
using System; using System;
using System.Drawing; using System.Drawing;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Windows.Forms; using System.Windows.Forms;
using Nikse.SubtitleEdit.Core.Enums;
using Nikse.SubtitleEdit.Logic;
namespace Nikse.SubtitleEdit.Forms namespace Nikse.SubtitleEdit.Forms
{ {

View File

@ -10,6 +10,7 @@ namespace Nikse.SubtitleEdit.Forms
public bool FromCurrentVideoPosition { get; set; } public bool FromCurrentVideoPosition { get; set; }
private TimeCode _videoOffset = new TimeCode(0); private TimeCode _videoOffset = new TimeCode(0);
public TimeCode VideoOffset public TimeCode VideoOffset
{ {
get get

View File

@ -38,6 +38,7 @@ namespace Nikse.SubtitleEdit.Forms
public string ChangeWord { get { return textBoxWord.Text; } set { textBoxWord.Text = value; } } public string ChangeWord { get { return textBoxWord.Text; } set { textBoxWord.Text = value; } }
public string ChangeWholeText { get { return textBoxWholeText.Text; } } public string ChangeWholeText { get { return textBoxWholeText.Text; } }
public bool AutoFixNames { get { return checkBoxAutoChangeNames.Checked; } } public bool AutoFixNames { get { return checkBoxAutoChangeNames.Checked; } }
public int CurrentLineIndex public int CurrentLineIndex
{ {
get { return _currentIndex; } get { return _currentIndex; }

View File

@ -16,7 +16,7 @@ namespace Nikse.SubtitleEdit.Forms
private string _mostUsedLines; private string _mostUsedLines;
private string _general; private string _general;
private string _mostUsedWords; private string _mostUsedWords;
const string WriteFormat = @"File generated by: Subtitle Edit private const string WriteFormat = @"File generated by: Subtitle Edit
http://www.nikse.dk/subtitleedit/ http://www.nikse.dk/subtitleedit/
https://github.com/SubtitleEdit/subtitleedit https://github.com/SubtitleEdit/subtitleedit
============================= General ============================= ============================= General =============================

View File

@ -1,6 +1,6 @@
using System; using Nikse.SubtitleEdit.Core;
using System;
using System.Windows.Forms; using System.Windows.Forms;
using Nikse.SubtitleEdit.Core;
namespace Nikse.SubtitleEdit.Forms.Styles namespace Nikse.SubtitleEdit.Forms.Styles
{ {

View File

@ -1,4 +1,7 @@
using System; using Nikse.SubtitleEdit.Core;
using Nikse.SubtitleEdit.Core.SubtitleFormats;
using Nikse.SubtitleEdit.Logic;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing; using System.Drawing;
using System.Drawing.Drawing2D; using System.Drawing.Drawing2D;
@ -6,9 +9,6 @@ using System.Drawing.Text;
using System.Globalization; using System.Globalization;
using System.Text; using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
using Nikse.SubtitleEdit.Core;
using Nikse.SubtitleEdit.Core.SubtitleFormats;
using Nikse.SubtitleEdit.Logic;
namespace Nikse.SubtitleEdit.Forms.Styles namespace Nikse.SubtitleEdit.Forms.Styles
{ {

View File

@ -1,9 +1,9 @@
using System.Globalization; using Nikse.SubtitleEdit.Core;
using Nikse.SubtitleEdit.Core;
using Nikse.SubtitleEdit.Core.SubtitleFormats; using Nikse.SubtitleEdit.Core.SubtitleFormats;
using Nikse.SubtitleEdit.Logic; using Nikse.SubtitleEdit.Logic;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization;
using System.IO; using System.IO;
using System.Text; using System.Text;
using System.Windows.Forms; using System.Windows.Forms;

View File

@ -1,11 +1,11 @@
using Nikse.SubtitleEdit.Core; using Nikse.SubtitleEdit.Core;
using Nikse.SubtitleEdit.Logic;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing; using System.Drawing;
using System.Globalization; using System.Globalization;
using System.Linq; using System.Linq;
using System.Windows.Forms; using System.Windows.Forms;
using Nikse.SubtitleEdit.Logic;
namespace Nikse.SubtitleEdit.Forms namespace Nikse.SubtitleEdit.Forms
{ {

View File

@ -5588,7 +5588,6 @@ namespace Nikse.SubtitleEdit.Forms
//} //}
//Text = (ts / _elapseds.Count).ToString(); // display ms in win title bar //Text = (ts / _elapseds.Count).ToString(); // display ms in win title bar
_lastLine = text; _lastLine = text;
text = text.Replace("<i>-</i>", "-"); text = text.Replace("<i>-</i>", "-");
@ -7951,7 +7950,6 @@ namespace Nikse.SubtitleEdit.Forms
Configuration.Settings.VobSubOcr.LastBinaryImageSpellCheck = comboBoxDictionaries.SelectedItem.ToString(); Configuration.Settings.VobSubOcr.LastBinaryImageSpellCheck = comboBoxDictionaries.SelectedItem.ToString();
} }
if (_bluRaySubtitlesOriginal != null) if (_bluRaySubtitlesOriginal != null)
Configuration.Settings.VobSubOcr.BlurayAllowDifferenceInPercent = (double)numericUpDownMaxErrorPct.Value; Configuration.Settings.VobSubOcr.BlurayAllowDifferenceInPercent = (double)numericUpDownMaxErrorPct.Value;
else else

View File

@ -1,13 +1,13 @@
using System.Globalization; using Nikse.SubtitleEdit.Core;
using Nikse.SubtitleEdit.Core; using Nikse.SubtitleEdit.Core.BluRaySup;
using Nikse.SubtitleEdit.Core.ContainerFormats.Matroska; using Nikse.SubtitleEdit.Core.ContainerFormats.Matroska;
using Nikse.SubtitleEdit.Core.SubtitleFormats; using Nikse.SubtitleEdit.Core.SubtitleFormats;
using Nikse.SubtitleEdit.Forms; using Nikse.SubtitleEdit.Forms;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization;
using System.IO; using System.IO;
using System.Text; using System.Text;
using Nikse.SubtitleEdit.Core.BluRaySup;
namespace Nikse.SubtitleEdit.Logic namespace Nikse.SubtitleEdit.Logic
{ {
@ -484,7 +484,6 @@ namespace Nikse.SubtitleEdit.Logic
} }
} }
/// <summary> /// <summary>
/// Gets a argument from the command line /// Gets a argument from the command line
/// </summary> /// </summary>

View File

@ -1,8 +1,8 @@
using System; using Nikse.SubtitleEdit.Core;
using Nikse.SubtitleEdit.Core.Enums;
using System;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Windows.Forms; using System.Windows.Forms;
using Nikse.SubtitleEdit.Core;
using Nikse.SubtitleEdit.Core.Enums;
namespace Nikse.SubtitleEdit.Logic namespace Nikse.SubtitleEdit.Logic
{ {

View File

@ -1,8 +1,8 @@
using System; using Nikse.SubtitleEdit.Core;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Net; using System.Net;
using System.Text; using System.Text;
using Nikse.SubtitleEdit.Core;
namespace Nikse.SubtitleEdit.Logic.Networking namespace Nikse.SubtitleEdit.Logic.Networking
{ {

View File

@ -1,7 +1,7 @@
using System; using Nikse.SubtitleEdit.Core;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing; using System.Drawing;
using Nikse.SubtitleEdit.Core;
namespace Nikse.SubtitleEdit.Logic namespace Nikse.SubtitleEdit.Logic
{ {

View File

@ -1,9 +1,9 @@
using System; using Nikse.SubtitleEdit.Core;
using Nikse.SubtitleEdit.Core.VobSub;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing; using System.Drawing;
using System.IO; using System.IO;
using Nikse.SubtitleEdit.Core;
using Nikse.SubtitleEdit.Core.VobSub;
namespace Nikse.SubtitleEdit.Logic.Ocr.Binary namespace Nikse.SubtitleEdit.Logic.Ocr.Binary
{ {

View File

@ -1,9 +1,9 @@
using System; using Nikse.SubtitleEdit.Core;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing; using System.Drawing;
using System.IO; using System.IO;
using System.IO.Compression; using System.IO.Compression;
using Nikse.SubtitleEdit.Core;
namespace Nikse.SubtitleEdit.Logic.Ocr namespace Nikse.SubtitleEdit.Logic.Ocr
{ {

View File

@ -1,6 +1,6 @@
using System; using Nikse.SubtitleEdit.Core;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using Nikse.SubtitleEdit.Core;
namespace Nikse.SubtitleEdit.Logic.SpellCheck namespace Nikse.SubtitleEdit.Logic.SpellCheck
{ {

View File

@ -1,13 +1,13 @@
using System; using Nikse.SubtitleEdit.Controls;
using System.Collections.Generic;
using System.Drawing;
using System.Text;
using Nikse.SubtitleEdit.Controls;
using Nikse.SubtitleEdit.Core; using Nikse.SubtitleEdit.Core;
using Nikse.SubtitleEdit.Core.SubtitleFormats; using Nikse.SubtitleEdit.Core.SubtitleFormats;
using Nikse.SubtitleEdit.Forms; using Nikse.SubtitleEdit.Forms;
using Nikse.SubtitleEdit.Logic.VideoPlayers; using Nikse.SubtitleEdit.Logic.VideoPlayers;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO; using System.IO;
using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
namespace Nikse.SubtitleEdit.Logic namespace Nikse.SubtitleEdit.Logic
@ -309,7 +309,6 @@ namespace Nikse.SubtitleEdit.Logic
control.Height = newHeight; control.Height = newHeight;
} }
public static void InitializeSubtitleFont(Control control) public static void InitializeSubtitleFont(Control control)
{ {
var gs = Configuration.Settings.General; var gs = Configuration.Settings.General;

View File

@ -153,7 +153,6 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
private delegate int libvlc_video_set_spu(IntPtr mediaPlayer, int trackNumber); private delegate int libvlc_video_set_spu(IntPtr mediaPlayer, int trackNumber);
private libvlc_video_set_spu _libvlc_video_set_spu; private libvlc_video_set_spu _libvlc_video_set_spu;
//[UnmanagedFunctionPointer(CallingConvention.Cdecl)] //[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
//public unsafe delegate void* LockEventHandler(void* opaque, void** plane); //public unsafe delegate void* LockEventHandler(void* opaque, void** plane);

View File

@ -1,7 +1,7 @@
using System; using Nikse.SubtitleEdit.Core;
using System;
using System.Text; using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
using Nikse.SubtitleEdit.Core;
namespace Nikse.SubtitleEdit.Logic.VideoPlayers namespace Nikse.SubtitleEdit.Logic.VideoPlayers
{ {

View File

@ -1,9 +1,9 @@
using System; using Nikse.SubtitleEdit.Core;
using System;
using System.Diagnostics; using System.Diagnostics;
using System.Globalization; using System.Globalization;
using System.IO; using System.IO;
using System.Windows.Forms; using System.Windows.Forms;
using Nikse.SubtitleEdit.Core;
namespace Nikse.SubtitleEdit.Logic.VideoPlayers namespace Nikse.SubtitleEdit.Logic.VideoPlayers
{ {
@ -33,6 +33,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
} }
private float _volume; private float _volume;
public override int Volume public override int Volume
{ {
get get
@ -55,6 +56,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers
} }
private double _timePosition; private double _timePosition;
public override double CurrentPosition public override double CurrentPosition
{ {
get get

View File

@ -38,6 +38,7 @@ namespace Nikse.SubtitleEdit.Logic.VideoPlayers.MpcHC
} }
private int _volume = 75; private int _volume = 75;
public override int Volume public override int Volume
{ {
get get

View File

@ -1,9 +1,9 @@
using System; using Nikse.SubtitleEdit.Core;
using QuartzTypeLib;
using System;
using System.ComponentModel;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Windows.Forms; using System.Windows.Forms;
using Nikse.SubtitleEdit.Core;
using QuartzTypeLib;
using System.ComponentModel;
//http://msdn.microsoft.com/en-us/library/dd375454%28VS.85%29.aspx //http://msdn.microsoft.com/en-us/library/dd375454%28VS.85%29.aspx
//http://msdn.microsoft.com/en-us/library/dd387928%28v=vs.85%29.aspx //http://msdn.microsoft.com/en-us/library/dd387928%28v=vs.85%29.aspx

View File

@ -1,8 +1,8 @@
using System; using Nikse.SubtitleEdit.Forms;
using System;
using System.Reflection; using System.Reflection;
using System.Windows.Forms;
using Nikse.SubtitleEdit.Forms;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Windows.Forms;
namespace Nikse.SubtitleEdit.Logic namespace Nikse.SubtitleEdit.Logic
{ {

View File

@ -1,8 +1,8 @@
using System; using Nikse.SubtitleEdit.Forms;
using System;
using System.Diagnostics; using System.Diagnostics;
using System.Threading; using System.Threading;
using System.Windows.Forms; using System.Windows.Forms;
using Nikse.SubtitleEdit.Forms;
namespace Nikse.SubtitleEdit namespace Nikse.SubtitleEdit
{ {

View File

@ -1,7 +1,7 @@
using System.IO; using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Nikse.SubtitleEdit.Core; using Nikse.SubtitleEdit.Core;
using System.IO;
using System.Text;
namespace Test.Core namespace Test.Core
{ {
@ -34,6 +34,5 @@ namespace Test.Core
Assert.AreEqual(languageCode, "da"); Assert.AreEqual(languageCode, "da");
} }
} }
} }

View File

@ -1,6 +1,6 @@
using System; using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Nikse.SubtitleEdit.Core; using Nikse.SubtitleEdit.Core;
using System;
namespace Test.Core namespace Test.Core
{ {

View File

@ -1,11 +1,11 @@
using System; using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Collections.Generic; using Nikse.SubtitleEdit.Core;
using System.IO;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Nikse.SubtitleEdit.Core.Forms.FixCommonErrors; using Nikse.SubtitleEdit.Core.Forms.FixCommonErrors;
using Nikse.SubtitleEdit.Core.SubtitleFormats; using Nikse.SubtitleEdit.Core.SubtitleFormats;
using Nikse.SubtitleEdit.Forms; using Nikse.SubtitleEdit.Forms;
using Nikse.SubtitleEdit.Core; using System;
using System.Collections.Generic;
using System.IO;
namespace Test namespace Test
{ {
@ -207,7 +207,6 @@ namespace Test
} }
} }
[TestMethod] [TestMethod]
[DeploymentItem("SubtitleEdit.exe")] [DeploymentItem("SubtitleEdit.exe")]
public void MergeShortLinesHearingImpaired() public void MergeShortLinesHearingImpaired()
@ -222,8 +221,6 @@ namespace Test
Assert.AreEqual(result, expected); Assert.AreEqual(result2, expected2.Replace(Environment.NewLine, " ")); Assert.AreEqual(result, expected); Assert.AreEqual(result2, expected2.Replace(Environment.NewLine, " "));
} }
#endregion Merge short lines #endregion Merge short lines
#region Fix Italics #region Fix Italics
@ -488,7 +485,6 @@ namespace Test
} }
} }
[TestMethod] [TestMethod]
[DeploymentItem("SubtitleEdit.exe")] [DeploymentItem("SubtitleEdit.exe")]
public void FixHyphensDontCrash() public void FixHyphensDontCrash()
@ -502,9 +498,6 @@ namespace Test
} }
} }
#endregion Fix Hyphens (add dash) #endregion Fix Hyphens (add dash)
#region Fix OCR errors #region Fix OCR errors
@ -884,9 +877,6 @@ namespace Test
} }
} }
#endregion Fix unneeded spaces #endregion Fix unneeded spaces
#region Fix EmptyLines #region Fix EmptyLines
@ -915,8 +905,7 @@ namespace Test
} }
} }
#endregion Fix EmptyLines
#endregion
#region Fix missing periods at end of line #region Fix missing periods at end of line
@ -941,7 +930,8 @@ namespace Test
new FixMissingPeriodsAtEndOfLine().Fix(s, new EmptyFixCallback()); new FixMissingPeriodsAtEndOfLine().Fix(s, new EmptyFixCallback());
Assert.AreEqual(s.Paragraphs[0].Text, "The house seemed desolate to me and"); Assert.AreEqual(s.Paragraphs[0].Text, "The house seemed desolate to me and");
} }
#endregion
#endregion Fix missing periods at end of line
#region Start with uppercase after paragraph #region Start with uppercase after paragraph
@ -1474,7 +1464,7 @@ namespace Test
Assert.AreEqual(result4, expected4); Assert.AreEqual(result4, expected4);
} }
#endregion #endregion FixDoubleGreater
#region Fix uppercase I inside words #region Fix uppercase I inside words
@ -1566,7 +1556,7 @@ namespace Test
} }
} }
#endregion #endregion FixDoubleDash
#region Start with upppercase after colon #region Start with upppercase after colon
@ -1613,9 +1603,11 @@ namespace Test
Assert.AreEqual("John: <font color=\"#ffff80\">Hello world.</font>", _subtitle.Paragraphs[0].Text); Assert.AreEqual("John: <font color=\"#ffff80\">Hello world.</font>", _subtitle.Paragraphs[0].Text);
} }
} }
#endregion
#endregion Start with upppercase after colon
#region Fix Music Notation #region Fix Music Notation
[TestMethod] [TestMethod]
public void FixMusicNotation1() public void FixMusicNotation1()
{ {
@ -1649,9 +1641,11 @@ namespace Test
Assert.AreEqual(string.Format("{0} Hello world. {0}", Configuration.Settings.Tools.MusicSymbol), _subtitle.Paragraphs[0].Text); Assert.AreEqual(string.Format("{0} Hello world. {0}", Configuration.Settings.Tools.MusicSymbol), _subtitle.Paragraphs[0].Text);
} }
} }
#endregion
#endregion Fix Music Notation
#region FixFrenchLApostrophe #region FixFrenchLApostrophe
[TestMethod] [TestMethod]
public void FixFrenchLApostrophe1() public void FixFrenchLApostrophe1()
{ {
@ -1683,6 +1677,7 @@ namespace Test
res = Nikse.SubtitleEdit.Logic.Ocr.OcrFixEngine.FixFrenchLApostrophe(res, " l'", "Bye."); res = Nikse.SubtitleEdit.Logic.Ocr.OcrFixEngine.FixFrenchLApostrophe(res, " l'", "Bye.");
Assert.AreEqual("L'Axxxx and" + Environment.NewLine + "l'axxxx", res); Assert.AreEqual("L'Axxxx and" + Environment.NewLine + "l'axxxx", res);
} }
#endregion
#endregion FixFrenchLApostrophe
} }
} }

View File

@ -1,9 +1,9 @@
using System; using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Drawing;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Nikse.SubtitleEdit.Core.BluRaySup; using Nikse.SubtitleEdit.Core.BluRaySup;
using System;
using System.Drawing;
using System.IO; using System.IO;
using System.Text;
namespace Test.Logic.BluRaySup namespace Test.Logic.BluRaySup
{ {

View File

@ -1,6 +1,6 @@
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.IO;
using Nikse.SubtitleEdit.Core.Dictionaries; using Nikse.SubtitleEdit.Core.Dictionaries;
using System.IO;
namespace Test.Logic.Dictionaries namespace Test.Logic.Dictionaries
{ {

View File

@ -1,7 +1,7 @@
using System; using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.IO;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Nikse.SubtitleEdit.Core.Dictionaries; using Nikse.SubtitleEdit.Core.Dictionaries;
using System;
using System.IO;
namespace Test.Logic.Dictionaries namespace Test.Logic.Dictionaries
{ {

View File

@ -1,7 +1,6 @@
using System; using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Nikse.SubtitleEdit.Core;
using Nikse.SubtitleEdit.Core.Forms; using Nikse.SubtitleEdit.Core.Forms;
using System;
namespace Test.Logic.Forms namespace Test.Logic.Forms
{ {

View File

@ -1,9 +1,9 @@
using System; using Microsoft.VisualStudio.TestTools.UnitTesting;
using Nikse.SubtitleEdit.Core;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Xml; using System.Xml;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Nikse.SubtitleEdit.Core;
namespace Test.Logic namespace Test.Logic
{ {

View File

@ -1,6 +1,6 @@
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.IO;
using Nikse.SubtitleEdit.Core.ContainerFormats.Mp4; using Nikse.SubtitleEdit.Core.ContainerFormats.Mp4;
using System.IO;
namespace Test.Logic.Mp4 namespace Test.Logic.Mp4
{ {

View File

@ -1,8 +1,8 @@
using System.Drawing; using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.IO;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Nikse.SubtitleEdit.Core; using Nikse.SubtitleEdit.Core;
using Nikse.SubtitleEdit.Logic.Ocr.Binary; using Nikse.SubtitleEdit.Logic.Ocr.Binary;
using System.Drawing;
using System.IO;
namespace Test.Logic.Ocr namespace Test.Logic.Ocr
{ {

View File

@ -1,7 +1,7 @@
using System.Drawing; using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.IO;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Nikse.SubtitleEdit.Logic.Ocr; using Nikse.SubtitleEdit.Logic.Ocr;
using System.Drawing;
using System.IO;
namespace Test.Logic.Ocr namespace Test.Logic.Ocr
{ {

View File

@ -1,6 +1,6 @@
using System; using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Nikse.SubtitleEdit.Core; using Nikse.SubtitleEdit.Core;
using System;
namespace Test.Logic namespace Test.Logic
{ {

View File

@ -1,6 +1,5 @@
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using Nikse.SubtitleEdit.Core; using Nikse.SubtitleEdit.Core;
using Nikse.SubtitleEdit.Logic;
namespace Test.Logic namespace Test.Logic
{ {

Some files were not shown because too many files have changed in this diff Show More