diff --git a/SabreTools.Library/DatFiles/DatFile.DFD.cs b/SabreTools.Library/DatFiles/DatFile.DFD.cs index a164a969..c658f41f 100644 --- a/SabreTools.Library/DatFiles/DatFile.DFD.cs +++ b/SabreTools.Library/DatFiles/DatFile.DFD.cs @@ -404,7 +404,7 @@ namespace SabreTools.Library.DatFiles // Update rom information datItem.Name = romname; datItem.MachineName = gamename; - datItem.Description = gamename; + datItem.MachineDescription = gamename; // Add the file information to the DAT Add(key, datItem); diff --git a/SabreTools.Library/DatFiles/DatFile.Manipulate.cs b/SabreTools.Library/DatFiles/DatFile.Manipulate.cs index b3249dfc..f907df5e 100644 --- a/SabreTools.Library/DatFiles/DatFile.Manipulate.cs +++ b/SabreTools.Library/DatFiles/DatFile.Manipulate.cs @@ -255,7 +255,7 @@ namespace SabreTools.Library.DatFiles // If the key mapping doesn't exist, add it if (!mapping.ContainsKey(item.MachineName)) { - mapping.TryAdd(item.MachineName, item.Description.Replace('/', '_').Replace("\"", "''")); + mapping.TryAdd(item.MachineName, item.MachineDescription.Replace('/', '_').Replace("\"", "''")); } } }); @@ -826,7 +826,7 @@ namespace SabreTools.Library.DatFiles } // Otherwise, move the items from the current game to a subfolder of the parent game - DatItem copyFrom = this[parent].Count == 0 ? new Rom { MachineName = parent, Description = parent } : this[parent][0]; + DatItem copyFrom = this[parent].Count == 0 ? new Rom { MachineName = parent, MachineDescription = parent } : this[parent][0]; List items = this[game]; foreach (DatItem item in items) { diff --git a/SabreTools.Library/DatFiles/DatFile.Parsers.cs b/SabreTools.Library/DatFiles/DatFile.Parsers.cs index ba77c7be..ee013700 100644 --- a/SabreTools.Library/DatFiles/DatFile.Parsers.cs +++ b/SabreTools.Library/DatFiles/DatFile.Parsers.cs @@ -264,7 +264,7 @@ namespace SabreTools.Library.DatFiles ItemStatus = ItemStatus.None, MachineName = gameinfo[0], - Description = gameinfo[1], + MachineDescription = gameinfo[1], CloneOf = gameinfo[3], Year = gameinfo[4], Manufacturer = gameinfo[5], @@ -380,7 +380,7 @@ namespace SabreTools.Library.DatFiles // Then populate it with information item.MachineName = tempgamename; - item.Description = gamedesc; + item.MachineDescription = gamedesc; item.CloneOf = cloneof; item.RomOf = romof; item.SampleOf = sampleof; @@ -1283,7 +1283,7 @@ namespace SabreTools.Library.DatFiles ItemStatus = ItemStatus.None, MachineName = rominfo[3], - Description = rominfo[4], + MachineDescription = rominfo[4], CloneOf = rominfo[1], RomOf = rominfo[8], @@ -1550,7 +1550,7 @@ namespace SabreTools.Library.DatFiles Name = name, MachineName = machineName, - Description = machineDesc, + MachineDescription = machineDesc, }; ParseAddHelper(archive, clean, remUnicode); @@ -1577,7 +1577,7 @@ namespace SabreTools.Library.DatFiles SHA512 = sha512, MachineName = machineName, - Description = machineDesc, + MachineDescription = machineDesc, ItemStatus = status, }; @@ -1590,7 +1590,7 @@ namespace SabreTools.Library.DatFiles Name = name, MachineName = machineName, - Description = machineDesc, + MachineDescription = machineDesc, }; ParseAddHelper(release, clean, remUnicode); @@ -1608,7 +1608,7 @@ namespace SabreTools.Library.DatFiles SHA512 = sha512, MachineName = machineName, - Description = machineDesc, + MachineDescription = machineDesc, ItemStatus = status, }; @@ -1621,7 +1621,7 @@ namespace SabreTools.Library.DatFiles Name = name, MachineName = machineName, - Description = machineDesc, + MachineDescription = machineDesc, }; ParseAddHelper(sample, clean, remUnicode); @@ -2796,7 +2796,7 @@ namespace SabreTools.Library.DatFiles { item.Name = Style.RemoveUnicodeCharacters(item.Name); item.MachineName = Style.RemoveUnicodeCharacters(item.MachineName); - item.Description = Style.RemoveUnicodeCharacters(item.Description); + item.MachineDescription = Style.RemoveUnicodeCharacters(item.MachineDescription); } // If we have a Rom or a Disk, clean the hash data diff --git a/SabreTools.Library/DatFiles/DatFile.Rebuild.cs b/SabreTools.Library/DatFiles/DatFile.Rebuild.cs index 99baf66c..5da16f3e 100644 --- a/SabreTools.Library/DatFiles/DatFile.Rebuild.cs +++ b/SabreTools.Library/DatFiles/DatFile.Rebuild.cs @@ -642,13 +642,13 @@ namespace SabreTools.Library.DatFiles // Get the item from the current file Rom item = FileTools.GetStreamInfo(fileStream, fileStream.Length, keepReadOpen: true); item.MachineName = Style.GetFileNameWithoutExtension(item.Name); - item.Description = Style.GetFileNameWithoutExtension(item.Name); + item.MachineDescription = Style.GetFileNameWithoutExtension(item.Name); // If we are coming from an archive, set the correct machine name if (machinename != null) { item.MachineName = machinename; - item.Description = machinename; + item.MachineDescription = machinename; } Globals.Logger.User("No matches found for '{0}', rebuilding accordingly from inverse flag...", Style.GetFileName(rom.Name)); diff --git a/SabreTools.Library/DatFiles/DatFile.Splitters.cs b/SabreTools.Library/DatFiles/DatFile.Splitters.cs index 41bfb608..e82af787 100644 --- a/SabreTools.Library/DatFiles/DatFile.Splitters.cs +++ b/SabreTools.Library/DatFiles/DatFile.Splitters.cs @@ -437,7 +437,7 @@ namespace SabreTools.Library.DatFiles // Clean the input list and set all games to be pathless List items = this[key]; items.ForEach(item => item.MachineName = Style.GetFileName(item.MachineName)); - items.ForEach(item => item.Description = Style.GetFileName(item.Description)); + items.ForEach(item => item.MachineDescription = Style.GetFileName(item.MachineDescription)); // Now add the game to the output DAT tempDat.AddRange(key, items); diff --git a/SabreTools.Library/DatFiles/DatFile.Writers.cs b/SabreTools.Library/DatFiles/DatFile.Writers.cs index 4b386c1a..1d00b8b8 100644 --- a/SabreTools.Library/DatFiles/DatFile.Writers.cs +++ b/SabreTools.Library/DatFiles/DatFile.Writers.cs @@ -487,7 +487,7 @@ namespace SabreTools.Library.DatFiles { case DatFormat.AttractMode: state += rom.MachineName + ";" - + rom.Description + ";" + + rom.MachineDescription + ";" + FileName + ";" + rom.CloneOf + ";" + rom.Year + ";" @@ -511,7 +511,7 @@ namespace SabreTools.Library.DatFiles (String.IsNullOrEmpty(rom.CloneOf) ? "" : "\tcloneof \"" + rom.CloneOf + "\"\n") + (String.IsNullOrEmpty(rom.SampleOf) ? "" : "\tsampleof \"" + rom.SampleOf + "\"\n") ) + - "\tdescription \"" + (String.IsNullOrEmpty(rom.Description) ? rom.MachineName : rom.Description) + "\"\n" + + "\tdescription \"" + (String.IsNullOrEmpty(rom.MachineDescription) ? rom.MachineName : rom.MachineDescription) + "\"\n" + (String.IsNullOrEmpty(rom.Year) ? "" : "\tyear " + rom.Year + "\n") + (String.IsNullOrEmpty(rom.Manufacturer) ? "" : "\tmanufacturer \"" + rom.Manufacturer + "\"\n"); break; @@ -541,7 +541,7 @@ namespace SabreTools.Library.DatFiles ) + ">\n" + (String.IsNullOrEmpty(rom.Comment) ? "" : "\t\t" + HttpUtility.HtmlEncode(rom.Comment) + "\n") + - "\t\t" + HttpUtility.HtmlEncode((String.IsNullOrEmpty(rom.Description) ? rom.MachineName : rom.Description)) + "\n" + + "\t\t" + HttpUtility.HtmlEncode((String.IsNullOrEmpty(rom.MachineDescription) ? rom.MachineName : rom.MachineDescription)) + "\n" + (String.IsNullOrEmpty(rom.Year) ? "" : "\t\t" + HttpUtility.HtmlEncode(rom.Year) + "\n") + (String.IsNullOrEmpty(rom.Manufacturer) ? "" : "\t\t" + HttpUtility.HtmlEncode(rom.Manufacturer) + "\n"); break; @@ -571,7 +571,7 @@ namespace SabreTools.Library.DatFiles ? "" : " sampleof=\"" + HttpUtility.HtmlEncode(rom.SampleOf) + "\"") ) + ">\n" - + "\t\t" + HttpUtility.HtmlEncode(rom.Description) + "\n" + + "\t\t" + HttpUtility.HtmlEncode(rom.MachineDescription) + "\n" + (rom.Year != null ? "\t\t" + HttpUtility.HtmlEncode(rom.Year) + "\n" : "") + (rom.Publisher != null ? "\t\t" + HttpUtility.HtmlEncode(rom.Publisher) + "\n" : ""); @@ -839,7 +839,7 @@ namespace SabreTools.Library.DatFiles + ",\"" + Name + "\"" + ",\"" + Description + "\"" + ",\"" + rom.MachineName + "\"" - + ",\"" + rom.Description + "\"" + + ",\"" + rom.MachineDescription + "\"" + "," + "\"rom\"" + ",\"" + rom.Name + "\"" + "," + "\"\"" @@ -859,7 +859,7 @@ namespace SabreTools.Library.DatFiles + ",\"" + Name + "\"" + ",\"" + Description + "\"" + ",\"" + rom.MachineName + "\"" - + ",\"" + rom.Description + "\"" + + ",\"" + rom.MachineDescription + "\"" + "," + "\"disk\"" + "," + "\"\"" + ",\"" + rom.Name + "\"" @@ -1291,7 +1291,7 @@ namespace SabreTools.Library.DatFiles state += "¬" + (String.IsNullOrEmpty(rom.CloneOf) ? "" : HttpUtility.HtmlEncode(rom.CloneOf)) + "¬" + (String.IsNullOrEmpty(rom.CloneOf) ? "" : HttpUtility.HtmlEncode(rom.CloneOf)) + "¬" + HttpUtility.HtmlEncode(rom.MachineName) + - "¬" + HttpUtility.HtmlEncode((String.IsNullOrEmpty(rom.Description) ? rom.MachineName : rom.Description)) + + "¬" + HttpUtility.HtmlEncode((String.IsNullOrEmpty(rom.MachineDescription) ? rom.MachineName : rom.MachineDescription)) + "¬" + HttpUtility.HtmlEncode(rom.Name) + "¬" + ((Rom)rom).CRC.ToLowerInvariant() + "¬" + (((Rom)rom).Size != -1 ? ((Rom)rom).Size.ToString() : "") + "¬¬¬\n"; @@ -1301,7 +1301,7 @@ namespace SabreTools.Library.DatFiles state += "¬" + (String.IsNullOrEmpty(rom.CloneOf) ? "" : HttpUtility.HtmlEncode(rom.CloneOf)) + "¬" + (String.IsNullOrEmpty(rom.CloneOf) ? "" : HttpUtility.HtmlEncode(rom.CloneOf)) + "¬" + HttpUtility.HtmlEncode(rom.MachineName) + - "¬" + HttpUtility.HtmlEncode((String.IsNullOrEmpty(rom.Description) ? rom.MachineName : rom.Description)) + + "¬" + HttpUtility.HtmlEncode((String.IsNullOrEmpty(rom.MachineDescription) ? rom.MachineName : rom.MachineDescription)) + "¬" + HttpUtility.HtmlEncode(rom.Name) + "¬¬¬¬¬\n"; } @@ -1543,7 +1543,7 @@ namespace SabreTools.Library.DatFiles + "\t\"" + Name + "\"" + "\t\"" + Description + "\"" + "\t\"" + rom.MachineName + "\"" - + "\t\"" + rom.Description + "\"" + + "\t\"" + rom.MachineDescription + "\"" + "\t" + "\"rom\"" + "\t\"" + rom.Name + "\"" + "\t" + "\"\"" @@ -1563,7 +1563,7 @@ namespace SabreTools.Library.DatFiles + "\t\"" + Name + "\"" + "\t\"" + Description + "\"" + "\t\"" + rom.MachineName + "\"" - + "\t\"" + rom.Description + "\"" + + "\t\"" + rom.MachineDescription + "\"" + "\t" + "\"disk\"" + "\t" + "\"\"" + "\t\"" + rom.Name + "\"" diff --git a/SabreTools.Library/Items/BiosSet.cs b/SabreTools.Library/Items/BiosSet.cs index c404f2fb..a4a0d795 100644 --- a/SabreTools.Library/Items/BiosSet.cs +++ b/SabreTools.Library/Items/BiosSet.cs @@ -1,5 +1,4 @@ -using System; -using SabreTools.Library.Data; +using SabreTools.Library.Data; namespace SabreTools.Library.Items { diff --git a/SabreTools.Library/Items/DatItem.cs b/SabreTools.Library/Items/DatItem.cs index 1b9d18e3..883a2883 100644 --- a/SabreTools.Library/Items/DatItem.cs +++ b/SabreTools.Library/Items/DatItem.cs @@ -112,7 +112,7 @@ namespace SabreTools.Library.Items _machine.Comment = value; } } - public string Description + public string MachineDescription { get {