Merge MergeDAT, part 6

This commit is contained in:
Matt Nadareski
2016-04-21 14:12:01 -07:00
parent 6483fd4772
commit 0390144419
3 changed files with 33 additions and 33 deletions

View File

@@ -1345,38 +1345,6 @@ Make a selection:
}
}
/// <summary>
/// Wrap splitting a DAT by 2 extensions
/// </summary>
/// <param name="input">Input file or folder to be split</param>
/// <param name="exta">First extension to split on</param>
/// <param name="extb">Second extension to split on</param>
/// <param name="outdir">Output directory for the split files</param>
private static void InitExtSplit(string input, string exta, string extb, string outdir)
{
// Strip any quotations from the names
input = input.Replace("\"", "");
exta = exta.Replace("\"", "");
extb = extb.Replace("\"", "");
outdir = outdir.Replace("\"", "");
if (input != "" && File.Exists(input))
{
if (exta == "" || extb == "")
{
logger.Warning("Two extensions are needed to split a DAT!");
return;
}
ExtSplit es = new ExtSplit(input, exta, extb, outdir, logger);
es.Split();
return;
}
else
{
logger.Log("I'm sorry but " + input + "doesn't exist!");
}
}
/// <summary>
/// Wrap merging, diffing, and deduping 2 or mor DATs
/// </summary>
@@ -1414,6 +1382,38 @@ Make a selection:
md.Process();
}
/// <summary>
/// Wrap splitting a DAT by 2 extensions
/// </summary>
/// <param name="input">Input file or folder to be split</param>
/// <param name="exta">First extension to split on</param>
/// <param name="extb">Second extension to split on</param>
/// <param name="outdir">Output directory for the split files</param>
private static void InitExtSplit(string input, string exta, string extb, string outdir)
{
// Strip any quotations from the names
input = input.Replace("\"", "");
exta = exta.Replace("\"", "");
extb = extb.Replace("\"", "");
outdir = outdir.Replace("\"", "");
if (input != "" && File.Exists(input))
{
if (exta == "" || extb == "")
{
logger.Warning("Two extensions are needed to split a DAT!");
return;
}
ExtSplit es = new ExtSplit(input, exta, extb, outdir, logger);
es.Split();
return;
}
else
{
logger.Log("I'm sorry but " + input + "doesn't exist!");
}
}
/// <summary>
/// Wrap adding a new source to the database
/// </summary>

View File

@@ -88,7 +88,7 @@
<Compile Include="Generate.cs" />
<Compile Include="Import.cs" />
<Compile Include="DATabase.cs" />
<Compile Include="MergeDAT.cs" />
<Compile Include="MergeDiff.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="TrimMerge.cs" />
</ItemGroup>