PKHeX/Misc/SplashScreen.cs
Kurt c15cbe2870 Separated initialization bool for clear purpose
formInitialized is for closing the splash screen and showing the main
form.
fieldsInitialized is for setting up and not running updates until fields
are ready to be updated.

Arceus is now the initial species instead of language dependent
(Abomasnow).
2015-11-05 22:59:55 -08:00

23 lines
No EOL
532 B
C#

using System.Threading;
using System.Windows.Forms;
namespace PKHeX
{
public partial class SplashScreen : Form
{
public SplashScreen()
{
InitializeComponent();
new Thread(() =>
{
while (!Main.formInitialized)
Thread.Sleep(50);
if (InvokeRequired)
try { Invoke((MethodInvoker)Close); }
catch { Close(); }
else Close();
}).Start();
}
}
}