如何读取目录下的所有图片
protected void PopulateFiles(TreeNode nodeCurrent)
{
//Populate listview with files
string[] lvData = new string[4];
//clear list
InitListView();
if (nodeCurrent.SelectedImageIndex != 0)
{
//check path
if (Directory.Exists((string)getFullPath(nodeCurrent.FullPath)) == false)
{
MessageBox.Show( "不存在路径或没有数据 ");
}
else
{
try
{
string[] stringFiles = Directory.GetFiles(getFullPath(nodeCurrent.FullPath));
string stringFileName = " ";
DateTime dtCreateDate, dtModifyDate;
Int64 lFileSize = 0;
string FileDirectory = " ";
//loop throught all files
foreach (string stringFile in stringFiles)