/// <summary> /// Call this method on place where StartScreen should be displayed! /// </summary> static public void ShowStartScreen() { try { if (startScreen != null) { return; } task = Task.Factory.StartNew(() => { Console.WriteLine("## New StartScreen Task started!"); StartScreen.ShowStartScreenForm(); }); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
static private void ShowStartScreenForm() { startScreen = new StartScreen(); Application.Run(startScreen); }