PKHeX/PKHeX.WinForms/Misc/SplashScreen.cs

24 lines
567 B
C#
Raw Normal View History

using System.Threading;
using System.Threading.Tasks;
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 Task(() =>
{
while (!Main.IsInitialized)
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
}