示例#1
0
        private void Expand()
        {
            if (Type == DirectoryItemType.File)
            {
                return;
            }

            Children = new ObservableCollection <DirectoryItemViewModel> (DirectoryStructure.GetDirectoryContent(FullPath).Select(c => new DirectoryItemViewModel(c.FullPath, c.Type)));
        }
示例#2
0
        public DirectoryStructureViewModel()
        {
            var drives = DirectoryStructure.GetLogicalDrives();

            Items = new ObservableCollection <DirectoryItemViewModel>(drives.Select(d => new DirectoryItemViewModel(d.FullPath, d.Type)));
        }