public static void ShowSplashScreen() { String[] arguments = Environment.GetCommandLineArgs(); for (int i = 1; i < arguments.Length; i++) { if (arguments[i].StartsWith("/NoSplash")) { return; } } if (formSplash == null) { formSplash = new FormSplash(); } if (timerSplashWait == null) { timerSplashWait = new Timer(); timerSplashWait.Tick += new EventHandler(timerSplashWait_Tick); } formSplash.Parameters("HMI " + Application.ProductVersion, 325, 296, new System.Drawing.Font("Arial", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))), System.Drawing.Color.FromArgb(0, 104, 157), System.Drawing.Color.Black); formSplash.Show(); Application.DoEvents(); }
public static void CloseSplashScreen() { if (formSplash != null) { formSplash.Close(); formSplash.Dispose(); formSplash = null; } }