| |||||||
| Plugins Plugins developed and maintained by users. Want to create your own plugin? Start a thread in here. |
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest
Posts: n/a
| Hi, Ive been programming for some time now in C# and wanted to try and build a plugin for mediaportal (which ive been using for a bit longer). I found the tutorial at http://mediaportal.sourceforge.net/P...inTutorial.htm which compiled fine, but it doesnt show up at the plugin list :\ Edit: The log says: Exception in plugin loading :The format of the file 'SomePlugin.dll' is invalid. Ive searched the forum for a solution, but havent been lucky yet. Can anyone help me out? Ive attached the code Ive compiled using Visual C# 2005 Express. Code: using System;
using System.Windows.Forms;
using MediaPortal.GUI.Library;
namespace SomePlugin
{
/// <summary>
/// Summary description for Class1.
/// </summary>
public class PluginClass : GUIWindow, ISetupForm
{
public PluginClass()
{
//
// TODO: Add constructor logic here
//
}
#region ISetupForm Members
// Returns the name of the plugin which is shown in the plugin menu
public string PluginName()
{
return "PluginClass";
}
// Returns the description of the plugin is shown in the plugin menu
public string Description()
{
return "Does stuff.";
}
// Returns the author of the plugin which is shown in the plugin menu
public string Author()
{
return "me";
}
// show the setup dialog
public void ShowPlugin()
{
MessageBox.Show("Nothing to configure yet!");
}
// Indicates whether plugin can be enabled/disabled
public bool CanEnable()
{
return true;
}
// get ID of windowplugin belonging to this setup
public int GetWindowId()
{
return 5678;
}
// Indicates if plugin is enabled by default;
public bool DefaultEnabled()
{
return true;
}
// 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=String.Empty;
strButtonImage=String.Empty;
strButtonImageFocus=String.Empty;
strPictureImage=String.Empty;
return false;
}
#endregion
}
}
|
|
| | #5 (permalink) |
| Portal Member Join Date: Aug 2004 Location: Melbourne, Australia
Posts: 773
Thanks: 0
Thanked 0 Times in 0 Posts
| The answer is simple, but its not good news: MP works off the .NET framework 1.1, used with VS.NET 2003. C# Express 2005 (or any of the .NET IDEs with 2005 in it) compile against .NET Framework 2.0, which does not work with .NET framework 1.1. BTW, .NET Framework 2.0 is still in beta, so MP will not support it until later. Sam |
| | |
![]() |
| Bookmarks |
| Tags |
| list, plugin, show |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [movieinfo] show a list with the actors, which you can select and view more infos | chefkoch | Improvement Suggestions | 2 | 2007-12-05 22:22 |
| Timeshift does not turn off resulting in huge file sizes | broadband412 | The old Bugreport Forum | 18 | 2006-06-16 08:47 |
| cant see list control list in my plugin | kenny | Plugins | 1 | 2006-04-04 20:58 |
| Gathering topical infos about plugins (To: authors & use | tomtom21000 | Plugins | 2 | 2006-02-05 00:20 |