CreateAndShow() public static method

public static CreateAndShow ( ) : SplashScreen
return SplashScreen
Example #1
0
 private static void CareForSplashScreenAtIdleTime(object sender, EventArgs e)
 {
     //this is a hack... somehow this is getting called again, haven't been able to track down how
     //to reproduce, remove the user settings so that we get first-run behavior. Instead of going through the
     //wizard, cancel it and open an existing project. After the new collectino window is created, this
     //fires *again* and would try to open a new splashform
     if (_alreadyHadSplashOnce)
     {
         Application.Idle -= CareForSplashScreenAtIdleTime;
         return;
     }
     if (_splashForm == null)
     {
         _splashForm = SplashScreen.CreateAndShow();                //warning: this does an ApplicationEvents()
     }
     else if (DateTime.Now > _earliestWeShouldCloseTheSplashScreen)
     {
         _alreadyHadSplashOnce = true;
         Application.Idle     -= CareForSplashScreenAtIdleTime;
         CloseSplashScreenAndCheckRegistration();
         if (_projectContext != null && _projectContext.ProjectWindow != null)
         {
             var shell = _projectContext.ProjectWindow as Shell;
             if (shell != null)
             {
                 shell.ReallyComeToFront();
             }
         }
     }
 }