|
From: <che...@us...> - 2007-02-06 03:28:07
|
Revision: 95
http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=95&view=rev
Author: chef_koch
Date: 2007-02-05 19:28:05 -0800 (Mon, 05 Feb 2007)
Log Message:
-----------
small change for logging
Modified Paths:
--------------
trunk/plugins/FritzBox/FritzBoxSetupFrom.cs
trunk/plugins/FritzBox/FritzBoxWatch.cs
Modified: trunk/plugins/FritzBox/FritzBoxSetupFrom.cs
===================================================================
--- trunk/plugins/FritzBox/FritzBoxSetupFrom.cs 2007-02-06 02:46:58 UTC (rev 94)
+++ trunk/plugins/FritzBox/FritzBoxSetupFrom.cs 2007-02-06 03:28:05 UTC (rev 95)
@@ -795,63 +795,52 @@
private void SaveSettings()
{
- try
+ Log.Info("FRITZ!Box: SaveSettings");
+ using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml")))
{
- Log.Info("FRITZ!Box: SaveSettings");
-
- using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml")))
- {
- xmlwriter.SetValueAsBool("fritzbox", "extensiveLogging", checkBoxExtensiveLogging.Checked);
+ xmlwriter.SetValueAsBool("fritzbox", "extensiveLogging", checkBoxExtensiveLogging.Checked);
- xmlwriter.SetValue("fritzbox", "address", textBoxAddress.Text);
- xmlwriter.SetValue("fritzbox", "port", textBoxPort.Text);
+ xmlwriter.SetValue("fritzbox", "address", textBoxAddress.Text);
+ xmlwriter.SetValue("fritzbox", "port", textBoxPort.Text);
- // notify settings
- xmlwriter.SetValueAsBool("fritzbox", "closeOnTimeout", checkBoxCloseOnTimout.Checked);
- xmlwriter.SetValue("fritzbox", "timeout", numericUpDownTimeout.Value);
+ // notify settings
+ xmlwriter.SetValueAsBool("fritzbox", "closeOnTimeout", checkBoxCloseOnTimout.Checked);
+ xmlwriter.SetValue("fritzbox", "timeout", numericUpDownTimeout.Value);
- xmlwriter.SetValueAsBool("fritzbox", "filterMSNs", checkBoxFilterMSNs.Checked);
- string strMSN = "";
- for (int i = 0; i < comboBoxMSNs.Items.Count; i++)
- {
- strMSN += comboBoxMSNs.Items[i].ToString() + ";";
- }
- xmlwriter.SetValue("fritzbox", "MSN", strMSN);
+ xmlwriter.SetValueAsBool("fritzbox", "filterMSNs", checkBoxFilterMSNs.Checked);
+ string strMSN = "";
+ for (int i = 0; i < comboBoxMSNs.Items.Count; i++)
+ {
+ strMSN += comboBoxMSNs.Items[i].ToString() + ";";
+ }
+ xmlwriter.SetValue("fritzbox", "MSN", strMSN);
- xmlwriter.SetValueAsBool("fritzbox", "showMsnOnHeading", checkBoxShowMsnOnHeading.Checked);
+ xmlwriter.SetValueAsBool("fritzbox", "showMsnOnHeading", checkBoxShowMsnOnHeading.Checked);
- // media settings
- xmlwriter.SetValueAsBool("fritzbox", "stopMedia", checkBoxStopMedia.Checked);
- xmlwriter.SetValueAsBool("fritzbox", "resumeMedia", checkBoxResumeMedia.Checked);
-
- // phonebook settings
- xmlwriter.SetValueAsBool("fritzbox", "usePhonebook", checkBoxUsePhonebook.Checked);
- xmlwriter.SetValueAsBool("fritzbox", "showUnknownCaller", checkBoxShowUnknownCaller.Checked);
- xmlwriter.SetValueAsBool("fritzbox", "saveUnknownCaller", checkBoxSaveUnknownCaller.Checked);
+ // media settings
+ xmlwriter.SetValueAsBool("fritzbox", "stopMedia", checkBoxStopMedia.Checked);
+ xmlwriter.SetValueAsBool("fritzbox", "resumeMedia", checkBoxResumeMedia.Checked);
+ // phonebook settings
+ xmlwriter.SetValueAsBool("fritzbox", "usePhonebook", checkBoxUsePhonebook.Checked);
+ xmlwriter.SetValueAsBool("fritzbox", "showUnknownCaller", checkBoxShowUnknownCaller.Checked);
+ xmlwriter.SetValueAsBool("fritzbox", "saveUnknownCaller", checkBoxSaveUnknownCaller.Checked);
- string strCallerId = "";
- string strName = "";
- string strShow = "";
- for (int i = 0; i < dataGridView.RowCount; i++)
- {
- strCallerId += dataGridView.Rows[i].Cells[0].Value.ToString() + ";";
- strName += dataGridView.Rows[i].Cells[1].Value.ToString() + ";";
- strShow += dataGridView.Rows[i].Cells[2].Value.ToString() + ";";
- }
+ string strCallerId = "";
+ string strName = "";
+ string strShow = "";
- xmlwriter.SetValue("fritzbox", "phonebookCallerId", strCallerId);
- xmlwriter.SetValue("fritzbox", "phonebookName", strName);
- xmlwriter.SetValue("fritzbox", "phonebookShow", strShow);
-
-
+ for (int i = 0; i < dataGridView.RowCount - 1; i++)
+ {
+ strCallerId += dataGridView.Rows[i].Cells[0].Value.ToString() + ";";
+ strName += dataGridView.Rows[i].Cells[1].Value.ToString() + ";";
+ strShow += dataGridView.Rows[i].Cells[2].Value.ToString() + ";";
}
- }
- catch (Exception ex)
- {
- Log.Error("{0}", ex);
+ xmlwriter.SetValue("fritzbox", "phonebookCallerId", strCallerId);
+ xmlwriter.SetValue("fritzbox", "phonebookName", strName);
+ xmlwriter.SetValue("fritzbox", "phonebookShow", strShow);
}
}
Modified: trunk/plugins/FritzBox/FritzBoxWatch.cs
===================================================================
--- trunk/plugins/FritzBox/FritzBoxWatch.cs 2007-02-06 02:46:58 UTC (rev 94)
+++ trunk/plugins/FritzBox/FritzBoxWatch.cs 2007-02-06 03:28:05 UTC (rev 95)
@@ -57,7 +57,7 @@
{
Thread watchThread = new Thread(new ThreadStart(WatchThread));
watchThread.Priority = ThreadPriority.BelowNormal;
- watchThread.Name = "FritzBox Monitoring";
+ watchThread.Name = "FRITZ!Box Monitoring";
watchThread.Start();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|