private bool openFile() { bool pass = false; OpenFileDialog FD = new OpenFileDialog(); FD.Filter = "SFC|*.sfc|SMC|*.smc"; if (FD.ShowDialog() == DialogResult.OK) { try { backBone = "../../Resources/"; realFilePath = FD.FileName; copyFilePath = backBone + Path.GetFileName(realFilePath); rom = new Romio(realFilePath, ref pass); File.Copy(realFilePath, copyFilePath, true); pass = true; } catch (IOException) { MessageBox.Show("Don't open your ROM in the resources folder."); pass = false; } catch (Exception e) { MessageBox.Show(e + "Error"); pass = false; } } return(pass); }
public form_monologue(ref Romio romioObj, string copyFilePath) { selectedAddress = ""; selectedSize = ""; InitializeComponent(); seperator = ": "; chara = new CharacterTable(" = "); this.copyFilePath = copyFilePath; this.romioObj = romioObj; }
private void button1_Click(object sender, System.EventArgs e) { if (textBox_room_id.Text.Equals("00")) { Romio obj = new Romio(filePath); label_map.Text = obj.readInDecimal(0x8008, 800); } else { label_map.Text = "N/A"; } }