mirror of
https://github.com/LBPUnion/UnionPatcher.git
synced 2025-08-03 14:48:53 +00:00
Use file-scoped namespaces
This commit is contained in:
parent
a90da4e7b3
commit
bccb6749d1
9 changed files with 393 additions and 393 deletions
|
@ -2,8 +2,9 @@
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
||||||
namespace LBPUnion.UnionPatcher.Cli {
|
namespace LBPUnion.UnionPatcher.Cli;
|
||||||
public static class Program {
|
|
||||||
|
public static class Program {
|
||||||
public const string Version = "1.0";
|
public const string Version = "1.0";
|
||||||
|
|
||||||
private static string fileName;
|
private static string fileName;
|
||||||
|
@ -50,5 +51,4 @@ namespace LBPUnion.UnionPatcher.Cli {
|
||||||
Console.WriteLine($"UnionPatcher {Version}");
|
Console.WriteLine($"UnionPatcher {Version}");
|
||||||
Console.WriteLine($" Usage: {FileName} <Input EBOOT.elf> <Server URL> <Output filename>");
|
Console.WriteLine($" Usage: {FileName} <Input EBOOT.elf> <Server URL> <Output filename>");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
namespace LBPUnion.UnionPatcher.Gui.Linux {
|
namespace LBPUnion.UnionPatcher.Gui.Linux;
|
||||||
public static class Program {
|
|
||||||
|
public static class Program {
|
||||||
public static void Main() {
|
public static void Main() {
|
||||||
Gui.Show();
|
Gui.Show();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
namespace LBPUnion.UnionPatcher.Gui.MacOS {
|
namespace LBPUnion.UnionPatcher.Gui.MacOS;
|
||||||
public static class Program {
|
|
||||||
|
public static class Program {
|
||||||
public static void Main() {
|
public static void Main() {
|
||||||
Gui.Show();
|
Gui.Show();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,10 +1,10 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace LBPUnion.UnionPatcher.Gui.Windows {
|
namespace LBPUnion.UnionPatcher.Gui.Windows;
|
||||||
public static class Program {
|
|
||||||
|
public static class Program {
|
||||||
[STAThread]
|
[STAThread]
|
||||||
public static void Main() {
|
public static void Main() {
|
||||||
Gui.Show();
|
Gui.Show();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,7 +1,8 @@
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace LBPUnion.UnionPatcher.Gui {
|
namespace LBPUnion.UnionPatcher.Gui;
|
||||||
public static class EasterEgg {
|
|
||||||
|
public static class EasterEgg {
|
||||||
private static bool? restitch = null;
|
private static bool? restitch = null;
|
||||||
|
|
||||||
public static bool Restitch {
|
public static bool Restitch {
|
||||||
|
@ -12,5 +13,4 @@ namespace LBPUnion.UnionPatcher.Gui {
|
||||||
return (bool)restitch;
|
return (bool)restitch;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -1,9 +1,9 @@
|
||||||
using Eto.Forms;
|
using Eto.Forms;
|
||||||
|
|
||||||
namespace LBPUnion.UnionPatcher.Gui {
|
namespace LBPUnion.UnionPatcher.Gui;
|
||||||
public static class Gui {
|
|
||||||
|
public static class Gui {
|
||||||
public static void Show() {
|
public static void Show() {
|
||||||
new Application().Run(new MainForm());
|
new Application().Run(new MainForm());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -5,8 +5,9 @@ using Eto;
|
||||||
using Eto.Drawing;
|
using Eto.Drawing;
|
||||||
using Eto.Forms;
|
using Eto.Forms;
|
||||||
|
|
||||||
namespace LBPUnion.UnionPatcher.Gui {
|
namespace LBPUnion.UnionPatcher.Gui;
|
||||||
public class MainForm : Form {
|
|
||||||
|
public class MainForm : Form {
|
||||||
#region UI
|
#region UI
|
||||||
private readonly FilePicker filePicker;
|
private readonly FilePicker filePicker;
|
||||||
private readonly TextBox serverUrl;
|
private readonly TextBox serverUrl;
|
||||||
|
@ -161,5 +162,4 @@ namespace LBPUnion.UnionPatcher.Gui {
|
||||||
|
|
||||||
this.CreateOkDialog("Success!", "The Server URL has been patched to " + this.serverUrl.Text).ShowModal();
|
this.CreateOkDialog("Success!", "The Server URL has been patched to " + this.serverUrl.Text).ShowModal();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -8,8 +8,9 @@ Linux ELF header refspec: https://refspecs.linuxfoundation.org/elf/gabi4+/ch4.eh
|
||||||
Wikipedia entry on ELF: https://en.wikipedia.org/wiki/Executable_and_Linkable_Format
|
Wikipedia entry on ELF: https://en.wikipedia.org/wiki/Executable_and_Linkable_Format
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace LBPUnion.UnionPatcher {
|
namespace LBPUnion.UnionPatcher;
|
||||||
public class ElfFile {
|
|
||||||
|
public class ElfFile {
|
||||||
internal const int MinimumSize = 52;
|
internal const int MinimumSize = 52;
|
||||||
|
|
||||||
private enum WordSize : byte {
|
private enum WordSize : byte {
|
||||||
|
@ -81,5 +82,4 @@ namespace LBPUnion.UnionPatcher {
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -2,8 +2,9 @@ using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace LBPUnion.UnionPatcher {
|
namespace LBPUnion.UnionPatcher;
|
||||||
public static class Patcher {
|
|
||||||
|
public static class Patcher {
|
||||||
private static readonly string[] toBePatched = {
|
private static readonly string[] toBePatched = {
|
||||||
// Normal LittleBigPlanet gameserver URLs
|
// Normal LittleBigPlanet gameserver URLs
|
||||||
"https://littlebigplanetps3.online.scee.com:10061/LITTLEBIGPLANETPS3_XML",
|
"https://littlebigplanetps3.online.scee.com:10061/LITTLEBIGPLANETPS3_XML",
|
||||||
|
@ -101,5 +102,4 @@ namespace LBPUnion.UnionPatcher {
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue