/[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 812 by william, Tue Apr 15 14:52:10 2014 UTC
# Line 19  using System.Linq; Line 19  using System.Linq;
19  using System.Text;  using System.Text;
20  using RomCheater.PluginFramework.Core;  using RomCheater.PluginFramework.Core;
21  using WeifenLuo.WinFormsUI.Docking;  using WeifenLuo.WinFormsUI.Docking;
22    using Enterprise.Logging;
23    
24  namespace RomCheater.EmuMMAPPlugin  namespace RomCheater.EmuMMAPPlugin
25  {  {
26      public class EmuMMAPPlugin : UserControlPlugin      public class EmuMMAPPlugin : UserControlPlugin
27      {      {
28            EmuMEMMapDockControl t;
29          const string name = "Emulator Memory Map Plugin";          const string name = "Emulator Memory Map Plugin";
30          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)";
31          public EmuMMAPPlugin() : base() { }          public EmuMMAPPlugin() : base() { t = new EmuMEMMapDockControl(this); }
32          public override Guid ID          public override Guid ID
33          {          {
34              get { return AssemblyGuid.GetGuid(typeof(EmuMMAPPlugin)); }              get { return AssemblyGuid.GetGuid(typeof(EmuMMAPPlugin)); }
# Line 52  namespace RomCheater.EmuMMAPPlugin Line 54  namespace RomCheater.EmuMMAPPlugin
54    
55          public override void Config()          public override void Config()
56          {          {
57              Logging.logger.Warn.WriteLine("Plugin: '{0}' guid: '{1}' - has no configurable settings", name, ID);              gLog.Warn.WriteLine("Plugin: '{0}' guid: '{1}' - has no configurable settings", name, ID);
58          }          }
59    
60          public override void Show() { Show(null); }          public override void Show() { Show(null); }
# Line 60  namespace RomCheater.EmuMMAPPlugin Line 62  namespace RomCheater.EmuMMAPPlugin
62          public override void Show(DockPanel dockPanel, DockState dockState) { InternalShow(dockPanel, dockState); }          public override void Show(DockPanel dockPanel, DockState dockState) { InternalShow(dockPanel, dockState); }
63          private void InternalShow(DockPanel dockPanel, DockState dockState)          private void InternalShow(DockPanel dockPanel, DockState dockState)
64          {          {
65  #if PLUGIN_ENABLED  #if PLUGIN_ENABLED          
             var t = new EmuMEMMapDockControl(this);  
66              if (dockPanel == null)              if (dockPanel == null)
67              {              {
68                  t.Show();                  t.Show();
# Line 74  namespace RomCheater.EmuMMAPPlugin Line 75  namespace RomCheater.EmuMMAPPlugin
75              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);
76  #endif  #endif
77          }          }
78    
79            public override void Activate()
80            {
81                DockContentHandler handler = this.DockHandler;
82                if (handler != null)
83                    handler.Activate();
84            }
85            public override void Close()
86            {
87                DockContentHandler handler = this.DockHandler;
88                if (handler != null)
89                    handler.Close();
90            }
91            public override DockContentHandler DockHandler
92            {
93                get
94                {
95                    if (t == null || t.DockHandler == null) return null;
96                    return t.DockHandler;
97                }
98            }
99      }      }
100  }  }

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

  ViewVC Help
Powered by ViewVC 1.1.22