UI VM factories - Shortened names for readibility

Layer properties - Ensure only LayerBrushes can add properties and make sure that method instantiates a keyframe engine
Layer properties UI - Respond to properties being added/removed
This commit is contained in:
Robert committed 2020-02-12 14:03:18 +01:00
1 parent b3e1ba6d1c
commit f4c1c9de3d
29 files changed
+417 -303

No files matched your search

@@ -16,8 +16,7 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.LayerProperties
private readonly IProfileEditorService _profileEditorService;
private bool _keyframesEnabled;
public LayerPropertyViewModel(BaseLayerProperty layerProperty, LayerPropertyViewModel parent, ILayerPropertyViewModelFactory layerPropertyViewModelFactory, IKernel kernel,
IProfileEditorService profileEditorService)
public LayerPropertyViewModel(BaseLayerProperty layerProperty, LayerPropertyViewModel parent, IKernel kernel, IProfileEditorService profileEditorService)
{
_kernel = kernel;
_profileEditorService = profileEditorService;
@@ -28,8 +27,7 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.LayerProperties
Children = new List<LayerPropertyViewModel>();
IsExpanded = layerProperty.ExpandByDefault;
foreach (var child in layerProperty.Children)
Children.Add(layerPropertyViewModelFactory.Create(child, this));
Parent?.Children.Add(this);
}
public BaseLayerProperty LayerProperty { get; }
@@ -78,15 +76,5 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.LayerProperties
match.Initialize(this);
return match;
}
public IEnumerable<LayerPropertyViewModel> GetAllChildren()
{
var children = new List<LayerPropertyViewModel>();
children.AddRange(Children);
foreach (var layerPropertyViewModel in children)
children.AddRange(layerPropertyViewModel.GetAllChildren());
return children;
}
}
}