}// ----------------------------------------- // -- private void btn_chksm_Click(object sender, EventArgs e) { FormMain.showCdInfo(postCdInfo); }// -----------------------------------------
}// ----------------------------------------- // -- // Event Clicked Compressed Button private void btn_CRUSH_Click(object sender, EventArgs e) { // Common callback for all job types Action <bool, CrushParams> jobCallback = (complete, jobdata) => { FormTools.invoke(this, () => { form_lockSection("all", false); form_set_crushed_size(jobdata.crushedSize); postCdInfo = jobdata.cd; // Either null or full info if (complete) { FormMain.sendMessage("Complete", 2); btn_chksm.Enabled = true; } else { FormMain.sendProgress(0); FormMain.sendMessage(CDCRUSH.ERROR, 3); } // Make progress bar and status message clear after FormMain.FLAG_REQUEST_STATUS_CLEAR = true; }); }; // Reset the message color, incase it was red FormMain.sendMessage("", 1); // Fix progress reporting. HACKY WAY :-/ CDCRUSH.HACK_CD_TRACKS = numberOfTracks; // Either compress to an archive, or just convert // Note : Progress updates are automatically being handled by the main FORM // This TUPLE will hold (CODECID, QUALITY INDEX) Tuple <string, int> audioQ = Tuple.Create(AudioMaster.codecs[combo_audio_c.SelectedIndex], combo_audio_q.SelectedIndex); bool res = CDCRUSH.startJob_Convert_Crush( combo_method.SelectedIndex, loadedCuePath, input_out.Text, audioQ, combo_data_c.SelectedIndex, info_cdtitle.Text, preparedCover, jobCallback ); // -- Check preliminary Job Status if (res) { form_lockSection("all", true); } else { FormMain.sendMessage(CDCRUSH.ERROR, 3); } }// -----------------------------------------