Inheritance: FileTreeViewModel
Esempio n. 1
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. 2
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. 3
0
 protected override void Initialize()
 {
     _dirs.AddRange(_dir.EnumerateDirectories().RemoveHidden().Select(d => Get(this, d)));
     _files.AddRange(_dir.EnumerateFiles().RemoveHidden().Select(f => FileViewModel.Get(this, f)));
 }