/[RomCheater]/trunk/RomCheater.EmuMMAPPlugin/EmuMMAPPlugin.cs
ViewVC logotype

Diff of /trunk/RomCheater.EmuMMAPPlugin/EmuMMAPPlugin.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 683 by william, Mon Jun 17 08:33:06 2013 UTC revision 717 by william, Tue Jun 18 11:27:53 2013 UTC
# Line 24  namespace RomCheater.EmuMMAPPlugin Line 24  namespace RomCheater.EmuMMAPPlugin
24  {  {
25      public class EmuMMAPPlugin : UserControlPlugin      public class EmuMMAPPlugin : UserControlPlugin
26      {      {
27            EmuMEMMapDockControl t;
28          const string name = "Emulator Memory Map Plugin";          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)";          const string description = "A simple plugin to display various the memory map for various emulator(s)/device(s)";
30          public EmuMMAPPlugin() : base() { }          public EmuMMAPPlugin() : base() { t = new EmuMEMMapDockControl(this); }
31          public override Guid ID          public override Guid ID
32          {          {
33              get { return AssemblyGuid.GetGuid(typeof(EmuMMAPPlugin)); }              get { return AssemblyGuid.GetGuid(typeof(EmuMMAPPlugin)); }
# Line 60  namespace RomCheater.EmuMMAPPlugin Line 61  namespace RomCheater.EmuMMAPPlugin
61          public override void Show(DockPanel dockPanel, DockState dockState) { InternalShow(dockPanel, dockState); }          public override void Show(DockPanel dockPanel, DockState dockState) { InternalShow(dockPanel, dockState); }
62          private void InternalShow(DockPanel dockPanel, DockState dockState)          private void InternalShow(DockPanel dockPanel, DockState dockState)
63          {          {
64  #if PLUGIN_ENABLED  #if PLUGIN_ENABLED          
             var t = new EmuMEMMapDockControl(this);  
65              if (dockPanel == null)              if (dockPanel == null)
66              {              {
67                  t.Show();                  t.Show();
# Line 74  namespace RomCheater.EmuMMAPPlugin Line 74  namespace RomCheater.EmuMMAPPlugin
74              Logging.logger.Warn.WriteLine("Plugin: '{0}' guid: '{1}' - is currently disabled", name, ID);              Logging.logger.Warn.WriteLine("Plugin: '{0}' guid: '{1}' - is currently disabled", name, ID);
75  #endif  #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  }  }

Legend:
Removed from v.683  
changed lines
  Added in v.717

  ViewVC Help
Powered by ViewVC 1.1.22