Inheritance: ItemViewModel
 private DirectoryViewModel CreateDirectoryViewModel(ProjectFolder projectFolder, DirectoryViewModel parent)
 {
     var viewModel = new DirectoryViewModel(parent, projectFolder);
     if (_settings.IsFlatMode) {
         foreach (var project in new[]{projectFolder}.Flatten(f => f.Projects, f => f.Folders)) {
             viewModel.Projects.Add(CreateProjectViewModel(project, viewModel));
         }
     } else {
         foreach (var folder in projectFolder.Folders) {
             viewModel.Directories.Add(CreateDirectoryViewModel(folder, viewModel));
         }
         foreach (var project in projectFolder.Projects) {
             viewModel.Projects.Add(CreateProjectViewModel(project, viewModel));
         }
     }
     return viewModel;
 }
Esempio n. 2
0
        private DirectoryViewModel CreateDirectoryViewModel(ProjectFolder projectFolder, DirectoryViewModel parent)
        {
            var viewModel = new DirectoryViewModel(parent, projectFolder);

            if (_settings.IsFlatMode)
            {
                foreach (var project in new[] { projectFolder }.Flatten(f => f.Projects, f => f.Folders))
                {
                    viewModel.Projects.Add(CreateProjectViewModel(project, viewModel));
                }
            }
            else
            {
                foreach (var folder in projectFolder.Folders)
                {
                    viewModel.Directories.Add(CreateDirectoryViewModel(folder, viewModel));
                }
                foreach (var project in projectFolder.Projects)
                {
                    viewModel.Projects.Add(CreateProjectViewModel(project, viewModel));
                }
            }
            return(viewModel);
        }
Esempio n. 3
0
 private ProjectViewModel CreateProjectViewModel(Project project, DirectoryViewModel parent)
 {
     return(new ProjectViewModel(parent, project));
 }
Esempio n. 4
0
 protected ItemViewModel(DirectoryViewModel parent)
 {
     _parent = parent;
 }
 private ProjectViewModel CreateProjectViewModel(Project project, DirectoryViewModel parent)
 {
     return new ProjectViewModel(parent, project);
 }
Esempio n. 6
0
 public ProjectViewModel(DirectoryViewModel parent, Project project) : base(parent)
 {
     _project = project;
 }
Esempio n. 7
0
 public DirectoryViewModel(DirectoryViewModel parent, ProjectFolder projectFolder)
     : base(parent)
 {
     _projectFolder = projectFolder;
 }
Esempio n. 8
0
 protected ItemViewModel(DirectoryViewModel parent)
 {
     _parent = parent;
 }
Esempio n. 9
0
 public DirectoryViewModel(DirectoryViewModel parent, ProjectFolder projectFolder) : base(parent)
 {
     _projectFolder = projectFolder;
 }
Esempio n. 10
0
 public ProjectViewModel(DirectoryViewModel parent, Project project)
     : base(parent)
 {
     _project = project;
 }