Fix typo + improve generic parsing a little

This commit is contained in:
niksedk 2019-11-11 10:16:42 +01:00
parent 94c3fb8f5d
commit e821495566
7 changed files with 981 additions and 923 deletions

View File

@ -611,8 +611,8 @@
<Compile Include="TransportStream\Teletext.cs" />
<Compile Include="TransportStream\TransportStreamParser.cs" />
<Compile Include="TransportStream\TransportStreamSubtitle.cs" />
<Compile Include="UknownFormatImporterJson.cs" />
<Compile Include="UknownFormatImporter.cs" />
<Compile Include="UnknownFormatImporterJson.cs" />
<Compile Include="UnknownFormatImporter.cs" />
<Compile Include="Utilities.cs" />
<Compile Include="VideoInfo.cs" />
<Compile Include="VobSub\Helper.cs" />

View File

@ -7,9 +7,8 @@ using System.Text;
namespace Nikse.SubtitleEdit.Core
{
public class UknownFormatImporterJson
public class UnknownFormatImporterJson
{
public Subtitle AutoGuessImport(List<string> lines)
{

View File

@ -672,7 +672,7 @@ namespace Nikse.SubtitleEdit.Forms
s = rtb.Text;
}
}
var unknownFormatImporter = new UknownFormatImporter { UseFrames = true };
var unknownFormatImporter = new UnknownFormatImporter { UseFrames = true };
var genericParseSubtitle = unknownFormatImporter.AutoGuessImport(s.SplitToLines());
if (genericParseSubtitle.Paragraphs.Count > 1)
{

View File

@ -45,7 +45,7 @@ namespace Nikse.SubtitleEdit.Forms
private void GeneratePreviewReal()
{
var uknownFormatImporter = new UknownFormatImporter { UseFrames = radioButtonTimeCodeFrames.Checked };
var uknownFormatImporter = new UnknownFormatImporter { UseFrames = radioButtonTimeCodeFrames.Checked };
ImportedSubitle = uknownFormatImporter.AutoGuessImport(textBoxText.Lines.ToList());
groupBoxImportResult.Text = string.Format(Configuration.Settings.Language.ImportText.PreviewLinesModifiedX, ImportedSubitle.Paragraphs.Count);
SubtitleListview1.Fill(ImportedSubitle);

View File

@ -2811,7 +2811,7 @@ namespace Nikse.SubtitleEdit.Forms
}
}
var uknownFormatImporter = new UknownFormatImporter { UseFrames = true };
var uknownFormatImporter = new UnknownFormatImporter { UseFrames = true };
var genericParseSubtitle = uknownFormatImporter.AutoGuessImport(s.SplitToLines());
if (genericParseSubtitle.Paragraphs.Count > 1)
{

View File

@ -70,7 +70,7 @@ namespace Test.Logic
}]
}";
var importer = new UknownFormatImporterJson();
var importer = new UnknownFormatImporterJson();
var subtitle = importer.AutoGuessImport(raw.Replace('\'', '"').SplitToLines());
Assert.AreEqual(11, subtitle.Paragraphs.Count);
Assert.AreEqual("development", subtitle.Paragraphs[1].Text);
@ -139,7 +139,7 @@ namespace Test.Logic
}]
}";
var importer = new UknownFormatImporterJson();
var importer = new UnknownFormatImporterJson();
var subtitle = importer.AutoGuessImport(raw.Replace('\'', '"').SplitToLines());
Assert.AreEqual(11, subtitle.Paragraphs.Count);
Assert.AreEqual("Ford" + Environment.NewLine + "BMW" + Environment.NewLine + "Fiat", subtitle.Paragraphs[1].Text);
@ -176,7 +176,7 @@ namespace Test.Logic
}]
}";
var importer = new UknownFormatImporterJson();
var importer = new UnknownFormatImporterJson();
var subtitle = importer.AutoGuessImport(raw.Replace('\'', '"').SplitToLines());
Assert.AreEqual(4, subtitle.Paragraphs.Count);
Assert.AreEqual("Line1", subtitle.Paragraphs[1].Text);