Exemple #1
0
 private void btnBrowseDir_Click(object sender, EventArgs e)
 {
     try
     {
         FolderBrowserDialog dlgBrowse = new FolderBrowserDialog();
         while (dlgBrowse.ShowDialog() == DialogResult.OK)
         {
             if (DiskIO.DirectoryHasMusicFile(dlgBrowse.SelectedPath))
             {
                 txtDirectory.Text = dlgBrowse.SelectedPath;
                 break;
             }
             else
             {
                 MessageBox.Show("This folder contains no music file. Please Select another.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
             }
         }
     }
     catch (Exception exp)
     {
         Program.ShowExceptionData(exp);
     }
 }