mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Core - Streamlined public parts of profile creation
UI - Started adjusting the VMs for the layer refactor
This commit is contained in:
1 parent
12ac50226f
commit
3e75f200f4
58 files changed
+694
-1196
No files matched your search
@@ -5,6 +5,7 @@ using Artemis.Core;
|
||||
using Artemis.Core.Modules;
|
||||
using Artemis.Core.Services;
|
||||
using Ninject;
|
||||
using Ninject.Parameters;
|
||||
using Serilog;
|
||||
using Stylet;
|
||||
|
||||
@@ -269,6 +270,16 @@ namespace Artemis.UI.Shared.Services
|
||||
return time;
|
||||
}
|
||||
|
||||
public PropertyInputViewModel<T> CreatePropertyInputViewModel<T>(LayerProperty<T> layerProperty)
|
||||
{
|
||||
var registration = RegisteredPropertyEditors.FirstOrDefault(r => r.SupportedType == typeof(T));
|
||||
if (registration == null)
|
||||
return null;
|
||||
|
||||
var parameter = new ConstructorArgument("layerProperty", layerProperty);
|
||||
return (PropertyInputViewModel<T>) Kernel.Get(registration.ViewModelType, parameter);
|
||||
}
|
||||
|
||||
public ProfileModule GetCurrentModule()
|
||||
{
|
||||
return SelectedProfile?.Module;
|
||||
|
||||
Reference in new issue
Block a user