/[RomCheater]/trunk/RomCheater.CheatPlugin/CheatCodePlugin.cs
ViewVC logotype

Diff of /trunk/RomCheater.CheatPlugin/CheatCodePlugin.cs

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

revision 441 by william, Tue May 28 19:10:10 2013 UTC revision 442 by william, Tue May 28 19:35:34 2013 UTC
# Line 1  Line 1 
1  ´╗┐using System;  ´╗┐//#define PLUGIN_ENABLED // when defined the plugin is enabled, otherwise it will not be shown
2    using System;
3  using System.Collections.Generic;  using System.Collections.Generic;
4  using System.Linq;  using System.Linq;
5  using System.Text;  using System.Text;
# Line 39  namespace RomCheater.CheatPlugin Line 40  namespace RomCheater.CheatPlugin
40    
41          public override void Config()          public override void Config()
42          {          {
43              Logging.logger.Warn.WriteLine("This plugin has no configurable settings.");              Logging.logger.Warn.WriteLine("Plugin: '{0}' guid: '{1}' - has no configurable settings", name, ID);
44          }          }
45    
46          public override void Show()          public override void Show() { Show(null); }
47            public override void Show(DockPanel dockPanel) { Show(dockPanel, DockState.Document); }
48            public override void Show(DockPanel dockPanel, DockState dockState) { InternalShow(dockPanel, dockState); }
49            private void InternalShow(DockPanel dockPanel, DockState dockState)
50          {          {
51    #if PLUGIN_ENABLED
52              var t = new CheatCodeDockContent();              var t = new CheatCodeDockContent();
53              t.Show();              if (dockPanel == null)
54          }              {
55          public override void Show(DockPanel dockPanel)                  t.Show();
56          {              }
57              var t = new CheatCodeDockContent();              else
58              t.Show(dockPanel);              {
59          }                  t.Show(dockPanel, dockState);
60          public override void Show(DockPanel dockPanel, DockState dockState)              }
61          {  #else
62              var t = new CheatCodeDockContent();              Logging.logger.Warn.WriteLine("Plugin: '{0}' guid: '{1}' - is currently disabled", name, ID);
63              t.Show(dockPanel, dockState);  #endif
64          }          }
65      }      }
66  }  }

Legend:
Removed from v.441  
changed lines
  Added in v.442

  ViewVC Help
Powered by ViewVC 1.1.22