I'm having difficulty saving multiple images without the use of database. The text data saved in txt, but I can not save images. I have already read the images.
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void label1_Click(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
{
pastaLabel.Text = folderBrowserDialog1.SelectedPath;
string[] arquivos = Directory.GetFiles(pastaLabel.Text, "*.jpg");
foreach (var arquivo in arquivos)
{
ImagensListBox.Items.Add(arquivo);
}
}
}
string arquivo;
private void ImagensListBox_SelectedIndexChanged(object sender, EventArgs e)
{
arquivo = ImagensListBox.SelectedItem.ToString();
imagemPictureBox.ImageLocation = arquivo;
}
private void salvarButton_Click(object sender, EventArgs e)
{
? ? ?
}