private void START_DOWNLOAD_Click(object sender, EventArgs e) { if (strPath == null) { MessageBox.Show("Please setting Path first.", "Caution", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1); return; } foreach (int nIndexChecked in PRINT_SEED.CheckedIndices) { DOWN_PROGRESS.Maximum = PRINT_SEED.CheckedIndices.Count; try { new WebClient().DownloadFile(rss.Items[nIndexChecked].Link, strPath + "\\" + rss.Items[nIndexChecked].Title + ".torrent"); DOWN_PROGRESS.Value = nIndexChecked; } catch (Exception exc) { PRINT_OPTION.AppendText(exc.ToString()); DOWN_PROGRESS.Value = nIndexChecked; } } MessageBox.Show("Download Completed!"); DOWN_PROGRESS.Value = 0; }
private void INPUT_OPTION_Click(object sender, EventArgs e) { // Ahh... F*****g int nTemp = 0; PRINT_OPTION.Clear(); bool CheckSelect = false; string TempURL = "http://tokyotosho.info/rss.php?filter="; CheckboxSelect Chbox = new CheckboxSelect(TempURL, 14); Chbox.InputCheckbox(nTemp++, CH_ANIME, "Anime"); Chbox.InputCheckbox(nTemp++, CH_MUSIC, "Music"); Chbox.InputCheckbox(nTemp++, CH_MANGA, "Manga"); Chbox.InputCheckbox(nTemp++, CH_HENTAI, "Hentai"); Chbox.InputCheckbox(nTemp++, CH_OTHER, "Other"); Chbox.InputCheckbox(nTemp++, CH_RAWS, "Raws"); Chbox.InputCheckbox(nTemp++, CH_DRAMA, "Drama"); Chbox.InputCheckbox(nTemp++, CH_MVIDEO, "Music Video"); Chbox.InputCheckbox(nTemp++, CH_NONENG, "Non-English"); Chbox.InputCheckbox(nTemp++, CH_BATCH, "Batch"); Chbox.InputCheckbox(nTemp++, CH_HANIME, "Hentai Anime"); Chbox.InputCheckbox(nTemp++, CH_HMANGA, "Hentai Manga"); Chbox.InputCheckbox(nTemp++, CH_HGAMES, "Hentai Games"); Chbox.InputCheckbox(nTemp++, CH_JAV, "JAV"); nTemp = 0; for (int i = 0; i < 14; i++) { if (++nTemp == 6) { nTemp = 7; } if (Chbox.returnChbox(i).Checked == true) { CheckSelect = true; if (Chbox.returnURL() != TempURL) { Chbox.AddURL("," + nTemp); } else { Chbox.AddURL(nTemp.ToString()); } PRINT_OPTION.AppendText("Select " + (i + 1) + ". " + Chbox.returnName(i) + "\n"); } } if (!CheckSelect) { PRINT_OPTION.AppendText("Please select at least one.\n"); return; } try { rss = new RssReader(); rss.FeedUrl = Chbox.returnURL(); PRINT_OPTION.AppendText("Successfuly opening tokyotosho.info\n"); PRINT_SEED.Items.Clear(); foreach (RssItem item in rss.Execute()) { PRINT_SEED.Items.Add(item.Title); } } catch (Exception exc) { exc.ToString(); PRINT_OPTION.AppendText("Error opening tokyotosho.info\n"); } }