[ALL] Update string check; add output path helper

This commit is contained in:
Matt Nadareski
2017-11-08 13:15:44 -08:00
parent bd27b486f8
commit de16014af9
23 changed files with 397 additions and 410 deletions

View File

@@ -238,7 +238,7 @@ namespace SabreTools.Library.DatFiles
{
try
{
string state = (String.IsNullOrEmpty(rom.SampleOf) ? "" : "\tsampleof \"" + rom.SampleOf + "\"\n") + ")\n";
string state = (String.IsNullOrWhiteSpace(rom.SampleOf) ? "" : "\tsampleof \"" + rom.SampleOf + "\"\n") + ")\n";
sw.Write(state);
sw.Flush();
@@ -284,8 +284,8 @@ namespace SabreTools.Library.DatFiles
case ItemType.Rom:
state += "\tfile ( name " + ((Rom)rom).Name
+ (((Rom)rom).Size != -1 ? " size " + ((Rom)rom).Size : "")
+ (!String.IsNullOrEmpty(((Rom)rom).Date) ? " date " + ((Rom)rom).Date : "")
+ (!String.IsNullOrEmpty(((Rom)rom).CRC) ? " crc " + ((Rom)rom).CRC.ToLowerInvariant() : "")
+ (!String.IsNullOrWhiteSpace(((Rom)rom).Date) ? " date " + ((Rom)rom).Date : "")
+ (!String.IsNullOrWhiteSpace(((Rom)rom).CRC) ? " crc " + ((Rom)rom).CRC.ToLowerInvariant() : "")
+ " )\n";
break;
}