Наследование: FileTreeViewModel
Пример #1
0
 public ProjectViewModel(FolderViewModel parent, DirectoryInfo dir)
     : base(parent, dir)
 {
     var tuple = Workspace.Add(this);
     _id = tuple.Item1;
     _project = tuple.Item2;
 }
Пример #2
0
        public ProjectViewModel(FolderViewModel parent, DirectoryInfo dir)
            : base(parent, dir)
        {
            var tuple = Workspace.Add(this);

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

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

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