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
Support
General Support
Development issue: Plugin configuration is not saved in Debug mode
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="horned_reaper" data-source="post: 847829" data-attributes="member: 109929"><p>Hi all,</p><p> </p><p>I try to debug the Configuration dialog window of the FRITZ!Box Manager plugin. Therefore I created the following code. When I run it the plugin is shown without any problem and all settings are loaded. But if I change settings they are not saved to the MediaPortal.xml file. The file isn't changed at all. However the plugin 's log messages are written to the MediaPortal.log file. And there's no error message.</p><p>All other functions of the Configuration dialog window are working fine.</p><p> </p><p>If I do the same via the MediaPortal Configuration.exe tool the settings are saved without any problem.</p><p> </p><p>Does anyone know the reason for this strange behaviour?</p><p>Any support is highly appreciated.</p><p> </p><p>[CODE]namespace FritzBoxConfigTester</p><p>{</p><p> internal class Program</p><p> {</p><p> [STAThread]</p><p> private static void Main(string[] args)</p><p> {</p><p> Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException);</p><p> Application.EnableVisualStyles();</p><p> </p><p> // test for direct save</p><p> MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings(@"C:\Documents and Settings\All Users\Application Data\Team MediaPortal\MediaPortal\MediaPortal.xml");</p><p> xmlwriter.SetValue("Section1", "Entry1", "Test");</p><p> </p><p> new FritzBox.FritzBox().ShowPlugin();</p><p> }</p><p> </p><p> static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)</p><p> {</p><p> try</p><p> {</p><p> Exception ex = (Exception)e.ExceptionObject;</p><p> MessageBox.Show("Unhandled exception. Please contact the developers with the following information:\n\n" + ex.Message + ex.StackTrace, "Fatal Error", MessageBoxButtons.OK, MessageBoxIcon.Stop);</p><p> }</p><p> finally</p><p> {</p><p> Application.Exit();</p><p> }</p><p> }</p><p> </p><p> public static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)</p><p> {</p><p> DialogResult result = DialogResult.Abort;</p><p> try</p><p> {</p><p> result = MessageBox.Show("Unhandled exception. Please contact the developers with the following information:\n\n" + e.Exception.Message + e.Exception.StackTrace, "Application Error", MessageBoxButtons.AbortRetryIgnore, MessageBoxIcon.Stop);</p><p> }</p><p> finally</p><p> {</p><p> if (result == DialogResult.Abort) Application.Exit();</p><p> }</p><p> }</p><p> }</p><p>}[/CODE]</p></blockquote><p></p>
[QUOTE="horned_reaper, post: 847829, member: 109929"] Hi all, I try to debug the Configuration dialog window of the FRITZ!Box Manager plugin. Therefore I created the following code. When I run it the plugin is shown without any problem and all settings are loaded. But if I change settings they are not saved to the MediaPortal.xml file. The file isn't changed at all. However the plugin 's log messages are written to the MediaPortal.log file. And there's no error message. All other functions of the Configuration dialog window are working fine. If I do the same via the MediaPortal Configuration.exe tool the settings are saved without any problem. Does anyone know the reason for this strange behaviour? Any support is highly appreciated. [CODE]namespace FritzBoxConfigTester { internal class Program { [STAThread] private static void Main(string[] args) { Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException); Application.EnableVisualStyles(); // test for direct save MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings(@"C:\Documents and Settings\All Users\Application Data\Team MediaPortal\MediaPortal\MediaPortal.xml"); xmlwriter.SetValue("Section1", "Entry1", "Test"); new FritzBox.FritzBox().ShowPlugin(); } static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) { try { Exception ex = (Exception)e.ExceptionObject; MessageBox.Show("Unhandled exception. Please contact the developers with the following information:\n\n" + ex.Message + ex.StackTrace, "Fatal Error", MessageBoxButtons.OK, MessageBoxIcon.Stop); } finally { Application.Exit(); } } public static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e) { DialogResult result = DialogResult.Abort; try { result = MessageBox.Show("Unhandled exception. Please contact the developers with the following information:\n\n" + e.Exception.Message + e.Exception.StackTrace, "Application Error", MessageBoxButtons.AbortRetryIgnore, MessageBoxIcon.Stop); } finally { if (result == DialogResult.Abort) Application.Exit(); } } } }[/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Support
General Support
Development issue: Plugin configuration is not saved in Debug mode
Contact us
RSS
Top
Bottom