public void AddFolder() { if (!SupportsChildren) { throw new ArtemisUIException("Cannot add a folder to a profile element of type " + ProfileElement.GetType().Name); } ProfileElement.AddChild(new Folder(ProfileElement.Profile, ProfileElement, "New folder")); UpdateProfileElements(); _profileEditorService.UpdateSelectedProfile(); }
public void AddExistingElement(TreeItemViewModel treeItem) { if (!SupportsChildren) { throw new ArtemisUIException("Cannot add a child to a profile element of type " + ProfileElement.GetType().Name); } ProfileElement.AddChild(treeItem.ProfileElement); Children.Add(treeItem); treeItem.Parent = this; }
public void AddLayer() { if (!SupportsChildren) { throw new ArtemisUIException("Cannot add a layer to a profile element of type " + ProfileElement.GetType().Name); } var layer = new Layer(ProfileElement.Profile, ProfileElement, "New layer"); foreach (var baseLayerProperty in layer.Properties) { _layerService.InstantiateKeyframeEngine(baseLayerProperty); } ProfileElement.AddChild(layer); UpdateProfileElements(); _profileEditorService.UpdateSelectedProfile(); }