Exemple #1
0
        public void RemoveExistingElement(TreeItemViewModel treeItem)
        {
            if (!SupportsChildren)
            {
                throw new ArtemisUIException("Cannot remove a child from a profile element of type " + ProfileElement.GetType().Name);
            }

            ProfileElement.RemoveChild(treeItem.ProfileElement);
            Children.Remove(treeItem);
            treeItem.Parent = null;
        }
Exemple #2
0
        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();
        }
Exemple #3
0
        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();
        }
Exemple #4
0
        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;
        }