2014-06-28 21:22:05 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.Data;
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
using System.Timers;
|
|
|
|
|
|
|
|
|
|
namespace PKHeX
|
|
|
|
|
{
|
|
|
|
|
public partial class SplashScreen : Form
|
|
|
|
|
{
|
|
|
|
|
Form1 m_parent;
|
|
|
|
|
public SplashScreen(Form1 frm1)
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
m_parent = frm1;
|
|
|
|
|
System.Timers.Timer myTimer = new System.Timers.Timer();
|
|
|
|
|
myTimer.Elapsed += new ElapsedEventHandler(DisplayTimeEvent);
|
2014-10-11 07:22:22 +00:00
|
|
|
|
myTimer.Interval = 50; // milliseconds per trigger interval
|
2014-06-28 21:22:05 +00:00
|
|
|
|
myTimer.Start();
|
|
|
|
|
}
|
|
|
|
|
public void DisplayTimeEvent(object source, ElapsedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
if (m_parent.init)
|
|
|
|
|
{
|
2014-12-13 06:58:34 +00:00
|
|
|
|
if (InvokeRequired && IsHandleCreated)
|
2014-06-28 21:22:05 +00:00
|
|
|
|
Invoke((MethodInvoker)delegate(){Close();});
|
|
|
|
|
else
|
|
|
|
|
Close();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch { };
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|