using System;
using System.Windows.Forms;
using Styx.Helpers;
using Styx.Plugins.PluginClass;
namespace PluginTemplate
{
internal class PluginTemplate : HBPlugin
{
private readonly Version _version = new Version(1, 0);
private const string _author = "Your Name";
private const string _name = "Name of the Plugin";
private bool _isInitialized ;
#region Overrides of HBPlugin
/// <summary>
/// Does this plugin want a button? If set to true, the button in the plugin manager will be enabled. [Default: false]
/// </summary>
public override bool WantButton { get { return true; } }
/// <summary>
/// The text of the button if the plugin wants it. [Default: "Settings"]
/// </summary>
public override string ButtonText { get { return _name; } }
/// <summary>
/// The name of this plugin.
/// </summary>
public override string Name { get { return _name; } }
/// <summary>
/// The author of this plugin.
/// </summary>
public override string Author { get { return _author; } }
/// <summary>
/// The version of the plugin.
/// </summary>
public override Version Version { get { return _version; } }
/// <summary>
/// Called everytime the engine pulses.
/// </summary>
public override void Pulse() { }
/// <summary>
/// Called when the user presses the button while having this plugin selected. The plugin can start a thread, show a form, or just do what the hell it wants.
/// </summary>
public override void OnButtonPress() { MessageBox.Show("We clicked the button!"); }
/// <summary>
/// Initializes this plugin after it has been properly loaded.
/// </summary>
public override void Initialize()
{
//Making sure we don't spam the log.
if(_isInitialized)
return;
Logging.Write("Initialized");
_isInitialized = true;
}
#endregion
}
}