Can't read MediaPortal.xml from window plugin (1 Viewer)

moryoav

Portal Pro
December 2, 2008
236
86
Home Country
Israel Israel
Hello,

I'm trying to add a few things to the Tellstick Pause plugin, original post here:
https://forum.team-mediaportal.com/...ick-pause-plugin-38400/index8.html#post558874

I'm having a really newbie problem here. I cannot read the mediaportal.xml from the window plugin.

Detailed explanation:

There's a process plugin and a window plugin.

In the process plugin I have:
Code:
using (MediaPortal.Profile.Settings xmlReader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml")))
{
MPMenuName.Text = xmlReader.GetValue("Tellstick Pause", "mpMenuName");
}

That works fine.
In the window plugin:
Code:
using (MediaPortal.Profile.Settings xmlReader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml")))
            {
                strButtonText = xmlReader.GetValue("Tellstick Pause", "mpMenuName");
            }

When I compile this I get:

Error 1 The type or namespace name 'Profile' does not exist in the namespace 'MediaPortal' (are you missing an assembly reference?) c:\Program Files\Team MediaPortal\Tellstick\Tellstick\TellstickPauseWindow\TellstickPauseWindow.cs 55 32 TellstickPauseWindow

What am I missing? what "Using" do I need for MediaPortal.Profile?

Any help would be greatly appreciated...
Thanks!

:D
 

Migue

Retired Team Member
  • Premium Supporter
  • January 27, 2006
    381
    305
    Florida
    I looked at your source code, you're missing a reference to Utils.dll in your window plugin.
    To add a reference, in Visual Studio, in your window project go to Solution explorer and right-click on References and choose Add Reference. There you can browse for Utils.dll in your Mediaportal folder.
     

    moryoav

    Portal Pro
    December 2, 2008
    236
    86
    Home Country
    Israel Israel
    I looked at your source code, you're missing a reference to Utils.dll in your window plugin.
    To add a reference, in Visual Studio, in your window project go to Solution explorer and right-click on References and choose Add Reference. There you can browse for Utils.dll in your Mediaportal folder.

    :D Works fine now...!
     

    Users who are viewing this thread

    Top Bottom