aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.ServerApplication/MainWindow.xaml.cs
diff options
context:
space:
mode:
authorLukePulverenti Luke Pulverenti luke pulverenti <LukePulverenti Luke Pulverenti luke.pulverenti@gmail.com>2012-08-19 18:35:45 -0400
committerLukePulverenti Luke Pulverenti luke pulverenti <LukePulverenti Luke Pulverenti luke.pulverenti@gmail.com>2012-08-19 18:35:45 -0400
commit3586c54e90811d106631ac429d126c0414889b64 (patch)
tree3d272e31a4466c560882d3ace522a01efb94e1a2 /MediaBrowser.ServerApplication/MainWindow.xaml.cs
parent87245d11fc6f129057f2dcd7d569423259f05f28 (diff)
Fixed some kernel/splash screen async startup issues
Diffstat (limited to 'MediaBrowser.ServerApplication/MainWindow.xaml.cs')
-rw-r--r--MediaBrowser.ServerApplication/MainWindow.xaml.cs42
1 files changed, 3 insertions, 39 deletions
diff --git a/MediaBrowser.ServerApplication/MainWindow.xaml.cs b/MediaBrowser.ServerApplication/MainWindow.xaml.cs
index 67e20b2a2..2e087a791 100644
--- a/MediaBrowser.ServerApplication/MainWindow.xaml.cs
+++ b/MediaBrowser.ServerApplication/MainWindow.xaml.cs
@@ -1,10 +1,5 @@
-using System;
-using System.Diagnostics;
+using System.Diagnostics;
using System.Windows;
-using MediaBrowser.Common.Logging;
-using MediaBrowser.Common.UI;
-using MediaBrowser.Controller;
-using MediaBrowser.Model.Progress;
namespace MediaBrowser.ServerApplication
{
@@ -16,38 +11,7 @@ namespace MediaBrowser.ServerApplication
public MainWindow()
{
InitializeComponent();
- LoadKernel();
- }
-
- private async void LoadKernel()
- {
- Progress<TaskProgress> progress = new Progress<TaskProgress>();
- Splash splash = new Splash(progress);
-
- splash.Show();
-
- try
- {
- DateTime now = DateTime.Now;
-
- await new Kernel().Init(progress);
-
- double seconds = (DateTime.Now - now).TotalSeconds;
-
- Logger.LogInfo("Kernel.Init completed in {0} seconds.", seconds);
-
- // Don't show the system tray icon until the kernel finishes.
- this.MbTaskbarIcon.Visibility = System.Windows.Visibility.Visible;
- }
- catch (Exception ex)
- {
- MessageBox.Show("There was an error launching Media Browser Server: " + ex.Message);
- Close();
- }
- finally
- {
- splash.Close();
- }
+ //LoadKernel();
}
#region Context Menu events
@@ -66,7 +30,7 @@ namespace MediaBrowser.ServerApplication
private void cmExit_click(object sender, RoutedEventArgs e)
{
- this.Close();
+ Close();
}
#endregion