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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 442 - (hide annotations) (download)
Tue May 28 19:35:34 2013 UTC (7 years, 5 months ago) by william
File size: 2058 byte(s)

1 william 442 //#define PLUGIN_ENABLED // when defined the plugin is enabled, otherwise it will not be shown
2     using System;
3 william 437 using System.Collections.Generic;
4     using System.Linq;
5     using System.Text;
6     using RomCheater.PluginFramework.Core;
7 william 440 using WeifenLuo.WinFormsUI.Docking;
8 william 437
9     namespace RomCheater.CheatPlugin
10     {
11     public class CheatCodePlugin : UserControlPlugin
12     {
13    
14     const string name = "Cheat Code Converter Plugin";
15     const string description = "A simple plugin to allow the conversion of cheat codes to one or more formats";
16    
17     public CheatCodePlugin() : base() { }
18     public override Guid ID
19     {
20     get { return AssemblyGuid.GetGuid(typeof(CheatCodePlugin)); }
21     //get { return new Guid(); }
22     }
23     public override string Name
24     {
25     get
26     {
27     return name;
28     }
29     }
30     public override string Description
31     {
32     get
33     {
34     return description;
35     }
36     }
37     public override void Reload(bool silent)
38     {
39     }
40 william 440
41     public override void Config()
42     {
43 william 442 Logging.logger.Warn.WriteLine("Plugin: '{0}' guid: '{1}' - has no configurable settings", name, ID);
44 william 440 }
45    
46 william 442 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 william 440 {
51 william 442 #if PLUGIN_ENABLED
52 william 440 var t = new CheatCodeDockContent();
53 william 442 if (dockPanel == null)
54     {
55     t.Show();
56     }
57     else
58     {
59     t.Show(dockPanel, dockState);
60     }
61     #else
62     Logging.logger.Warn.WriteLine("Plugin: '{0}' guid: '{1}' - is currently disabled", name, ID);
63     #endif
64 william 440 }
65 william 437 }
66     }

  ViewVC Help
Powered by ViewVC 1.1.22