public DashboardPlanetM() { if (loObj.ValidateLicense()) { this.Hide(); bool done = false; ThreadPool.QueueUserWorkItem((x) => { using (var splashForm = new Splash()) { splashForm.Show(); while (!done) Application.DoEvents(); splashForm.Close(); } }); Thread.Sleep(250); InitializeComponent(); LogWrapper.LogInfo("PlanetM Dashboard initialization complete."); ConfigureGridview(); done = true; //Thread.Sleep(250); this.Show(); this.Activate(); this.BringToFront(); } else { Environment.Exit(9); } }
private void ShowSplashForm() { this.Hide(); bool done = false; ThreadPool.QueueUserWorkItem((x) => { using (var splashForm = new Splash()) { splashForm.Show(); while (!done) Application.DoEvents(); splashForm.Close(); } }); Thread.Sleep(3000); // Emulate hardwork done = true; this.Show(); }
private void Dashboard_Load(object sender, EventArgs e) { this.Hide(); bool done = false; ThreadPool.QueueUserWorkItem((x) => { using (var splashForm = new Splash()) { splashForm.Show(); while (!done) Application.DoEvents(); splashForm.Close(); } }); Thread.Sleep(500); LoadMovies(); done = true; this.Show(); }