mirror of
https://github.com/LBPUnion/UnionPatcher.git
synced 2025-04-25 05:55:18 +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.IO;
|
||||
using System.Diagnostics;
|
||||
|
||||
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.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),
|
||||
|
|
Loading…
Add table
Reference in a new issue