private void btnOK_Click(object sender, EventArgs e) { int selCount = 0; for (int i = 0; i < pcmList.Count; i++) { if (pcmList[i].Selected) { selCount++; string fileName = pcmList[i].pcmFile.FileName; SelectPCM sPCM = pcmList[i]; LoggerBold(fileName); searchTargetTables(sPCM.pcmFile, tableIds, true); } } if (selCount == 0) { Logger("No files selected"); } else { refreshPcmList(); LoggerBold("Done, You can now save files"); } }
public void startTableCopy() { try { frmFileSelection frmF = new frmFileSelection(); frmF.btnOK.Text = "Select files"; frmF.Text = "Select target for tables"; frmF.LoadFiles(UniversalPatcher.Properties.Settings.Default.LastBINfolder); if (frmF.ShowDialog(this) == DialogResult.OK) { pcmList = new List <SelectPCM>(); for (int i = 0; i < frmF.listFiles.CheckedItems.Count; i++) { string fileName = frmF.listFiles.CheckedItems[i].Tag.ToString(); PcmFile newPCM = new PcmFile(fileName, true, ""); LoggerBold(fileName); newPCM.loadTunerConfig(); if (PCM.seekTablesImported && !newPCM.seekTablesImported) { newPCM.importSeekTables(); } SelectPCM sPCM = new SelectPCM(); sPCM.pcmFile = newPCM; searchTargetTables(sPCM.pcmFile, tableIds, false); pcmList.Add(sPCM); } LoggerBold("Select destination files and Press Apply to copy tables"); refreshPcmList(); } } catch (Exception ex) { LoggerBold(ex.Message); } }