Esempio n. 1
0
        private void dataGridSavedResults_CellDoubleClick(Object sender, DataGridViewCellEventArgs e)
        {
            var cells            = dataGridSavedResults.Rows[e.RowIndex].Cells;
            var cheatInformation = (CheatInformation)dataGridSavedResults.Rows[e.RowIndex].Tag;
            var frmEditInstance  = new ChildForms.childFrmEditCheat(
                listProcessMemorySections,
                (String)cells[SavedResultsColumnIndex.iDescription].Value,
                (librpc.MemorySection)cells[SavedResultsColumnIndex.iSection].Value,
                cheatInformation.sectionAddressOffset,
                (String)cells[SavedResultsColumnIndex.iValueType].Value,
                cells[SavedResultsColumnIndex.iValue].Value.ToString()
                );

            if (frmEditInstance.ShowDialog() == DialogResult.OK)
            {
                var returnInformation = frmEditInstance.returnInformation;
                cells[SavedResultsColumnIndex.iDescription].Value = returnInformation.description;
                cells[SavedResultsColumnIndex.iSection].Value     = returnInformation.section;
                cheatInformation.sectionAddressOffset             = returnInformation.sectionAddressOffset;
                cells[SavedResultsColumnIndex.iValueType].Value   = returnInformation.valueType;
                cells[SavedResultsColumnIndex.iValue].Value       = returnInformation.value;

                UInt64 runtimeAddress = returnInformation.section.start + returnInformation.sectionAddressOffset;
                Type   varType        = ScanTypeOptions.getValueTypeFromString(returnInformation.valueType);
                Memory.write(
                    processInfo.pid,
                    runtimeAddress,
                    Convert.ChangeType(returnInformation.value, varType),
                    varType
                    );
            }
        }
Esempio n. 2
0
        private void cmbBoxScanType_SelectedIndexChanged(Object sender, EventArgs e)
        {
            var newCompareType = ScanTypeOptions.getCompareTypeFromString((String)((sender as ComboBox).SelectedItem));

            scanCompareType = newCompareType;

            switch (newCompareType)
            {
            case Memory.CompareType.BetweenValues:
                lblSecondValue.Enabled = txtBoxScanValueSecond.Enabled = true;
                break;

            case Memory.CompareType.IncreasedValue:
            case Memory.CompareType.DecreasedValue:
            case Memory.CompareType.ChangedValue:
            case Memory.CompareType.UnchangedValue:
            case Memory.CompareType.UnknownInitialValue:
                lblSecondValue.Enabled = txtBoxScanValue.Enabled = txtBoxScanValueSecond.Enabled = false;
                break;

            default:
                txtBoxScanValue.Enabled = true;
                break;
            }
        }
Esempio n. 3
0
        private void cmbBoxValueType_SelectedIndexChanged(Object sender, EventArgs e)
        {
            var newIndex = cmbBoxValueType.SelectedIndex;

            switch (newIndex)
            {
            case 0: // Byte
            case 1: // 2 Bytes
            case 2: // 4 Bytes
            case 3: // 8 Bytes
            case 4: // Float
            case 5: // Double
                if (curScanStatus == ScanStatus.FirstScan)
                {
                    cmbBoxScanType.DataSource = ScanTypeOptions.listSearch_FirstScan;
                }
                else
                {
                    cmbBoxScanType.DataSource = ScanTypeOptions.listSearch_NextScan;
                }
                break;

            case 6: // String
            case 7: // Array of bytes
                cmbBoxScanType.DataSource = ScanTypeOptions.listSearchExactOnly;
                break;
            }
            scanValueType = ScanTypeOptions.getValueTypeFromString((String)cmbBoxValueType.SelectedItem);
        }
Esempio n. 4
0
        private void cmbBoxScanType_SelectedIndexChanged(Object sender, EventArgs e)
        {
            var newCompareType = ScanTypeOptions.getCompareTypeFromString((String)((sender as ComboBox).SelectedItem));

            scanCompareType        = newCompareType;
            lblSecondValue.Enabled = txtBoxScanValueSecond.Enabled = newCompareType == Memory.CompareType.BetweenValues;
        }
Esempio n. 5
0
        public Scanner_List()
        {
            InitializeComponent();
            this.DataContext = this;

            DocumentSavePathOption = DocumentSavePathOptions.FirstOrDefault(x => x.Value == true);

            SelectedScanType             = ScanTypeOptions.FirstOrDefault();
            SelectedDocumentHandlingType = DocumentHandlingTypes.FirstOrDefault();
            SelectedDocumentScanMode     = DocumentScanModes.FirstOrDefault();
        }
Esempio n. 6
0
 private void bgWorkerResultsUpdater_DoWork(Object sender, DoWorkEventArgs e)
 {
     while (true)
     {
         Thread.Sleep(1000);
         dataGridSavedResults.Invoke(new Action(() =>
         {
             foreach (DataGridViewRow row in dataGridSavedResults.Rows)
             {
                 var runtimeValue = Memory.read(
                     processInfo.pid,
                     (UInt64)row.Cells[SavedResultsColumnIndex.iAddress].Value,
                     ScanTypeOptions.getValueTypeFromString((String)row.Cells[SavedResultsColumnIndex.iValueType].Value)
                     );
                 dataGridSavedResults.Rows[row.Index].Cells[SavedResultsColumnIndex.iValue].Value = runtimeValue;
             }
         }));
     }
 }
Esempio n. 7
0
        private void dataGridSavedResults_CellDoubleClick(Object sender, DataGridViewCellEventArgs e)
        {
            var cells            = dataGridSavedResults.Rows[e.RowIndex].Cells;
            var cheatInformation = (CheatInformation)dataGridSavedResults.Rows[e.RowIndex].Tag;
            var frmEditInstance  = new ChildForms.childFrmEditCheat(
                (String)cells[SavedResultsColumnIndex.iDescription].Value,
                (String)cells[SavedResultsColumnIndex.iSection].Value,
                cheatInformation.sectionAddressOffset,
                (String)cells[SavedResultsColumnIndex.iType].Value,
                cells[SavedResultsColumnIndex.iValue].Value.ToString()
                );

            if (frmEditInstance.ShowDialog() == DialogResult.OK)
            {
                var returnInformation = frmEditInstance.returnInformation;
                cells[SavedResultsColumnIndex.iDescription].Value = returnInformation.description;
                cells[SavedResultsColumnIndex.iSection].Value     = returnInformation.sectionName;
                cheatInformation.sectionAddressOffset             = returnInformation.sectionAddressOffset;
                cells[SavedResultsColumnIndex.iType].Value        = returnInformation.valueType;
                cells[SavedResultsColumnIndex.iValue].Value       = returnInformation.value;

                UInt64 runtimeAddress = 0;
                for (Int32 i = 0; i < ProcessManager.mInstance.MappedSectionList.Count; i++)
                {
                    if (ProcessManager.mInstance.MappedSectionList.GetSectionName(i).Contains(returnInformation.sectionName, StringComparison.OrdinalIgnoreCase))
                    {
                        runtimeAddress = ProcessManager.mInstance.MappedSectionList[i].Start + returnInformation.sectionAddressOffset;
                        break;
                    }
                }
                Memory.write(processInfo.pid, runtimeAddress, Convert.ChangeType(returnInformation.value, ScanTypeOptions.getValueTypeFromString(returnInformation.valueType)));
            }
        }