/// <summary>
        /// Default constructor
        /// </summary>
        public BrowserStructureViewModel()
        {
            var children = BrowserStructure.GetLogicalDrives();

            this.Items = new ObservableCollection <BrowserItemViewModel>(
                children.Select(drive => new BrowserItemViewModel(drive.FullPath, Data.BrowserItemType.Drive)));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Expands this directory and finds all children
        /// </summary>
        private void Expand()
        {
            if (this.Type == BrowserItemType.File)
            {
                return;
            }

            var children = BrowserStructure.GetDirectoryContents(this.FullPath);

            this.Children = new ObservableCollection <BrowserItemViewModel>(
                children.Select(content => new BrowserItemViewModel(content.FullPath, content.Type)));
        }