|
|
| Line 2: |
Line 2: |
| | | | |
| | == Building Plugins == | | == Building Plugins == |
| − |
| |
| − | == Plugin Interfaces ==
| |
| − |
| |
| − | === IUBotCommand ===
| |
| − |
| |
| − | <syntaxhighlight lang="csharp">
| |
| − | public interface IUBotCommand
| |
| − | {
| |
| − | string CommandName { get; }
| |
| − | string Category { get; }
| |
| − | IEnumerable<UBotParameterDefinition> ParameterDefinitions { get; }
| |
| − | void Execute(IUBotStudio ubotStudio, Dictionary<string, string> parameters);
| |
| − | bool IsContainer { get; }
| |
| − | }
| |
| − | </syntaxhighlight>
| |
| − |
| |
| − | === IUBotFunction ===
| |
| − |
| |
| − | <syntaxhighlight lang="csharp">
| |
| − | public interface IUBotFunction
| |
| − | {
| |
| − | string FunctionName { get; }
| |
| − | object ReturnValue { get; }
| |
| − | UBotType ReturnValueType { get; }
| |
| − | string Category { get; }
| |
| − | IEnumerable<UBotParameterDefinition> ParameterDefinitions { get; }
| |
| − | void Execute(IUBotStudio ubotStudio, Dictionary<string, string> parameters);
| |
| − | }
| |
| − | </syntaxhighlight>
| |
| − |
| |
| − | === IUBotStudio ===
| |
| − |
| |
| − | <syntaxhighlight lang="csharp">
| |
| − | public interface IUBotStudio
| |
| − | {
| |
| − | void RunScript(string script);
| |
| − | void ChangeUserInterface(string name);
| |
| − | IUBotCommand ContainerParent { get; set; }
| |
| − | void RunContainerCommands();
| |
| − | void SetVariable(string variableName, string value);
| |
| − | void SetList(string listName, List<string> value);
| |
| − | void SetTable(string tableName, string[,] value);
| |
| − | string GetVariable(string variableName);
| |
| − | List<string> GetList(string listName);
| |
| − | string[,] GetTable(string tableName);
| |
| − | }
| |
| − | </syntaxhighlight>
| |
| − |
| |
| − | === IEventEnabled ===
| |
| − |
| |
| − | <syntaxhighlight lang="csharp">
| |
| − | public interface IEventEnabled
| |
| − | {
| |
| − | void StartEventListener();
| |
| − | void StopEventListener();
| |
| − | }
| |
| − | </syntaxhighlight>
| |
| − |
| |
| − | === IWizardEnabled ===
| |
| − |
| |
| − | <syntaxhighlight lang="csharp">
| |
| − | public interface IWizardEnabled
| |
| − | {
| |
| − | IWizard GenerateWizard();
| |
| − | }
| |
| − | </syntaxhighlight>
| |
| − |
| |
| − | === IWizard ===
| |
| − |
| |
| − | <syntaxhighlight lang="csharp">
| |
| − | public interface IWizard
| |
| − | {
| |
| − | Window WizardWindow { get; }
| |
| − | Dictionary<string, string> WizardValues { get; }
| |
| − | }
| |
| − | </syntaxhighlight>
| |
| − |
| |
| − | === UBotParameterDefinition ===
| |
| − |
| |
| − | <syntaxhighlight lang="csharp">
| |
| − | public class UBotParameterDefinition
| |
| − | {
| |
| − | public string Name { get; private set; }
| |
| − | public UBotType Type { get; private set; }
| |
| − | public IEnumerable<string> Options { get; set; }
| |
| − | public object DefaultValue { get; set; }
| |
| − |
| |
| − | public UBotParameterDefinition(string name, UBotType type)
| |
| − | {
| |
| − | Name = name;
| |
| − | Type = type;
| |
| − | }
| |
| − | }
| |
| − | </syntaxhighlight>
| |
| − |
| |
| − | === UBotType ===
| |
| − |
| |
| − | <syntaxhighlight lang="csharp">
| |
| − | public enum UBotType
| |
| − | {
| |
| − | String,
| |
| − | UBotVariable,
| |
| − | UBotList,
| |
| − | UBotTable
| |
| − | }
| |
| − | </syntaxhighlight>
| |
| − |
| |
| − | == Plugin Examples ==
| |
| − |
| |
| − | === Simple Commands and Functions ===
| |