예제 #1
0
        /// <summary>
        /// handles the full screen splash
        /// </summary>
        private void ShowFullScreenSplashScreen()
        {
            Cursor.Hide();
            _frmFull                   = new FullScreenSplashScreen();
            _frmFull.TopMost           = _alwaysOnTop;
            _frmFull.Bounds            = CurrentDisplay.Bounds;
            _frmFull.lblMain.Parent    = _frmFull.pbBackground;
            _frmFull.lblVersion.Parent = _frmFull.lblMain;
            _frmFull.lblCVS.Parent     = _frmFull.lblMain;
            _frmFull.RetrieveSplashScreenInfo();
            _frmFull.SetVersion(Version);
            _frmFull.Show();
            _frmFull.Update();
            _frmFull.Opacity = 100;

            string oldInfo = null;

            // run until stop of splash screen is requested
            while (!_stopRequested)
            {
                if (oldInfo != _info)
                {
                    _frmFull.SetInformation(_info);
                    oldInfo = _info;
                }
                Thread.Sleep(10);
            }
            _frmFull.Close();
            _frmFull = null;
        }
예제 #2
0
        /// <summary>
        /// handles the full screen splash
        /// </summary>
        private void ShowFullScreenSplashScreen()
        {
            int percent1w  = CurrentDisplay.Bounds.Width / 100;
            int percent1h  = CurrentDisplay.Bounds.Height / 100;
            int percent10h = CurrentDisplay.Bounds.Height / 10;

            Cursor.Hide();
            _frmFull         = new FullScreenSplashScreen();
            _frmFull.TopMost = _alwaysOnTop;
            _frmFull.Bounds  = CurrentDisplay.Bounds;

            _frmFull.lblMain.Parent    = _frmFull.pbBackground;
            _frmFull.lblVersion.Parent = _frmFull.pbBackground;
            _frmFull.lblCVS.Parent     = _frmFull.pbBackground;

            _frmFull.lblMain.Left   = 0;
            _frmFull.lblMain.Top    = (percent10h / 2);
            _frmFull.lblMain.Height = _frmFull.Height - percent10h;
            _frmFull.lblMain.Width  = _frmFull.Width;

            _frmFull.lblVersion.Left   = percent1w / 2;
            _frmFull.lblVersion.Top    = percent1h / 2;
            _frmFull.lblVersion.Width  = (_frmFull.Width - percent1w) / 2;
            _frmFull.lblVersion.Height = _frmFull.Height - percent1h;

            _frmFull.lblCVS.Left   = (_frmFull.Width - percent1w) / 2;
            _frmFull.lblCVS.Top    = percent1h / 2;
            _frmFull.lblCVS.Width  = (_frmFull.Width - percent1w) / 2;
            _frmFull.lblCVS.Height = _frmFull.Height - percent1h;

            _frmFull.SetVersion(Version);

            _frmFull.RetrieveSplashScreenInfo();

            _frmFull.Show();
            _frmFull.Update();
            _frmFull.Opacity = 100;

            string oldInfo = null;

            // run until stop of splash screen is requested
            while (!_stopRequested)
            {
                if (oldInfo != _info)
                {
                    _frmFull.SetInformation(_info);
                    oldInfo = _info;
                }
                Thread.Sleep(10);
            }
            _frmFull.Close();
            _frmFull = null;
        }
예제 #3
0
    /// <summary>
    /// handles the full screen splash
    /// </summary>
    private void ShowFullScreenSplashScreen()
    {
      Cursor.Hide();
      _frmFull = new FullScreenSplashScreen();
      _frmFull.RetrieveSplashScreenInfo();
      _frmFull.TopMost = _alwaysOnTop;
      _frmFull.Bounds = CurrentDisplay.Bounds;
      _frmFull.lblMain.Parent = _frmFull.pbBackground;
      _frmFull.lblVersion.Parent = _frmFull.lblMain;
      _frmFull.lblCVS.Parent = _frmFull.lblMain;
      _frmFull.SetVersion(Version);
      _frmFull.Show();
      _frmFull.Update();
      _frmFull.Opacity = 100;

      string oldInfo = null;

      // run until stop of splash screen is requested
      while (!_stopRequested)
      {
        if (oldInfo != _info)
        {
          _frmFull.SetInformation(_info);
          oldInfo = _info;
        }
        Thread.Sleep(10);
      }
      _frmFull.Close();
      _frmFull = null;
    }
