本地:
string path = “本地目录路径”;
if (System.IO.Directory.Exists(path))
{
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo()
{
FileName = path,
UseShellExecute = true,
Verb = “open”
});
}
FTP:
string path = string.Format(“ftp://{0}:{1}@{2}”, ftpUserName,ftpPassword, IpAddress);
System.Diagnostics.Process.Start(“explorer.exe”, path);
//禁用打开按钮
System.Threading.ThreadPool.QueueUserWorkItem((Object obj) =>
{
System.Threading.Thread.Sleep(3000);
//启用打开按钮
});