mirror of
https://github.com/LBPUnion/UnionPatcher.git
synced 2025-07-23 09:21:41 +00:00
Code cleanup
This commit is contained in:
parent
bccb6749d1
commit
ff38cd2bd6
3 changed files with 4 additions and 22 deletions
|
@ -1,6 +1,4 @@
|
||||||
using System;
|
using System.Diagnostics;
|
||||||
using System.Diagnostics;
|
|
||||||
using System.IO;
|
|
||||||
|
|
||||||
namespace LBPUnion.UnionPatcher.Cli;
|
namespace LBPUnion.UnionPatcher.Cli;
|
||||||
|
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace LBPUnion.UnionPatcher.Gui;
|
|
||||||
|
|
||||||
public static class EasterEgg {
|
|
||||||
private static bool? restitch = null;
|
|
||||||
|
|
||||||
public static bool Restitch {
|
|
||||||
get {
|
|
||||||
if(restitch == null) {
|
|
||||||
return (bool)(restitch = new Random().Next(1, 10_000) == 1);
|
|
||||||
}
|
|
||||||
return (bool)restitch;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,5 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using Eto;
|
using Eto;
|
||||||
using Eto.Drawing;
|
using Eto.Drawing;
|
||||||
|
@ -12,6 +11,7 @@ public class MainForm : Form {
|
||||||
private readonly FilePicker filePicker;
|
private readonly FilePicker filePicker;
|
||||||
private readonly TextBox serverUrl;
|
private readonly TextBox serverUrl;
|
||||||
private readonly FilePicker outputFileName;
|
private readonly FilePicker outputFileName;
|
||||||
|
|
||||||
public Dialog CreateOkDialog(string title, string errorMessage) {
|
public Dialog CreateOkDialog(string title, string errorMessage) {
|
||||||
DynamicLayout layout = new();
|
DynamicLayout layout = new();
|
||||||
Button button;
|
Button button;
|
||||||
|
@ -50,7 +50,7 @@ public class MainForm : Form {
|
||||||
|
|
||||||
public Control CreatePatchButton(int tabIndex = 0) {
|
public Control CreatePatchButton(int tabIndex = 0) {
|
||||||
Button control = new() {
|
Button control = new() {
|
||||||
Text = EasterEgg.Restitch ? "Restitch!" : "Patch!",
|
Text = "Patch!",
|
||||||
TabIndex = tabIndex,
|
TabIndex = tabIndex,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ public class MainForm : Form {
|
||||||
}
|
}
|
||||||
|
|
||||||
public MainForm() {
|
public MainForm() {
|
||||||
this.Title = EasterEgg.Restitch ? "Union Restitcher" : "Union Patcher";
|
this.Title = "Union Patcher";
|
||||||
this.ClientSize = new Size(500, -1);
|
this.ClientSize = new Size(500, -1);
|
||||||
this.Content = new TableLayout {
|
this.Content = new TableLayout {
|
||||||
Spacing = new Size(5,5),
|
Spacing = new Size(5,5),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue