/[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/05/31 05:52:41	196
+++ trunk/RomCheater/Docking/FloatingMemoryView.cs	2012/06/03 12:48:09	237
@@ -13,16 +13,35 @@
 
 namespace RomCheater.Docking
 {
-    public partial class FloatingMemoryView : DockContent, IProcessConfig, IAcceptsPlugin<IConfigPlugin>
+    public partial class FloatingMemoryView : DockContent, IAcceptsProcess<Process>, IAcceptsPlugin<IConfigPlugin>, IAcceptsExternalMemoryAddress
     {
-        public FloatingMemoryView() { InitializeComponent(); this.AcceptedPlugin = null; this.AcceptedProcess = null; }
+        public FloatingMemoryView() { 
+            InitializeComponent(); 
+            this.AcceptedPlugin = null;
+            this.AcceptedProcess = null;
+            //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; }
-        #region IProcessConfig Members
-        public Process AcceptedProcess { get; set; }
+        #region  IAcceptsProcess<Process> Members
+        public Process AcceptedProcess { get { return MemView.AcceptedProcess; } set { MemView.AcceptedProcess = value; } }
         #endregion
         #region IAcceptsPlugin<IConfigPlugin> Members
-        public IConfigPlugin AcceptedPlugin { get; set; }
+        public IConfigPlugin AcceptedPlugin { get { return MemView.AcceptedPlugin; } set { MemView.AcceptedPlugin = value; } }
+        #endregion
+        #region IAcceptsMemoryRange members
+        private uint MemoryStart { get { return MemView.MemoryStart; } }
+        private uint MemorySize { get { return MemView.MemorySize; } }
+        #endregion
+
+        #region IAcceptsExternalMemoryAddress
+        public bool AcceptExternalMemoryAddress(uint address)
+        {
+            if (!((MemoryStart <= address) && (address <= (MemoryStart + MemorySize)))) { return false; }
+            MemView.GotoAddress(address);
+            return true;
+        }
         #endregion
     }
 }

 

  ViewVC Help
Powered by ViewVC 1.1.22