/// <summary> /// 打开应用 /// </summary> /// <param name="listView"></param> public bool OpenApp(params object[] par) { if (par.Length < 0) { return(false); } try { ListViewEx listView = par[0] as ListViewEx; int index = 0; if (listView.Tag != null && (listView.Tag as List <string>).Count != 0) { foreach (string item in listView.Tag as List <string> ) { if (!index.ToString().Equals(listView.SelectedIndices[0].ToString())) { index++; continue; } else { CheckHWND(item); List <OpenFileInfo> list = Global.FileInfo.FindAll(a => a.Name == item); //MessageBox.Show(list.Count.ToString()); if (list.Count > 1) { app ap = new app(); ap._fileInfo = list; ap.ShowDialog(); } else { OpenSingleApp(item); } break; } } } return(true); } catch (Exception ex) { MessageBox.Show(ex.Message); return(false); } }