Esempio n. 1
0
 public DataFragment EncodeString(int address, string str)
 {
     DataFragment df = new DataFragment();
     try {
         df = encoder(address, str);
     } catch(Exception) {
         MessageBox.Show("Error converting string \"" + str + "\" to type " + Name, "Conversion Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     return df;
 }
Esempio n. 2
0
 internal void ApplyEdit(DataFragment data)
 {
     if(data.Length > 0) {
         Array.Copy(data.Data, 0, fileBytes, data.Address / 8, data.Length);
         NavigateToAddress();
     }
 }
Esempio n. 3
0
 internal bool Search(DataFragment toSearch)
 {
     byte[] target = new byte[toSearch.Length];
     Array.Copy(toSearch.Data, target, toSearch.Length);
     int idx = StartingIndex(fileBytes, target);
     if(idx >= 0) {
         NavigateToAddress(idx * 8);
     }
     return idx >= 0;
 }
Esempio n. 4
0
 public string DecodeToString(DataFragment target)
 {
     return decoder(target);
 }
Esempio n. 5
0
 private void goButton_Click(object sender, EventArgs e)
 {
     ToSearch = (dtComboBox.Items[dtComboBox.SelectedIndex] as DataType).EncodeString(0, valueTextBox.Text);
 }
Esempio n. 6
0
 private void SelectedAddressInspector_DataChanged(DataFragment data)
 {
     hexView.ApplyEdit(data);
     selectedAddressInspector.Target = hexView.GetSelectedData();
 }
Esempio n. 7
0
 private void SelectedAddressInspector_DataChanged(DataFragment data)
 {
     hexView.ApplyEdit(data);
     selectedAddressInspector.Target = hexView.GetSelectedData();
 }