static void Application_Idle(object sender, EventArgs e) { splash.Close(); Application.Idle -= idleTemp; idleTemp = null; splash = null; }
private static void SplashForm_ControlClosed(object sender, EventArgs e) { splashForm.Close(); if (IsTrialLicenseExpired() || IsLicenseExpired()) { Environment.Exit(1); } else { Thread splashThread = new Thread(new ThreadStart( delegate { var mainForm = InitializeMainForm(); Application.Run(mainForm); })); splashThread.SetApartmentState(ApartmentState.STA); splashThread.Start(); } }