private void ScrapeButton_Click(object sender, EventArgs e) { // check if a rom directory has been selected if (RomDirTextBox.Text == "") { MessageBox.Show("Oops! It looks like you forgot to select a directory containing the ROMs you want to scrape.", "Sselph Scraper GUI - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { // set the dir arguments that are dependent on the selected rom directory Properties.Settings.Default.rom_dir = "-rom_dir=" + "\"" + RomDirTextBox.Text + "\""; Properties.Settings.Default.image_dir = "-image_dir=" + "\"" + RomDirTextBox.Text + "\\" + Properties.Settings.Default.image_path_string + "\""; Properties.Settings.Default.marquee_dir = "-marquee_dir=" + "\"" + RomDirTextBox.Text + "\\" + Properties.Settings.Default.marquee_path_string + "\""; Properties.Settings.Default.video_dir = "-video_dir=" + "\"" + RomDirTextBox.Text + "\\" + Properties.Settings.Default.video_path_string + "\""; Properties.Settings.Default.output_file = "-output_file=" + "\"" + RomDirTextBox.Text + "\\" + "gamelist.xml" + "\""; Properties.Settings.Default.missing = "-missing=" + "\"" + RomDirTextBox.Text + "\\" + "miss.txt" + "\""; // build the string string scrape_options = BuildOutput(); // clear the rom dir text box RomDirTextBox.Text = ""; // clear the console control AppConsoleControl.ClearOutput(); // start the scraping process AppConsoleControl.StartProcess("scraper.exe", scrape_options); } }
private void CancelScrapeButton_Click(object sender, EventArgs e) { // cancel the scraping process if (AppConsoleControl.IsProcessRunning == true) { AppConsoleControl.StopProcess(); } }