Beispiel #1
0
        private void materialFlatButton1_Click(object sender, EventArgs e)
        {
            MessageBox.Show("请选择视频下载路径,会将你所有选项下载到里面");
            var          dialog = new FolderBrowserDialog();
            DialogResult result = dialog.ShowDialog();

            if (result == DialogResult.OK)
            {
                string downloadpath = dialog.SelectedPath;
                foreach (IntereactiveVideo video in videos)
                {
                    episode ep = new episode();
                    ep.aid  = aid;
                    ep.cid  = video.cid;
                    ep.name = video.name + " (" + video.nodeid + ")";
                    ep.Download(downloadpath, 120);
                }
                Dialog.Show("成功添加下载!");
            }
            return;
        }
Beispiel #2
0
 public static void readMisson()
 {
     try
     {
         string json = File.ReadAllText(Environment.CurrentDirectory + "/config/download.session");
         List <DownloadSavedMisson> ms = new List <DownloadSavedMisson>();
         ms = JsonConvert.DeserializeObject <List <DownloadSavedMisson> >(json);
         foreach (DownloadSavedMisson dobj in ms)
         {
             episode ep = new episode();
             ep.aid             = dobj.aid;
             ep.cid             = dobj.cid;
             ep.savedir         = dobj.saveto;
             ep.name            = dobj.name;
             ep.selectedquality = dobj.quality;
             ep.Download(false);
         }
     }
     catch (Exception e)
     {
         //防止报错
     }
 }