/[RomCheater]/trunk/RomCheater/Docking/UI/UIMemoryViewer.cs
ViewVC logotype

Diff of /trunk/RomCheater/Docking/UI/UIMemoryViewer.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/RomCheater/Docking/UI/UIMemoryViewer.cs	2013/06/03 05:48:41	470
+++ trunk/RomCheater/Docking/UI/UIMemoryViewer.cs	2013/06/03 07:13:44	471
@@ -34,7 +34,7 @@
 {
     public partial class UIMemoryViewer : UserControl,
         IAcceptsPlugin<IConfigPlugin>,
-        IAcceptsProcess<Process>,
+        IAcceptsProcess,
         IAcceptsProcessAndConfig,
         IAcceptsMemoryRange,
         IBrowseMemoryRegion,
@@ -59,7 +59,7 @@
             for (uint i = MemoryRangeStart; i < (MemoryRangeStart + max_ram_view); i += max_address_width) { ramScroll.Maximum += (int)max_address_width; }
             ramScroll.Value = ramScroll.Minimum;
             this.CanChangeUpdateInterval = false;
-            this.AcceptedPlugin = null; this.AcceptedProcess = null;
+            this.AcceptedPlugin = null; this.ProcessPID = 0;
             txtAddresses.MouseWheel += new MouseEventHandler(txtAddresses_MouseWheel);
             txtData.MouseWheel += new MouseEventHandler(txtData_MouseWheel);
         }      
@@ -98,17 +98,17 @@
         }
         #endregion
         #region  IAcceptsProcess<Process> Members
-        private Process _AcceptedProcess;
-        public Process AcceptedProcess
+        private int _ProcessPID;
+        public int ProcessPID
         {
-            get { return _AcceptedProcess; }
+            get { return _ProcessPID; }
             set
             {
-                _AcceptedProcess = value;
-                update_timer.Enabled = (value != null);
+                _ProcessPID = value;
+                update_timer.Enabled = (value != 0);
                 UpdateEnabled = update_timer.Enabled;
 #if !DISABLE_GETFIRSTNONZEROBYTE_ONUPDATE_ACCEPTEDPROCESS
-                if (value != null)
+                if (value != 0)
                     GetFirstNonZeroByte();
 #endif
             }
@@ -231,7 +231,7 @@
         }
         private void UpdateGui(bool force)
         {
-            if (AcceptedProcess == null) { return; }
+            if (ProcessPID == 0) { return; }
             if (AcceptedPlugin == null) { return; }
 
             if (!this.ShouldUpdateResults()) { return; }// this.Logger.LogDebugMessage(string.Format("ShouldUpdateResults() -> returning false")); return; }
@@ -293,7 +293,7 @@
             if (SearchInProgress) return;
             try
             {
-                if (AcceptedProcess == null) { return; }
+                if (ProcessPID == 0) { return; }
                 if (AcceptedPlugin == null) { return; }
 
                 byte[] data = GetMemory();
@@ -359,7 +359,7 @@
         {
             try
             {
-                if (AcceptedProcess == null) { return; }
+                if (ProcessPID == 0) { return; }
                 if (AcceptedPlugin == null) { return; }
                 // Byte changed
                 //byte[] data = (txtData.ByteProvider as DynamicByteProvider).Bytes.ToArray();

 

  ViewVC Help
Powered by ViewVC 1.1.22