1 |
william |
596 |
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 System.Diagnostics; |
12 |
|
|
using RomCheater.PluginFramework.Events; |
13 |
|
|
using Sojaner.MemoryScanner; |
14 |
|
|
|
15 |
|
|
namespace RomCheater.Docking |
16 |
|
|
{ |
17 |
|
|
public partial class FloatingMemorySectionViewer : DockContent, |
18 |
|
|
IAcceptsPlugin<IConfigPlugin>, |
19 |
|
|
IAcceptsProcess<Process>, |
20 |
|
|
IAcceptsProcessAndConfig, |
21 |
|
|
IAcceptPEData |
22 |
|
|
{ |
23 |
|
|
public FloatingMemorySectionViewer() |
24 |
|
|
{ |
25 |
|
|
InitializeComponent(); |
26 |
|
|
} |
27 |
|
|
|
28 |
|
|
public FloatingMemorySectionViewer(IConfigPlugin config) : this() { this.AcceptedPlugin = config; } |
29 |
|
|
public FloatingMemorySectionViewer(IConfigPlugin config, Process process) : this() { this.AcceptedPlugin = config; this.AcceptedProcess = process; } |
30 |
|
|
|
31 |
|
|
#region IAcceptsPlugin<IConfigPlugin> Members |
32 |
|
|
private IConfigPlugin _AcceptedPlugin; |
33 |
|
|
public IConfigPlugin AcceptedPlugin { get { return _AcceptedPlugin; } set { _AcceptedPlugin = value; UpdateAcceptedPlugin(value); } } |
34 |
|
|
private void UpdateAcceptedPlugin(IConfigPlugin config) |
35 |
|
|
{ |
36 |
william |
597 |
if (config == null) { return; } |
37 |
william |
596 |
// perform processing when config plugin is updated |
38 |
|
|
} |
39 |
|
|
#endregion |
40 |
|
|
#region IAcceptsProcess<Process> Members |
41 |
|
|
private Process _AcceptedProcess; |
42 |
|
|
public Process AcceptedProcess { get { return _AcceptedProcess; } set { _AcceptedProcess = value; UpdateAcceptedProcess(value); } } |
43 |
|
|
private void UpdateAcceptedProcess(Process process) |
44 |
|
|
{ |
45 |
|
|
if (process == null) { return; } |
46 |
|
|
// perform processing when process is updated |
47 |
|
|
} |
48 |
|
|
#endregion |
49 |
|
|
|
50 |
|
|
#region IAcceptPEData Members |
51 |
|
|
private IPEDData _PEData; |
52 |
|
|
private IPEDData PEData { get { return _PEData; } set { _PEData = value; } } |
53 |
|
|
public void SetPEViewerData(Sojaner.MemoryScanner.IPEDData peData) |
54 |
|
|
{ |
55 |
|
|
this.PEData = peData; |
56 |
|
|
} |
57 |
|
|
#endregion |
58 |
|
|
|
59 |
|
|
} |
60 |
|
|
} |