Skip to content
TheCheatsrichter edited this page May 20, 2019 · 5 revisions

Welcome to the Gw2LBPluginTemplates wiki!

This wiki is a work in process documentation of the plugin implementation of Gw2 Launchbuddy.

LBPlugin interface:

Properties:

Plugininfo

General information about your plugin will be saved here. This includes:

  • Name -> the name of your plugin
  • Version -> version of your plugin
  • Author -> your name/nickname
  • Url -> link associated with your website/plugin
  • Description -> General description about your plugin

ObservableCollection Accounts:

A collection of all created accounts in Launchbuddy. Use these to control and manage gameclients, loginfiles and nicknames.

IEnviroment Enviroment:

All file and folder paths created and managed by Launchbuddy which might be needed for your plugin.

bool Verify:

Return if everything is set up for the plugin to work correctly.

bool IsUpToDate:

Return if a newer version of your plugin is available or not. If this is false and Launchbuddy plugin autoupdate is active, then the plugin Update() will be called.

Methods:

bool Init():

The initialize method for your plugin. This will be called only once on each LB startup. Return true if successfull.

string Update():

Download and manage the newest version of your plugin. Then return the filelocation of the new .dll as string. Overwriting or swaping .dlls is not needed as Launchbuddy will manage this on its own.

bool Uninstall():

Clear every file / configuration of your plugin to leave a clean enviroment! Return true if successfull.

Events:

OnLBStart(object sender, EventArgs e):

An event which will be raised when Launchbuddy is successfully loaded. Keep in mind that this requires an initialized plugin and will be called if really everything of LB is loaded and configured.

OnLBClose(object sender, EventArgs e):

An event raised when Launchbuddy closes. Most likely used to save things.

OnClientStatusChanged(object sender, ClientStatusEventArgs e):

An event raised when any of the accounts clients changes its state. To keep track of which client changed to what. Interesting information (client id, status) is provided in ClientStatusEventArgs. For further information about the clientstatus see: https://github.com/TheCheatsrichter/Gw2LBPluginTemplates/wiki/Launchbuddy-Client-Status-Diagram

UI

TabItem UIContent:

The TabItem which will be attached to the Launchbuddy TabCollection in the main left corner. Return null if you don't want your plugin to show any UI at all.