home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Development
General Development (no feature request here!)
VB .Net Plugin Development, XML Settings file
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="kyleh0000" data-source="post: 638202" data-attributes="member: 91207"><p>Hi All,</p><p></p><p>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)</p><p></p><p>I was reading about this in the developers guide...</p><p></p><p><a href="http://wiki.team-mediaportal.com/AdvancedPluginDevelopmentTipsAndTricks#Configuration" target="_blank">Tips and Tricks</a></p><p></p><p> // Read configuration settings</p><p> using (Settings reader = new Settings(Config.GetFile(Config.Dir.Config, "mediaportal.xml")))</p><p> {</p><p> setting = reader.GetValue("section_name", "setting_name");</p><p> }</p><p></p><p>I asume what this does it read the xml config files from and returns the value.</p><p></p><p>now i realise the above is not vb .net so i converted it and got this..</p><p></p><p>Using reader As New <strong>Settings</strong>(Config.GetFile(Config.Dir.Config, "mediaportal.xml"))</p><p> setting = reader.GetValue("section_name", "setting_name")</p><p>End Using</p><p></p><p></p><p>however Visual Studio tells me that <strong>Settings</strong> 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 <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite3" alt=":(" title="Frown :(" loading="lazy" data-shortname=":(" /></p><p></p><p>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</p><p></p><p>Imports System.Windows.Forms</p><p>Imports System</p><p>Imports MediaPortal.GUI.Library</p><p>Imports MediaPortal.Dialogs</p><p>Imports MediaPortal.Configuration</p><p>Imports MediaPortal.Utils.Web</p><p>Imports MediaPortal.Services</p><p></p><p>Any help would be fantastic!</p></blockquote><p></p>
[QUOTE="kyleh0000, post: 638202, member: 91207"] 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... [URL="http://wiki.team-mediaportal.com/AdvancedPluginDevelopmentTipsAndTricks#Configuration"]Tips and Tricks[/URL] // 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 [B]Settings[/B](Config.GetFile(Config.Dir.Config, "mediaportal.xml")) setting = reader.GetValue("section_name", "setting_name") End Using however Visual Studio tells me that [B]Settings[/B] 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! [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
VB .Net Plugin Development, XML Settings file
Contact us
RSS
Top
Bottom