Fig 1.1
Code :
private void btnImport_Click_1(object sender, EventArgs e)
{
FolderBrowserDialog fbd = new FolderBrowserDialog();
DialogResult dr = fbd.ShowDialog();
if (dr == DialogResult.OK)
{
string[] files = Directory.GetFiles(fbd.SelectedPath);
for (int i = 0; i < files.Count(); i++)
{
lstFiles.Items.Add(files[i].ToString());
}
lblNo.Text = files.Count().ToString();
}
}
private void btnClearImport_Click_1(object sender, EventArgs e)
{
lstFiles.Items.Clear();
lblNo.Text = "";
}
Code :
private void btnImport_Click_1(object sender, EventArgs e)
{
FolderBrowserDialog fbd = new FolderBrowserDialog();
DialogResult dr = fbd.ShowDialog();
if (dr == DialogResult.OK)
{
string[] files = Directory.GetFiles(fbd.SelectedPath);
for (int i = 0; i < files.Count(); i++)
{
lstFiles.Items.Add(files[i].ToString());
}
lblNo.Text = files.Count().ToString();
}
}
private void btnClearImport_Click_1(object sender, EventArgs e)
{
lstFiles.Items.Clear();
lblNo.Text = "";
}