home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Plugins
Plugin interface
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Frodo" data-source="post: 663" data-attributes="member: 10277"><p>A plugin can now have its own setup/configuration form(s)</p><p>I've setup a simple interface :</p><p>[code]</p><p>using System;</p><p></p><p>namespace MediaPortal.GUI.Library</p><p>{</p><p> /// <summary></p><p> /// Interface for plugin setup configuration screens. </p><p> /// </p><p> /// Plugins may have a configuration screen. By implementing this interface in your plugin</p><p> /// MediaPortal will add it to the tools->plugin menu where users can configure your plugin</p><p> /// Look at the home subproject for a sample </p><p> /// </summary></p><p> public interface ISetupForm</p><p> {</p><p> string PluginName(); // Return the name which should b shown in the plugin menu</p><p> string Description(); // Return the description which should b shown in the plugin menu</p><p> string Author(); // Return the author which should b shown in the plugin menu</p><p> void ShowPlugin(); // show the setup dialog</p><p> bool CanEnable(); // Indicates whether plugin can be enabled/disabled</p><p> int GetWindowId(); // get ID of plugin window</p><p></p><p> /// <summary></p><p> /// If the plugin should have its own button on the home screen then it</p><p> /// should return true to this method, otherwise if it should not be on home</p><p> /// it should return false</p><p> /// </summary></p><p> /// <param name="strButtonText">text the button should have</param></p><p> /// <param name="strButtonImage">image for the button, or empty for default</param></p><p> /// <param name="strButtonImageFocus">image for the button, or empty for default</param></p><p> /// <param name="strPictureImage">subpicture for the button or empty for none</param></p><p> /// <returns>true : plugin needs its own button on home</p><p> /// false : plugin does not need its own button on home</returns></p><p> bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage); </p><p> }</p><p>}</p><p></p><p>[/code]</p><p></p><p>If your own plugin contains class(es) which implement this interface they will show up on the tools->plugin... menu </p><p>When a user wants to configure the plugin the ShowPlugIn() will be called</p><p></p><p>Frodo</p></blockquote><p></p>
[QUOTE="Frodo, post: 663, member: 10277"] A plugin can now have its own setup/configuration form(s) I've setup a simple interface : [code] using System; namespace MediaPortal.GUI.Library { /// <summary> /// Interface for plugin setup configuration screens. /// /// Plugins may have a configuration screen. By implementing this interface in your plugin /// MediaPortal will add it to the tools->plugin menu where users can configure your plugin /// Look at the home subproject for a sample /// </summary> public interface ISetupForm { string PluginName(); // Return the name which should b shown in the plugin menu string Description(); // Return the description which should b shown in the plugin menu string Author(); // Return the author which should b shown in the plugin menu void ShowPlugin(); // show the setup dialog bool CanEnable(); // Indicates whether plugin can be enabled/disabled int GetWindowId(); // get ID of plugin window /// <summary> /// If the plugin should have its own button on the home screen then it /// should return true to this method, otherwise if it should not be on home /// it should return false /// </summary> /// <param name="strButtonText">text the button should have</param> /// <param name="strButtonImage">image for the button, or empty for default</param> /// <param name="strButtonImageFocus">image for the button, or empty for default</param> /// <param name="strPictureImage">subpicture for the button or empty for none</param> /// <returns>true : plugin needs its own button on home /// false : plugin does not need its own button on home</returns> bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage); } } [/code] If your own plugin contains class(es) which implement this interface they will show up on the tools->plugin... menu When a user wants to configure the plugin the ShowPlugIn() will be called Frodo [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
Plugin interface
Contact us
RSS
Top
Bottom