mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Added a Material-styled scrollbar
Cleaned up reorder code Reorganised profile editor layout and added panel titles
This commit is contained in:
1 parent
0ebb2ac556
commit
2ee1db6893
31 files changed
+896
-368
No files matched your search
@@ -1,5 +1,7 @@
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Threading;
|
||||
using Artemis.Core.Ninject;
|
||||
using Artemis.Core.Services.Interfaces;
|
||||
using Artemis.UI.Ninject;
|
||||
@@ -7,6 +9,7 @@ using Artemis.UI.Screens;
|
||||
using Artemis.UI.Screens.Splash;
|
||||
using Artemis.UI.Stylet;
|
||||
using Ninject;
|
||||
using Serilog;
|
||||
using Stylet;
|
||||
|
||||
namespace Artemis.UI
|
||||
@@ -31,12 +34,33 @@ namespace Artemis.UI
|
||||
|
||||
Task.Run(() =>
|
||||
{
|
||||
// Start the Artemis core
|
||||
_core = Kernel.Get<ICoreService>();
|
||||
// When the core is done, hide the splash and show the main window
|
||||
_core.Initialized += (sender, args) => ShowMainWindow(windowManager, splashViewModel);
|
||||
// While the core is instantiated, start listening for events on the splash
|
||||
splashViewModel.ListenToEvents();
|
||||
try
|
||||
{
|
||||
// Start the Artemis core
|
||||
_core = Kernel.Get<ICoreService>();
|
||||
// When the core is done, hide the splash and show the main window
|
||||
_core.Initialized += (sender, args) => ShowMainWindow(windowManager, splashViewModel);
|
||||
// While the core is instantiated, start listening for events on the splash
|
||||
splashViewModel.ListenToEvents();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
var logger = Kernel.Get<ILogger>();
|
||||
logger.Fatal(e, "Fatal exception during initialization, shutting down.");
|
||||
|
||||
// TODO: A proper exception viewer
|
||||
Execute.OnUIThread(() =>
|
||||
{
|
||||
windowManager.ShowMessageBox(e.Message + "\n\n Please refer the log file for more details.",
|
||||
"Fatal exception during initialization",
|
||||
MessageBoxButton.OK,
|
||||
MessageBoxImage.Error
|
||||
);
|
||||
Environment.Exit(1);
|
||||
});
|
||||
|
||||
throw;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -59,5 +83,13 @@ namespace Artemis.UI
|
||||
kernel.Load<CoreModule>();
|
||||
base.ConfigureIoC(kernel);
|
||||
}
|
||||
|
||||
protected override void OnUnhandledException(DispatcherUnhandledExceptionEventArgs e)
|
||||
{
|
||||
var logger = Kernel.Get<ILogger>();
|
||||
logger.Fatal(e.Exception, "Fatal exception, shutting down.");
|
||||
|
||||
base.OnUnhandledException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user