LukePulverenti Luke Pulverenti luke pulverenti 13 年之前
父節點
當前提交
03c9523001
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      MediaBrowser.Common/UI/BaseApplication.cs

+ 3 - 0
MediaBrowser.Common/UI/BaseApplication.cs

@@ -16,6 +16,7 @@ namespace MediaBrowser.Common.UI
 
 
         protected async override void OnStartup(StartupEventArgs e)
         protected async override void OnStartup(StartupEventArgs e)
         {
         {
+            // Without this the app will shutdown after the splash screen closes
             this.ShutdownMode = ShutdownMode.OnExplicitShutdown;
             this.ShutdownMode = ShutdownMode.OnExplicitShutdown;
 
 
             await LoadKernel();
             await LoadKernel();
@@ -48,6 +49,8 @@ namespace MediaBrowser.Common.UI
             {
             {
                 MessageBox.Show("There was an error launching Media Browser: " + ex.Message);
                 MessageBox.Show("There was an error launching Media Browser: " + ex.Message);
                 splash.Close();
                 splash.Close();
+
+                // Shutdown the app with an error code
                 Shutdown(1);
                 Shutdown(1);
             }
             }
         }
         }