PKHeX/PKHeX.WinForms/Misc/SplashScreen.cs

23 lines
541 B
C#
Raw Normal View History

using System.Threading;
2014-06-28 21:22:05 +00:00
using System.Windows.Forms;
namespace PKHeX.WinForms
2014-06-28 21:22:05 +00:00
{
public partial class SplashScreen : Form
{
public SplashScreen()
2014-06-28 21:22:05 +00:00
{
InitializeComponent();
new Thread(() =>
{
while (!Main.formInitialized)
Thread.Sleep(50);
if (InvokeRequired)
try { Invoke((MethodInvoker)Close); }
catch { Close(); }
2015-01-31 18:36:06 +00:00
else Close();
}).Start();
2014-06-28 21:22:05 +00:00
}
}
2015-01-31 18:36:06 +00:00
}