mirror of
https://github.com/LBPUnion/UnionPatcher.git
synced 2025-08-11 18:49:58 +00:00
Add easter egg
This commit is contained in:
parent
a763d3fa26
commit
61bf5d5686
3 changed files with 20 additions and 3 deletions
16
UnionPatcher.Gui/EasterEgg.cs
Normal file
16
UnionPatcher.Gui/EasterEgg.cs
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -48,7 +48,7 @@ namespace UnionPatcher.Gui {
|
||||||
|
|
||||||
public Control CreatePatchButton(int tabIndex = 0) {
|
public Control CreatePatchButton(int tabIndex = 0) {
|
||||||
Button control = new() {
|
Button control = new() {
|
||||||
Text = "Patch!",
|
Text = EasterEgg.Restitch ? "Restitch!" : "Patch!",
|
||||||
TabIndex = tabIndex,
|
TabIndex = tabIndex,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ namespace UnionPatcher.Gui {
|
||||||
}
|
}
|
||||||
|
|
||||||
public MainForm() {
|
public MainForm() {
|
||||||
this.Title = "Union Patcher";
|
this.Title = EasterEgg.Restitch ? "Union Restitcher" : "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),
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=EBOOT/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=EBOOT/@EntryIndexedValue">True</s:Boolean>
|
||||||
|
<s:Boolean x:Key="/Default/UserDictionary/Words/=Restitcher/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
Loading…
Add table
Add a link
Reference in a new issue