public bool judgeExpensionName(string folderPath)
{
bool isTp = false;
if (Directory.Exists(folderPath))
{
foreach (string itemFilePath in Directory.GetFiles(folderPath))
{
FileInfo fi = new FileInfo(itemFilePath);
if (fi.Extension.Equals(".jpg") || fi.Extension.Equals(".JPG") || fi.Extension.Equals(".jpge") || fi.Extension.Equals(".JPEG") || fi.Extension.Equals(".gif") || fi.Extension.Equals(".GIF"))
{
isTp = true;
break;
}
else
isTp = false;
}
}
return isTp;
}