private void listView2_MouseDoubleClick(object sender, MouseEventArgs e) { ListViewHitTestInfo hitTest = listViewEx1.HitTest(e.X, e.Y); int columnIndex = hitTest.Item.SubItems.IndexOf(hitTest.SubItem); if (columnIndex == 2) { VEdit_Form veditForm = new VEdit_Form(); DialogResult k = veditForm.ShowDialog(this); if (k == DialogResult.OK) { unsafe { byte *buffer = (byte *)Memory.Alloc(16); *(UInt32 *)buffer = (UInt32)veditForm.VALUE; ushort size = 0; switch (listViewEx1.FocusedItem.SubItems[3].Text) { case "Byte": size = 1; break; case "4 Bytes": size = 4; break; } WPM((UInt64)PID, Convert.ToUInt64(listViewEx1.FocusedItem.SubItems[1].Text, 16), size, (IntPtr)buffer); Memory.Free(buffer); } } } else if (columnIndex == 4) { NewDesc_Form newdescForm = new NewDesc_Form(); DialogResult k = newdescForm.ShowDialog(this); if (k == DialogResult.OK) { listViewEx1.FocusedItem.SubItems[4].Text = newdescForm.VALUE; } } }
private void listView2_MouseDoubleClick(object sender, MouseEventArgs e) { ListViewHitTestInfo hitTest = listView2.HitTest(e.X, e.Y); int columnIndex = hitTest.Item.SubItems.IndexOf(hitTest.SubItem); if (columnIndex == 2) { VEdit_Form veditForm = new VEdit_Form(); DialogResult k = veditForm.ShowDialog(this); if (k == DialogResult.OK) { unsafe { byte *buffer = (byte *)Memory.Alloc(16); *(UInt32 *)buffer = (UInt32)veditForm.VALUE; WPM((UInt64)PID, Convert.ToUInt64(listView2.FocusedItem.SubItems[1].Text, 16), (UInt16)Value_Type, (IntPtr)buffer); Memory.Free(buffer); } } } }