private void LoadSubDirectories()
 {
     // Show subdirectory
     DirectoryInfo[] folders = (new DirectoryInfo(LocationText)).GetDirectories();
     foreach (DirectoryInfo folder in folders)
     {
         RootFoldersList.Add(new TreeFolderInfo(null, folder, true));
     }
 }
 private void LoadRootDrives()
 {
     // Load root drives
     DriveInfo[] drives = DriveInfo.GetDrives();
     foreach (DriveInfo drive in drives)
     {
         string fullText = drive.Name + drive.VolumeLabel;
         RootFoldersList.Add(new TreeFolderInfo(fullText, new DirectoryInfo(drive.Name), true));
     }
 }
        private void LocationLabel_MouseDown(object sender, MouseButtonEventArgs e)
        {
            // Open an aura first
            ModalDialogAura modalAura = new ModalDialogAura(this);

            modalAura.Show();

            // Open folder browser
            string path = null;

            if (Archive != null)
            {
                path = Archive.Path;
            }
            OpenFolderDialog dialog = new OpenFolderDialog(this, path);

            if (dialog.ShowDialog() == true)
            {
                LocationText = dialog.ChosenDirectoryPath;

                // Update display
                RootFoldersList.Clear();
                if (string.IsNullOrWhiteSpace(LocationText) == false)
                {
                    LoadSubDirectories();
                }
                else
                {
                    LoadRootDrives();
                }
            }
            else
            {
            }        // Nothing happens

            modalAura.Close();
        }