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

Annotation of /trunk/RomCheater.EmuMMAPPlugin/EmuMMAPPlugin.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 627 - (hide annotations) (download)
Sat Jun 8 19:17:44 2013 UTC (7 years, 4 months ago) by william
File size: 2529 byte(s)

1 william 627 #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     using System;
17     using System.Collections.Generic;
18     using System.Linq;
19     using System.Text;
20     using RomCheater.PluginFramework.Core;
21     using WeifenLuo.WinFormsUI.Docking;
22    
23     namespace RomCheater.EmuMMAPPlugin
24     {
25     public class EmuMMAPPlugin : UserControlPlugin
26     {
27     const string name = "Emulator Memory Map Plugin";
28     const string description = "A simple plugin to display various the memory map for various emulator(s)/device(s)";
29     public EmuMMAPPlugin() : base() { }
30     public override Guid ID
31     {
32     get { return AssemblyGuid.GetGuid(typeof(EmuMMAPPlugin)); }
33     //get { return new Guid(); }
34     }
35     public override string Name
36     {
37     get
38     {
39     return name;
40     }
41     }
42     public override string Description
43     {
44     get
45     {
46     return description;
47     }
48     }
49     public override void Reload(bool silent)
50     {
51     }
52    
53     public override void Config()
54     {
55     Logging.logger.Warn.WriteLine("Plugin: '{0}' guid: '{1}' - has no configurable settings", name, ID);
56     }
57    
58     public override void Show() { Show(null); }
59     public override void Show(DockPanel dockPanel) { Show(dockPanel, DockState.Document); }
60     public override void Show(DockPanel dockPanel, DockState dockState) { InternalShow(dockPanel, dockState); }
61     private void InternalShow(DockPanel dockPanel, DockState dockState)
62     {
63     #if PLUGIN_ENABLED
64     var t = new CheatCodeDockContent();
65     if (dockPanel == null)
66     {
67     t.Show();
68     }
69     else
70     {
71     t.Show(dockPanel, dockState);
72     }
73     #else
74     Logging.logger.Warn.WriteLine("Plugin: '{0}' guid: '{1}' - is currently disabled", name, ID);
75     #endif
76     }
77     }
78     }

  ViewVC Help
Powered by ViewVC 1.1.22