public static void Close() { if (MySplashThread == null) { return; } if (MySplashForm == null) { return; } try { MySplashForm.Invoke(new MethodInvoker(MySplashForm.Close)); } catch (Exception e) { string hash = e.GetHashCode().ToString(); MessageBox.Show("Exception occurred: " + hash); } MySplashForm = null; MySplashThread = null; }
static void ShowThread() { MySplashForm = new SplashForm(); Application.Run(MySplashForm); }