Esempio n. 1
0
 private void buttonItem1_Click(object sender, EventArgs e)
 {
     try
     {
         OFD1.ShowDialog();
         PackageIO.Reader reader = new PackageIO.Reader(OFD1.FileName, Endian.Big, 0);
         reader.Position = 0x19A90;
         textBoxX1.Text  = reader.ReadInt32().ToString();
         reader.Close();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Esempio n. 2
0
 private void buttonItem1_Click(object sender, EventArgs e)
 {
     try                                                                               //tries to do the following noted with //
     {
         OFD1.ShowDialog();                                                            //Opens the file dialog
         PackageIO.Reader reader = new PackageIO.Reader(OFD1.FileName, Endian.Big, 0); //Opens the Offset reader
         reader.Position = 0x12FB0;                                                    //Starts reading the offset at 19A90
         textBoxX1.Text  = reader.ReadInt32().ToString();                              //Prints the current offset to an Int32 integer
         reader.Close();                                                               //closes the reader so you can recall it or don't get file in use error
     }
     catch (Exception ex)                                                              //logs the error
     {
         MessageBox.Show(ex.Message);                                                  //shows the error message if something happens while opening
     }
 }