mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[DATabase] Miscellaneous integration cleanups
This cleans up a lot of things left over from the original integration of DATabaseTwo into DATabase. This also includes some updates that will make importing DATs even easier and make the import process more streamlined.
This commit is contained in:
@@ -133,7 +133,7 @@ CREATE TABLE IF NOT EXISTS system (
|
||||
{
|
||||
return sslc.ExecuteNonQuery() >= 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,16 +20,16 @@
|
||||
public static string GoodXmlPattern = @"^(Good.*?)_.*\.xml";
|
||||
public static string MamePattern = @"^(.*)\.xml$";
|
||||
public static string MaybeIntroPattern = @"(.*?) \[T-En\].*\((\d{8})\)\.dat$";
|
||||
public static string NoIntroPattern = @"^(.*?) \((\d{8}-\d{6})_CM\)\.dat$";
|
||||
public static string NoIntroNumberedPattern = @"(.*? - .*?) \(\d.*?_CM\).dat";
|
||||
public static string NoIntroSpecialPattern = @"(.*? - .*?) \((\d{8})\)\.dat";
|
||||
public static string NoIntroPattern = @"^(.*?) \((\d{8}-\d{6})_CM\).*\.dat$";
|
||||
public static string NoIntroNumberedPattern = @"(.*? - .*?) \(\d.*?_CM\).*.dat";
|
||||
public static string NoIntroSpecialPattern = @"(.*? - .*?) \((\d{8})\).*\.dat";
|
||||
public static string NonGoodPattern = @"^(NonGood.*?)( .*?)?.xml";
|
||||
public static string NonGoodSpecialPattern = @"^(NonGood.*?)( .*)?.dat";
|
||||
public static string RedumpPattern = @"^(.*?) \((\d{8} \d{2}-\d{2}-\d{2})\)\.dat$";
|
||||
public static string RedumpBiosPattern = @"^(.*?) \(\d+\) \((\d{4}-\d{2}-\d{2})\)\.dat$";
|
||||
public static string TosecPattern = @"^(.*?) - .* \(TOSEC-v(\d{4}-\d{2}-\d{2})_CM\)\.dat$";
|
||||
public static string TosecSpecialPatternA = @"^(.*? - .*?) - .* \(TOSEC-v(\d{4}-\d{2}-\d{2})_CM\)\.dat$";
|
||||
public static string TosecSpecialPatternB = @"^(.*? - .*? - .*?) - .* \(TOSEC-v(\d{4}-\d{2}-\d{2})_CM\)\.dat$";
|
||||
public static string TosecPattern = @"^(.*?) - .* \(TOSEC-v(\d{4}-\d{2}-\d{2})_CM\).*\.dat$";
|
||||
public static string TosecSpecialPatternA = @"^(.*? - .*?) - .* \(TOSEC-v(\d{4}-\d{2}-\d{2})_CM\).*\.dat$";
|
||||
public static string TosecSpecialPatternB = @"^(.*? - .*? - .*?) - .* \(TOSEC-v(\d{4}-\d{2}-\d{2})_CM\).*\.dat$";
|
||||
public static string TruripPattern = @"^(.*) - .* \(trurip_XML\)\.dat$";
|
||||
public static string ZandroPattern = @"^SMW-.*.xml";
|
||||
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
{
|
||||
public interface IImport
|
||||
{
|
||||
bool ImportData();
|
||||
bool UpdateDatabase();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
<mapping from="Nintendo - Game Boy" to="Nintendo - Game Boy, Game Boy Color" />
|
||||
<mapping from="Nintendo - Game Boy Advance" to="Nintendo - Game Boy Advance" />
|
||||
<mapping from="Nintendo - Game Boy Advance (e-Cards)" to="Nintendo - Game Boy Advance" />
|
||||
<mapping from="Nintendo - Game Boy Advance MultiBoots" to="Nintendo - Game Boy Advance" />
|
||||
<mapping from="Nintendo - Game Boy Color" to="Nintendo - Game Boy, Game Boy Color" />
|
||||
<mapping from="Nintendo - New Nintendo 3DS" to="Nintendo - Nintendo 3DS, New Nintendo 3DS" />
|
||||
<mapping from="Nintendo - New Nintendo 3DS (DLC)" to="Nintendo - Nintendo 3DS, New Nintendo 3DS" />
|
||||
|
||||
@@ -218,5 +218,22 @@ namespace SabreTools.Helper
|
||||
// Return formatted number with suffix
|
||||
return readable.ToString("0.### ") + suffix;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts a string to sentence case.
|
||||
/// </summary>
|
||||
/// <param name="input">The string to convert.</param>
|
||||
/// <returns>A string representing a sentence case string</returns>
|
||||
/// <remarks>http://stackoverflow.com/questions/3141426/net-method-to-convert-a-string-to-sentence-case</remarks>
|
||||
public static string SentenceCase(string input)
|
||||
{
|
||||
if (input.Length < 1)
|
||||
{
|
||||
return input;
|
||||
}
|
||||
|
||||
string sentence = input.ToLower();
|
||||
return sentence[0].ToString().ToUpper() + sentence.Substring(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user