/// <summary>
        /// Default constructor
        /// </summary>
        public DirectoryStructreViewModel()
        {
            // Get the logical drives
            var childeren = DirectoryStructure.GetLogicalDrives();

            // Create the view models from the data
            this.Items = new ObservableCollection <DirectoryItemViewModel>(
                childeren.Select(drive => new DirectoryItemViewModel(drive.FullPath, DirectoryItemType.Drive)));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Expands this directory
        /// </summary>
        private void Expand()
        {
            if (this.Type == DirectoryItemType.File)
            {
                return;
            }

            // Find all Children
            var childeren = DirectoryStructure.GetDirectoryContents(this.FullPath);

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