void SetEntry()
        {
            if (ValueTextBox.Text.Trim().Length <= 0)
            {
                return;
            }

            byte[] writeBuf = SearchTypeConverter.ParseInputToByteArray(ValueTextBox.Text, TargetEntry.ValueType);
            if (writeBuf.Length <= 0)
            {
                MessageBox.Show("Failed to convert input value!", "Error!", MessageBoxButton.OK, MessageBoxImage.Error);
                return;
            }

            if (TargetEntry.ValueType == SearchType.String)
            {
                List <byte> strList = writeBuf.ToList();
                strList.Add((byte)0x00);
                writeBuf = strList.ToArray();
            }

            TargetEntry.Frozen = FrozenCheckBox.IsChecked.Value;
            TargetEntry.Value  = ValueTextBox.Text;

            try
            {
                TargetProcess.WriteBuffer(TargetEntry.OriginalAddress, writeBuf);
            }
            catch (Exception e)
            {
            }

            this.Close();
        }
Exemple #2
0
        private void UpdateSearchEntryFrozen(SearchEntry en)
        {
            byte[] write = SearchTypeConverter.ParseInputToByteArray(en.Value, en.ValueType);
            if (write.Length <= 0)
            {
                return;                 //failed to parse, no messagebox to avoid spam
            }
            if (en.ValueType == SearchType.String)
            {
                List <byte> strList = write.ToList();
                strList.Add((byte)0x00);
                write = strList.ToArray();
            }

            SelectedProcess.WriteBuffer(en.OriginalAddress, write);
        }
Exemple #3
0
        private void SearchNextButton_Click(object sender, RoutedEventArgs e)
        {
            SearchResultDataGrid.Items.Clear();
            SearchProgressBar.Value = 0;

            string valueInput = SearchValueTextBox.Text.Trim();

            if (valueInput.Length < 1)
            {
                return;
            }

            byte[] searchBytes = SearchTypeConverter.ParseInputToByteArray(valueInput, CurrentSearchType);
            if (searchBytes.Length <= 0)
            {
                MessageBox.Show("Failed to convert input value to selected type!", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
                return;
            }

            Searcher.SearchAgain(searchBytes);
            EnableControls(false);
            WasSearching = true;
        }