public ParticleProcessorViewModel(IParticleProcessor particleProcessor, TreeViewItemViewModel parent, INodeAddedCallback nodeAddCB,
     ICommand removeParticleProcessor)
     : base(particleProcessor.GetType().Name, parent, nodeAddCB, particleProcessor)
 {
     RemoveParticleProcessor = removeParticleProcessor;
     ParticleProcessor = particleProcessor;
 }
Exemple #2
0
 public BoneViewModel(
     TreeViewItemViewModel parent, INodeAddedCallback nodeAddCB, ICommand attachToBoneCommand, BoneActor actor)
     : base(parent, nodeAddCB, false)
 {
     BoneActor = actor;
     AttachToBoneCommand = attachToBoneCommand;
 }
 public ParticleSpawnProcessorViewModel(ParticleSpawnProcessor spawnProcessor, TreeViewItemViewModel parent, INodeAddedCallback nodeAddCB,
     ICommand replaceSpawnParticleProcessor)
     : base(spawnProcessor.GetType().Name, parent, nodeAddCB, spawnProcessor)
 {
     ReplaceSpawnParticleProcessor = replaceSpawnParticleProcessor;
     SpawnProcessor = spawnProcessor;
 }
Exemple #4
0
 public ActorViewModel(TreeViewItemViewModel parent, INodeAddedCallback nodeAddCB, Type t, string assemblyName)
     : base(parent, nodeAddCB, false)
 {
     ActorType = t;
     ActorName = t.Name;
     AssemblyName = assemblyName;
 }
        protected TreeViewItemViewModel(TreeViewItemViewModel parent, INodeAddedCallback nodeAddCB, bool lazyLoadChildren)
            : this()
        {
            _parent = parent;
            ChildAdded += nodeAddCB.NodeAddedCallback;

            if (lazyLoadChildren)
                _children.Add(DummyChild);
        }
 public FolderViewModel(
     TreeViewItemViewModel parent,
     INodeAddedCallback nodeAddCB, 
     string folderName, 
     string folderFullPath, 
     string tag = null)
     : base(parent, nodeAddCB, false)
 {
     FolderName = folderName;
     FolderFullPath = folderFullPath;
     Tag = tag;
 }
 public ParticleEmitterViewModel(
     string name, 
     INodeAddedCallback nodeAddCB, 
     ICommand setParticleSpawnProcessor, 
     ICommand setParticleProcessor,
     TreeViewItemViewModel parent,
     ParticleEmitter emitter)
     : base(name, parent, nodeAddCB, emitter)
 {
     SetParticleSpawnProcessor = setParticleSpawnProcessor;
     SetParticleProcessor = setParticleProcessor;
     ParticleEmitter = emitter;
 }
        private void AddScenesAndFolders(TreeViewItemViewModel parent, DirectoryInfo currentDirectory)
        {
            var fis = currentDirectory.GetFilesByExtension(FilesExtensions.SceneSavedModel);
            foreach (var fi in fis)
            {
                var svm = new SceneViewModel(parent, _nodeAddCB, fi.Name, fi.FullName);
                parent.Children.Add(svm);
            }

            var childDirectories = currentDirectory.GetDirectories();
            foreach (var di in childDirectories)
            {
                var folder = new FolderViewModel(parent, _nodeAddCB, di.Name, di.FullName, "Scenes");
                parent.Children.Add(folder);
                AddScenesAndFolders(folder, di);
            }
        }
Exemple #9
0
 public SceneViewModel(TreeViewItemViewModel parent, INodeAddedCallback nodeAddCB, string sceneName, string path)
     : base(parent, nodeAddCB, false)
 {
     SceneName = sceneName;
     Path = path;
 }
 public TextureViewModel(TreeViewItemViewModel parent, INodeAddedCallback nodeAddCB, string name, string fullpath)
     : base(parent, nodeAddCB, false)
 {
     _name = name;
     _fullPath = fullpath;
 }
Exemple #11
0
 public AssetViewModel(TreeViewItemViewModel parent, INodeAddedCallback nodeAddCB, BoneAttachedRenderableAsset asset, string name)
     : base(parent, nodeAddCB, false)
 {
     Name = name;
     Asset = asset;
 }
 public void NodeAddedCallback(TreeViewItemViewModel parent, IEnumerable<TreeViewItemViewModel> newModels)
 {
 }
 public AssemblyViewModel(TreeViewItemViewModel parent, INodeAddedCallback nodeAddCB, string assemblyName)
     : base(parent, nodeAddCB, false)
 {
     AssemblyName = assemblyName;
 }
        private void treeView_MouseMove(object sender, MouseEventArgs e)
        {
            try
            {
                if (e.LeftButton == MouseButtonState.Pressed)
                {
                    var currentPosition = e.GetPosition(GameObjects);

                    if ((Math.Abs(currentPosition.X - _lastMouseDown.X) > 10.0) ||
                        (Math.Abs(currentPosition.Y - _lastMouseDown.Y) > 10.0))
                    {
                        draggedItem = (TreeViewItemViewModel)GameObjects.SelectedItem;
                        if (draggedItem != null)
                        {
                            var finalDropEffect =
                                DragDrop.DoDragDrop(
                                    GameObjects,
                                    GameObjects.SelectedValue,
                                    DragDropEffects.Move);
                            //Checking target is not null and item is
                            //dragging(moving)
                            /*if ((finalDropEffect == DragDropEffects.Move) &&
                    (_target != null))
                            {
                                // A Move drop was accepted
                                /*if (!draggedItem.Header.ToString().Equals
                    (_target.Header.ToString()))
                                {
                                    CopyItem(draggedItem, _target);
                                    _target = null;
                                    draggedItem = null;
                                }
                            }*/
                        }
                    }
                }
            }
            catch (Exception)
            {
            }
        }
 public void NodeAddedCallback(TreeViewItemViewModel parent, IEnumerable<TreeViewItemViewModel> newModels)
 {
     if(OnGameObjectsAdded != null)
         OnGameObjectsAdded(parent, newModels);
 }
 public ParticleTreeViewItem(string name, TreeViewItemViewModel parent, INodeAddedCallback nodeAddCB, object editableObject)
     : base(parent, nodeAddCB, false)
 {
     Name = name;
     EditableObject = editableObject;
 }