C# Class PaleTree.Plugins.PluginManager

Inheritance: IPluginManager
显示文件 Open project: exectails/PaleTree Class Usage Examples

Public Methods

Method Description
AddToMenu ( int index, string text, EventHandler onClick ) : void

Adds item to Plugin menu.

AddToMenu ( string text, EventHandler onClick ) : void

Adds item to Plugin menu.

AddToToolbar ( Image icon, string tooltip, EventHandler onClick ) : void

Adds button to toolbar.

AddToToolbar ( int index, Image icon, string tooltip, EventHandler onClick ) : void

Adds button to toolbar.

GetPacketList ( ) : IList

Returns a thread-safe list of all current packets.

GetSelectedPacket ( ) : PalePacket

Returns currently selected packet or null.

OpenCentered ( Form form ) : void

Opens form centered on the main window.

PluginManager ( FrmMain frmMain ) : System

Creates new plugin manager.

Private Methods

Method Description
Load ( ) : void

Loads plugins from Plugins folder.

OnClear ( ) : void
OnEnd ( ) : void

Fires End event.

OnReady ( ) : void

Fires Ready event.

OnRecv ( PalePacket palePacket ) : void

Fires Recv event.

OnSelected ( PalePacket palePacket ) : void

Fires End event.

OnSelectedHex ( PalePacket palePacket, int start ) : void

Fires End event.

OnSend ( PalePacket palePacket ) : void

Fires Send event.

Method Details

AddToMenu() public method

Adds item to Plugin menu.
public AddToMenu ( int index, string text, EventHandler onClick ) : void
index int Index at which to insert the item
text string Text used for item
onClick EventHandler Event handler for when the item is clicked
return void

AddToMenu() public method

Adds item to Plugin menu.
public AddToMenu ( string text, EventHandler onClick ) : void
text string Text used for item
onClick EventHandler Event handler for when the item is clicked
return void

AddToToolbar() public method

Adds button to toolbar.
public AddToToolbar ( Image icon, string tooltip, EventHandler onClick ) : void
icon Image Icon for the button
tooltip string Tooltip for the button
onClick EventHandler Event handler for when the button is clicked
return void

AddToToolbar() public method

Adds button to toolbar.
public AddToToolbar ( int index, Image icon, string tooltip, EventHandler onClick ) : void
index int Index at which to insert the button
icon Image Icon for the button
tooltip string Tooltip for the button
onClick EventHandler Event handler for when the button is clicked
return void

GetPacketList() public method

Returns a thread-safe list of all current packets.
public GetPacketList ( ) : IList
return IList

GetSelectedPacket() public method

Returns currently selected packet or null.
public GetSelectedPacket ( ) : PalePacket
return PaleTree.Shared.PalePacket

OpenCentered() public method

Opens form centered on the main window.
public OpenCentered ( Form form ) : void
form System.Windows.Forms.Form Form to show
return void

PluginManager() public method

Creates new plugin manager.
public PluginManager ( FrmMain frmMain ) : System
frmMain FrmMain Main window
return System