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

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

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

            _dirs  = new List <FolderViewModel>();
            _files = new List <FileViewModel>();
        }
Esempio n. 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;
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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;
        }
Esempio n. 9
0
 public FolderViewModel(FolderViewModel parent, string path)
     : this(parent, new DirectoryInfo(path))
 {
 }
Esempio n. 10
0
 public CSharpFileViewModel(FolderViewModel parent, FileInfo file)
     : base(parent, file)
 {
 }
Esempio n. 11
0
 public FileViewModel(FolderViewModel parent, FileInfo file)
     : base(parent)
 {
     _parent = parent;
     _file   = file;
 }
Esempio n. 12
0
 public FileViewModel(FolderViewModel parent, FileInfo file)
     : base(parent)
 {
     _parent = parent;
     _file = file;
 }
Esempio n. 13
0
 public FileViewModel(FolderViewModel parent, string path)
     : this(parent, new FileInfo(path))
 {
 }
Esempio n. 14
0
 public FolderViewModel(FolderViewModel parent, string path)
     : this(parent, new DirectoryInfo(path))
 {
 }
Esempio n. 15
0
 public PackagesViewModel(FolderViewModel parent, DirectoryInfo dir, bool isRoot)
     : base(parent, dir)
 {
     _isRoot = isRoot;
 }
Esempio n. 16
0
 public CSharpFileViewModel(FolderViewModel parent, FileInfo file)
     : base(parent, file)
 {
 }
Esempio n. 17
0
 public PackagesViewModel(FolderViewModel parent, DirectoryInfo dir, bool isRoot)
     : base(parent, dir)
 {
     _isRoot = isRoot;
 }
Esempio n. 18
0
 public FileViewModel(FolderViewModel parent, string path)
     : this(parent, new FileInfo(path))
 {
 }