/// <summary> send either a file name or path.</summary> static public void ExploreHere(string lvs) { if (lvs == null) { return; } if (lvs == string.Empty) { return; } RunProcess RP; if (!CheckFile(lvs)) { RP = new RunProcess("Explorer.exe", "/e,/root," + lvs, @"C:\windows", false, true, false, false); RP.Start(); RP.Close(); RP.Dispose(); return; } if (CheckFile(lvs)) { RP = new RunProcess("Explorer.exe", "/e,/root,\"" + FileUtil.FInfo(lvs).FullName + "\" , /select,\"" + lvs + "\"", @"C:\windows", false, true, false, false); RP.Start(); RP.Close(); RP.Dispose(); } }
public void Exit() { if (RunProcess != null && RunProcess.HasExited == false) { try { RunProcess.Kill(); RunProcess.Close(); } catch { } } SetListViewInfo("未运行"); IsRun = false; RunProcess = null; }