#region Logging Defines // include this any class or method that required logging, and comment-out what is not needed #define LOGGING_ENABLED // this is only valid within the logger class #region Enabled logging levels #define LOGGING_ENABLE_INFO #define LOGGING_ENABLE_WARN #define LOGGING_ENABLE_DEBUG #define LOGGING_ENABLE_VERBOSEDEBUG #define LOGGING_ENABLE_ERROR #define LOGGING_ENABLE_VERBOSEERROR #define LOGGING_ENABLE_PROFILER #endregion #endregion #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.RVACalculator { public class RVACalculatorPlugin : UserControlPlugin { const string name = "RVA Calculator Plugin"; const string description = "A simple plugin to help calculate RVA values"; public RVACalculatorPlugin() : base() { } public override Guid ID { get { return AssemblyGuid.GetGuid(typeof(RVACalculatorPlugin)); } //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 RVACalculatorDockControl(this); 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 } } }