Difference between revisions of "PlugIn Development:GameEx Configure Function"
Jump to navigation
Jump to search
Line 5: | Line 5: | ||
<br /> | <br /> | ||
=== <span style="color:#003300;">VB.NET</span> === | === <span style="color:#003300;">VB.NET</span> === | ||
---- | |||
<pre style="font-family:'Lucida Console', Monaco, monospace; border-color:#003300; background-color:#E0EEE0; border-style:solid;"> | <pre style="font-family:'Lucida Console', Monaco, monospace; border-color:#003300; background-color:#E0EEE0; border-style:solid;"> | ||
Public Sub Configure() | Public Sub Configure() | ||
Line 12: | Line 13: | ||
=== <span style="color:#003300;">C#</span> === | === <span style="color:#003300;">C#</span> === | ||
---- | |||
<pre style="font-family:'Lucida Console', Monaco, monospace; border-color:#003300; background-color:#E0EEE0; border-style:solid;"> | <pre style="font-family:'Lucida Console', Monaco, monospace; border-color:#003300; background-color:#E0EEE0; border-style:solid;"> | ||
public void Configure() | public void Configure() |
Revision as of 06:41, 27 April 2014
This function is called when the user configures the PlugIn from the PlugIn Manager interface.
Typically you would launch a configuration window from this sub. If your plugin doesn't require user configuration, you can simply leave this area empty.
Code Examples
The following code assumes that you have a Configuration class with a window for setting options. It's probably good practice that if you don't allow a user to configure any options, you should add a MessageBox.Show command to let the user know there are no user-configurable options so they aren't deterred from enabling your plugin in the PlugIn Manager.
VB.NET
Public Sub Configure() Dim config As New Configuration config.ShowDialog() End Sub
C#
public void Configure() { using(Configuration config = new Configuration()) { config.ShowDialog(null); } }