public override string Dump(bool simpleFormat) { string save_buf = ""; save_buf += MemoryHelper.GetStringOfValueType(ValueType) + "|"; save_buf += MemoryHelper.BytesToString(data) + "|"; return(save_buf); }
public override string Dump(bool simpleFormat) { string dump_buf = ""; dump_buf += MemoryHelper.GetStringOfValueType(ValueType) + "|"; dump_buf += Address.Dump(simpleFormat); for (int i = 0; i < Offsets.Count; ++i) { dump_buf += Offsets[i].Dump(simpleFormat); } return(dump_buf); }
void add_new_row_of_cheat_list_view(HexCheat cheat, int sectionID) { int index = this.cheat_list_view.Rows.Add(); DataGridViewRow cheat_list_view_item = cheat_list_view.Rows[index]; cheat_list_view_item.Cells[CHEAT_LIST_ADDRESS].Value = cheat.Address; cheat_list_view_item.Cells[CHEAT_LIST_TYPE].Value = MemoryHelper.GetStringOfValueType(cheat.Type); cheat_list_view_item.Cells[CHEAT_LIST_VALUE].Value = cheat.Value; cheat_list_view_item.Cells[CHEAT_LIST_SECTION].Value = processManager.GetSectionName(sectionID); cheat_list_view_item.Cells[CHEAT_LIST_DESC].Value = cheat.Description; }
private void pointer_list_view_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex < 0) { return; } PointerResult pointerResult = pointerResults[e.RowIndex]; ulong baseAddress = pointerResult.GetBaseAddress(processManager.MappedSectionList); ulong tailAddress = pointerList.GetTailAddress(pointerResult, processManager.MappedSectionList); string data = MemoryHelper.BytesToString(MemoryHelper.GetBytesByType(tailAddress)); string dataType = MemoryHelper.GetStringOfValueType(MemoryHelper.ValueType); string description = ""; for (int oIdx = 0; oIdx < pointerResult.Offsets.Length; ++oIdx) { description += "+" + pointerResult.Offsets[oIdx].ToString("X"); } description = (string)baseAddress.ToString("X") + description; mainForm.new_pointer_cheat(baseAddress, pointerResult.Offsets.ToList(), dataType, data, false, description); }
public override string Save() { ulong addressDec = ulong.Parse(Address, NumberStyles.HexNumber); MappedSection mappedSection = processManager.GetMappedSection(addressDec); string save_buf = ""; save_buf += "hex|"; save_buf += SectionID + "|"; save_buf += String.Format("{0:X}", addressDec - mappedSection.Start) + "|"; save_buf += MemoryHelper.GetStringOfValueType(Type) + "|"; save_buf += Value + "|"; save_buf += "0"; save_buf += Description + "|\n"; return(save_buf); }
void add_new_row_to_cheat_list_view(Cheat cheat) { int index = this.lvCheatList.Rows.Add(); DataGridViewRow cheat_list_view_item = lvCheatList.Rows[index]; CheatOperator destination = cheat.GetDestination(); CheatOperator source = cheat.GetSource(); cheat_list_view_item.Cells[CHEAT_LIST_ADDRESS].Value = destination.Display(); cheat_list_view_item.Cells[CHEAT_LIST_TYPE].Value = MemoryHelper.GetStringOfValueType(source.ValueType); cheat_list_view_item.Cells[CHEAT_LIST_VALUE].Value = source.Display(); cheat_list_view_item.Cells[CHEAT_LIST_SECTION].Value = processManager.MappedSectionList.GetSectionName(destination.GetSectionID()); cheat_list_view_item.Cells[CHEAT_LIST_LOCK].Value = cheat.Lock; cheat_list_view_item.Cells[CHEAT_LIST_DESC].Value = cheat.Description; }
private void pointer_list_view_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex < 0) { return; } PointerResult pointerResult = pointerResults[e.RowIndex]; ulong baseAddress = pointerResult.GetBaseAddress(processManager.MappedSectionList); ulong tailAddress = pointerList.GetTailAddress(pointerResult, processManager.MappedSectionList); string data = MemoryHelper.BytesToString(MemoryHelper.GetBytesByType(tailAddress)); string dataType = MemoryHelper.GetStringOfValueType(MemoryHelper.ValueType); mainForm.new_pointer_cheat(baseAddress, pointerResult.Offsets.ToList(), dataType, data, false, ""); }
private void update_result_list_view(BackgroundWorker worker, bool refresh, int start, float percent) { worker.ReportProgress(start); List <ListViewItem> listViewItems = new List <ListViewItem>(); bool[] mappedSectionCheckeSet = new bool[processManager.MappedSectionList.Count]; ulong totalResultCount = processManager.MappedSectionList.TotalResultCount(); ulong curResultCount = 0; string value_type = MemoryHelper.GetStringOfValueType(memoryHelper.ValueType); const int MAX_RESULTS_NUM = 0x1000; for (int idx = 0; idx < processManager.MappedSectionList.Count; ++idx) { MappedSection mapped_section = processManager.MappedSectionList[idx]; ResultList result_list = mapped_section.ResultList; if (result_list == null) { continue; } if (!mapped_section.Check) { continue; } mappedSectionCheckeSet[idx] = result_list.Count > 0; for (result_list.Begin(); !result_list.End(); result_list.Next()) { if (curResultCount >= MAX_RESULTS_NUM) { break; } uint memory_address_offset = 0; byte[] memory_value = null; result_list.Get(ref memory_address_offset, ref memory_value); curResultCount++; ListViewItem lvi = new ListViewItem(); lvi.Text = String.Format("{0:X}", memory_address_offset + mapped_section.Start); if (refresh && !worker.CancellationPending) { memory_value = memoryHelper.GetBytesByType(memory_address_offset + mapped_section.Start); result_list.Set(memory_value); worker.ReportProgress(start + (int)(100.0f * curResultCount / MAX_RESULTS_NUM)); } lvi.SubItems.Add(value_type); lvi.SubItems.Add(memoryHelper.BytesToString(memory_value)); lvi.SubItems.Add(memoryHelper.BytesToHexString(memory_value)); lvi.SubItems.Add(processManager.MappedSectionList.GetSectionName(idx)); listViewItems.Add(lvi); } } WorkerReturn workerReturn = new WorkerReturn(); workerReturn.ListViewItems = listViewItems; workerReturn.MappedSectionCheckeSet = mappedSectionCheckeSet; workerReturn.Results = totalResultCount; worker.ReportProgress(start + (int)(100 * percent), workerReturn); }