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

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

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

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