mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Added device identification to surface editor
Fixed dialog rendering Cleaned up XAML
This commit is contained in:
1 parent
0d1370af30
commit
6719a36c50
24 files changed
+165
-79
No files matched your search
@@ -0,0 +1,6 @@
|
||||
namespace Artemis.UI.Ninject.Factories
|
||||
{
|
||||
public interface IArtemisUIFactory
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
using Artemis.Core.Models.Surface;
|
||||
using Artemis.UI.Screens.Settings.Tabs.Devices;
|
||||
|
||||
namespace Artemis.UI.Ninject.Factories
|
||||
{
|
||||
public interface IDeviceSettingsViewModelFactory : IArtemisUIFactory
|
||||
{
|
||||
DeviceSettingsViewModel Create(Device device);
|
||||
}
|
||||
}
|
||||
@@ -3,8 +3,8 @@ using Artemis.UI.Screens.Module;
|
||||
|
||||
namespace Artemis.UI.Ninject.Factories
|
||||
{
|
||||
public interface IModuleViewModelFactory
|
||||
public interface IModuleViewModelFactory : IArtemisUIFactory
|
||||
{
|
||||
ModuleRootViewModel CreateModuleViewModel(Module module);
|
||||
ModuleRootViewModel Create(Module module);
|
||||
}
|
||||
}
|
||||
@@ -3,8 +3,8 @@ using Artemis.UI.Screens.Module.ProfileEditor;
|
||||
|
||||
namespace Artemis.UI.Ninject.Factories
|
||||
{
|
||||
public interface IProfileEditorViewModelFactory
|
||||
public interface IProfileEditorViewModelFactory : IArtemisUIFactory
|
||||
{
|
||||
ProfileEditorViewModel CreateModuleViewModel(ProfileModule module);
|
||||
ProfileEditorViewModel Create(ProfileModule module);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using Artemis.UI.Ninject.Factories;
|
||||
using System;
|
||||
using Artemis.UI.Ninject.Factories;
|
||||
using Artemis.UI.Screens;
|
||||
using Artemis.UI.Screens.Module.ProfileEditor;
|
||||
using Artemis.UI.Services.Interfaces;
|
||||
@@ -17,6 +18,9 @@ namespace Artemis.UI.Ninject
|
||||
{
|
||||
public override void Load()
|
||||
{
|
||||
if (Kernel == null)
|
||||
throw new ArgumentNullException("Kernel shouldn't be null here.");
|
||||
|
||||
// Bind all built-in VMs
|
||||
Kernel.Bind(x =>
|
||||
{
|
||||
@@ -35,10 +39,19 @@ namespace Artemis.UI.Ninject
|
||||
.BindAllBaseClasses();
|
||||
});
|
||||
|
||||
// Bind the module VM
|
||||
Bind<IModuleViewModelFactory>().ToFactory();
|
||||
Bind<IProfileEditorViewModelFactory>().ToFactory();
|
||||
// Bind UI factories
|
||||
Kernel.Bind(x =>
|
||||
{
|
||||
x.FromThisAssembly()
|
||||
.SelectAllClasses()
|
||||
.InheritedFrom<IArtemisUIFactory>()
|
||||
.BindToFactory();
|
||||
});
|
||||
|
||||
Kernel.Bind<IDeviceSettingsViewModelFactory>().ToFactory();
|
||||
Kernel.Bind<IModuleViewModelFactory>().ToFactory();
|
||||
Kernel.Bind<IProfileEditorViewModelFactory>().ToFactory();
|
||||
|
||||
// Bind profile editor VMs
|
||||
Kernel.Bind(x =>
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user