Beispiel #1
0
        private void add_address_btn_Click(object sender, EventArgs e)
        {
            NewAddress newAddress = new NewAddress(processManager);

            if (newAddress.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            ulong  address     = newAddress.Address;
            string value_type  = newAddress.ValueTypeStr;
            string value       = newAddress.Value;
            bool   lock_       = newAddress.Lock;
            string description = newAddress.Descriptioin;

            int sectionID = processManager.MappedSectionList.GetMappedSectionID(address);

            if (sectionID < 0)
            {
                MessageBox.Show("Invalid Address!!");
                return;
            }

            if (!newAddress.Pointer)
            {
                new_data_cheat(address, value_type, value, lock_, description);
            }
            else
            {
                new_pointer_cheat(address, newAddress.OffsetList, value_type, value, lock_, description);
            }
        }
Beispiel #2
0
        private void add_address_btn_Click(object sender, EventArgs e)
        {
            NewAddress newAddress = new NewAddress();

            newAddress.ShowDialog();

            if (newAddress.succed)
            {
                ulong  address     = newAddress.address;
                string type        = newAddress.type;
                string value       = newAddress.value;
                string lock_       = newAddress.lock_;
                string description = newAddress.descriptioin.ToString();

                int sectionID = processManager.GetSectionInfoIdx(address);

                if (sectionID < 0)
                {
                    MessageBox.Show("Invalid Address!!");
                    return;
                }

                string sectionName = processManager.GetSectionName(sectionID);
                add_to_cheat_list_view(String.Format("{0:X}", address), type, value, sectionName, lock_, description);
            }
        }
Beispiel #3
0
        private void add_to_cheat_list_btn_Click(object sender, EventArgs e)
        {
            if (hexBox.SelectionStart <= 0)
            {
                return;
            }
            ulong address = section.Start + (ulong)hexBox.SelectionStart;

            if (page > 0)
            {
                address += (ulong)(page * hexBox.ByteProvider.Length);
            }
            string value = "", valueTypeStr = "";

            List <byte> tmpBList = new List <byte>();

            for (int idx = 0; idx <= 8; ++idx)
            {
                tmpBList.Add(hexBox.ByteProvider.ReadByte(hexBox.SelectionStart + idx));
            }
            switch (hexBox.SelectionLength)
            {
            case 1:

                value        = Convert.ToUInt16(tmpBList.GetRange(0, 1).ToArray()[0]).ToString();
                valueTypeStr = CONSTANT.BYTE_TYPE;
                break;

            case 2:
                value        = BitConverter.ToUInt16(tmpBList.GetRange(0, 2).ToArray(), 0).ToString();
                valueTypeStr = CONSTANT.BYTE_2_TYPE;
                break;

            case 4:
                value        = BitConverter.ToUInt32(tmpBList.GetRange(0, 4).ToArray(), 0).ToString();
                valueTypeStr = CONSTANT.BYTE_4_TYPE;
                break;

            case 8:
                value        = BitConverter.ToUInt64(tmpBList.GetRange(0, 8).ToArray(), 0).ToString();
                valueTypeStr = CONSTANT.BYTE_8_TYPE;
                break;

            default:
                value        = BitConverter.ToUInt32(tmpBList.GetRange(0, 4).ToArray(), 0).ToString();
                valueTypeStr = CONSTANT.BYTE_4_TYPE;
                break;
            }
            NewAddress newAddress = new NewAddress(null, address,
                                                   value,
                                                   valueTypeStr,
                                                   "",
                                                   false,
                                                   false, null, false);

            if (newAddress.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            if (!newAddress.Pointer)
            {
                mainForm.new_data_cheat(newAddress.Address, newAddress.ValueTypeStr, newAddress.Value, newAddress.Lock, newAddress.Descriptioin);
            }
            else
            {
                mainForm.new_pointer_cheat(address, newAddress.OffsetList, newAddress.ValueTypeStr, newAddress.Value, newAddress.Lock, newAddress.Descriptioin);
            }
        }