Removed static and added an error message
This commit is contained in:
parent
b50a15aaf4
commit
10551b6804
|
@ -23,15 +23,13 @@ namespace MediaBrowser.ServerApplication
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class MainWindow : Window
|
public partial class MainWindow : Window
|
||||||
{
|
{
|
||||||
protected static Kernel kernel;
|
|
||||||
|
|
||||||
public MainWindow()
|
public MainWindow()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
LoadKernel();
|
LoadKernel();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void LoadKernel()
|
private void LoadKernel()
|
||||||
{
|
{
|
||||||
Progress<TaskProgress> progress = new Progress<TaskProgress>();
|
Progress<TaskProgress> progress = new Progress<TaskProgress>();
|
||||||
SplashScreen splash = new SplashScreen(progress);
|
SplashScreen splash = new SplashScreen(progress);
|
||||||
|
@ -40,12 +38,11 @@ namespace MediaBrowser.ServerApplication
|
||||||
{
|
{
|
||||||
splash.Show();
|
splash.Show();
|
||||||
|
|
||||||
kernel = new Kernel();
|
new Kernel().Init(progress);
|
||||||
|
|
||||||
kernel.Init(progress);
|
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
MessageBox.Show("There was an error launching Media Browser: " + ex.Message);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user