/[RomCheater]/trunk/RomCheater/Docking/FloatingMemorySearcher.cs
ViewVC logotype

Diff of /trunk/RomCheater/Docking/FloatingMemorySearcher.cs

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

--- trunk/RomCheater/Docking/FloatingMemorySearcher.cs	2012/06/03 13:21:51	243
+++ trunk/RomCheater/Docking/FloatingMemorySearcher.cs	2012/06/03 14:50:09	245
@@ -329,6 +329,7 @@
                 Address = Convert.ToUInt32(ResultItems[i].SubItems[col_Found_Address].Text, 16);
                 //r_ms.BaseStream.Seek(Address, SeekOrigin.Begin);                
                 GenericMemoryProvider provider = new GenericMemoryProvider((IAcceptsProcessAndConfig)this);
+                provider.OpenProvider();
                 int bytesReadSize;
                 byte[] data;    
                 uint bytesToRead = 0;
@@ -370,6 +371,7 @@
                         break;
                 }
                 r_ms.Close();
+                provider.CloseProvider();
                 Application.DoEvents();
             }
             #endregion
@@ -403,6 +405,7 @@
                 ResultDataType _result = (ResultDataType)AddedItems[i].Tag;
                 Address = Convert.ToUInt32(AddedItems[i].SubItems[col_Added_Address].Text, 16);
                 GenericMemoryProvider provider = new GenericMemoryProvider((IAcceptsProcessAndConfig)this);
+                provider.OpenProvider();
                 int bytesReadSize;
                 byte[] data;
                 uint bytesToRead = 0;
@@ -444,6 +447,7 @@
                         break;
                 }
                 r_ms.Close();
+                provider.CloseProvider();
                 Application.DoEvents();
             }
             #endregion
@@ -584,14 +588,14 @@
 
         private void btnAddPatchAddress_Click(object sender, EventArgs e)
         {
-            PatchAdder adder = new PatchAdder(this.AcceptedProcess.Id);
+            PatchAdder adder = new PatchAdder((IAcceptsProcessAndConfig)this);
             adder.ShowDialog();
             if (adder.WasAPatchAdded) AddToPatchList(adder.AddedPatchValue);
         }
 
         private void btnAddAddressRange_Click(object sender, EventArgs e)
         {
-            PatchRangeAdder adder = new PatchRangeAdder(this.AcceptedProcess.Id);
+            PatchRangeAdder adder = new PatchRangeAdder((IAcceptsProcessAndConfig)this);
             adder.ShowDialog();
             if (adder.WasAPatchAdded) AddToPatchList(adder.AddedPatchValue);
         }
@@ -644,7 +648,7 @@
         }
         private void AddToPatchList(string address, SearchDataTypes bitsize, bool IsUnsigned)
         {
-            ResultItemState state = new ResultItemState(address, bitsize, IsUnsigned, this.AcceptedProcess.Id);
+            ResultItemState state = new ResultItemState(address, bitsize, IsUnsigned, (IAcceptsProcessAndConfig)this);
             ResultItem item = new ResultItem(state.Address, state.Value, state.Frozen, state.ValueType, state.IsUnsigned);
             this.AddToPatchList(item);
         }

 

  ViewVC Help
Powered by ViewVC 1.1.22