--- trunk/RomCheater/Docking/FloatingMemoryView.cs 2012/05/31 07:13:43 198 +++ trunk/RomCheater/Docking/FloatingMemoryView.cs 2012/05/31 09:31:57 206 @@ -13,14 +13,14 @@ using System.Diagnostics; namespace RomCheater.Docking { - public partial class FloatingMemoryView : DockContent, IProcessConfig, IAcceptsPlugin<IConfigPlugin> + public partial class FloatingMemoryView : DockContent, IProcessConfig, IAcceptsPlugin<IConfigPlugin>, IAcceptsExternalMemoryAddress { public FloatingMemoryView() { InitializeComponent(); this.AcceptedPlugin = null; this.AcceptedProcess = null; - this.MemoryStart = uint.MinValue; - this.MemorySize = uint.MaxValue; + //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; } @@ -31,8 +31,17 @@ namespace RomCheater.Docking public IConfigPlugin AcceptedPlugin { get { return MemView.AcceptedPlugin; } set { MemView.AcceptedPlugin = value; } } #endregion #region IAcceptsMemoryRange members - private uint MemoryStart { get { return MemView.MemoryStart; } set { MemView.MemoryStart = value; } } - private uint MemorySize { get { return MemView.MemorySize; } set { MemView.MemorySize = value; } } + 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 } } |