Plug-in for Media portal Help! (1 Viewer)

basimn

New Member
October 28, 2011
2
0
Hi;

I’m a .NET developer; I have been reading the Wiki for days now to learn how to build a Plug-in for Media portal 1.2.1

I think that MediaPortal is a great project, but sadly I could not find samples and examples that can bring developers to an advanced level to develop cool applications…

For example, I have been trying to create multiple windows for the same plug-in, something like a master-details-sub details forms, I have also tried to find a way to populate a list with variable options dynamically from the code, where if some option is selected, another set of options can also be selected, etc…

I truly appreciate it if someone can provide me with a cheat-sheet or a link that I may have missed to bring my skills to the next level beyond OnClick!

Thanks;
B.
 

jameson_uk

Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    Have you seen wiki.team-mediaportal.com/1_MEDIAPORTAL_1/18_Contribute/7_Skins/Skin_Architecture/GuiControlsDemo

    Source code is available in repository. Also check out other plugins. Most have the source available
     

    basimn

    New Member
    October 28, 2011
    2
    0
    Yes I did, but I could not install it, an error Message pops while installing,

    No MediaPortal dependency found!
    No Plugin dependencies found!

    I think it is targeting a different version of MediaPortal

    To read the source of other plugins is in my opinion is not a practical way to learn! In the end it seems that this is the only way I have been left with to try and learn how to develop for this project!

    Thanks for the reply…
     

    FredP42

    MP Donator
  • Premium Supporter
  • May 2, 2009
    237
    243
    78
    Home Country
    France France
    Re : Plug-in for Media portal Help!

    Hello basimm,
    It is true that the documentation of MediaPortal is light, but I have to admit it has improved a lot!
    The wiki has a lot of information and the Plugin Developer's Guide - MediaPortal Wiki is the good place to start to create a plugin.
    I remember seeing a demo plugin with several controls but I couldn't find the link :(

    A skin control is very similar to a regular Form control.
    VisualStudio completion helps to discover the methods of the control, it is just annoying not to have the documentation.

    If you want to populate a list, you can do:
    Code:
      // add a listcontrol to the skin with id = 10
      [SkinControlAttribute(10)]
      protected GUIListControl lstDetails = null;
    
      private void PopulateList(string[] list)
      {
          foreach (string str in list)
          {
              GUIListItem item = new GUIListItem();
              item.Label = str;
              lstDetails.Add(item);
          }
      }

    For the master-details-sub details forms, I don't know what you want to do exactly but it seems you'll need two controls a list and a text control (?).
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    In 1.2.0 Beta a version check was introduced:
    Version Compatibility - MediaPortal Wiki

    The GUIControlsDemo is probably not updated to support this :(

    Anyways, a great way to learn how plugins are constructed, is to look at all the sourcecode that most of the plugins have available.
     

    Users who are viewing this thread


    Write your reply...
    Top Bottom