From 2bf2fe9b8046e40e17e2a2b14e7c9dd9dfd954ef Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Thu, 28 Apr 2016 17:18:31 -0700 Subject: [PATCH] Remove commented code --- SabreHelper/Output.cs | 99 ------------------------------------------- 1 file changed, 99 deletions(-) diff --git a/SabreHelper/Output.cs b/SabreHelper/Output.cs index 0fe741ce..57bbbd0b 100644 --- a/SabreHelper/Output.cs +++ b/SabreHelper/Output.cs @@ -184,105 +184,6 @@ namespace SabreTools.Helper // Now write out to file return WriteToDat(name, description, version, date, category, author, forceunpack, old, outDir, sortable, logger); - - /* - // (currently uses current time, change to "last updated time") - logger.Log("Opening file for writing: " + outDir + description + (old ? ".dat" : ".xml")); - - try - { - FileStream fs = File.Create(outDir + description + (old ? ".dat" : ".xml")); - StreamWriter sw = new StreamWriter(fs, Encoding.UTF8); - - string header_old = "clrmamepro (\n" + - "\tname \"" + HttpUtility.HtmlEncode(name) + "\"\n" + - "\tdescription \"" + HttpUtility.HtmlEncode(description) + "\"\n" + - "\tcategory \"" + HttpUtility.HtmlEncode(category) + "\"\n" + - "\tversion \"" + HttpUtility.HtmlEncode(version) + "\"\n" + - "\tdate \"" + HttpUtility.HtmlEncode(date) + "\"\n" + - "\tauthor \"" + HttpUtility.HtmlEncode(author) + "\"\n" + - (forceunpack ? "\tforcezipping no\n" : "") + - ")\n"; - - string header = "\n" + - "\n\n" + - "\t\n" + - "\t\t
\n" + - "\t\t\t" + HttpUtility.HtmlEncode(name) + "\n" + - "\t\t\t" + HttpUtility.HtmlEncode(description) + "\n" + - "\t\t\t" + HttpUtility.HtmlEncode(category) + "\n" + - "\t\t\t" + HttpUtility.HtmlEncode(version) + "\n" + - "\t\t\t" + HttpUtility.HtmlEncode(date) + "\n" + - "\t\t\t" + HttpUtility.HtmlEncode(author) + "\n" + - (forceunpack ? "\t\t\t\n" : "") + - "\t\t
\n"; - - // Write the header out - sw.Write((old ? header_old : header)); - - // Write out each of the machines and roms - string lastgame = ""; - foreach (string key in dict.Keys) - { - foreach (RomData value in dict[key]) - { - string state = ""; - if (lastgame != "" && lastgame != value.Game) - { - state += (old ? ")\n" : "\t\n"); - } - - if (lastgame != value.Game) - { - state += (old ? "game (\n\tname \"" + value.Game + "\"\n" + - "\tdescription \"" + value.Game + "\"\n" : - "\t\n" + - "\t\t" + HttpUtility.HtmlEncode(value.Game) + "\n"); - } - - if (old) - { - state += "\t" + value.Type + " ( name \"" + value.Name + "\"" + - (value.Size != 0 ? " size " + value.Size : "") + - (value.CRC != "" ? " crc " + value.CRC.ToLowerInvariant() : "") + - (value.MD5 != "" ? " md5 " + value.MD5.ToLowerInvariant() : "") + - (value.SHA1 != "" ? " sha1 " + value.SHA1.ToLowerInvariant() : "") + - " )\n"; - } - else - { - state += "\t\t<" + value.Type + " name=\"" + HttpUtility.HtmlEncode(value.Name) + "\"" + - (value.Size != -1 ? " size=\"" + value.Size + "\"" : "") + - (value.CRC != "" ? " crc=\"" + value.CRC.ToLowerInvariant() + "\"" : "") + - (value.MD5 != "" ? " md5=\"" + value.MD5.ToLowerInvariant() + "\"" : "") + - (value.SHA1 != "" ? " sha1=\"" + value.SHA1.ToLowerInvariant() + "\"" : "") + - "/>\n"; - } - - lastgame = value.Game; - sw.Write(state); - - // If we're in merged mode, only write the first file in each list - if (merge) - { - break; - } - } - } - - sw.Write((old ? ")" : "\t\n
")); - logger.Log("File written!" + Environment.NewLine); - sw.Close(); - fs.Close(); - } - catch (Exception ex) - { - logger.Error(ex.ToString()); - return false; - } - - return true; - */ } ///