Inheritance: FileTreeViewModel
Beispiel #1
0
 public ProjectViewModel(FolderViewModel parent, DirectoryInfo dir)
     : base(parent, dir)
 {
     var tuple = Workspace.Add(this);
     _id = tuple.Item1;
     _project = tuple.Item2;
 }
Beispiel #2
0
        public ProjectViewModel(FolderViewModel parent, DirectoryInfo dir)
            : base(parent, dir)
        {
            var tuple = Workspace.Add(this);

            _id      = tuple.Item1;
            _project = tuple.Item2;
        }
Beispiel #3
0
        public FolderViewModel(FolderViewModel parent, DirectoryInfo dir)
            : base(parent)
        {
            _dir = dir;
            _parent = parent;

            _dirs = new List<FolderViewModel>();
            _files = new List<FileViewModel>();
        }
Beispiel #4
0
        public FolderViewModel(FolderViewModel parent, DirectoryInfo dir)
            : base(parent)
        {
            _dir    = dir;
            _parent = parent;

            _dirs  = new List <FolderViewModel>();
            _files = new List <FileViewModel>();
        }
Beispiel #5
0
        internal static FileViewModel Get(FolderViewModel folderViewModel, FileInfo file)
        {
            FileViewModel ret;

            if (file.Extension == ".cs")
                ret = new CSharpFileViewModel(folderViewModel, file);

            else
                ret = new FileViewModel(folderViewModel, file);

            ret.Initialize();
            return ret;
        }
Beispiel #6
0
        internal static FileViewModel Get(FolderViewModel folderViewModel, FileInfo file)
        {
            FileViewModel ret;

            if (file.Extension == ".cs")
            {
                ret = new CSharpFileViewModel(folderViewModel, file);
            }

            else
            {
                ret = new FileViewModel(folderViewModel, file);
            }

            ret.Initialize();
            return(ret);
        }
Beispiel #7
0
        public static FolderViewModel Get(FolderViewModel parent, DirectoryInfo dir)
        {
            FolderViewModel ret;

            if (dir.Name == "packages" && parent is WorkspaceViewModel)
            {
                ret = new PackagesViewModel(parent, dir, true);
            }

            else if (dir.GetFiles("project.json", SearchOption.TopDirectoryOnly).Length == 1)
            {
                ret = new ProjectViewModel(parent, dir);
            }

            else
            {
                ret = new FolderViewModel(parent, dir);
            }

            ret.Initialize();
            return(ret);
        }
Beispiel #8
0
        public static FolderViewModel Get(FolderViewModel parent, DirectoryInfo dir)
        {
            FolderViewModel ret;
            if (dir.Name == "packages" && parent is WorkspaceViewModel)
                ret = new PackagesViewModel(parent, dir, true);

            else if (dir.GetFiles("project.json", SearchOption.TopDirectoryOnly).Length == 1)
                ret = new ProjectViewModel(parent, dir);

            else
                ret = new FolderViewModel(parent, dir);

            ret.Initialize();
            return ret;
        }
Beispiel #9
0
 public FolderViewModel(FolderViewModel parent, string path)
     : this(parent, new DirectoryInfo(path))
 {
 }
Beispiel #10
0
 public CSharpFileViewModel(FolderViewModel parent, FileInfo file)
     : base(parent, file)
 {
 }
Beispiel #11
0
 public FileViewModel(FolderViewModel parent, FileInfo file)
     : base(parent)
 {
     _parent = parent;
     _file   = file;
 }
Beispiel #12
0
 public FileViewModel(FolderViewModel parent, FileInfo file)
     : base(parent)
 {
     _parent = parent;
     _file = file;
 }
Beispiel #13
0
 public FileViewModel(FolderViewModel parent, string path)
     : this(parent, new FileInfo(path))
 {
 }
Beispiel #14
0
 public FolderViewModel(FolderViewModel parent, string path)
     : this(parent, new DirectoryInfo(path))
 {
 }
Beispiel #15
0
 public PackagesViewModel(FolderViewModel parent, DirectoryInfo dir, bool isRoot)
     : base(parent, dir)
 {
     _isRoot = isRoot;
 }
Beispiel #16
0
 public CSharpFileViewModel(FolderViewModel parent, FileInfo file)
     : base(parent, file)
 {
 }
Beispiel #17
0
 public PackagesViewModel(FolderViewModel parent, DirectoryInfo dir, bool isRoot)
     : base(parent, dir)
 {
     _isRoot = isRoot;
 }
Beispiel #18
0
 public FileViewModel(FolderViewModel parent, string path)
     : this(parent, new FileInfo(path))
 {
 }