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
MediaPortal 1 Plugins
Where to store settings when writing plugin?
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="samuel337" data-source="post: 94168" data-attributes="member: 10347"><p>Use something like this to read:</p><p>MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))</p><p></p><p>And something like this to write:</p><p>MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))</p><p></p><p>Plenty of MP plugin files have code that you can use to write to the configuration file, e.g. WindowPlugins\GUIAlarm\Alarm.cs, link:</p><p><a href="http://mediaportal.svn.sourceforge.net/viewvc/mediaportal/trunk/mediaportal/WindowPlugins/GUIAlarm/Alarm.cs?revision=10466&view=markup" target="_blank">http://mediaportal.svn.sourceforge.net/viewvc/mediaportal/trunk/mediaportal/WindowPlugins/GUIAlarm/Alarm.cs?revision=10466&view=markup</a></p><p></p><p>Check out the LoadAll and SaveAlarm methods in that.</p><p></p><p>Sam</p></blockquote><p></p>
[QUOTE="samuel337, post: 94168, member: 10347"] Use something like this to read: MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml")) And something like this to write: MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml")) Plenty of MP plugin files have code that you can use to write to the configuration file, e.g. WindowPlugins\GUIAlarm\Alarm.cs, link: [url]http://mediaportal.svn.sourceforge.net/viewvc/mediaportal/trunk/mediaportal/WindowPlugins/GUIAlarm/Alarm.cs?revision=10466&view=markup[/url] Check out the LoadAll and SaveAlarm methods in that. Sam [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
Where to store settings when writing plugin?
Contact us
RSS
Top
Bottom