Code cleanup

This commit is contained in:
jvyden 2022-06-14 21:02:39 -04:00
parent bccb6749d1
commit ff38cd2bd6
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278
3 changed files with 4 additions and 22 deletions

View file

@ -1,6 +1,4 @@
using System;
using System.Diagnostics;
using System.IO;
using System.Diagnostics;
namespace LBPUnion.UnionPatcher.Cli;

View file

@ -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;
}
}
}

View file

@ -1,5 +1,4 @@
using System;
using System.IO;
using System.Diagnostics;
using Eto;
using Eto.Drawing;
@ -12,6 +11,7 @@ public class MainForm : Form {
private readonly FilePicker filePicker;
private readonly TextBox serverUrl;
private readonly FilePicker outputFileName;
public Dialog CreateOkDialog(string title, string errorMessage) {
DynamicLayout layout = new();
Button button;
@ -50,7 +50,7 @@ public class MainForm : Form {
public Control CreatePatchButton(int tabIndex = 0) {
Button control = new() {
Text = EasterEgg.Restitch ? "Restitch!" : "Patch!",
Text = "Patch!",
TabIndex = tabIndex,
};
@ -77,7 +77,7 @@ public class MainForm : Form {
}
public MainForm() {
this.Title = EasterEgg.Restitch ? "Union Restitcher" : "Union Patcher";
this.Title = "Union Patcher";
this.ClientSize = new Size(500, -1);
this.Content = new TableLayout {
Spacing = new Size(5,5),