24 |
|
{ |
25 |
|
public class EmuMMAPPlugin : UserControlPlugin |
26 |
|
{ |
27 |
+ |
EmuMEMMapDockControl t; |
28 |
|
const string name = "Emulator Memory Map Plugin"; |
29 |
|
const string description = "A simple plugin to display various the memory map for various emulator(s)/device(s)"; |
30 |
< |
public EmuMMAPPlugin() : base() { } |
30 |
> |
public EmuMMAPPlugin() : base() { t = new EmuMEMMapDockControl(this); } |
31 |
|
public override Guid ID |
32 |
|
{ |
33 |
|
get { return AssemblyGuid.GetGuid(typeof(EmuMMAPPlugin)); } |
61 |
|
public override void Show(DockPanel dockPanel, DockState dockState) { InternalShow(dockPanel, dockState); } |
62 |
|
private void InternalShow(DockPanel dockPanel, DockState dockState) |
63 |
|
{ |
64 |
< |
#if PLUGIN_ENABLED |
64 |
< |
var t = new EmuMEMMapDockControl(this); |
64 |
> |
#if PLUGIN_ENABLED |
65 |
|
if (dockPanel == null) |
66 |
|
{ |
67 |
|
t.Show(); |
74 |
|
Logging.logger.Warn.WriteLine("Plugin: '{0}' guid: '{1}' - is currently disabled", name, ID); |
75 |
|
#endif |
76 |
|
} |
77 |
+ |
|
78 |
+ |
public override void Activate() |
79 |
+ |
{ |
80 |
+ |
DockContentHandler handler = this.DockHandler; |
81 |
+ |
if (handler != null) |
82 |
+ |
handler.Activate(); |
83 |
+ |
} |
84 |
+ |
public override void Close() |
85 |
+ |
{ |
86 |
+ |
DockContentHandler handler = this.DockHandler; |
87 |
+ |
if (handler != null) |
88 |
+ |
handler.Close(); |
89 |
+ |
} |
90 |
+ |
public override DockContentHandler DockHandler |
91 |
+ |
{ |
92 |
+ |
get |
93 |
+ |
{ |
94 |
+ |
if (t == null || t.DockHandler == null) return null; |
95 |
+ |
return t.DockHandler; |
96 |
+ |
} |
97 |
+ |
} |
98 |
|
} |
99 |
|
} |