Profile editor - Started implementing property add/remove handling

This commit is contained in:
SpoinkyNL committed 2020-02-11 23:24:17 +01:00
1 parent f1a1c7d34c
commit b3e1ba6d1c
11 files changed
+98 -24

No files matched your search

@@ -35,7 +35,7 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.LayerProperties
public BaseLayerProperty LayerProperty { get; }
public LayerPropertyViewModel Parent { get; }
public List<LayerPropertyViewModel> Children { get; set; }
public List<LayerPropertyViewModel> Children { get; }
public bool IsExpanded { get; set; }
@@ -78,5 +78,15 @@ 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;
}
}
}