Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Sep 20th, 2012  |  syntax: C#  |  size: 2.16 KB  |  views: 247  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using System.IO;
  10.  
  11. namespace DBZ_buus_Fury_Text_Editor
  12. {
  13.     public partial class Form1 : Form
  14.     {
  15.         public Form1()
  16.         {
  17.             InitializeComponent();
  18.         }
  19.         string path;
  20.  
  21.         private void menuItem6_Click(object sender, EventArgs e)
  22.         {
  23.             MessageBox.Show("Dragon Ball Z Buu's Fury Text Editor\nBy Omarrrio 2012", "About DBZBFTE", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, 0, "http://gbatemp.net/user/245642-omarrrio/");
  24.         }
  25.  
  26.         private void menuItem4_Click(object sender, EventArgs e)
  27.         {
  28.             this.Close();
  29.         }
  30.  
  31.         private void listView1_SelectedIndexChanged(object sender, EventArgs e)
  32.         {
  33.             if (listView1.SelectedItems.Count != 0)
  34.             {
  35.                 textBox1.Text = listView1.SelectedItems[0].SubItems[1].Text;
  36.             }
  37.         }
  38.  
  39.         private void button1_Click(object sender, EventArgs e)
  40.         {
  41.             listView1.SelectedItems[0].SubItems[1].Text = textBox1.Text;
  42.         }
  43.  
  44.         private void menuItem2_Click(object sender, EventArgs e)
  45.         {
  46.             textBox1.Text = "";
  47.             listView1.Items.Clear();
  48.             OpenFileDialog ofd = new OpenFileDialog();
  49.             ofd.Title = "Open DBZ BF Rom";
  50.             ofd.Filter = "GBA Rom (*.gba)|*.dat|All Files (*.*)|*.*";
  51.             if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
  52.             {
  53.                 MessageBox.Show("File opened Succesfully!", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information);
  54.                 path = ofd.FileName;
  55.                 BinaryReader br = new BinaryReader(File.OpenRead(path), Encoding.Unicode);
  56.                 int num_pointers = 0x5FE;
  57.                 List<int> offsets = new List<int>();
  58.                 for (int i = 0; i < num_pointers; i++)
  59.                 {
  60.                     offsets.Add(br.ReadInt32());
  61.                 }
  62.             }
  63.         }
  64.     }
  65. }
clone this paste RAW Paste Data