private void loadINT(object sender, EventArgs e) { ListBox list = (ListBox)sender; intTree.Nodes.Clear(); string selected = (string)list.SelectedItem; string path = i2p[selected]; Stream stream = iso.OpenFile(path, FileMode.Open); currentInt = new PTR2Lib.INT(stream); Dictionary <PTR2Lib.INT.SectionInfo, List <PTR2Lib.INT.INTFile> > files = currentInt.sectionsToDict(); int i = 0; changeStatus("Loading " + selected + "..", true); foreach (PTR2Lib.INT.SectionInfo section in files.Keys) { intTree.Nodes.Add(section.folderName); foreach (PTR2Lib.INT.INTFile file in section.files) { intTree.Nodes[i].Nodes.Add(file.name); } i++; } changeStatus(null, false); }
private void temp2() { OpenFileDialog open = new OpenFileDialog { Filter = "e|*.int" }; if (open.ShowDialog() != DialogResult.OK) { return; } SaveFileDialog save = new SaveFileDialog { Filter = "PNG+XML Export|*.xml" }; if (save.ShowDialog() != DialogResult.OK) { return; } PTR2Lib.INT impint = new PTR2Lib.INT(open.FileName); impint.extract(Path.GetDirectoryName(save.FileName)); }