1 |
william |
196 |
using System; |
2 |
|
|
using System.Collections.Generic; |
3 |
|
|
using System.ComponentModel; |
4 |
|
|
using System.Data; |
5 |
|
|
using System.Drawing; |
6 |
|
|
using System.Linq; |
7 |
|
|
using System.Text; |
8 |
|
|
using System.Windows.Forms; |
9 |
|
|
using WeifenLuo.WinFormsUI.Docking; |
10 |
|
|
using RomCheater.PluginFramework.Interfaces; |
11 |
|
|
using RomCheater.PluginFramework.Events; |
12 |
|
|
using System.Diagnostics; |
13 |
|
|
|
14 |
|
|
namespace RomCheater.Docking |
15 |
|
|
{ |
16 |
william |
243 |
public partial class FloatingMemoryView : DockContent, |
17 |
|
|
IAcceptsPlugin<IConfigPlugin>, |
18 |
|
|
IAcceptsProcess<Process>, |
19 |
william |
276 |
IAcceptsProcessAndConfig, IBrowseMemoryRegion |
20 |
william |
196 |
{ |
21 |
william |
198 |
public FloatingMemoryView() { |
22 |
|
|
InitializeComponent(); |
23 |
|
|
this.AcceptedPlugin = null; |
24 |
|
|
this.AcceptedProcess = null; |
25 |
william |
201 |
//this.MemoryStart = uint.MinValue; |
26 |
|
|
//this.MemorySize = uint.MaxValue; |
27 |
william |
198 |
} |
28 |
william |
196 |
public FloatingMemoryView(IConfigPlugin config) : this() { this.AcceptedPlugin = config; } |
29 |
|
|
public FloatingMemoryView(IConfigPlugin config, Process process) : this() { this.AcceptedPlugin = config; this.AcceptedProcess = process; } |
30 |
william |
237 |
#region IAcceptsProcess<Process> Members |
31 |
william |
198 |
public Process AcceptedProcess { get { return MemView.AcceptedProcess; } set { MemView.AcceptedProcess = value; } } |
32 |
william |
196 |
#endregion |
33 |
|
|
#region IAcceptsPlugin<IConfigPlugin> Members |
34 |
william |
198 |
public IConfigPlugin AcceptedPlugin { get { return MemView.AcceptedPlugin; } set { MemView.AcceptedPlugin = value; } } |
35 |
william |
196 |
#endregion |
36 |
william |
206 |
#region IAcceptsMemoryRange members |
37 |
william |
249 |
private int MemoryStart { get { return MemView.MemoryStart; } } |
38 |
william |
256 |
private uint MemorySize { get { return MemView.MemorySize; } } |
39 |
william |
206 |
#endregion |
40 |
|
|
|
41 |
william |
276 |
#region IBrowseMemoryRegion |
42 |
|
|
public bool BrowseMemoryRegion(int MemoryRegion) |
43 |
william |
206 |
{ |
44 |
william |
276 |
if (!((MemoryStart <= MemoryRegion) && (MemoryRegion <= (MemoryStart + MemorySize)))) { return false; } |
45 |
|
|
MemView.GotoAddress(MemoryRegion); |
46 |
william |
206 |
return true; |
47 |
|
|
} |
48 |
|
|
#endregion |
49 |
william |
196 |
} |
50 |
|
|
} |