Writing a plugin using VB .NET (1 Viewer)

kyleh0000

MP Donator
  • Premium Supporter
  • April 28, 2009
    144
    23
    Home Country
    HI all

    I have been seraching the forums and so far have not found the answers i seek, so im hoping some of you will know :)

    I have started work on a mod for a skin that I have been using and all is going well, I have created an editor in VB .NET which works great.

    However I would like to convert this into a plugin for mediaportal, at the moment this is just a stand along applcation but i would like to intergrate this into the plugin section of MP when the skin gets installed.

    i have read the manual here however it only discribes how to write the plugin in C#, now I have never written anything in C# before and im a bit confused as to how to convert so im the statments in the manul to vb .net.

    If i can help it i would realy like to leave it in vb .net as the editor is working great at the moment and not having done C# before it would take a long time to convert it.

    If anyone has any experience in writing a plugin for MP in VB .net could you please point me in the right direction.

    and one more quick thing, the plugin saves some settings and things to and from text files and also requires some extra xml files and things for it to work. i just wanted to check if there is a standard place to put somthing like this inside the MP directory or if it would be better off in the skin directory itself.

    thanks all!
     

    FredP42

    MP Donator
  • Premium Supporter
  • May 2, 2009
    237
    243
    78
    Home Country
    France France
    Hello, I never tried to write a plugin in VB but it should be easy to translate the example.
    I only have VS C# Express at home so I can not try it, but creating the project, adding the references, implementing the interface should be pretty similar?
    Which instructions are giving you troubles?

    For the directory I think that if your files are only related to a skin it is better to keep it in the skin directory.
    Maybe one exception is that if you want to keep the settings when reinstalling the skin, in this case I will put it in the config directory (see example).
    There is an enum in the MediaPortal.Configuration.Config called Dir which gives all the directories.
    Then (C#) you do this to get the path to the file:
    Code:
     string file = Config.GetFile(Config.Dir.Config, "myfile.xml");
     

    kyleh0000

    MP Donator
  • Premium Supporter
  • April 28, 2009
    144
    23
    Home Country
    thanks for the reply, I found a bit of a workaround here Convert C# to VB
    I just put the C# in here then i managed to work it out from there.

    Also i might just have a look at that iPimp, i have a windows mobile but i always want to run that or something similar on it...

    thanks for your help all!
     

    Users who are viewing this thread

    Top Bottom