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 2
Plugin Development
Questions on writing my first 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="huha" data-source="post: 923201" data-attributes="member: 63847"><p>Hi Morpheus,</p><p>thanks again for your help!</p><p>- compiling works now out of one project file incliding the .xaml files. This is great.</p><p>- the hover picture works great</p><p>- I will use the plugin.xml version number in the future, but will wait for the next release of MP2</p><p> </p><p>- On the settings manager I am still struggling. It works fine if i change a setting within the configuration manager. Then the file is immediately writtten. However, if I am saving a setting within a model file, the .xml file is written after the client is closed.</p><p>I had the following code used in the Result_GUI model, and it is called from the function ExitModelContext(NavigationContext oldContext, NavigationContext newContext) or Deactivate(NavigationContext oldContext, NavigationContext newContext):</p><p> </p><p>[CODE]try</p><p> {</p><p> ISettingsManager settingsManager = ServiceRegistration.Get<ISettingsManager>();</p><p> TvWishListMP2Settings settings = settingsManager.Load<TvWishListMP2Settings>();</p><p> </p><p> //settings.TvWishItemSeparator = TvWishItemSeparator;</p><p> </p><p> settings.Sort = mymessages.Sort;</p><p> settings.SortReverse = mymessages.SortReverse;</p><p> </p><p> settings.Email = mymessages.Email;</p><p> settings.Deleted = mymessages.Deleted;</p><p> Log.Debug("mymessages.Deleted=" + mymessages.Deleted.ToString());</p><p> settings.Conflicts = mymessages.Conflicts;</p><p> settings.Scheduled = mymessages.Scheduled;</p><p> settings.Recorded = mymessages.Recorded;</p><p> Log.Debug("mymessages.Recorded=" + mymessages.Recorded.ToString());</p><p> settings.View = mymessages.View;</p><p> </p><p> settingsManager.Save(settings);</p><p> Log.Debug("Settings have been saved");</p><p> }</p><p> catch (Exception exc)</p><p> {</p><p> Log.Debug("Error SaveSettings: Exception " + exc.Message);</p><p> }[/CODE]</p><p> </p><p>It looks like writting the .xml setting file is delayed if the command is used outside the configuration manager. Is this a bug in MP2?</p><p>( I am using the official summer built release)</p></blockquote><p></p>
[QUOTE="huha, post: 923201, member: 63847"] Hi Morpheus, thanks again for your help! - compiling works now out of one project file incliding the .xaml files. This is great. - the hover picture works great - I will use the plugin.xml version number in the future, but will wait for the next release of MP2 - On the settings manager I am still struggling. It works fine if i change a setting within the configuration manager. Then the file is immediately writtten. However, if I am saving a setting within a model file, the .xml file is written after the client is closed. I had the following code used in the Result_GUI model, and it is called from the function ExitModelContext(NavigationContext oldContext, NavigationContext newContext) or Deactivate(NavigationContext oldContext, NavigationContext newContext): [CODE]try { ISettingsManager settingsManager = ServiceRegistration.Get<ISettingsManager>(); TvWishListMP2Settings settings = settingsManager.Load<TvWishListMP2Settings>(); //settings.TvWishItemSeparator = TvWishItemSeparator; settings.Sort = mymessages.Sort; settings.SortReverse = mymessages.SortReverse; settings.Email = mymessages.Email; settings.Deleted = mymessages.Deleted; Log.Debug("mymessages.Deleted=" + mymessages.Deleted.ToString()); settings.Conflicts = mymessages.Conflicts; settings.Scheduled = mymessages.Scheduled; settings.Recorded = mymessages.Recorded; Log.Debug("mymessages.Recorded=" + mymessages.Recorded.ToString()); settings.View = mymessages.View; settingsManager.Save(settings); Log.Debug("Settings have been saved"); } catch (Exception exc) { Log.Debug("Error SaveSettings: Exception " + exc.Message); }[/CODE] It looks like writting the .xml setting file is delayed if the command is used outside the configuration manager. Is this a bug in MP2? ( I am using the official summer built release) [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
Plugin Development
Questions on writing my first plugin
Contact us
RSS
Top
Bottom