mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 11:26:27 +00:00
Added some module architecture
This commit is contained in:
1 parent
8d9076a241
commit
84f21aa044
25 files changed
+1732
-59
No files matched your search
@@ -1,4 +1,7 @@
|
||||
using Artemis.UI.Ninject;
|
||||
using System.Windows;
|
||||
using Artemis.Core.Ninject;
|
||||
using Artemis.Core.Services.Interfaces;
|
||||
using Artemis.UI.Ninject;
|
||||
using Artemis.UI.Stylet;
|
||||
using Artemis.UI.ViewModels;
|
||||
using Ninject;
|
||||
@@ -7,9 +10,26 @@ namespace Artemis.UI
|
||||
{
|
||||
public class Bootstrapper : NinjectBootstrapper<RootViewModel>
|
||||
{
|
||||
private ICoreService _core;
|
||||
|
||||
protected override void OnExit(ExitEventArgs e)
|
||||
{
|
||||
// Stop the Artemis core
|
||||
_core.Dispose();
|
||||
|
||||
base.OnExit(e);
|
||||
}
|
||||
|
||||
protected override void ConfigureIoC(IKernel kernel)
|
||||
{
|
||||
// Load this assembly's module
|
||||
kernel.Load<UIModule>();
|
||||
// Load the core assembly's module
|
||||
kernel.Load<CoreModule>();
|
||||
|
||||
// Start the Artemis core, the core's constructor will initialize async
|
||||
_core = Kernel.Get<ICoreService>();
|
||||
|
||||
base.ConfigureIoC(kernel);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user