mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Added dialog system
Added surface delete
This commit is contained in:
1 parent
c7790c1d82
commit
89bd76387b
24 files changed
+470
-96
No files matched your search
@@ -1,7 +1,11 @@
|
||||
using Artemis.UI.Services.Interfaces;
|
||||
using Artemis.UI.Stylet;
|
||||
using Artemis.UI.ViewModels.Dialogs;
|
||||
using Artemis.UI.ViewModels.Interfaces;
|
||||
using FluentValidation;
|
||||
using Ninject.Extensions.Conventions;
|
||||
using Ninject.Modules;
|
||||
using Stylet;
|
||||
|
||||
namespace Artemis.UI.Ninject
|
||||
{
|
||||
@@ -10,7 +14,7 @@ namespace Artemis.UI.Ninject
|
||||
{
|
||||
public override void Load()
|
||||
{
|
||||
// Bind all built-in viewmodels
|
||||
// Bind all built-in VMs
|
||||
Kernel.Bind(x =>
|
||||
{
|
||||
x.FromThisAssembly()
|
||||
@@ -19,6 +23,15 @@ namespace Artemis.UI.Ninject
|
||||
.BindAllInterfaces();
|
||||
});
|
||||
|
||||
// Bind all dialog VMs
|
||||
Kernel.Bind(x =>
|
||||
{
|
||||
x.FromThisAssembly()
|
||||
.SelectAllClasses()
|
||||
.InheritedFrom<DialogViewModelBase>()
|
||||
.BindAllBaseClasses();
|
||||
});
|
||||
|
||||
// Bind all UI services as singletons
|
||||
Kernel.Bind(x =>
|
||||
{
|
||||
@@ -28,6 +41,16 @@ namespace Artemis.UI.Ninject
|
||||
.BindAllInterfaces()
|
||||
.Configure(c => c.InSingletonScope());
|
||||
});
|
||||
|
||||
// Bind all validators
|
||||
Bind(typeof(IModelValidator<>)).To(typeof(FluentValidationAdapter<>));
|
||||
Kernel.Bind(x =>
|
||||
{
|
||||
x.FromThisAssembly()
|
||||
.SelectAllClasses()
|
||||
.InheritedFrom<IValidator>()
|
||||
.BindAllInterfaces();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user