Пример #1
0
        protected override void ShowSplash()
        {
            m_splash = new SampleCsSplashScreen();

            var thread = new Thread(ShowSplashScreen);

            thread.Start();

            var worker = new SampleCsSplashScreenWorker();

            worker.ProgressChanged += (o, ex) =>
            {
                if (null != m_splash)
                {
                    m_splash.UpdateProgress(ex.Progress);
                }
            };

            worker.HardWorkDone += (o, ex) =>
            {
                m_done = true;
            };

            worker.DoHardWork();
        }
Пример #2
0
        private void ShowSplashScreen()
        {
            m_splash.Show();

            while (!m_done)
            {
                Application.DoEvents();
            }

            m_splash.Close();
            m_splash.Dispose();
            m_splash = null;
            m_done   = false;
        }