From 6013a3d36f13171f9bd96ed5bc7f854728768f2a Mon Sep 17 00:00:00 2001 From: TheShadowEevee Date: Mon, 21 Mar 2022 23:15:09 -0500 Subject: [PATCH] Run VS Code Cleanup, update .gitignore --- .gitignore | 4 +--- Sharpii/BNS.cs | 2 +- Sharpii/EXT.cs | 5 +---- Sharpii/HBC.cs | 10 +++++----- Sharpii/IOS.cs | 22 +++++++++++----------- Sharpii/NUSD.cs | 29 ++++++++++++++++++----------- Sharpii/Program.cs | 2 +- Sharpii/TPL.cs | 4 ++-- Sharpii/U8.cs | 8 ++++---- Sharpii/WAD.cs | 12 ++++++------ 10 files changed, 50 insertions(+), 48 deletions(-) diff --git a/.gitignore b/.gitignore index 25b7f53..3ab30b4 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,4 @@ /.vs /bin -/obj -/Sharpii/obj/x86 -/WadInstaller/obj/Debug +/obj \ No newline at end of file diff --git a/Sharpii/BNS.cs b/Sharpii/BNS.cs index 69c499a..93d2274 100644 --- a/Sharpii/BNS.cs +++ b/Sharpii/BNS.cs @@ -16,9 +16,9 @@ * along with Sharpii. If not, see . */ +using libWiiSharp; using System; using System.IO; -using libWiiSharp; namespace Sharpii { diff --git a/Sharpii/EXT.cs b/Sharpii/EXT.cs index e315c67..29467ee 100644 --- a/Sharpii/EXT.cs +++ b/Sharpii/EXT.cs @@ -17,9 +17,6 @@ */ using System; -using System.IO; -using System.Numerics; -using libWiiSharp; namespace Sharpii { @@ -59,7 +56,7 @@ namespace Sharpii Console.WriteLine(""); ErrCodeFound = 1; } - + if (args[1] == "16003") { Console.WriteLine(""); diff --git a/Sharpii/HBC.cs b/Sharpii/HBC.cs index 92285ea..ab3d9e7 100644 --- a/Sharpii/HBC.cs +++ b/Sharpii/HBC.cs @@ -16,9 +16,9 @@ * along with Sharpii. If not, see . */ +using libWiiSharp; using System; using System.IO; -using libWiiSharp; namespace Sharpii { @@ -151,7 +151,7 @@ namespace Sharpii } if (noip == true && BeQuiet.quiet > 2) Console.WriteLine("No IP set, using {0}", ip); - + libWiiSharp.Protocol proto = Protocol.JODI; if (BeQuiet.quiet > 2 && protocol == "HAXX") @@ -164,16 +164,16 @@ namespace Sharpii Console.Write("Loading File..."); HbcTransmitter file = new HbcTransmitter(proto, ip); - + if (BeQuiet.quiet > 2) Console.Write("Done!\n"); if (BeQuiet.quiet > 2 && compress == true) Console.Write("Compressing File..."); - + file.Compress = compress; - + if (BeQuiet.quiet > 2 && compress == true) Console.Write("Done!\n"); diff --git a/Sharpii/IOS.cs b/Sharpii/IOS.cs index 7b75b5c..87e2723 100644 --- a/Sharpii/IOS.cs +++ b/Sharpii/IOS.cs @@ -16,9 +16,9 @@ * along with Sharpii. If not, see . */ +using libWiiSharp; using System; using System.IO; -using libWiiSharp; namespace Sharpii { @@ -90,7 +90,7 @@ namespace Sharpii return; } if (!int.TryParse(args[i + 1], out slot)) - { + { Console.WriteLine("Invalid slot {0}...", args[i + 1]); Console.WriteLine("Error: SHARPII_NET_CORE_IOS_INVALID_SLOT"); if (OperatingSystem.Windows()) @@ -101,10 +101,10 @@ namespace Sharpii { Environment.Exit(0x0000000C); } - return; + return; } if (slot < 3 || slot > 255) - { + { Console.WriteLine("Invalid slot {0}...", slot); Console.WriteLine("Error: SHARPII_NET_CORE_IOS_INVALID_SLOT"); if (OperatingSystem.Windows()) @@ -115,7 +115,7 @@ namespace Sharpii { Environment.Exit(0x0000000C); } - return; + return; } break; case "-S": @@ -178,7 +178,7 @@ namespace Sharpii return; } if (!int.TryParse(args[i + 1], out version)) - { + { Console.WriteLine("Invalid version {0}...", args[i + 1]); Console.WriteLine("Error: SHARPII_NET_CORE_IOS_INVALID_VERSION"); if (OperatingSystem.Windows()) @@ -189,10 +189,10 @@ namespace Sharpii { Environment.Exit(0x0000000E); } - return; + return; } if (version < 0 || version > 65535) - { + { Console.WriteLine("Invalid version {0}...", version); Console.WriteLine("Error: SHARPII_NET_CORE_IOS_INVALID_VERSION"); if (OperatingSystem.Windows()) @@ -203,7 +203,7 @@ namespace Sharpii { Environment.Exit(0x0000000E); } - return; + return; } break; case "-O": @@ -236,9 +236,9 @@ namespace Sharpii if (BeQuiet.quiet > 2) Console.Write("Loading File..."); - + ios.LoadFile(input); - + if (BeQuiet.quiet > 2) Console.Write("Done!\n"); diff --git a/Sharpii/NUSD.cs b/Sharpii/NUSD.cs index 41316ff..e4912c9 100644 --- a/Sharpii/NUSD.cs +++ b/Sharpii/NUSD.cs @@ -16,10 +16,10 @@ * along with Sharpii. If not, see . */ -using System; -using System.IO; -using System.Collections.Generic; using libWiiSharp; +using System; +using System.Collections.Generic; +using System.IO; namespace Sharpii { @@ -389,7 +389,7 @@ namespace Sharpii { wad = true; if (Directory.Exists(temp) == true) - DeleteADir.DeleteDirectory(temp); + DeleteADir.DeleteDirectory(temp); Directory.CreateDirectory(temp); } @@ -413,7 +413,7 @@ namespace Sharpii Console.WriteLine("Using local files if present..."); nus.UseLocalFiles = true; } - + if (ContinueWithoutTicket == true) { if (BeQuiet.quiet > 2) @@ -426,9 +426,12 @@ namespace Sharpii if (BeQuiet.quiet > 1) Console.Write("Downloading content..."); - if (url != "") { + if (url != "") + { nus.DownloadSingleContent(id, version, content, output, url); - } else { + } + else + { nus.DownloadSingleContent(id, version, content, output); } @@ -441,16 +444,20 @@ namespace Sharpii Console.Write("Downloading title...\n"); string realout = output; - if (wad == true) { + if (wad == true) + { output = temp; } - if (url != "") { + if (url != "") + { nus.DownloadTitle(id, version, output, url, store.ToArray()); - } else { + } + else + { nus.DownloadTitle(id, version, output, store.ToArray()); } - + WadIosNamingStuff(wad, temp, id, version, ios, NoOut, output, realout); diff --git a/Sharpii/Program.cs b/Sharpii/Program.cs index 750de8e..ea1f6bf 100644 --- a/Sharpii/Program.cs +++ b/Sharpii/Program.cs @@ -177,8 +177,8 @@ namespace Sharpii Console.WriteLine(""); } - } } +} public class DeleteADir { public static bool DeleteDirectory(string target_dir) diff --git a/Sharpii/TPL.cs b/Sharpii/TPL.cs index 5239b7f..84a0efd 100644 --- a/Sharpii/TPL.cs +++ b/Sharpii/TPL.cs @@ -16,9 +16,9 @@ * along with Sharpii. If not, see . */ +using libWiiSharp; using System; using System.IO; -using libWiiSharp; namespace Sharpii { @@ -42,7 +42,7 @@ namespace Sharpii //********************* From TPL ********************* if (args[1] == "-from") { - From(args); + From(args); return; } diff --git a/Sharpii/U8.cs b/Sharpii/U8.cs index d839c1e..278f6dd 100644 --- a/Sharpii/U8.cs +++ b/Sharpii/U8.cs @@ -16,9 +16,9 @@ * along with Sharpii. If not, see . */ +using libWiiSharp; using System; using System.IO; -using libWiiSharp; namespace Sharpii { @@ -89,7 +89,7 @@ namespace Sharpii } return; } - + //Run main part, and check for exceptions try { @@ -208,7 +208,7 @@ namespace Sharpii try { U8 U8folder = new U8(); - + if (BeQuiet.quiet > 2) Console.Write("Loading folder..."); @@ -243,7 +243,7 @@ namespace Sharpii Console.WriteLine("Saving file"); U8folder.Save(output); - + if (BeQuiet.quiet > 1) Console.WriteLine("Operation completed succesfully!"); } diff --git a/Sharpii/WAD.cs b/Sharpii/WAD.cs index f8a8bef..1b8b1c3 100644 --- a/Sharpii/WAD.cs +++ b/Sharpii/WAD.cs @@ -16,9 +16,9 @@ * along with Sharpii. If not, see . */ +using libWiiSharp; using System; using System.IO; -using libWiiSharp; namespace Sharpii { @@ -32,7 +32,7 @@ namespace Sharpii WAD_help(); return; } - + //********************* PACK ********************* if (args[1] == "-p") { @@ -68,7 +68,7 @@ namespace Sharpii return; } - Editor(args, true); + Editor(args, true); return; } @@ -205,7 +205,7 @@ namespace Sharpii if (output.Substring(output.Length - 4, 4).ToUpper() != ".TXT") output += ".txt"; - + TextWriter txt = new StreamWriter(output); txt.WriteLine("WAD Info:"); txt.WriteLine(""); @@ -230,7 +230,7 @@ namespace Sharpii txt.WriteLine("Version: {0}", wad.TitleVersion); txt.WriteLine("Blocks: {0}", wad.NandBlocks); txt.Close(); - + if (BeQuiet.quiet > 2) Console.Write("Done!\n"); @@ -764,7 +764,7 @@ namespace Sharpii { Environment.Exit(0x00000004); } - } + } } }