ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/RomCheater/trunk/RomCheater.EmuMMAPPlugin/EmuMMAPPlugin.cs
(Generate patch)

Comparing trunk/RomCheater.EmuMMAPPlugin/EmuMMAPPlugin.cs (file contents):
Revision 683 by william, Mon Jun 17 08:33:06 2013 UTC vs.
Revision 717 by william, Tue Jun 18 11:27:53 2013 UTC

# Line 24 | Line 24 | namespace RomCheater.EmuMMAPPlugin
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)); }
# Line 60 | Line 61 | namespace RomCheater.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();
# Line 74 | Line 74 | namespace RomCheater.EmuMMAPPlugin
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   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines