private void tsmiOpenPathOrMedia_Click(object sender, EventArgs e)
 {
     if (folderDialog.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
     {
         _configData.DirPaths.PathList.Add(folderDialog.SelectedPath);
         ConfigManger.SaveConfigData(_configData);
         OpenFileForm form = new OpenFileForm(_configData);
         form.ShowDialog();
     }
 }
 private void tsmiOpenFile_Click(object sender, EventArgs e)
 {
     if (fileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         foreach (var file in fileDialog.FileNames)
         {
             _configData.RecentFiles.Files.Insert(0, file);
         }
         ConfigManger.SaveConfigData(_configData);
         OpenFileForm form = new OpenFileForm(_configData);
         if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             _fileInfoList = form.Tag as List <FileInformation>;
         }
     }
 }
 private void MainForm_Load(object sender, EventArgs e)
 {
     progressBar.Visible        = false;
     ConfigManger.ConfigPath    = Application.StartupPath + @"\config.xml";
     _configData                = ConfigManger.GetConfigData();
     DBOperator.DBConnectString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Application.StartupPath + "\\InnerDB.idf;Persist Security Info=True;Mode=Share Exclusive;Jet OLEDB:Database Password=iicdc;";
     //_configData.WaveConfigs.WaveConfigCount = 10;
     _configData.RecentFiles.FilesCount = 10;
     if (!string.IsNullOrEmpty(_configData.MediaPath) ||
         (_configData.RecentFiles.Files != null &&
          _configData.RecentFiles.Files.Count > 0) ||
         _configData.DirPaths.PathList.Count > 0)
     {
         OpenFileForm form = new OpenFileForm(_configData);
         if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             progressBar.Visible = true;
             _fileInfoList       = form.Tag as List <FileInformation>;
         }
     }
 }