My first plugin in conflict with my torrents - solved (1 Viewer)

aasmund Nordal

Portal Pro
June 20, 2005
203
0
Norway
Home Country
Norway Norway
Hello. I have never tried programing before and I hate matematics so I don`t know if I am able to learn it but it would be very cool to make plugins for mediaportal.

So I tried to folow the guide but when I created a new project I got this code:

Code:
using System;
using System.Collections.Generic;
using System.Text;

namespace ourplugin
{
    public class Class1
    {
    }
}

instead of this code from the guide:
Code:
namespace OurPlugin

{

/// <summary>

/// Summary description for Class1.

/// </summary>

public class Class1

{

public Class1()

{

//

// TODO: Add constructor logic here

//

}

}

}

Is this becouse I use visual studio 2005 and not 2003?
 

wertzui

Retired Team Member
  • Premium Supporter
  • July 2, 2005
    320
    8
    its basically the same, everything behind the /// is a comment and can be deleted.

    but the constructor is missing.
    a constructor is a function with the same name as the class it is located in.
     

    wertzui

    Retired Team Member
  • Premium Supporter
  • July 2, 2005
    320
    8
    samuel337 said:
    The constructor is simply:

    Code:
    public <class>
    {
    
    }
    where <class> is the name of your class. It has to be placed within the curly brackets of the class declaration.

    Sam

    public <class>()
    {

    }
    dont forget the brackets
     

    aasmund Nordal

    Portal Pro
    June 20, 2005
    203
    0
    Norway
    Home Country
    Norway Norway
    Finaly I got things working a bit more,,
    I had to use a big "C" when using it`s name.
    Among other things.

    But now I have another problem.
    When I try to modefy the code to use the xml skin file I get an error:
    ourplugin.Class1 does not implement interface member mediaportal.GUI.libary.ISetupForm.GetWindowid()

    The guide wants me to have a space in "mediaportal" so it`s media portal, But the program gave me an error: "; expected" so I just wrote mediaportal.

    Could this be the reason?

    Btw: thank you so far. I was very happy when I got a first bit of the plugin to work, even if it does nothing :D
     

    wortelsoft

    Portal Pro
    May 13, 2005
    374
    1
    50
    Rotterdam, The Netherlands
    Home Country
    Netherlands Netherlands
    You need to end each line of code with a semi colan: ;

    I would sugest you also search the web for a tutorial on C# programming, to learn some basics.

    And have fun learning to programm!
     

    aasmund Nordal

    Portal Pro
    June 20, 2005
    203
    0
    Norway
    Home Country
    Norway Norway
    Wel, I now I know some of the basic's.
    Stuff like "hello World" some calculations, the if else thing and some other things.

    I tried the guide again and it works :D And now I can try to do stuff when I press the buttons. That must be the best motivation for me to study further.

    There is just one problem. When I use my torrents plugin I can't use my plugin. When I start the "my plugin" it opens my torrents.
    And the plugin becomes a process plugin acording to mediaportal setup.

    Could this be becouse fcsobel who made the torrent plugin pherhaps used the mediaportal guide?
    If so, I gues I need to change something.

    If this is the reason I wil ask fcsobel for the source and compere.
     

    Users who are viewing this thread

    Top Bottom