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
Window plugin showing up as process
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="Hesse" data-source="post: 73632" data-attributes="member: 23814"><p>I haven't seen anyone else using the IShowPlugin interface.</p><p></p><p>I added return values to the GetHome function and also return true now, but it is still showing up as a process plugin. I looked in the GUIWindow.cs file and I didn't see a list of plugin IDs in the enumeration section. There really wasn't a whole lot there. Is it maybe in a different file?</p><p></p><p>Here's the whole code in case someone sees something I missed.</p><p></p><p>Jesse</p><p></p><p></p><p>[code]</p><p>#region Copyright (C) 2006 Team MediaPortal</p><p></p><p>/* </p><p> * Copyright (C) 2006 Team MediaPortal</p><p> * https://www.team-mediaportal.com</p><p> *</p><p> * This Program is free software; you can redistribute it and/or modify</p><p> * it under the terms of the GNU General Public License as published by</p><p> * the Free Software Foundation; either version 2, or (at your option)</p><p> * any later version.</p><p> * </p><p> * This Program is distributed in the hope that it will be useful,</p><p> * but WITHOUT ANY WARRANTY; without even the implied warranty of</p><p> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</p><p> * GNU General Public License for more details.</p><p> * </p><p> * You should have received a copy of the GNU General Public License</p><p> * along with GNU Make; see the file COPYING. If not, write to</p><p> * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. </p><p> * http://www.gnu.org/copyleft/gpl.html</p><p> *</p><p> */</p><p></p><p>#endregion</p><p></p><p>#region XMMImporter: Version History</p><p></p><p>/*</p><p> * XMM Importer</p><p> * </p><p> * Plugin to allow converting Extreme Movie Manager (XMM) databases to</p><p> * MediaPortal.</p><p> * </p><p> * 060827 - JBL - 0.0.0.1</p><p> * Started 060819.</p><p> * </p><p> * This is my first attempt at a C# program and plugin for MediaPortal. This first</p><p> * version of XMM Importer is capable of reading Extreme Movie Manager v5 database</p><p> * files and converting the video data into a MediaPortal video database.</p><p> * </p><p> * Current Version Features:</p><p> * + Configuration control through a MediaPortal plugin interface and a</p><p> * windows form.</p><p> * + Capable of reading XMM v5 database files.</p><p> * + Automatically copies cover files to specified MediaPortal thumbnail directory.</p><p> * </p><p> * Future Work:</p><p> * + Auto detect MediaPortal directories and database files</p><p> * + Save settings to XML or SQLite database to retain settings between uses.</p><p> * + Allow for importing multiple databases by allowing multiple settings in configuration</p><p> * file</p><p> * + Add more control over import information</p><p> * + Relook over SQLite.NET and other MP database code to see if it would work better</p><p> * than the current method of working with SQLite databases</p><p> * + Clean up and add more comments to code for next version</p><p> * </p><p> * Known Issues:</p><p> * + The method of access the MP databases probably isn't optimal. It is currently done</p><p> * using the alternative SQLite interface and a data reader has to be generated each</p><p> * time a query needs to be made. It seems there should be a better way, but seems to</p><p> * work OK for now.</p><p> * + There are no warnings before clearing the data in the video database. The next</p><p> * version should include a warning and even backup the MP video database before working</p><p> * on it.</p><p> * + Only tried on US English version of Windows. May not be compatable with different</p><p> * character sets, but remains to be seen.</p><p> * </p><p> */</p><p>#endregion</p><p></p><p></p><p>using System;</p><p>using System.Collections.Generic;</p><p>using System.Text;</p><p>//using System.ComponentModel;</p><p>using System.Windows.Forms;</p><p>using MediaPortal.GUI.Library;</p><p></p><p></p><p>namespace GUIXMM</p><p>{ </p><p> /// <summary></p><p> /// CLASS: XMMImporterPlugin</p><p> /// This is the main plugin interface to MediaPortal.</p><p> /// </summary></p><p> public class XMMImporterPlugin : GUIWindow, ISetupForm</p><p> {</p><p> public XMMImporterPlugin()</p><p> {</p><p> }</p><p></p><p> #region ISetupForm Members</p><p> </p><p> //Returns the name of the plugin which is shown in the plugin menu</p><p> public string PluginName()</p><p> {</p><p> return "XMMImporter";</p><p> }</p><p> //Returns the description of the plugin is shown in the plugin menu</p><p> public string Description()</p><p> {</p><p> return "Imports XMM Libraries into the MediaPortal database";</p><p> }</p><p> // Returns the author of the plugin which is shown in the plugin menu</p><p> public string Author()</p><p> {</p><p> return "Hesse";</p><p> }</p><p> // Show the setup dialog</p><p> public void ShowPlugin()</p><p> {</p><p> //MessageBox.Show("Nothing to do now");</p><p> XMMImportForm myXMMImporterForm = new XMMImportForm();</p><p> myXMMImporterForm.Show();</p><p> }</p><p> //Indicates whether plugin can be enabled/disabled</p><p> public bool CanEnable()</p><p> {</p><p> return true;</p><p> }</p><p> // Indicates if a plugin is enabled by default</p><p> public bool DefaultEnabled()</p><p> {</p><p> return false;</p><p> }</p><p> // get ID Of windowplugin belonging to this setup</p><p> public int GetWindowId()</p><p> {</p><p> return 4444;</p><p> }</p><p> // Indicates if a plugin has its own setup screen</p><p> public bool HasSetup()</p><p> {</p><p> return true;</p><p> }</p><p></p><p> /// <summary></p><p> /// If the plugin should have its own button on the main menu of Media Portal 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></p><p> public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage)</p><p> {</p><p> strButtonText = "XMMImporter";</p><p> strButtonImage = "";</p><p> strButtonImageFocus = "";</p><p> strPictureImage = "";</p><p> return true;</p><p> }</p><p> #endregion</p><p></p><p> }</p><p>}</p><p>[/code]</p></blockquote><p></p>
[QUOTE="Hesse, post: 73632, member: 23814"] I haven't seen anyone else using the IShowPlugin interface. I added return values to the GetHome function and also return true now, but it is still showing up as a process plugin. I looked in the GUIWindow.cs file and I didn't see a list of plugin IDs in the enumeration section. There really wasn't a whole lot there. Is it maybe in a different file? Here's the whole code in case someone sees something I missed. Jesse [code] #region Copyright (C) 2006 Team MediaPortal /* * Copyright (C) 2006 Team MediaPortal * https://www.team-mediaportal.com * * This Program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * This Program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GNU Make; see the file COPYING. If not, write to * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. * http://www.gnu.org/copyleft/gpl.html * */ #endregion #region XMMImporter: Version History /* * XMM Importer * * Plugin to allow converting Extreme Movie Manager (XMM) databases to * MediaPortal. * * 060827 - JBL - 0.0.0.1 * Started 060819. * * This is my first attempt at a C# program and plugin for MediaPortal. This first * version of XMM Importer is capable of reading Extreme Movie Manager v5 database * files and converting the video data into a MediaPortal video database. * * Current Version Features: * + Configuration control through a MediaPortal plugin interface and a * windows form. * + Capable of reading XMM v5 database files. * + Automatically copies cover files to specified MediaPortal thumbnail directory. * * Future Work: * + Auto detect MediaPortal directories and database files * + Save settings to XML or SQLite database to retain settings between uses. * + Allow for importing multiple databases by allowing multiple settings in configuration * file * + Add more control over import information * + Relook over SQLite.NET and other MP database code to see if it would work better * than the current method of working with SQLite databases * + Clean up and add more comments to code for next version * * Known Issues: * + The method of access the MP databases probably isn't optimal. It is currently done * using the alternative SQLite interface and a data reader has to be generated each * time a query needs to be made. It seems there should be a better way, but seems to * work OK for now. * + There are no warnings before clearing the data in the video database. The next * version should include a warning and even backup the MP video database before working * on it. * + Only tried on US English version of Windows. May not be compatable with different * character sets, but remains to be seen. * */ #endregion using System; using System.Collections.Generic; using System.Text; //using System.ComponentModel; using System.Windows.Forms; using MediaPortal.GUI.Library; namespace GUIXMM { /// <summary> /// CLASS: XMMImporterPlugin /// This is the main plugin interface to MediaPortal. /// </summary> public class XMMImporterPlugin : GUIWindow, ISetupForm { public XMMImporterPlugin() { } #region ISetupForm Members //Returns the name of the plugin which is shown in the plugin menu public string PluginName() { return "XMMImporter"; } //Returns the description of the plugin is shown in the plugin menu public string Description() { return "Imports XMM Libraries into the MediaPortal database"; } // Returns the author of the plugin which is shown in the plugin menu public string Author() { return "Hesse"; } // Show the setup dialog public void ShowPlugin() { //MessageBox.Show("Nothing to do now"); XMMImportForm myXMMImporterForm = new XMMImportForm(); myXMMImporterForm.Show(); } //Indicates whether plugin can be enabled/disabled public bool CanEnable() { return true; } // Indicates if a plugin is enabled by default public bool DefaultEnabled() { return false; } // get ID Of windowplugin belonging to this setup public int GetWindowId() { return 4444; } // Indicates if a plugin has its own setup screen public bool HasSetup() { return true; } /// <summary> /// If the plugin should have its own button on the main menu of Media Portal 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> public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) { strButtonText = "XMMImporter"; strButtonImage = ""; strButtonImageFocus = ""; strPictureImage = ""; return true; } #endregion } } [/code] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
Window plugin showing up as process
Contact us
RSS
Top
Bottom