Exemple #1
0
 private void btnBrowseDir_Click(object sender, EventArgs e)
 {
     try
     {
         OpenFileDialog dlgBrowse = new OpenFileDialog();
         while (dlgBrowse.ShowDialog() == DialogResult.OK)
         {
             if (DiskIO.IsArticleFile(dlgBrowse.FileName))
             {
                 txtFile.Text = dlgBrowse.FileName;
                 break;
             }
             else
             {
                 MessageBox.Show("Selected file is not an article (.pdf) file. Please Select another.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
             }
         }
     }
     catch (Exception exp)
     {
         Program.ShowExceptionData(exp);
     }
 }