Reply to thread

Hi All,


Im looking for a bit of help in developing my plugin, im trying to work out how to implement the XML settings reader (at least i think thats what im after)


I was reading about this in the developers guide...


Tips and Tricks


 // Read configuration settings

  using (Settings reader = new Settings(Config.GetFile(Config.Dir.Config, "mediaportal.xml")))

  {

     setting = reader.GetValue("section_name", "setting_name");

  }


I asume what this does it read the xml config files from and returns the value.


now i realise the above is not vb .net so i converted it and got this..


Using reader As New Settings(Config.GetFile(Config.Dir.Config, "mediaportal.xml"))

    setting = reader.GetValue("section_name", "setting_name")

End Using



however Visual Studio tells me that Settings is not defined I asume this is because I do not have imported the correct references, however i have spent half a day trying to work out what is missing but so far have gotten no where :(


I have added core.dll, dialoags.dll and utils.dll as it mentions in the doco, below are my import statements however i have tried every combination of them i can think of so im a bit stumped


Imports System.Windows.Forms

Imports System

Imports MediaPortal.GUI.Library

Imports MediaPortal.Dialogs

Imports MediaPortal.Configuration

Imports MediaPortal.Utils.Web

Imports MediaPortal.Services


Any help would be fantastic!


Top Bottom