public void GotoEID() { if (tbcTabs.SelectedTab != null) { NSFBox nsfbox = (NSFBox)tbcTabs.SelectedTab.Tag; using (InputWindow inputwindow = new InputWindow()) { if (inputwindow.ShowDialog() == DialogResult.OK) { try { nsfbox.GotoEID((int)uint.Parse(inputwindow.Input, NumberStyles.HexNumber)); } catch (FormatException) { MessageBox.Show("Invalid EID.\nMust be specified in hexadecmical without leading '0x' or trailing 'h'.", "Goto EID", MessageBoxButtons.OK, MessageBoxIcon.Error); } catch (OverflowException) { MessageBox.Show("Invalid EID.\nMust be in range 0 to FFFFFFFF", "Goto EID", MessageBoxButtons.OK, MessageBoxIcon.Error); } } } } }
public void PatchNSD() { if (tbcTabs.SelectedTab != null) { string filename = tbcTabs.SelectedTab.Text; if (filename.EndsWith("F")) { filename = filename.Remove(filename.Length - 1); filename += "D"; } else if (filename.EndsWith("f")) { filename = filename.Remove(filename.Length - 1); filename += "d"; } else { string message = string.Format("Can't figure out NSD filename.\n\nFOO.NSF -> FOO.NSD\n\n{0} -> ???", filename); MessageBox.Show(message, "Patch NSD", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } NSFBox nsfbox = (NSFBox)tbcTabs.SelectedTab.Tag; PatchNSD(filename, nsfbox.NSF); } }
public void FindNext() { if (tbcTabs.SelectedTab != null) { NSFBox nsfbox = (NSFBox)tbcTabs.SelectedTab.Tag; nsfbox.FindNext(); } }
public void SaveNSF() { if (tbcTabs.SelectedTab != null) { string filename = tbcTabs.SelectedTab.Text; NSFBox nsfbox = (NSFBox)tbcTabs.SelectedTab.Tag; SaveNSF(filename, nsfbox.NSF); } }
public void Find() { if (tbcTabs.SelectedTab != null) { NSFBox nsfbox = (NSFBox)tbcTabs.SelectedTab.Tag; using (InputWindow inputwindow = new InputWindow()) { if (inputwindow.ShowDialog() == DialogResult.OK) { nsfbox.Find(inputwindow.Input); } } } }
public void OpenNSF(string filename, NSF nsf, GameVersion gameversion) { NSFBox nsfbox = new NSFBox(nsf, gameversion); nsfbox.Dock = DockStyle.Fill; TabPage nsftab = new TabPage(filename); nsftab.Tag = nsfbox; nsftab.Controls.Add(nsfbox); tbcTabs.TabPages.Add(nsftab); tbcTabs.SelectedTab = nsftab; }
public void OpenNSF(string filename,NSF nsf,GameVersion gameversion) { NSFBox nsfbox = new NSFBox(nsf,gameversion); nsfbox.Dock = DockStyle.Fill; TabPage nsftab = new TabPage(filename); nsftab.Tag = nsfbox; nsftab.Controls.Add(nsfbox); tbcTabs.TabPages.Add(nsftab); tbcTabs.SelectedTab = nsftab; }