private void button6_Click(object sender, EventArgs e) { openDatFileDialog.InitialDirectory = Settings.Default.openDatFilePath; openDatFileDialog.FileName = ""; if (openDatFileDialog.ShowDialog() == DialogResult.OK) { var info = new FileInfo(openDatFileDialog.FileName); Settings.Default.openDatFilePath = Path.GetDirectoryName(info.FullName); var fileInfo = (IsoFileInfo)filesystemTreeView.SelectedNode.Tag; IsoFile.ReplaceFileInIso(fileInfo, info.FullName); } }
private void button4_Click(object sender, EventArgs e) { string datFileName = DatFile.fileName; IsoFileInfo fileInfo = IsoFile.SearchIso(datFileName, filesystemTreeView.Nodes[0]); if (fileInfo == null) { MessageBox.Show("Error finding file in disc image!"); } else { IsoFile.ReplaceFileInIso(fileInfo, DatFile.file); } }
private void Button_Export_Click(object sender, EventArgs e) { IsoFileInfo info = (IsoFileInfo)filesystemTreeView.SelectedNode.Tag; String extension = info.Name.Substring(info.Name.IndexOf('.')); var saveFileDialog1 = new SaveFileDialog { Title = "Export File", InitialDirectory = Settings.Default.saveDatFilePath, FileName = info.Name, Filter = "All files|*.*", FilterIndex = 1, AddExtension = true }; if (saveFileDialog1.ShowDialog() == DialogResult.OK) { Settings.Default.saveDatFilePath = Path.GetDirectoryName(saveFileDialog1.FileName); IsoFile.ExportFileFromIso(info, saveFileDialog1); } }
private void Button_openfile_Click(object sender, EventArgs e) { openDiscImageDialog.InitialDirectory = Settings.Default.openDiscImagePath; openDiscImageDialog.FileName = ""; if (openDiscImageDialog.ShowDialog() == DialogResult.OK) { var info = new FileInfo(openDiscImageDialog.FileName); Settings.Default.openDiscImagePath = Path.GetDirectoryName(openDiscImageDialog.FileName); IsoFile.OpenFile(info.FullName); label7.Text = IsoFile.GetTitle(); label6.Text = IsoFile.GetVersion(); filesystemTreeView.Nodes.Clear(); filesystemTreeView.BeginUpdate(); filesystemTreeView.Nodes.Add(IsoFile.root); filesystemTreeView.Nodes[0].Expand(); filesystemTreeView.EndUpdate(); if (DatFile.isFileLoaded) { button4.Enabled = true; } } }
private void Button_Open_Click(object sender, EventArgs e) { IsoFileInfo info = (IsoFileInfo)filesystemTreeView.SelectedNode.Tag; OpenDatFileAndUpdateWindow(IsoFile.OpenDatFile(info), info.Name); }