//获取打开文件的文件名(包括文件的扩展名)
//注意:参数FileName为OpenFileDialog.FileName
public string GetFileName(string FileName)
{
string[] Names = FileName.Split(new char[]{'\\'});
string Name = Names[Names.Length-1];
return Name;
}
//获取打开文件的路径
//注意:参数FileName为OpenFileDialog.FileName
public string GetPath(string FileName)
{
string path = FileName.Replace(GetFileName(FileName),"");
return path;
}