Ejemplo n.º 1
0
 /// <summary>
 /// Build and show the splash screen.
 /// </summary>
 private void _showSplashScreen(SplashDelegate del)
 {
     lock (_mutex)
     {
         CadKit.Helios.SplashScreen splash = null;
         try
         {
             System.DateTime start    = System.DateTime.Now;
             System.TimeSpan duration = new System.TimeSpan(0, 0, 1);
             splash = this._buildSplashScreen();
             if (null != splash)
             {
                 splash.Show();
                 splash.Update();
             }
             del((null != splash) ? (object)splash : (object)this);
             this._safeSleep(duration - (System.DateTime.Now - start));
         }
         finally
         {
             if (null != splash)
             {
                 splash.Close();
             }
         }
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Build the splash screen.
 /// </summary>
 private CadKit.Helios.SplashScreen _buildSplashScreen()
 {
     lock (_mutex)
     {
         try
         {
             CadKit.Helios.SplashScreen splash = new CadKit.Helios.SplashScreen(this);
             string file = CadKit.Helios.Application.Instance.SplashImage;
             splash.Image      = CadKit.Images.Image.load(file);
             splash.Text       = CadKit.Helios.Application.Instance.Name + " Startup";
             splash.Label.Text = splash.Text;
             splash.Icon       = this.Icon;
             return(splash);
         }
         catch (System.Exception e)
         {
             System.Console.WriteLine("Error 3966419022: {0}", e.Message);
             return(null);
         }
     }
 }