private void InternalShowSplashScreen() { if (m_waitFormInstance == null) { m_waitFormInstance = (IWaitForm)Activator.CreateInstance(m_typeWaitForm); m_waitFormInstance.SetCaption(Caption); m_waitFormInstance.SetDescription(Description); m_waitFormInstance.ShowWaitForm(); } }
/// <summary> /// /// </summary> public void ShowSplashScreen() { if (IsVisibleSplashScreen) { m_waitFormInstance.SetCaption(Caption); m_waitFormInstance.SetDescription(Description); return; } m_thread = new Thread(new ThreadStart(InternalShowSplashScreen)); m_thread.Name = "SplashScreen"; m_thread.IsBackground = true; m_thread.SetApartmentState(ApartmentState.STA); m_thread.Start(); while (m_waitFormInstance == null || ((Form)m_waitFormInstance).IsHandleCreated == false) { Thread.Sleep(100); } }