private void openInTOCToolToolStripMenuItem_Click(object sender, EventArgs e) { string path = Path.GetDirectoryName(GlobalStuff.FindSetting("gamepath")); string path2 = ""; if (toolStripButton4.Checked) { int n = listBox1.SelectedIndex; if (n == -1) { return; } path2 = listBox1.Items[n].ToString(); } else { TreeNode t = treeView1.SelectedNode; if (t == null) { return; } path2 = t.Text; while (t.Parent != null) { t = t.Parent; path2 = t.Text + "\\" + path2; } } if (!path2.StartsWith("\\")) { path += "\\"; } path += path2; FileTools.TOCTool toc = new FileTools.TOCTool(); toc.toc = new TOCFile(path); toc.RefreshTree(); toc.MdiParent = this.MdiParent; toc.WindowState = FormWindowState.Maximized; toc.Show(); }
private void openInTOCToolToolStripMenuItem_Click(object sender, EventArgs e) { string path = Path.GetDirectoryName(GlobalStuff.FindSetting("gamepath")); string path2 = ""; if (toolStripButton4.Checked) { int n = listBox1.SelectedIndex; if (n == -1) return; path2 = listBox1.Items[n].ToString(); } else { TreeNode t = treeView1.SelectedNode; if (t == null) return; path2 = t.Text; while (t.Parent != null) { t = t.Parent; path2 = t.Text + "\\" + path2; } } if (!path2.StartsWith("\\")) path += "\\"; path += path2; FileTools.TOCTool toc = new FileTools.TOCTool(); toc.toc = new TOCFile(path); toc.RefreshTree(); toc.MdiParent = this.MdiParent; toc.WindowState = FormWindowState.Maximized; toc.Show(); }