ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/RomCheater/trunk/RomCheater/Docking/UI/UIMemoryViewer.cs
(Generate patch)

Comparing trunk/RomCheater/Docking/UI/UIMemoryViewer.cs (file contents):
Revision 245 by william, Sun Jun 3 14:50:09 2012 UTC vs.
Revision 246 by william, Sun Jun 3 15:15:51 2012 UTC

--- trunk/RomCheater/Docking/UI/UIMemoryViewer.cs	2012/06/03 14:50:09	245
+++ trunk/RomCheater/Docking/UI/UIMemoryViewer.cs	2012/06/03 15:15:51	246
@@ -1,4 +1,6 @@
-´╗┐using System;
+´╗┐#define DISABLE_GETFIRSTNONZEROBYTE_ONUPDATE_ACCEPTEDPROCESS // when defined will not call GetFirstNonZeroByte() when AcceptedProcess is updated and is not null
+#define DISABLE_GETFIRSTNONZERO_BYTE // when defined will make GetFirstNonZeroByte() an empty void method
+using System;
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Drawing;
@@ -51,6 +53,7 @@ namespace RomCheater.Docking.UI
 
         private void GetFirstNonZeroByte()
         {
+#if !DISABLE_GETFIRSTNONZERO_BYTE
             if (!DesignMode)
             {
                 GenericMemoryProvider provider = new GenericMemoryProvider((IAcceptsProcessAndConfig)this);
@@ -60,6 +63,7 @@ namespace RomCheater.Docking.UI
                 provider.CloseProvider();
                 GotoAddress(addr);
             }
+#endif
         }
 
         #region  IAcceptsProcess<Process> Members
@@ -72,8 +76,10 @@ namespace RomCheater.Docking.UI
                 _AcceptedProcess = value;
                 update_timer.Enabled = (value != null);
                 UpdateEnabled = update_timer.Enabled;
+#if !DISABLE_GETFIRSTNONZEROBYTE_ONUPDATE_ACCEPTEDPROCESS
                 if (value != null)
                     GetFirstNonZeroByte();
+#endif
             }
         }
         #endregion