Exemple #1
0
 // Single with Preview Action
 private void Load_Thread_Preview()
 {
     ClearUI();
     thread = new ThreadObj(textNewURL.Text);
     if (!thread.PageFound())
     {
         MessageBox.Show("Failed to fetch thread!");
         return;
     }
     textThreadTitle.Text = thread.GetThreadname();
     textLoadedURL.Text   = textNewURL.Text;
     itemURLs             = thread.GetItemList();
     foreach (string pic in itemURLs)
     {
         checkBoxFiles.Items.Add(pic, true);
     }
     thumbnailURLs = thread.GetThumbList();
     FileUtilities.ThumbFolderSetup(thumbnailPath);
     SetFoundLabel(itemURLs.Count);
     SetCheckedLabel(itemURLs.Count);
     if (checkBoxFiles.Items.Count > 0)
     {
         checkBoxFiles.SelectedIndex = 0;
     }
 }
Exemple #2
0
 private bool Load_Thread(string url)
 {
     thread = new ThreadObj(url);
     if (!thread.PageFound())
     {
         if (mode != 2)
         {
             MessageBox.Show("Failed to fetch thread!");
         }
         return(false);
     }
     itemURLs = thread.GetItemList();
     return(true);
 }
Exemple #3
0
 // Inintiate New Thread Grab
 private void buttonGrab_Click(object sender, EventArgs e)
 {
     if (textOutputPath.Text == "")
     {
         MessageBox.Show("Please select output path before continuing.");
         return;
     }
     if (textNewURL.Text == "")
     {
         return;
     }
     if (mode == 0)
     {
         Load_Thread_Preview();
     }
     else if (mode == 1)
     {
         if (Load_Thread(textNewURL.Text))
         {
             ToggleControlLock();
             Download_Loaded_Thread();
         }
     }
     else if (mode == 2)
     {
         if (!threadURLs.Contains(textNewURL.Text))
         {
             ThreadObj threadCheck = new ThreadObj(textNewURL.Text);
             if (threadCheck.PageFound())
             {
                 int count = threadCheck.GetItemList().Count;
                 threadURLs.Add(textNewURL.Text);
                 listMultiLinks.Items.Add(textNewURL.Text);
                 listMultiNames.Items.Add(threadCheck.GetThreadname());
                 listMultiStatus.Items.Add(threadCheck.GetItemList().Count);
                 int thumbCount = threadCheck.GetThumbList().Count;
                 if (count != thumbCount)
                 {
                     MessageBox.Show("Possible Error: " + count + " images vs " + thumbCount + " thumbs found.");
                 }
                 textNewURL.Text = "";
             }
             else
             {
                 MessageBox.Show("Thread not found. (404)");
             }
         }
     }
 }
Exemple #4
0
 private void DownloadModeSwitch(object sender, EventArgs e)
 {
     ClearUI();
     thread = null;
     if (radioSP.Checked)
     {
         ModeSwitchSP();
         Properties.Settings.Default.Mode = 0;
     }
     else if (radioS.Checked)
     {
         ModeSwitchS();
         Properties.Settings.Default.Mode = 1;
     }
     else if (radioM.Checked)
     {
         ModeSwitchM();
         Properties.Settings.Default.Mode = 2;
     }
     Properties.Settings.Default.Save();
 }