Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void GameIndexChanged()
- {
- int i = -1;
- for (int j = 0; j < GameBlocks.Length; j++)
- {
- if (GameBlocks[j] == comboBox1.Items[comboBox1.SelectedIndex].ToString())
- {
- i = j;
- break;
- }
- }
- if (i != -1)
- {
- try
- {
- string GameName = GameBlocks[i];
- Console.WriteLine("Game: " + GameName);
- string RegionAddNameAdd = GameBlocks[i + 1];
- string[] SpecificGameAddresses = RegionAddNameAdd.Split(new char[] { '"' });
- string GameRegion = SpecificGameAddresses[0];
- Console.WriteLine("Region: " + GameRegion);
- for (int j = 1; j < SpecificGameAddresses.Length; j++)
- {
- string[] FinalAddress = SpecificGameAddresses[j].Split(Environment.NewLine.ToCharArray());
- string Address_Name = FinalAddress[0];
- string[] AddressBytes = FinalAddress[1].Split(new char[] { ' ' });
- string Address = AddressBytes[0];
- string Bytes = AddressBytes[1];
- Console.WriteLine("Name: " + Address_Name + " Offset: 0x" + Address + " Bytes: " + Bytes);
- }
- Console.WriteLine();
- }
- catch
- {
- Console.WriteLine("Failed on block " + i.ToString());
- Console.WriteLine();
- }
- }
- else
- {
- MessageBox.Show("Error: Game " + comboBox1.Items[comboBox1.SelectedIndex].ToString() + " not found.");
- }
- }
- string[] GameBlocks;
- private void OpenButtonShit()
- {
- string TextDoc = File.ReadAllText(@"codelist.inf");
- GameBlocks = TextDoc.Split(new char[] { '#' });
- comboBox1.Items.Clear();
- for (int i = 0; i < GameBlocks.Length; i++)
- {
- if (GameBlocks[i] >= 2)
- {
- if (GameBlocks[i][0] != 'S' && GameBlocks[i][1] != 'L')
- comboBox1.Items.Add(GameBlocks[i]);
- }
- else
- {
- comboBox1.Items.Add(GameBlocks[i]);
- }
- }
- comboBox1.SelectedIndex = 0;
- }
- private void OnComboBoxIndexChangedThing()
- {
- GameIndexChanged();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement