Run VS Code Cleanup, update .gitignore

This commit is contained in:
Michael 2022-03-21 23:15:09 -05:00
parent 40fd02af08
commit 6013a3d36f
Signed by: TheShadowEevee
GPG key ID: 7A8AA92B3BAFAB75
10 changed files with 50 additions and 48 deletions

4
.gitignore vendored
View file

@ -4,6 +4,4 @@
/.vs /.vs
/bin /bin
/obj /obj
/Sharpii/obj/x86
/WadInstaller/obj/Debug

View file

@ -16,9 +16,9 @@
* along with Sharpii. If not, see <http://www.gnu.org/licenses/>. * along with Sharpii. If not, see <http://www.gnu.org/licenses/>.
*/ */
using libWiiSharp;
using System; using System;
using System.IO; using System.IO;
using libWiiSharp;
namespace Sharpii namespace Sharpii
{ {

View file

@ -17,9 +17,6 @@
*/ */
using System; using System;
using System.IO;
using System.Numerics;
using libWiiSharp;
namespace Sharpii namespace Sharpii
{ {
@ -59,7 +56,7 @@ namespace Sharpii
Console.WriteLine(""); Console.WriteLine("");
ErrCodeFound = 1; ErrCodeFound = 1;
} }
if (args[1] == "16003") if (args[1] == "16003")
{ {
Console.WriteLine(""); Console.WriteLine("");

View file

@ -16,9 +16,9 @@
* along with Sharpii. If not, see <http://www.gnu.org/licenses/>. * along with Sharpii. If not, see <http://www.gnu.org/licenses/>.
*/ */
using libWiiSharp;
using System; using System;
using System.IO; using System.IO;
using libWiiSharp;
namespace Sharpii namespace Sharpii
{ {
@ -151,7 +151,7 @@ namespace Sharpii
} }
if (noip == true && BeQuiet.quiet > 2) if (noip == true && BeQuiet.quiet > 2)
Console.WriteLine("No IP set, using {0}", ip); Console.WriteLine("No IP set, using {0}", ip);
libWiiSharp.Protocol proto = Protocol.JODI; libWiiSharp.Protocol proto = Protocol.JODI;
if (BeQuiet.quiet > 2 && protocol == "HAXX") if (BeQuiet.quiet > 2 && protocol == "HAXX")
@ -164,16 +164,16 @@ namespace Sharpii
Console.Write("Loading File..."); Console.Write("Loading File...");
HbcTransmitter file = new HbcTransmitter(proto, ip); HbcTransmitter file = new HbcTransmitter(proto, ip);
if (BeQuiet.quiet > 2) if (BeQuiet.quiet > 2)
Console.Write("Done!\n"); Console.Write("Done!\n");
if (BeQuiet.quiet > 2 && compress == true) if (BeQuiet.quiet > 2 && compress == true)
Console.Write("Compressing File..."); Console.Write("Compressing File...");
file.Compress = compress; file.Compress = compress;
if (BeQuiet.quiet > 2 && compress == true) if (BeQuiet.quiet > 2 && compress == true)
Console.Write("Done!\n"); Console.Write("Done!\n");

View file

@ -16,9 +16,9 @@
* along with Sharpii. If not, see <http://www.gnu.org/licenses/>. * along with Sharpii. If not, see <http://www.gnu.org/licenses/>.
*/ */
using libWiiSharp;
using System; using System;
using System.IO; using System.IO;
using libWiiSharp;
namespace Sharpii namespace Sharpii
{ {
@ -90,7 +90,7 @@ namespace Sharpii
return; return;
} }
if (!int.TryParse(args[i + 1], out slot)) if (!int.TryParse(args[i + 1], out slot))
{ {
Console.WriteLine("Invalid slot {0}...", args[i + 1]); Console.WriteLine("Invalid slot {0}...", args[i + 1]);
Console.WriteLine("Error: SHARPII_NET_CORE_IOS_INVALID_SLOT"); Console.WriteLine("Error: SHARPII_NET_CORE_IOS_INVALID_SLOT");
if (OperatingSystem.Windows()) if (OperatingSystem.Windows())
@ -101,10 +101,10 @@ namespace Sharpii
{ {
Environment.Exit(0x0000000C); Environment.Exit(0x0000000C);
} }
return; return;
} }
if (slot < 3 || slot > 255) if (slot < 3 || slot > 255)
{ {
Console.WriteLine("Invalid slot {0}...", slot); Console.WriteLine("Invalid slot {0}...", slot);
Console.WriteLine("Error: SHARPII_NET_CORE_IOS_INVALID_SLOT"); Console.WriteLine("Error: SHARPII_NET_CORE_IOS_INVALID_SLOT");
if (OperatingSystem.Windows()) if (OperatingSystem.Windows())
@ -115,7 +115,7 @@ namespace Sharpii
{ {
Environment.Exit(0x0000000C); Environment.Exit(0x0000000C);
} }
return; return;
} }
break; break;
case "-S": case "-S":
@ -178,7 +178,7 @@ namespace Sharpii
return; return;
} }
if (!int.TryParse(args[i + 1], out version)) if (!int.TryParse(args[i + 1], out version))
{ {
Console.WriteLine("Invalid version {0}...", args[i + 1]); Console.WriteLine("Invalid version {0}...", args[i + 1]);
Console.WriteLine("Error: SHARPII_NET_CORE_IOS_INVALID_VERSION"); Console.WriteLine("Error: SHARPII_NET_CORE_IOS_INVALID_VERSION");
if (OperatingSystem.Windows()) if (OperatingSystem.Windows())
@ -189,10 +189,10 @@ namespace Sharpii
{ {
Environment.Exit(0x0000000E); Environment.Exit(0x0000000E);
} }
return; return;
} }
if (version < 0 || version > 65535) if (version < 0 || version > 65535)
{ {
Console.WriteLine("Invalid version {0}...", version); Console.WriteLine("Invalid version {0}...", version);
Console.WriteLine("Error: SHARPII_NET_CORE_IOS_INVALID_VERSION"); Console.WriteLine("Error: SHARPII_NET_CORE_IOS_INVALID_VERSION");
if (OperatingSystem.Windows()) if (OperatingSystem.Windows())
@ -203,7 +203,7 @@ namespace Sharpii
{ {
Environment.Exit(0x0000000E); Environment.Exit(0x0000000E);
} }
return; return;
} }
break; break;
case "-O": case "-O":
@ -236,9 +236,9 @@ namespace Sharpii
if (BeQuiet.quiet > 2) if (BeQuiet.quiet > 2)
Console.Write("Loading File..."); Console.Write("Loading File...");
ios.LoadFile(input); ios.LoadFile(input);
if (BeQuiet.quiet > 2) if (BeQuiet.quiet > 2)
Console.Write("Done!\n"); Console.Write("Done!\n");

View file

@ -16,10 +16,10 @@
* along with Sharpii. If not, see <http://www.gnu.org/licenses/>. * along with Sharpii. If not, see <http://www.gnu.org/licenses/>.
*/ */
using System;
using System.IO;
using System.Collections.Generic;
using libWiiSharp; using libWiiSharp;
using System;
using System.Collections.Generic;
using System.IO;
namespace Sharpii namespace Sharpii
{ {
@ -389,7 +389,7 @@ namespace Sharpii
{ {
wad = true; wad = true;
if (Directory.Exists(temp) == true) if (Directory.Exists(temp) == true)
DeleteADir.DeleteDirectory(temp); DeleteADir.DeleteDirectory(temp);
Directory.CreateDirectory(temp); Directory.CreateDirectory(temp);
} }
@ -413,7 +413,7 @@ namespace Sharpii
Console.WriteLine("Using local files if present..."); Console.WriteLine("Using local files if present...");
nus.UseLocalFiles = true; nus.UseLocalFiles = true;
} }
if (ContinueWithoutTicket == true) if (ContinueWithoutTicket == true)
{ {
if (BeQuiet.quiet > 2) if (BeQuiet.quiet > 2)
@ -426,9 +426,12 @@ namespace Sharpii
if (BeQuiet.quiet > 1) if (BeQuiet.quiet > 1)
Console.Write("Downloading content..."); Console.Write("Downloading content...");
if (url != "") { if (url != "")
{
nus.DownloadSingleContent(id, version, content, output, url); nus.DownloadSingleContent(id, version, content, output, url);
} else { }
else
{
nus.DownloadSingleContent(id, version, content, output); nus.DownloadSingleContent(id, version, content, output);
} }
@ -441,16 +444,20 @@ namespace Sharpii
Console.Write("Downloading title...\n"); Console.Write("Downloading title...\n");
string realout = output; string realout = output;
if (wad == true) { if (wad == true)
{
output = temp; output = temp;
} }
if (url != "") { if (url != "")
{
nus.DownloadTitle(id, version, output, url, store.ToArray()); nus.DownloadTitle(id, version, output, url, store.ToArray());
} else { }
else
{
nus.DownloadTitle(id, version, output, store.ToArray()); nus.DownloadTitle(id, version, output, store.ToArray());
} }
WadIosNamingStuff(wad, temp, id, version, ios, NoOut, output, realout); WadIosNamingStuff(wad, temp, id, version, ios, NoOut, output, realout);

View file

@ -177,8 +177,8 @@ namespace Sharpii
Console.WriteLine(""); Console.WriteLine("");
} }
}
} }
}
public class DeleteADir public class DeleteADir
{ {
public static bool DeleteDirectory(string target_dir) public static bool DeleteDirectory(string target_dir)

View file

@ -16,9 +16,9 @@
* along with Sharpii. If not, see <http://www.gnu.org/licenses/>. * along with Sharpii. If not, see <http://www.gnu.org/licenses/>.
*/ */
using libWiiSharp;
using System; using System;
using System.IO; using System.IO;
using libWiiSharp;
namespace Sharpii namespace Sharpii
{ {
@ -42,7 +42,7 @@ namespace Sharpii
//********************* From TPL ********************* //********************* From TPL *********************
if (args[1] == "-from") if (args[1] == "-from")
{ {
From(args); From(args);
return; return;
} }

View file

@ -16,9 +16,9 @@
* along with Sharpii. If not, see <http://www.gnu.org/licenses/>. * along with Sharpii. If not, see <http://www.gnu.org/licenses/>.
*/ */
using libWiiSharp;
using System; using System;
using System.IO; using System.IO;
using libWiiSharp;
namespace Sharpii namespace Sharpii
{ {
@ -89,7 +89,7 @@ namespace Sharpii
} }
return; return;
} }
//Run main part, and check for exceptions //Run main part, and check for exceptions
try try
{ {
@ -208,7 +208,7 @@ namespace Sharpii
try try
{ {
U8 U8folder = new U8(); U8 U8folder = new U8();
if (BeQuiet.quiet > 2) if (BeQuiet.quiet > 2)
Console.Write("Loading folder..."); Console.Write("Loading folder...");
@ -243,7 +243,7 @@ namespace Sharpii
Console.WriteLine("Saving file"); Console.WriteLine("Saving file");
U8folder.Save(output); U8folder.Save(output);
if (BeQuiet.quiet > 1) if (BeQuiet.quiet > 1)
Console.WriteLine("Operation completed succesfully!"); Console.WriteLine("Operation completed succesfully!");
} }

View file

@ -16,9 +16,9 @@
* along with Sharpii. If not, see <http://www.gnu.org/licenses/>. * along with Sharpii. If not, see <http://www.gnu.org/licenses/>.
*/ */
using libWiiSharp;
using System; using System;
using System.IO; using System.IO;
using libWiiSharp;
namespace Sharpii namespace Sharpii
{ {
@ -32,7 +32,7 @@ namespace Sharpii
WAD_help(); WAD_help();
return; return;
} }
//********************* PACK ********************* //********************* PACK *********************
if (args[1] == "-p") if (args[1] == "-p")
{ {
@ -68,7 +68,7 @@ namespace Sharpii
return; return;
} }
Editor(args, true); Editor(args, true);
return; return;
} }
@ -205,7 +205,7 @@ namespace Sharpii
if (output.Substring(output.Length - 4, 4).ToUpper() != ".TXT") if (output.Substring(output.Length - 4, 4).ToUpper() != ".TXT")
output += ".txt"; output += ".txt";
TextWriter txt = new StreamWriter(output); TextWriter txt = new StreamWriter(output);
txt.WriteLine("WAD Info:"); txt.WriteLine("WAD Info:");
txt.WriteLine(""); txt.WriteLine("");
@ -230,7 +230,7 @@ namespace Sharpii
txt.WriteLine("Version: {0}", wad.TitleVersion); txt.WriteLine("Version: {0}", wad.TitleVersion);
txt.WriteLine("Blocks: {0}", wad.NandBlocks); txt.WriteLine("Blocks: {0}", wad.NandBlocks);
txt.Close(); txt.Close();
if (BeQuiet.quiet > 2) if (BeQuiet.quiet > 2)
Console.Write("Done!\n"); Console.Write("Done!\n");
@ -764,7 +764,7 @@ namespace Sharpii
{ {
Environment.Exit(0x00000004); Environment.Exit(0x00000004);
} }
} }
} }
} }