工具条
private void mD5校验器ToolStripMenuItem_Click(object sender, EventArgs e)
{
string v_OpenFilePath = Application.StartupPath + "//Tools//fHash.exe";
//路径不能为空!
if (v_OpenFilePath.Equals(""))
{
MessageBox.Show("路径不能为空!", "操作提示");
return;
}
//先判断文件是否存在,不存在则提示
if (!System.IO.File.Exists(v_OpenFilePath))
{
MessageBox.Show("指定文件不存在!", "操作提示");
return;
}
//存在则打开
System.Diagnostics.Process.Start("explorer.exe", v_OpenFilePath);
}
首先把小工具放在//Tools 目录下