Esempio n. 1
0
        private void SelectProcess()
        {
            if (ProcessSelectDataGrid.SelectedItems.Count < 1)
            {
                return;
            }

            ProcessInfo selectedProc = (ProcessInfo)ProcessSelectDataGrid.SelectedItem;

            try
            {
                if ((string)ProcessMainWindow.SelectedProcessLabel.Content != selectedProc.ThisProcess.ProcessName &&
                    (ProcessMainWindow.AddressListDataGrid.Items.Count > 0 || ProcessMainWindow.SearchResultDataGrid.Items.Count > 0))
                {
                    MessageBoxResult res = MessageBox.Show("Selecting a new process will clear the address table!\nDo you want to continue?", "Warning", MessageBoxButton.YesNo, MessageBoxImage.Warning);
                    if (res == MessageBoxResult.No)
                    {
                        return;
                    }
                    ProcessMainWindow.AddressListDataGrid.Items.Clear();
                    ProcessMainWindow.SearchResultDataGrid.Items.Clear();
                }
                MemoryProcess memProc = new MemoryProcess(selectedProc.ThisProcess);
                ProcessMainWindow.SetSelectedProcess(memProc);
                this.Close();
            }
            catch (Exception e)
            {
                MessageBox.Show("Error: " + e.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
                return;
            }
        }
Esempio n. 2
0
        public void SelectProcess(MemoryProcess proc)
        {
            if (!proc.IsOpen())
            {
                throw new Exception("Memory process is not open!");
            }

            TargetProcess   = proc;
            ProcessSelected = true;
        }
Esempio n. 3
0
        public EditValueWindow(SearchEntry editEntry, MemoryProcess targetProcess)
        {
            TargetEntry   = editEntry;
            TargetProcess = targetProcess;

            InitializeComponent();

            ValueLabel.Content       = "Value (" + editEntry.ValueTypeString + ")";
            ValueTextBox.Text        = editEntry.Value;
            FrozenCheckBox.IsChecked = editEntry.Frozen;
        }
Esempio n. 4
0
 public void SetSelectedProcess(MemoryProcess memProc)
 {
     if (!memProc.IsOpen())
     {
         MessageBox.Show("Selected process is closed or inaccessible!", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
         return;
     }
     SelectedProcess = memProc;
     SelectedProcessLabel.Content = memProc.GetProcess().ProcessName;
     Searcher.SelectProcess(memProc);
     EnableControls(true);
 }