//#define PLUGIN_ENABLED // when defined the plugin is enabled, otherwise it will not be shown using System; using System.Collections.Generic; using System.Linq; using System.Text; using RomCheater.PluginFramework.Core; using WeifenLuo.WinFormsUI.Docking; namespace RomCheater.CheatPlugin { public class CheatCodePlugin : UserControlPlugin { const string name = "Cheat Code Converter Plugin"; const string description = "A simple plugin to allow the conversion of cheat codes to one or more formats"; public CheatCodePlugin() : base() { } public override Guid ID { get { return AssemblyGuid.GetGuid(typeof(CheatCodePlugin)); } //get { return new Guid(); } } public override string Name { get { return name; } } public override string Description { get { return description; } } public override void Reload(bool silent) { } public override void Config() { Logging.logger.Warn.WriteLine("Plugin: '{0}' guid: '{1}' - has no configurable settings", name, ID); } public override void Show() { Show(null); } public override void Show(DockPanel dockPanel) { Show(dockPanel, DockState.Document); } public override void Show(DockPanel dockPanel, DockState dockState) { InternalShow(dockPanel, dockState); } private void InternalShow(DockPanel dockPanel, DockState dockState) { #if PLUGIN_ENABLED var t = new CheatCodeDockContent(); if (dockPanel == null) { t.Show(); } else { t.Show(dockPanel, dockState); } #else Logging.logger.Warn.WriteLine("Plugin: '{0}' guid: '{1}' - is currently disabled", name, ID); #endif } } }