Ejemplo n.º 1
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)
         {
             DownloadObject obj = new DownloadObject(dobj.aid, dobj.cid, dobj.quality, dobj.saveto, dobj.name, dobj.avname);
             DownloadQueue.AddDownload(obj);
         }
     }
     catch (Exception e)
     {
         //防止报错
     }
 }
Ejemplo n.º 2
0
 private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     DownloadQueue.SaveMissons();
     Environment.Exit(0);
 }
Ejemplo n.º 3
0
 private void DeleteAll_Click(object sender, EventArgs e)
 {
     DownloadQueue.DeleteAll();
 }
Ejemplo n.º 4
0
 private void PauseAll_Click(object sender, EventArgs e)
 {
     DownloadQueue.PauseAll();
 }
Ejemplo n.º 5
0
 public void StartAllButton_Click(object sender, EventArgs e)
 {
     DownloadQueue.StartAll();
 }