Plugin Development

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
(Created page with "== Getting Started == == Plugin Interfaces == === IUBotCommand === <syntaxhighlight lang="csharp"> public interface IUBotCommand { string CommandName { get; } strin...")

Revision as of 16:31, 15 October 2012

Contents

Getting Started

Plugin Interfaces

IUBotCommand

public interface IUBotCommand
{
    string CommandName { get; }
    string Category { get; }
    IEnumerable<UBotParameterDefinition> ParameterDefinitions { get; }
    void Execute(IUBotStudio ubotStudio, Dictionary<string, string> parameters);
    bool IsContainer { get; }
}

IUBotFunction

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);
}

IUBotStudio

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);
}

IEventEnabled

public interface IEventEnabled
{
    void StartEventListener();
    void StopEventListener();
}

IWizardEnabled

public interface IWizardEnabled
{
    IWizard GenerateWizard();
}

IWizard

public interface IWizard
{
    Window WizardWindow { get; }
    Dictionary<string, string> WizardValues { get; }
}

UBotParameterDefinition

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;
    }
}

UBotType

public enum UBotType
{
    String,
    UBotVariable,
    UBotList,
    UBotTable
}

Plugin Examples

Simple Commands and Functions

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox