13 |
|
|
14 |
|
namespace RomCheater.Docking |
15 |
|
{ |
16 |
< |
public partial class FloatingMemoryView : DockContent, IProcessConfig, IAcceptsPlugin<IConfigPlugin> |
16 |
> |
public partial class FloatingMemoryView : DockContent, IProcessConfig, IAcceptsPlugin<IConfigPlugin>, IAcceptsExternalMemoryAddress |
17 |
|
{ |
18 |
|
public FloatingMemoryView() { |
19 |
|
InitializeComponent(); |
20 |
|
this.AcceptedPlugin = null; |
21 |
|
this.AcceptedProcess = null; |
22 |
< |
this.MemoryStart = uint.MinValue; |
23 |
< |
this.MemorySize = uint.MaxValue; |
22 |
> |
//this.MemoryStart = uint.MinValue; |
23 |
> |
//this.MemorySize = uint.MaxValue; |
24 |
|
} |
25 |
|
public FloatingMemoryView(IConfigPlugin config) : this() { this.AcceptedPlugin = config; } |
26 |
|
public FloatingMemoryView(IConfigPlugin config, Process process) : this() { this.AcceptedPlugin = config; this.AcceptedProcess = process; } |
31 |
|
public IConfigPlugin AcceptedPlugin { get { return MemView.AcceptedPlugin; } set { MemView.AcceptedPlugin = value; } } |
32 |
|
#endregion |
33 |
|
#region IAcceptsMemoryRange members |
34 |
< |
private uint MemoryStart { get { return MemView.MemoryStart; } set { MemView.MemoryStart = value; } } |
35 |
< |
private uint MemorySize { get { return MemView.MemorySize; } set { MemView.MemorySize = value; } } |
34 |
> |
private uint MemoryStart { get { return MemView.MemoryStart; } } |
35 |
> |
private uint MemorySize { get { return MemView.MemorySize; } } |
36 |
> |
#endregion |
37 |
> |
|
38 |
> |
#region IAcceptsExternalMemoryAddress |
39 |
> |
public bool AcceptExternalMemoryAddress(uint address) |
40 |
> |
{ |
41 |
> |
if (!((MemoryStart <= address) && (address <= (MemoryStart + MemorySize)))) { return false; } |
42 |
> |
MemView.GotoAddress(address); |
43 |
> |
return true; |
44 |
> |
} |
45 |
|
#endregion |
46 |
|
} |
47 |
|
} |