private void btnOpenFile_Click(object sender, EventArgs e)
{
string _FilePath = this.txtFileFullPath.Text.Trim();
if (File.Exists(_FilePath))
{
//打开指定文件
System.Diagnostics.Process.Start(_FilePath);
}
}
private void button1_Click(object sender, EventArgs e)
{
string _FilePath = this.txtFileFullPath.Text.Trim();
//打开指定文件夹选中文件(路径不存在则默认打开并选中我的文档)
System.Diagnostics.Process.Start("explorer.exe", "/select," + _FilePath);
}