Cannot change plugin icon on configuration screen (1 Viewer)

crawshaws

Portal Member
October 1, 2010
11
0
Home Country
United Kingdom United Kingdom
Hi all,

i am trying to write a new plugin. And want it to look nice as well as work....

Problem is, i cannot for the life in me specify a different plugin icon for the configuration screen.

Ive seen code include such lines as:

Code:
[PluginIcons("somepluginicon", "someothericon")]

But i cannot seem to do this, even if i copy all of their code exactly.

I get the following error:

Code:
The type or namespace name 'PluginIcons' could not be found (are you missing a using directive or an assembly reference

What references am i missing (baring in mind i copied the entirity of apparantly working code and got the same error).....

Thanks
 

crawshaws

Portal Member
October 1, 2010
11
0
Home Country
United Kingdom United Kingdom
Still looking for an answer to this, google does not seem to like to help and well every search term I put in just shows people useing the PluginIcons attribute (which ofcourse don't work on my machine)

Thanks in advance.
 

jameson_uk

Retired Team Member
  • Premium Supporter
  • January 27, 2005
    7,258
    2,528
    Birmingham
    Home Country
    United Kingdom United Kingdom
    I see you found forum.team-mediaportal.com/general-development-no-feature-request-here-48/plugin-icon-configuration-dialog-95576/

    You need to make sure you embed the images in your project.

    I am assuming you have followed the wiki about creating plugins?
     

    crawshaws

    Portal Member
    October 1, 2010
    11
    0
    Home Country
    United Kingdom United Kingdom
    Yeah Images are Embedded the problem is the [PluginIcons] attribute is not recognised.

    Like i am missing a reference to something somehwere.

    Ive looked in the main MediaPortal Namespace etc and cannot find it....

    Problem is if i import someone elses source code it does not regognise it then either..... Ill re-read everything incase i missed a small small step...
     

    crawshaws

    Portal Member
    October 1, 2010
    11
    0
    Home Country
    United Kingdom United Kingdom
    Just so this thread does not look unanswred:

    The PluginIcon attribute is located in the MediaPortal.Configuration namespace
     

    bushbrother

    Portal Pro
    February 14, 2008
    192
    15
    UK
    Home Country
    United Kingdom United Kingdom
    OK, this has had me stumped for a while, I am only trying to add an Icon :(

    It keeps telling me that "The type or namespace name 'PluginIcons' could not be found (are you missing a using directive or an assembly reference?)"

    I have the following code (I am just copy pasting the first section):

    Code:
    using System;
    using System.Windows.Forms;
    using MediaPortal.GUI.Library;
    using MediaPortal.Dialogs;
    using MediaPortal.Configuration;
    
    namespace mptransmission
    {
        [PluginIcons("mptransmission.Icon.png", "mptransmission.Icon_Disabled.png")]
        public class mptransmission : GUIWindow, ISetupForm, IPlugin
        {
            [SkinControlAttribute(2)]
            protected GUIButtonControl buttonOne = null;
            [SkinControlAttribute(3)]
            protected GUIButtonControl buttonTwo = null;
    
            public mptransmission()
            {
    
            }

    But I cannot see any PluginIcons inside MediaPortal.Configuration :( Am I doing something stupid? Sorry, new to all this and learning!
     

    Users who are viewing this thread

    Top Bottom