PICHU.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Net;
namespace Image_Downloader_Pro
{
public partial class Form1 : Form
{
string ImageName = "";
string Path = "";
int min = 0;
int max = 1;
int arraystart = 0;
int arraybuilder = 0;
string SaveImageType = "";
List<string> Weblink = new List<string>();
public Form1()
{
InitializeComponent();
}
public void checkifcompleted()
{
if (ImageName != "" && Path != "")
{
button4.Enabled = true;
button5.Enabled = true;
}
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
if (textBox1.Text != "")
{
ImageName = textBox1.Text;
}
else
{
MessageBox.Show("Field May Not Be Left Blank When Setting ImageName", "Error");
}
}
private void button2_Click(object sender, EventArgs e)
{
FolderBrowserDialog fbd = new FolderBrowserDialog();
if (fbd.ShowDialog() == DialogResult.OK)
{
Path = fbd.SelectedPath + "\\";
textBox2.Text = Path;
}
}
private void button3_Click(object sender, EventArgs e)
{
min = Convert.ToInt32(numericUpDown1.Value);
max = Convert.ToInt32(numericUpDown2.Value);
textBox4.Text = textBox3.Text + min + comboBox1.Text;
SaveImageType = comboBox2.Text;
Weblink.Clear();
Weblink.Add(textBox3.Text + min + comboBox1.Text);
checkifcompleted();
}
private void button4_Click(object sender, EventArgs e)
{
string uri = Weblink[arraystart];
try
{
WebClient wc = new WebClient();
Stream stream = wc.OpenRead(Weblink[arraystart]);
Bitmap bmp = new Bitmap(stream);
if (bmp != null)
{
bmp.Save(Path + ImageName + min + SaveImageType);
}
stream.Flush();
stream.Close();
wc.Dispose();
Weblink.Clear();
for (int i = min; i <= max; i++)
{
Weblink.Add(textBox3.Text + i + comboBox1.Text);
richTextBox1.Text += Weblink[arraybuilder] + "\n";
arraybuilder++;
}
}
catch
{
MessageBox.Show("Error With The Download");
}
}
private void button5_Click(object sender, EventArgs e)
{
try
{
for (int i = min; i <= max; i++)
{
WebClient wc = new WebClient();
Stream stream = wc.OpenRead(Weblink[arraystart]);
Bitmap bmp = new Bitmap(stream);
if (bmp != null)
{
bmp.Save(Path + ImageName + min + SaveImageType);
label8.Text = "Successful Images = " + (arraystart+1);
}
arraystart++;
min++;
stream.Flush();
stream.Close();
wc.Dispose();
if (i == max)
{
button6.Enabled = true;
button5.Enabled = false;
button4.Enabled = false;
}
}
}
catch
{
MessageBox.Show(Weblink[arraystart]);
}
}
private void button6_Click(object sender, EventArgs e)
{
arraystart = 0;
min = Convert.ToInt32(numericUpDown1.Value);
}
}
}
Copyright © 2026, NextGenUpdate.
All Rights Reserved.