private void openToolStripMenuItem_Click(object sender, EventArgs e) { OpenFileDialog fd = new OpenFileDialog(); fd.Filter = "ALL CST Files|*.cst|All CSTL Files|*.cstl"; if (fd.ShowDialog() != DialogResult.OK) { return; } byte[] Script = System.IO.File.ReadAllBytes(fd.FileName); CSTMode = fd.FilterIndex == 1; if (CSTMode) { Editor = new CSTHelper(Script, true, true); listBox1.Items.Clear(); foreach (string str in Editor.Import()) { listBox1.Items.Add(str); } } else { Editor2 = new CSTLHelper(Script); listBox1.Items.Clear(); foreach (string str in Editor2.Import()) { listBox1.Items.Add(str); } } }
private void escapeToolStripMenuItem_Click(object sender, EventArgs e) { OpenFileDialog fd = new OpenFileDialog(); fd.Multiselect = true; if (fd.ShowDialog() != DialogResult.OK) { return; } foreach (string file in fd.FileNames) { byte[] Scr = File.ReadAllBytes(file); var Editor = new CSTHelper(Scr); string[] Dialogues = Editor.Import(); } }