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

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

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

--- trunk/RomCheater/Docking/FloatingMemoryView.cs	2012/06/03 16:09:05	249
+++ trunk/RomCheater/Docking/FloatingMemoryView.cs	2013/06/03 07:13:44	471
@@ -10,41 +10,44 @@
 using RomCheater.PluginFramework.Interfaces;
 using RomCheater.PluginFramework.Events;
 using System.Diagnostics;
+using Sojaner.MemoryScanner;
 
 namespace RomCheater.Docking
 {
     public partial class FloatingMemoryView : DockContent,
         IAcceptsPlugin<IConfigPlugin>,
-        IAcceptsProcess<Process>,
-        IAcceptsProcessAndConfig, IAcceptsExternalMemoryAddress
+        IAcceptsProcess,
+        IAcceptsProcessAndConfig, 
+        IBrowseMemoryRegion,
+        IAcceptsMemoryRange,
+        IAcceptPEData
     {
         public FloatingMemoryView() { 
             InitializeComponent(); 
             this.AcceptedPlugin = null;
-            this.AcceptedProcess = null;
+            this.ProcessPID = 0;
             //this.MemoryStart = uint.MinValue;
             //this.MemorySize = uint.MaxValue;
         }
         public FloatingMemoryView(IConfigPlugin config) : this() { this.AcceptedPlugin = config; }
-        public FloatingMemoryView(IConfigPlugin config, Process process) : this() { this.AcceptedPlugin = config; this.AcceptedProcess = process; }
+        public FloatingMemoryView(IConfigPlugin config, int pid) : this() { this.AcceptedPlugin = config; this.ProcessPID = pid; }
         #region  IAcceptsProcess<Process> Members
-        public Process AcceptedProcess { get { return MemView.AcceptedProcess; } set { MemView.AcceptedProcess = value; } }
+        public int ProcessPID { get { return MemView.ProcessPID; } set { MemView.ProcessPID = value; } }
         #endregion
         #region IAcceptsPlugin<IConfigPlugin> Members
         public IConfigPlugin AcceptedPlugin { get { return MemView.AcceptedPlugin; } set { MemView.AcceptedPlugin = value; } }
         #endregion
         #region IAcceptsMemoryRange members
-        private int MemoryStart { get { return MemView.MemoryStart; } }
-        private int MemorySize { get { return MemView.MemorySize; } }
+        public uint MemoryRangeStart { get { return MemView.MemoryRangeStart; } set { MemView.MemoryRangeStart = value; } } // set is empty in MemView, placed here incase it changes
+        public uint MemoryRangeSize { get { return MemView.MemoryRangeSize; } set { MemView.MemoryRangeSize = value; } } // set is empty in MemView, placed here incase it changes
         #endregion
 
-        #region IAcceptsExternalMemoryAddress
-        public bool AcceptExternalMemoryAddress(uint address)
-        {
-            if (!((MemoryStart <= address) && (address <= (MemoryStart + MemorySize)))) { return false; }
-            MemView.GotoAddress(address);
-            return true;
-        }
+        #region IBrowseMemoryRegion
+        public bool BrowseMemoryRegion(uint MemoryRegion) { return MemView.BrowseMemoryRegion(MemoryRegion); }
+        #endregion
+
+        #region IAcceptPEData members
+        public void SetPEViewerData(IPEDData peData) { MemView.SetPEViewerData(peData); }
         #endregion
     }
 }

 

  ViewVC Help
Powered by ViewVC 1.1.22