private void openFolder() { if (listView1.SelectedItems[0].ImageKey == "???" || listView1.SelectedItems[0].ImageKey == "????") { currHier = currHier + listView1.SelectedItems[0].Text + @"\"; filesystempath = gamefolder + @"\" + currHier; if (Directory.Exists(filesystempath)) { if (Directory.EnumerateFileSystemEntries(filesystempath, "*", SearchOption.AllDirectories).Count() > 0) { ContentDirectory(); DirectoryInfo root = new DirectoryInfo(filesystempath); fileEntries = root.GetFiles(); folderEntries = root.GetDirectories(); backgroundWorker1.RunWorkerAsync(); } else { EmptyDirectory(); } //Disable some UI things openToolStripMenuItem1.Enabled = false; showInWindowsExplorerToolStripMenuItem2.Enabled = false; copyPathToolStripMenuItem2.Enabled = false; propertiesToolStripMenuItem1.Enabled = false; isWorking = false; } } else if ((listView1.SelectedItems[0].ImageKey == ".dir" || listView1.SelectedItems[0].ImageKey == ".DIR" || listView1.SelectedItems[0].ImageKey == ".img" || listView1.SelectedItems[0].ImageKey == ".IMG") && (intGame == 0 || intGame == 10 || intGame == 1 || intGame == 11)) { if (listView1.SelectedItems[0].ImageKey == ".dir" || listView1.SelectedItems[0].ImageKey == ".DIR") { IMGvc imgVCform = new IMGvc(gamefolder + @"\" + currHier + @"\" + listView1.SelectedItems[0].Text.ToString(), false); imgVCform.Show(); } else { IMGvc imgVCform = new IMGvc(gamefolder + @"\" + currHier + @"\" + listView1.SelectedItems[0].Text.ToString(), true); imgVCform.Show(); } } else { Process.Start(gamefolder + @"\" + currHier + @"\" + listView1.SelectedItems[0].Text.ToString()); } }