コード例 #1
0
 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);
                 }
             }
         }
     }
 }
コード例 #2
0
 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);
     }
 }
コード例 #3
0
 public void FindNext()
 {
     if (tbcTabs.SelectedTab != null)
     {
         NSFBox nsfbox = (NSFBox)tbcTabs.SelectedTab.Tag;
         nsfbox.FindNext();
     }
 }
コード例 #4
0
 public void SaveNSF()
 {
     if (tbcTabs.SelectedTab != null)
     {
         string filename = tbcTabs.SelectedTab.Text;
         NSFBox nsfbox   = (NSFBox)tbcTabs.SelectedTab.Tag;
         SaveNSF(filename, nsfbox.NSF);
     }
 }
コード例 #5
0
 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);
             }
         }
     }
 }
コード例 #6
0
        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;
        }
コード例 #7
0
ファイル: MainForm.cs プロジェクト: CryZENx/CrashEdit
        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;
        }