예제 #4
0
        /// <summary>
        /// handles the fullscreen splash
        /// </summary>
        private void ShowFullScreenSplashScreen()
        {
            frmFull = new FullScreenSplashScreen();
            Cursor.Hide();

            //frmFull.pbBackground.Image = new System.Drawing.Bitmap(GetBackgroundImagePath());
            frmFull.RetrieveSplashScreenInfo();

            frmFull.Left = (Screen.PrimaryScreen.Bounds.Width / 2 - frmFull.Width / 2) + 1;
            frmFull.Top  = (Screen.PrimaryScreen.Bounds.Height / 2 - frmFull.Height / 2) + 1;

            frmFull.lblMain.Parent    = frmFull.pbBackground;
            frmFull.lblVersion.Parent = frmFull.lblMain;
            frmFull.lblCVS.Parent     = frmFull.lblMain;

            frmFull.SetVersion(Version);
            frmFull.Show();

            frmFull.Update();
            //frmFull.FadeIn(); // remarked because without it the start looks faster (more powerful and responding)
            frmFull.Opacity = 100;

            string oldInfo            = null;
            bool   delayedStopAllowed = false;
            int    stopRequestTime    = 0;

            while (!delayedStopAllowed && (frmFull.Focused || _overlaidForm != null))
            //run until stop of splashscreen is requested
            {
                if (stopRequested && stopRequestTime == 0) // store the current time when stop of the splashscreen is requested
                {
                    stopRequestTime = Environment.TickCount;
                    frmFull.TopMost = false; // allow the splashscreen to be overlayed by other windows (like the mp main screen)
                }
                if (AllowWindowOverlayRequested)
                // Allow other Windows to Overlay the splashscreen
                {
                    lock (_overlaidFormClosingLock)
                    {
                        if (_overlaidForm != null && _overlaidForm.Visible)
                        // prepare everything to let the Outdated skin message appear
                        {
                            if (frmFull.Focused)
                            {
                                frmFull.TopMost       = false;
                                _overlaidForm.TopMost = true;
                                _overlaidForm.BringToFront();
                                Cursor.Show();
                            }
                        }
                        else
                        {
                            AllowWindowOverlayRequested = false;
                            frmFull.TopMost             = true;
                            frmFull.BringToFront();
                            Cursor.Hide();
                        }
                    }
                }
                if ((stopRequestTime != 0) && ((Environment.TickCount - 5000) > stopRequestTime))
                {
                    delayedStopAllowed = true; // if stop is requested for more than 5sec ... leave the loop
                }

                if (oldInfo != info)
                {
                    frmFull.SetInformation(info);
                    oldInfo = info;
                }
                Thread.Sleep(25);
            }

            Cursor.Show();
            frmFull.Close();
            frmFull = null;
        }
예제 #5
0
    /// <summary>
    /// handles the fullscreen splash
    /// </summary>
    private void ShowFullScreenSplashScreen()
    {
      frmFull = new FullScreenSplashScreen();
      Cursor.Hide();

      //frmFull.pbBackground.Image = new System.Drawing.Bitmap(GetBackgroundImagePath());
      frmFull.RetrieveSplashScreenInfo();

      frmFull.Left = (Screen.PrimaryScreen.Bounds.Width / 2 - frmFull.Width / 2) + 1;
      frmFull.Top = (Screen.PrimaryScreen.Bounds.Height / 2 - frmFull.Height / 2) + 1;

      frmFull.lblMain.Parent = frmFull.pbBackground;
      frmFull.lblVersion.Parent = frmFull.lblMain;
      frmFull.lblCVS.Parent = frmFull.lblMain;

      frmFull.SetVersion(Version);
      frmFull.Show();

      frmFull.Update();
      //frmFull.FadeIn(); // remarked because without it the start looks faster (more powerful and responding)
      frmFull.Opacity = 100;

      string oldInfo = null;
      bool delayedStopAllowed = false;
      int stopRequestTime = 0;
      while (!delayedStopAllowed && (frmFull.Focused || _overlaidForm != null))
        //run until stop of splashscreen is requested
      {
        if (stopRequested && stopRequestTime == 0) // store the current time when stop of the splashscreen is requested
        {
          stopRequestTime = Environment.TickCount;
          frmFull.TopMost = false; // allow the splashscreen to be overlayed by other windows (like the mp main screen)
        }
        if (AllowWindowOverlayRequested)
        // Allow other Windows to Overlay the splashscreen
        {
          lock (_overlaidFormClosingLock)
          {
            if (_overlaidForm != null && _overlaidForm.Visible)
              // prepare everything to let the Outdated skin message appear
            {
              if (frmFull.Focused)
              {
                frmFull.TopMost = false;
                _overlaidForm.TopMost = true;
                _overlaidForm.BringToFront();
                Cursor.Show();
              }
            }
            else
            {
              AllowWindowOverlayRequested = false;
              frmFull.TopMost = true;
              frmFull.BringToFront();
              Cursor.Hide();
            }
          }
        }
        if ((stopRequestTime != 0) && ((Environment.TickCount - 5000) > stopRequestTime))
        {
          delayedStopAllowed = true; // if stop is requested for more than 5sec ... leave the loop
        }

        if (oldInfo != info)
        {
          frmFull.SetInformation(info);
          oldInfo = info;
        }
        Thread.Sleep(25);
      }

      Cursor.Show();
      frmFull.Close();
      frmFull = null;
    }