/// ---------------------------------------------------------------------------------------- /// <summary> /// Activates (brings back to the top) the splash screen (assuming it is already visible /// and the application showing it is the active application). /// </summary> /// ---------------------------------------------------------------------------------------- void IFwSplashScreen.Activate() { Debug.Assert(m_splashScreen != null); lock (m_splashScreen.m_Synchronizer) { m_splashScreen.Invoke(new MethodInvoker(m_splashScreen.Activate)); } }
/// ------------------------------------------------------------------------------------ /// <summary> /// Shows the splash screen /// </summary> /// <param name="fDisplaySILInfo">if set to <c>false</c>, any SIL-identifying information /// will be hidden.</param> /// <param name="fNoUi">if set to <c>true</c> no UI is to be shown (i.e., we aren't /// really going to show the splash screen).</param> /// ------------------------------------------------------------------------------------ public void Show(bool fDisplaySILInfo, bool fNoUi) { if (m_thread != null) { return; } m_DisplaySILInfo = fDisplaySILInfo; m_fNoUi = fNoUi; m_waitHandle = new EventWaitHandle(false, EventResetMode.AutoReset); #if __MonoCS__ // mono winforms can't create items not on main thread. StartSplashScreen(); // Create Modeless dialog on Main GUI thread #else if (fNoUi) { StartSplashScreen(); } else { m_thread = new Thread(StartSplashScreen); m_thread.IsBackground = true; m_thread.SetApartmentState(ApartmentState.STA); m_thread.Name = "SplashScreen"; // Copy the UI culture from the main thread to the splash screen thread. m_thread.CurrentUICulture = Thread.CurrentThread.CurrentUICulture; m_thread.Start(); m_waitHandle.WaitOne(); } #endif Debug.Assert(m_splashScreen != null); lock (m_splashScreen.m_Synchronizer) { m_splashScreen.Invoke(new SetAssemblyPropDelegate(m_splashScreen.SetProductExecutableAssembly), ProductExecutableAssembly); } Message = string.Empty; }