mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Make sure things have tabs instead of spaces
This commit is contained in:
@@ -79,7 +79,7 @@ namespace SabreTools
|
||||
// Check to see if the source is an import-only. If so, tell the user and exit
|
||||
int id = 0;
|
||||
if (_sources != "" && Int32.TryParse(_sources, out id) && id <= 14)
|
||||
{
|
||||
{
|
||||
_logger.Warning("This source (" + id + ") is import-only so a DAT cannot be created. We apologize for the inconvenience.");
|
||||
return false;
|
||||
}
|
||||
@@ -272,7 +272,7 @@ namespace SabreTools
|
||||
|
||||
sw.Write((_old ? ")" : "\t</machine>\n</datafile>"));
|
||||
_logger.Log("File written!");
|
||||
sw.Close();
|
||||
sw.Close();
|
||||
fs.Close();
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -289,7 +289,7 @@ namespace SabreTools
|
||||
/// </summary>
|
||||
/// <remarks>To make this even more accurate, files with a more recent "LastUpdated" should be considered the parent if all else is the same.</remarks>
|
||||
/// <returns>A List of RomData objects containing all information about the files</returns>
|
||||
public List<RomData> ProcessRoms()
|
||||
public List<RomData> ProcessRoms()
|
||||
{
|
||||
List<RomData> roms = new List<RomData>();
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace SabreTools
|
||||
// Regex File Name Patterns
|
||||
private static string _defaultPattern = @"^(.+?) - (.+?) \((.*) (.*)\)\.dat$";
|
||||
private static string _mamePattern = @"^(.*)\.xml$";
|
||||
private static string _noIntroPattern = @"^(.*?) \((\d{8}-\d{6})_CM\)\.dat$";
|
||||
private static string _noIntroPattern = @"^(.*?) \((\d{8}-\d{6})_CM\)\.dat$";
|
||||
private static string _noIntroNumberedPattern = @"(.*? - .*?) \(.*?_CM\).dat";
|
||||
private static string _noIntroSpecialPattern = @"(.*? - .*?) \((\d{8})\)\.dat";
|
||||
private static string _redumpPattern = @"^(.*?) \((\d{8} \d{2}-\d{2}-\d{2})\)\.dat$";
|
||||
@@ -224,7 +224,7 @@ namespace SabreTools
|
||||
datestring = fileinfo[2].Value;
|
||||
GroupCollection niDateInfo = Regex.Match(datestring, _noIntroSpecialDatePattern).Groups;
|
||||
date = niDateInfo[1].Value + "-" + niDateInfo[2].Value + "-" + niDateInfo[3].Value + " 00:00:00";
|
||||
}
|
||||
}
|
||||
break;
|
||||
case DatType.Redump:
|
||||
if (!Remapping.Redump.ContainsKey(fileinfo[1].Value))
|
||||
@@ -373,7 +373,7 @@ namespace SabreTools
|
||||
{
|
||||
node = node.NextSibling;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Once we find the main body, enter it
|
||||
if (node != null && (node.Name == "datafile" || node.Name == "softwarelist"))
|
||||
@@ -406,15 +406,15 @@ namespace SabreTools
|
||||
if (node.Name == "software")
|
||||
{
|
||||
tempname = node.SelectSingleNode("description").InnerText;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// There are rare cases where a malformed XML will not have the required attributes. We can only skip them.
|
||||
if (node.Attributes.Count == 0)
|
||||
{
|
||||
_logger.Error(@"A node with malformed XML has been found!
|
||||
For RV DATs, please make sure that all names and descriptions are quoted.
|
||||
For XML DATs, make sure that the DAT has all required information.");
|
||||
For RV DATs, please make sure that all names and descriptions are quoted.
|
||||
For XML DATs, make sure that the DAT has all required information.");
|
||||
node = node.NextSibling;
|
||||
continue;
|
||||
}
|
||||
@@ -446,7 +446,7 @@ namespace SabreTools
|
||||
else if (child.Attributes["size"] != null)
|
||||
{
|
||||
size = Int64.Parse(child.Attributes["size"].Value);
|
||||
}
|
||||
}
|
||||
|
||||
AddRom(
|
||||
child.Name,
|
||||
@@ -457,7 +457,7 @@ namespace SabreTools
|
||||
(child.Attributes["crc"] != null ? child.Attributes["crc"].Value.ToLowerInvariant().Trim() : ""),
|
||||
(child.Attributes["md5"] != null ? child.Attributes["md5"].Value.ToLowerInvariant().Trim() : ""),
|
||||
(child.Attributes["sha1"] != null ? child.Attributes["sha1"].Value.ToLowerInvariant().Trim() : "")
|
||||
);
|
||||
);
|
||||
}
|
||||
// If we find the signs of a software list, traverse the children
|
||||
else if (child.NodeType == XmlNodeType.Element && child.Name == "part" && child.HasChildNodes)
|
||||
@@ -605,10 +605,10 @@ SELECT files.id FROM files
|
||||
WHERE files.name='" + name.Replace("'", "''") + @"'
|
||||
AND files.type='" + romtype + @"'
|
||||
AND files.setid=" + gameid + " " +
|
||||
" AND checksums.size=" + size +
|
||||
" AND checksums.crc='" + crc + "'" +
|
||||
" AND checksums.md5='" + md5 + "'" +
|
||||
" AND checksums.sha1='" + sha1 + "'";
|
||||
" AND checksums.size=" + size +
|
||||
" AND checksums.crc='" + crc + "'" +
|
||||
" AND checksums.md5='" + md5 + "'" +
|
||||
" AND checksums.sha1='" + sha1 + "'";
|
||||
using (SQLiteConnection dbc = new SQLiteConnection(_connectionString))
|
||||
{
|
||||
dbc.Open();
|
||||
|
||||
@@ -554,7 +554,7 @@ Make a selection:
|
||||
JOIN sources
|
||||
ON games.source=sources.id
|
||||
WHERE systems.id=" + sldr.GetInt32(0).ToString() + @"
|
||||
ORDER BY sources.name";
|
||||
ORDER BY sources.name";
|
||||
|
||||
using (SQLiteCommand sslc = new SQLiteCommand(squery, dbc))
|
||||
{
|
||||
@@ -889,7 +889,7 @@ Make a selection:
|
||||
else
|
||||
{
|
||||
logger.Error("Source with id '" + srcid + "' could not be removed.");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -930,7 +930,7 @@ Make a selection:
|
||||
else
|
||||
{
|
||||
logger.Error("System with id '" + sysid + "' could not be removed.");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -131,7 +131,7 @@ namespace SabreTools.Helper
|
||||
|
||||
// If we find an end bracket that's not associated with anything else, the block is done
|
||||
else if (Regex.IsMatch(line, _endPattern) && block)
|
||||
{
|
||||
{
|
||||
block = false;
|
||||
elem = elem.Parent;
|
||||
}
|
||||
@@ -250,5 +250,5 @@ namespace SabreTools.Helper
|
||||
|
||||
return output;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace SabreTools.Helper
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
{
|
||||
_log.WriteLine("Logging ended " + DateTime.Now);
|
||||
_log.Close();
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace SabreTools.Helper
|
||||
{
|
||||
RemappingHelper(remapping);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a remapping from XML
|
||||
|
||||
Reference in New Issue
Block a user