Esempio n. 1
0
        /// ----------------------------------------------------------------------------------------
        /// <summary>
        /// Closes the splash screen
        /// </summary>
        /// ----------------------------------------------------------------------------------------
        public void Close()
        {
            if (m_splashScreen == null)
            {
                return;
            }

            lock (m_splashScreen.m_Synchronizer)
            {
                try
                {
                    m_splashScreen.Invoke(new MethodInvoker(m_splashScreen.RealClose));
                }
                catch
                {
                    // Something bad happened, but we are closing anyways :)
                }
            }
#if !__MonoCS__
            if (m_thread != null)
            {
                m_thread.Join();
            }
#endif
            lock (m_splashScreen.m_Synchronizer)
            {
                m_splashScreen.Dispose();
                m_splashScreen = null;
            }
#if !__MonoCS__
            m_thread = null;
#endif
        }
Esempio n. 2
0
        /// ----------------------------------------------------------------------------------------
        /// <summary>
        /// Closes the splash screen
        /// </summary>
        /// ----------------------------------------------------------------------------------------
        void IFwSplashScreen.Close()
        {
            if (m_splashScreen == null)
            {
                return;
            }

            lock (m_splashScreen.m_Synchronizer)
            {
                try
                {
                    m_splashScreen.Invoke(new MethodInvoker(m_splashScreen.RealClose));
                }
                catch
                {
                    // Something bad happened, but we are closing anyways :)
                }
            }
            m_thread.Join();
            lock (m_splashScreen.m_Synchronizer)
            {
                m_splashScreen.Dispose();
                m_splashScreen = null;
            }

            m_hiddenForm.Close();
            m_thread = null;
        }
 public void RunOnMainThread()
 {
     using (var waitHandle = new EventWaitHandle(false, EventResetMode.AutoReset))
         using (var window = new RealSplashScreen(false))
         {
             window.WaitHandle = waitHandle;
             window.CreateControl();
             window.Message = string.Empty;
             window.Show();
             Application.DoEvents();
         }
 }
		public void RunOnMainThread()
		{
			using (var waitHandle = new EventWaitHandle(false, EventResetMode.AutoReset))
			using (var window = new RealSplashScreen(false))
			{
				window.WaitHandle = waitHandle;
				window.CreateControl();
				window.Message = string.Empty;
				window.Show();
				Application.DoEvents();
			}
		}
Esempio n. 5
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Starts the splash screen.
        /// </summary>
        /// ------------------------------------------------------------------------------------
        private void StartSplashScreen()
        {
            m_splashScreen            = new RealSplashScreen(m_DisplaySILInfo);
            m_splashScreen.WaitHandle = m_waitHandle;
            if (m_fNoUi)
            {
                IntPtr blah = m_splashScreen.Handle;                 // force handle creation.
            }
            else
            {
#if !__MonoCS__
                m_splashScreen.ShowDialog();
#else
                // Mono Winforms can't create Forms that are not on the Main thread.
                m_splashScreen.CreateControl();
                m_splashScreen.Message = string.Empty;
                m_splashScreen.Show();
#endif
            }
        }
Esempio n. 6
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Starts the splash screen.
 /// </summary>
 /// ------------------------------------------------------------------------------------
 private void StartSplashScreen()
 {
     m_splashScreen = new RealSplashScreen();
     m_splashScreen.RealShow(m_waitHandle);
     m_splashScreen.ShowDialog();
 }
 public void Basic()
 {
     using (var window = new RealSplashScreen(false))
         Assert.NotNull(window);
 }
		public void Basic()
		{
			using (var window = new RealSplashScreen(false))
				Assert.NotNull(window);
		}
Esempio n. 9
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Starts the splash screen.
		/// </summary>
		/// ------------------------------------------------------------------------------------
		private void StartSplashScreen()
		{
			m_splashScreen = new RealSplashScreen();
			m_splashScreen.RealShow(m_waitHandle);
			m_splashScreen.ShowDialog();
		}
Esempio n. 10
0
		/// ----------------------------------------------------------------------------------------
		/// <summary>
		/// Closes the splash screen
		/// </summary>
		/// ----------------------------------------------------------------------------------------
		void IFwSplashScreen.Close()
		{
			if (m_splashScreen == null)
				return;

			lock (m_splashScreen.m_Synchronizer)
			{
				try
				{
					m_splashScreen.Invoke(new MethodInvoker(m_splashScreen.RealClose));
				}
				catch
				{
					// Something bad happened, but we are closing anyways :)
				}
			}
			m_thread.Join();
			lock (m_splashScreen.m_Synchronizer)
			{
				m_splashScreen.Dispose();
				m_splashScreen = null;
			}

			m_hiddenForm.Close();
			m_thread = null;
		}
Esempio n. 11
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Starts the splash screen.
		/// </summary>
		/// ------------------------------------------------------------------------------------
		private void StartSplashScreen()
		{
			m_splashScreen = new RealSplashScreen(m_DisplaySILInfo);
			m_splashScreen.WaitHandle = m_waitHandle;
			if (m_fNoUi)
			{
				IntPtr blah = m_splashScreen.Handle; // force handle creation.
			}
			else
			{
#if !__MonoCS__
				m_splashScreen.ShowDialog();
#else
			// Mono Winforms can't create Forms that are not on the Main thread.
			m_splashScreen.CreateControl();
			m_splashScreen.Message = string.Empty;
			m_splashScreen.Show();
#endif
			}
		}
Esempio n. 12
0
		/// ----------------------------------------------------------------------------------------
		/// <summary>
		/// Closes the splash screen
		/// </summary>
		/// ----------------------------------------------------------------------------------------
		public void Close()
		{
			if (m_splashScreen == null)
				return;

			lock (m_splashScreen.m_Synchronizer)
			{
				try
				{
					m_splashScreen.Invoke(new MethodInvoker(m_splashScreen.RealClose));
				}
				catch
				{
					// Something bad happened, but we are closing anyways :)
				}
			}
#if !__MonoCS__
			if (m_thread != null)
				m_thread.Join();
#endif
			lock (m_splashScreen.m_Synchronizer)
			{
				m_splashScreen.Dispose();
				m_splashScreen = null;
			}
#if !__MonoCS__
			m_thread = null;
#endif
		}