private void button5_Click(object sender, EventArgs e) { //PublicIP ip = new PublicIP(); //textBox1.Text = ip.IP + ip.Location + ip.ISP; TSDownload tsdd = new TSDownload("http://xiazai.xiazaiba.com/Soft/Q/QQ2014_5.5(11447)_XiaZaiBa.exe"); tsdd.Progressbar = progressBar1; tsdd.Start(); textBox1.Text = "开始下载?"; }
void DlNextST() { try { tsd.Stop(); } catch { } try { if (downloader.Status == DownloadStatus.Downloading) { downloader.Cancel(); } } catch { } if (listb.Count != 0) { List <BiliInterfaceInfo> lb = (List <BiliInterfaceInfo>)dataGridViewRAW.DataSource; listb[0].Fpaiming = lb?.Find(x => x.AVNUM == listb[0].AVNUM)?.Fpaiming ?? 0; string topstring = ""; if (listb[0].Fpaiming != 0 && listb[0].Fpaiming <= 20) { topstring = "TOP_" + listb[0].Fpaiming + "-"; } if (listb[0].mp4url != null) { tsd = new TSDownload(listb[0].mp4url, Environment.CurrentDirectory + $@"\video\{topstring}{listb[0].AVNUM}-{TSDownload.removeInvChrInPath(listb[0].title)}.mp4"); } else if (listb[0].flvurl != null) { tsd = new TSDownload(listb[0].flvurl, Environment.CurrentDirectory + $@"\video\{topstring}{listb[0].AVNUM}-{TSDownload.removeInvChrInPath(listb[0].title)}.flv"); } tsd.Progressbar = verticalProgressBar1; nowAV = listb[0]; Log.Info("正在下载视频 - " + listb[0].AVNUM + " | " + tsd.URL); pictureBoxDl.ImageLocation = listb[0].pic; tsd.Start(); listb.RemoveAt(0); } else { Log.Info("批量下载完成"); timer1.Enabled = false; textBox1.Text = "下载状态将会显示在这里"; } }
private void button6_Click(object sender, EventArgs e) { tsd.Progressbar = progressBar1; tsd.Start(); textBox1.Text = "开始下载?"; }