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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 683 - (hide annotations) (download)
Mon Jun 17 08:33:06 2013 UTC (7 years, 4 months ago) by william
File size: 2536 byte(s)

1 william 443 #region Logging Defines
2     // include this any class or method that required logging, and comment-out what is not needed
3     #define LOGGING_ENABLED // this is only valid within the logger class
4     #region Enabled logging levels
5     #define LOGGING_ENABLE_INFO
6     #define LOGGING_ENABLE_WARN
7     #define LOGGING_ENABLE_DEBUG
8     #define LOGGING_ENABLE_VERBOSEDEBUG
9     #define LOGGING_ENABLE_ERROR
10     #define LOGGING_ENABLE_VERBOSEERROR
11     #define LOGGING_ENABLE_PROFILER
12     #endregion
13     #endregion
14    
15     //#define PLUGIN_ENABLED // when defined the plugin is enabled, otherwise it will not be shown
16 william 442 using System;
17 william 437 using System.Collections.Generic;
18     using System.Linq;
19     using System.Text;
20     using RomCheater.PluginFramework.Core;
21 william 440 using WeifenLuo.WinFormsUI.Docking;
22 william 437
23     namespace RomCheater.CheatPlugin
24     {
25     public class CheatCodePlugin : UserControlPlugin
26     {
27    
28     const string name = "Cheat Code Converter Plugin";
29     const string description = "A simple plugin to allow the conversion of cheat codes to one or more formats";
30    
31     public CheatCodePlugin() : base() { }
32     public override Guid ID
33     {
34     get { return AssemblyGuid.GetGuid(typeof(CheatCodePlugin)); }
35     //get { return new Guid(); }
36     }
37     public override string Name
38     {
39     get
40     {
41     return name;
42     }
43     }
44     public override string Description
45     {
46     get
47     {
48     return description;
49     }
50     }
51     public override void Reload(bool silent)
52     {
53     }
54 william 440
55     public override void Config()
56     {
57 william 442 Logging.logger.Warn.WriteLine("Plugin: '{0}' guid: '{1}' - has no configurable settings", name, ID);
58 william 440 }
59    
60 william 442 public override void Show() { Show(null); }
61     public override void Show(DockPanel dockPanel) { Show(dockPanel, DockState.Document); }
62     public override void Show(DockPanel dockPanel, DockState dockState) { InternalShow(dockPanel, dockState); }
63     private void InternalShow(DockPanel dockPanel, DockState dockState)
64 william 440 {
65 william 442 #if PLUGIN_ENABLED
66 william 683 var t = new CheatCodeDockContent(this);
67 william 442 if (dockPanel == null)
68     {
69     t.Show();
70     }
71     else
72     {
73     t.Show(dockPanel, dockState);
74     }
75     #else
76     Logging.logger.Warn.WriteLine("Plugin: '{0}' guid: '{1}' - is currently disabled", name, ID);
77     #endif
78 william 440 }
79 william 437 }
80     }

  ViewVC Help
Powered by ViewVC 1.1.22