private void btnReplaceOverlay_Click(object sender, EventArgs e) { if (m_SelectedOverlay == null) { return; } OpenFileDialog ofd = new OpenFileDialog(); if (ofd.ShowDialog() == DialogResult.Cancel) { return; } uint ovlID = uint.Parse(m_SelectedOverlay.Substring(8)); NitroOverlay ovl = new NitroOverlay(Program.m_ROM, ovlID); ovl.Clear(); ovl.WriteBlock(0, System.IO.File.ReadAllBytes(ofd.FileName)); ovl.SaveChanges(); }
private void btnReplaceOverlay_Click(object sender, EventArgs e) { if (m_SelectedOverlay == null || m_SelectedOverlay.Equals("")) return; OpenFileDialog ofd = new OpenFileDialog(); if (ofd.ShowDialog() == DialogResult.Cancel) return; uint ovlID = uint.Parse(m_SelectedOverlay.Substring(8)); NitroOverlay ovl = new NitroOverlay(Program.m_ROM, ovlID); ovl.Clear(); ovl.WriteBlock(0, System.IO.File.ReadAllBytes(ofd.FileName)); ovl.SaveChanges(); }