diff --git a/DisplayMagician/Program.cs b/DisplayMagician/Program.cs index b198af9..ae7362e 100644 --- a/DisplayMagician/Program.cs +++ b/DisplayMagician/Program.cs @@ -316,6 +316,9 @@ namespace DisplayMagician { // This is the RunShortcut command app.Command(DisplayMagicianStartupAction.RunShortcut.ToString(), (runShortcutCmd) => { + // Try to load all the games in parallel to this process + Task.Run(() => LoadGamesInBackground()); + // Set the --trace or --debug options if supplied if (trace.HasValue()) { @@ -588,6 +591,10 @@ namespace DisplayMagician { } } logger.Info("Starting Normally..."); + + // Try to load all the games in parallel to this process + Task.Run(() => LoadGamesInBackground()); + StartUpApplication(); return 0; }); @@ -603,10 +610,7 @@ namespace DisplayMagician { splashThread.SetApartmentState(ApartmentState.STA); splashThread.Start(); - } - - // Try to load all the games in parallel to this process - Task.Run(() => LoadGamesInBackground()); + } try { @@ -658,6 +662,9 @@ namespace DisplayMagician { IPCService.GetInstance().Status = InstanceStatus.User; + if (ProgramSettings.LoadSettings().ShowSplashScreen && AppSplashScreen != null && !AppSplashScreen.Disposing && !AppSplashScreen.IsDisposed) + AppSplashScreen.Invoke(new Action(() => AppSplashScreen.Close())); + // Run the program with directly showing CreateProfile form Application.Run(new DisplayProfileForm()); @@ -788,6 +795,9 @@ namespace DisplayMagician { throw new Exception(Language.Cannot_find_shortcut_in_library); } + if (ProgramSettings.LoadSettings().ShowSplashScreen && AppSplashScreen != null && !AppSplashScreen.Disposing && !AppSplashScreen.IsDisposed) + AppSplashScreen.Invoke(new Action(() => AppSplashScreen.Close())); + if (shortcutToRun is ShortcutItem) { ShortcutRepository.RunShortcut(shortcutToRun); @@ -815,6 +825,9 @@ namespace DisplayMagician { ProfileItem profileToUse = ProfileRepository.AllProfiles.Where(p => p.UUID.Equals(profileName)).First(); logger.Trace($"Program/RunProfile: Found profile called {profileName} and now starting to apply the profile"); + if (ProgramSettings.LoadSettings().ShowSplashScreen && AppSplashScreen != null && !AppSplashScreen.Disposing && !AppSplashScreen.IsDisposed) + AppSplashScreen.Invoke(new Action(() => AppSplashScreen.Close())); + ProfileRepository.ApplyProfile(profileToUse); } diff --git a/DisplayMagician/Properties/AssemblyInfo.cs b/DisplayMagician/Properties/AssemblyInfo.cs index 266d411..257815e 100644 --- a/DisplayMagician/Properties/AssemblyInfo.cs +++ b/DisplayMagician/Properties/AssemblyInfo.cs @@ -26,8 +26,8 @@ using System.Resources; [assembly: Guid("e4ceaf5e-ad01-4695-b179-31168eb74c48")] // Version information -[assembly: AssemblyVersion("2.1.0.59")] -[assembly: AssemblyFileVersion("2.1.0.59")] +[assembly: AssemblyVersion("2.1.0.65")] +[assembly: AssemblyFileVersion("2.1.0.65")] [assembly: NeutralResourcesLanguageAttribute( "en" )] [assembly: CLSCompliant(true)]