2015-03-11 01:44:51 +00:00
|
|
|
|
using System.Timers;
|
2014-06-28 21:22:05 +00:00
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
|
|
|
|
|
namespace PKHeX
|
|
|
|
|
{
|
|
|
|
|
public partial class SplashScreen : Form
|
|
|
|
|
{
|
2015-09-21 03:34:09 +00:00
|
|
|
|
public SplashScreen()
|
2014-06-28 21:22:05 +00:00
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
System.Timers.Timer myTimer = new System.Timers.Timer();
|
2015-03-11 01:44:51 +00:00
|
|
|
|
myTimer.Elapsed += DisplayTimeEvent;
|
2015-01-31 23:59:23 +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)
|
|
|
|
|
{
|
2015-09-21 03:34:09 +00:00
|
|
|
|
if (!Main.init)
|
|
|
|
|
if (L_Status.InvokeRequired) L_Status.Invoke((MethodInvoker)delegate { L_Status.Text = Main.Status; });
|
|
|
|
|
else { L_Status.Text = Main.Status; }
|
2015-01-31 18:36:06 +00:00
|
|
|
|
else
|
|
|
|
|
if (InvokeRequired && IsHandleCreated)
|
2015-03-11 01:44:51 +00:00
|
|
|
|
try { Invoke((MethodInvoker)Close); } catch { Close(); }
|
2015-01-31 18:36:06 +00:00
|
|
|
|
else Close();
|
2014-06-28 21:22:05 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2015-01-31 18:36:06 +00:00
|
|
|
|
}
|