private void 打开ToolStripMenuItem_Click(object sender, EventArgs e) { foreach (var Path in SelectedPathArray) { Win32ApiHelper.ShellExecute(IntPtr.Zero, "", Path, "", "", Win32ApiHelper.ShowCommands.SW_SHOWNORMAL); } }
private void lvBrowser_MouseDoubleClick(object sender, MouseEventArgs e) { if (lvBrowser.SelectedItems.Count == 0) { return; } var newLvi = lvBrowser.SelectedItems[0]; var Path = newLvi.Name; if (Directory.Exists(Path)) { ListFolder(Path); } else if (File.Exists(Path)) { Win32ApiHelper.ShellExecute(IntPtr.Zero, "", Path, "", "", Win32ApiHelper.ShowCommands.SW_SHOWNORMAL); } else { MessageBox.Show("路径无效"); } }