Added dialog system

Added surface delete
This commit is contained in:
Robert Beekman committed 2019-10-26 21:54:25 +02:00
1 parent c7790c1d82
commit 89bd76387b
24 files changed
+470 -96

No files matched your search

+24 -1
View File
@@ -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();
});
}
}
}