From: <che...@us...> - 2007-06-17 15:37:07
|
Revision: 565 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=565&view=rev Author: chef_koch Date: 2007-06-17 08:37:03 -0700 (Sun, 17 Jun 2007) Log Message: ----------- Added Paths: ----------- trunk/plugins/FritzBox/FritzBox/ trunk/plugins/FritzBox/FritzBox/Caller.cs trunk/plugins/FritzBox/FritzBox/FritzBox.cs trunk/plugins/FritzBox/FritzBox/FritzBox.csproj trunk/plugins/FritzBox/FritzBox/FritzBox.png trunk/plugins/FritzBox/FritzBox/FritzBoxDisabled.png trunk/plugins/FritzBox/FritzBox/FritzBoxSetupFrom.cs trunk/plugins/FritzBox/FritzBox/FritzBoxSetupFrom.resx trunk/plugins/FritzBox/FritzBox/FritzBoxWatch.cs trunk/plugins/FritzBox/FritzBox/Properties/ trunk/plugins/FritzBox/FritzBox/gfx/ Removed Paths: ------------- trunk/plugins/FritzBox/Caller.cs trunk/plugins/FritzBox/FritzBox.cs trunk/plugins/FritzBox/FritzBox.csproj trunk/plugins/FritzBox/FritzBox.png trunk/plugins/FritzBox/FritzBoxDisabled.png trunk/plugins/FritzBox/FritzBoxSetupFrom.cs trunk/plugins/FritzBox/FritzBoxSetupFrom.resx trunk/plugins/FritzBox/FritzBoxWatch.cs trunk/plugins/FritzBox/Properties/ trunk/plugins/FritzBox/gfx/ Deleted: trunk/plugins/FritzBox/Caller.cs =================================================================== --- trunk/plugins/FritzBox/Caller.cs 2007-06-17 11:03:06 UTC (rev 564) +++ trunk/plugins/FritzBox/Caller.cs 2007-06-17 15:37:03 UTC (rev 565) @@ -1,89 +0,0 @@ -#region Copyright (C) 2005-2007 Team MediaPortal - -/* - * Copyright (C) 2005-2007 Team MediaPortal - * http://www.team-mediaportal.com - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Make; see the file COPYING. If not, write to - * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - * http://www.gnu.org/copyleft/gpl.html - * - */ - -#endregion - -using System; -using System.Collections.Generic; -using System.Text; - -namespace FritzBox -{ - public class Caller - { - string _id; - string _name; - bool _show; - - public Caller() - { - this._id = ""; - this._name = ""; - this._show = false; - } - - public Caller(string id, string name, bool show) - { - this._id = id; - this._name = name; - this._show = show; - } - - public string ID - { - get - { - return _id; - } - set - { - _id = value; - } - } - - public string Name - { - get - { - return _name; - } - set - { - _name = value; - } - } - - public bool Show - { - get - { - return _show; - } - set - { - _show = value; - } - } - - } -} Copied: trunk/plugins/FritzBox/FritzBox/Caller.cs (from rev 554, trunk/plugins/FritzBox/Caller.cs) =================================================================== --- trunk/plugins/FritzBox/FritzBox/Caller.cs (rev 0) +++ trunk/plugins/FritzBox/FritzBox/Caller.cs 2007-06-17 15:37:03 UTC (rev 565) @@ -0,0 +1,89 @@ +#region Copyright (C) 2005-2007 Team MediaPortal + +/* + * Copyright (C) 2005-2007 Team MediaPortal + * http://www.team-mediaportal.com + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This Program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +#endregion + +using System; +using System.Collections.Generic; +using System.Text; + +namespace FritzBox +{ + public class Caller + { + string _id; + string _name; + bool _show; + + public Caller() + { + this._id = ""; + this._name = ""; + this._show = false; + } + + public Caller(string id, string name, bool show) + { + this._id = id; + this._name = name; + this._show = show; + } + + public string ID + { + get + { + return _id; + } + set + { + _id = value; + } + } + + public string Name + { + get + { + return _name; + } + set + { + _name = value; + } + } + + public bool Show + { + get + { + return _show; + } + set + { + _show = value; + } + } + + } +} Copied: trunk/plugins/FritzBox/FritzBox/FritzBox.cs (from rev 554, trunk/plugins/FritzBox/FritzBox.cs) =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzBox.cs (rev 0) +++ trunk/plugins/FritzBox/FritzBox/FritzBox.cs 2007-06-17 15:37:03 UTC (rev 565) @@ -0,0 +1,698 @@ +#region Copyright (C) 2005-2007 Team MediaPortal + +/* + * Copyright (C) 2005-2007 Team MediaPortal + * http://www.team-mediaportal.com + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This Program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +#endregion + +using System; +using System.Collections; +using System.Diagnostics; +using System.IO; +using System.Net.Sockets; +using System.Reflection; +using System.Runtime.InteropServices; +using System.Threading; +using System.Windows.Forms; +using System.Xml; + +using MediaPortal.Ripper; + +using MediaPortal.Util; +using MediaPortal.GUI.Library; +using MediaPortal.Configuration; +using MediaPortal.Dialogs; +using MediaPortal.Player; +using System.Collections.Generic; + + +namespace FritzBox +{ + /* + * Things to do: + * - add more comments to code + * - split code more in methods/classes + */ + + [PluginIcons("FritzBox.FritzBox.png", "FritzBox.FritzBoxDisabled.png")] + public class FritzBox : ISetupForm, IPlugin + { + #region Variables + #region Private Variables + + private bool _fritzBoxDisabled = false; + + // notify settings + private int _timeout = -1; // autoclose the dialog after the timeout expired + private bool _closeOnTimeout = false; + + public static bool _filterMSNs = false; + public static string[] _msn; + + public static bool _showMsnOnHeading = false; + + // media settings + private bool _stopMedia = true; // stop media when an event happend + private bool _resumeMedia = true; // resume media when notify is closed + + private bool _showNotify = true; + private List<string> notifyQueue = new List<string>(); + + #endregion + + #region public Variables + + public const string _version = "0.2.2.0"; + public static int _lastVersion = 0; + public static bool _extensiveLogging = false; + + // phonebook settings + public static bool _usePhonebook = true; + public static bool _showUnknownCaller = true; + public static bool _saveUnknownCaller = true; + + public static List<Caller> phonebook = new List<Caller>(); + + #endregion + + FritzBoxWatch FritzBoxWatch; + + // Protected Variables + #endregion + + #region Constructors/Destructors + public FritzBox() + { + } + #endregion + + #region Private Methods + + #region Settings + private void LoadSettings() + { + char[] charSeparators = new char[] { ';' }; + + if (_extensiveLogging) + Log.Info("FRITZ!Box: LoadSettings"); + + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) + { + _lastVersion = xmlreader.GetValueAsInt("fritzbox", "lastVersion", 0); + + _extensiveLogging = xmlreader.GetValueAsBool("fritzbox", "extensiveLogging", false); + + FritzBoxWatch.fritzBoxAddress = xmlreader.GetValueAsString("fritzbox", "address", "fritz.box"); + FritzBoxWatch.fritzBoxPort = xmlreader.GetValueAsString("fritzbox", "port", "1012"); + + // notify settings + _closeOnTimeout = xmlreader.GetValueAsBool("fritzbox", "closeOnTimeout", false); + _timeout = xmlreader.GetValueAsInt("fritzbox", "timeout", 10); + + if ((!_closeOnTimeout) || (_timeout == 0)) + _timeout = -1; + + _filterMSNs = xmlreader.GetValueAsBool("fritzbox", "filterMSNs", false); + string strMSN = xmlreader.GetValueAsString("fritzbox", "MSN", ""); + _msn = strMSN.Split(charSeparators, StringSplitOptions.RemoveEmptyEntries); + + if (_extensiveLogging) + Log.Debug("FRITZ!Box: MSNs loaded: {0}", strMSN); + + _showMsnOnHeading = xmlreader.GetValueAsBool("fritzbox", "showMsnOnHeading", false); + + // media settings + _stopMedia = xmlreader.GetValueAsBool("fritzbox", "stopMedia", true); + _resumeMedia = xmlreader.GetValueAsBool("fritzbox", "resumeMedia", true); + + // phonebook settings + _usePhonebook = xmlreader.GetValueAsBool("fritzbox", "usePhonebook", true); + _showUnknownCaller = xmlreader.GetValueAsBool("fritzbox", "showUnknownCaller", true); + _saveUnknownCaller = xmlreader.GetValueAsBool("fritzbox", "saveUnknownCaller", true); + + if (_extensiveLogging) + { + Log.Info("FRITZ!Box: closeOnTimeout = {0}", _closeOnTimeout.ToString()); + Log.Info("FRITZ!Box: timeout = {0}", _timeout.ToString()); + Log.Info("FRITZ!Box: showMsnOnHeading = {0}", _showMsnOnHeading.ToString()); + + Log.Info("FRITZ!Box: stopMedia = {0}", _stopMedia.ToString()); + Log.Info("FRITZ!Box: resumeMedia = {0}", _resumeMedia.ToString()); + + Log.Info("FRITZ!Box: usePhonebook = {0}", _usePhonebook.ToString()); + Log.Info("FRITZ!Box: showUnknownCaller = {0}", _showUnknownCaller.ToString()); + Log.Info("FRITZ!Box: saveUnknownCaller = {0}", _saveUnknownCaller.ToString()); + } + } + + LoadPhonebook(); + } + + private void SaveSettings() + { + if (_extensiveLogging) + Log.Info("FRITZ!Box: SaveSettings"); + + using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) + { + xmlwriter.SetValue("fritzbox", "lastVersion", _version.Replace(".", string.Empty)); + } + + SavePhonebook(); + } + #endregion + + #region Phonebook + public static void LoadPhonebook() + { + if ((_lastVersion < 0220) && (!File.Exists(Config.GetFile(Config.Dir.Config, "fritzbox.xml")))) + { + UpdateTo0220(); + return; + } + + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "fritzbox.xml"))) + { + int countCaller = xmlreader.GetValueAsInt("phonebook", "count", 0); + + for (int i = 0; i < countCaller; i++) + { + Caller caller = new Caller(); + + caller.ID = xmlreader.GetValueAsString("phonebook", string.Format("callerID{0}", i.ToString()), ""); + caller.Name = xmlreader.GetValueAsString("phonebook", string.Format("name{0}", i.ToString()), ""); + caller.Show = xmlreader.GetValueAsBool("phonebook", string.Format("show{0}", i.ToString()), false); + + phonebook.Add(caller); + + if (_extensiveLogging) + Log.Debug("FRITZ!Box: caller loaded: {0} {1} {2}", caller.ID, caller.Name, caller.Show); + } + } + if (_extensiveLogging) + Log.Debug("FRITZ!Box: imported {0} callers", phonebook.Count.ToString()); + } + + public static void SavePhonebook() + { + using (MediaPortal.Profile.Settings xmlwriter = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "fritzbox.xml"))) + { + xmlwriter.SetValue("phonebook", "count", phonebook.Count); + + for (int i = 0; i < phonebook.Count; i++) + { + Caller caller = phonebook[i]; + + xmlwriter.SetValue("phonebook", string.Format("callerID{0}", i.ToString()), caller.ID); + xmlwriter.SetValue("phonebook", string.Format("name{0}", i.ToString()), caller.Name); + xmlwriter.SetValueAsBool("phonebook", string.Format("show{0}", i.ToString()), caller.Show); + } + } + } + + public static void UpdateTo0220() + { + char[] charSeparators = new char[] { ';' }; + + using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) + { + string[] strLCallerId = xmlreader.GetValueAsString("fritzbox", "phonebookCallerId", "").Split(charSeparators, StringSplitOptions.RemoveEmptyEntries); + string[] strLName = xmlreader.GetValueAsString("fritzbox", "phonebookName", "").Split(charSeparators, StringSplitOptions.RemoveEmptyEntries); + string[] strLShow = xmlreader.GetValueAsString("fritzbox", "phonebookShow", "").Split(charSeparators, StringSplitOptions.RemoveEmptyEntries); + + for (int i = 0; i <= strLCallerId.GetUpperBound(0); i++) + { + Caller caller = new Caller(strLCallerId[i], strLName[i], bool.Parse(strLShow[i])); + phonebook.Add(caller); + + if (_extensiveLogging) + Log.Debug("FRITZ!Box: caller loaded: {0} {1} {2}", caller.ID, caller.Name, caller.Show); + } + } + } + + public static int ImportFritzBoxMonitor(string filepath) + { + try + { + int count = 0; + + // Create an instance of StreamReader to read from a file. + // The using statement also closes the StreamReader. + using (StreamReader sr = new StreamReader(filepath)) + { + string line; + // Read and display lines from the file until the end of + // the file is reached. + while ((line = sr.ReadLine()) != null) + { + if ( (count == 0) && line.Contains("sep=;") ) + continue; + if ( (count == 0) && line.Contains("Telefonnummer")) + continue; + + string[] ar = line.Split(char.Parse(";")); + + ar[0] = ar[0].TrimStart('!'); + ar[1] = ar[1].TrimStart('!'); + + Caller caller = new Caller(); + + caller.ID = ar[2]; + caller.Name = string.Format("{0} {1}", ar[0], ar[1]); + caller.Name = caller.Name.Trim(); + caller.Show = true; + + if (CallerExists(caller)) continue; + + phonebook.Add(caller); + count++; + } + } + + return count; + } + catch (Exception e) + { + // Let the user know what went wrong. + Log.Error("The file could not be read: {0}", e.Message); + return 0; + } + } + + public static bool CallerExists(Caller caller) + { + for (int i = 0; i < phonebook.Count; i++) + { + if (phonebook[i].ID == caller.ID) + return true; + } + return false; + } + #endregion + + public bool IsFritzBoxConnected(string fritzBoxAddress, string fritzBoxPort) + { + TcpClient TcpClient; + + try + { + TcpClient = new TcpClient(fritzBoxAddress, Int32.Parse(fritzBoxPort)); + } + catch (Exception) + { + return false; + } + + TcpClient.Close(); + return true; + } + + #region FritzBoxActions + private void OnFritzBoxEvent(string dataStream) + { + if (!_showNotify) + { + Log.Info("External process is running. Notify is queued and will be shown later."); + notifyQueue.Add(dataStream); + return; + } + + string[] strList; // splitted data + + // data-stream can be in following format: + // incoming calls: DateTime;RING;ConnectionID;CallerID;MSN;??POTS??; + // outgoing calls: DateTime;CALL;ConnectionID;??Nebenstelle??;MSN;CallerID;??POTS??; + // connection started: DateTime;CONNECT;ConnectionID;??Nebenstelle??;CallerID; + // connection closed: DateTime;DISCONNECT;ConnectionID;ConnectedTime; + + // DateTime format: + // 12.12.06 12:12:12 + // dd.MM.yy hh:mm:ss + + dataStream = dataStream.Replace("\n", ""); + if (FritzBox._extensiveLogging) + Log.Info("received data: {0}", dataStream); + strList = dataStream.Split(';'); + + switch (strList[1]) + { + case "RING": + OnIncomingCall(strList[0], strList[3], strList[4]); + break; + + case "CALL": + OnOutgoingCall(strList[0], strList[3], strList[4], strList[5]); + break; + + case "CONNECT": + OnConnectionStarted(strList[0], strList[3], strList[4]); + break; + + case "DISCONNECT": + OnConnectionClosed(strList[0], int.Parse(strList[3])); + break; + } + } + + private void OnIncomingCall(string dateTime, string callerId, string msn) + { + Log.Info("incoming call:"); + Log.Info(" DateTime: {0}", dateTime); + if (FritzBox._extensiveLogging) + { + Log.Info(" Caller: {0}", callerId); + Log.Info(" MSN: {0}", msn); + } + + if (CheckMSN(msn) == true) + { + if (callerId == "") + { + Log.Info("Caller is not identified by CLIP."); + + if (FritzBox._showUnknownCaller) + DialogOnIncomingCall("", msn); + } + else + { + if (FritzBox._usePhonebook) + { + + + + + bool foundCaller = false; + + if (phonebook.Count == 0) + { + Log.Info("Phonebook is empty. Caller is added to the phonebook."); + Caller caller = new Caller(callerId, callerId, true); + phonebook.Add(caller); + } + else + { + int i = 0; + + do + { + Caller caller = phonebook[i]; + + if (caller.ID.Equals(callerId)) + { + Log.Info("Caller is identified by phonebook as {0}.", caller.Name); + foundCaller = true; + + if (caller.Show) + { + Log.Info("Caller is accepted by phonebook and dialog will be shown."); + + DialogOnIncomingCall(caller.Name, msn); + } + else + { + Log.Info("Caller is denied by phonebook and dialog won't be shown."); + } + } + i++; + } + while (!foundCaller && (i < phonebook.Count)); + + if (!foundCaller) + { + Log.Info("Caller is not identified by phonebook."); + + if (FritzBox._saveUnknownCaller) + { + Log.Info("saveUnknownCallers is ON - Caller is added to the phonebook."); + + Caller caller = new Caller(callerId, callerId, FritzBox._showUnknownCaller); + phonebook.Add(caller); + } + + if (FritzBox._showUnknownCaller) + { + Log.Info("showUnknownCallers is ON - Caller is shown."); + + DialogOnIncomingCall(callerId, msn); + } + } + + } + } + else + DialogOnIncomingCall(callerId, msn); + } + } + } + + private void OnOutgoingCall(string dateTime, string nebenstelle, string msn, string callerId) + { + Log.Info("outgoing call:"); + Log.Info(" DateTime: {0}", dateTime); + if (FritzBox._extensiveLogging) + { + Log.Info(" Nebenstelle: {0}", nebenstelle); + Log.Info(" MSN: {0}", msn); + Log.Info(" Caller: {0}", callerId); + } + } + + private void OnConnectionStarted(string dateTime, string nebenstelle, string callerId) + { + Log.Info("connection started:"); + Log.Info(" DateTime: {0}", dateTime); + if (FritzBox._extensiveLogging) + { + Log.Info(" Nebenstelle: {0}", nebenstelle); + Log.Info(" Caller: {0}", callerId); + } + } + + private void OnConnectionClosed(string dateTime, int connectedTime) + { + Log.Info("connection closed:"); + Log.Info(" DateTime: {0}", dateTime); + Log.Info(" conneted time (in s): {0}", connectedTime.ToString()); + } + #endregion + + void DialogOnIncomingCall(string strCallerId, string strMSN) + { + string strImage = null; + string strHeading = null; + + if (strCallerId == "") + { + strCallerId = GUILocalizeStrings.Get(2014); // 2014 = unknown + strImage = MediaPortal.Util.Utils.GetCoverArt(Thumbs.Yac, "_unknown"); + } + else + { + //search image for caller + if (_extensiveLogging) + Log.Info("searching image: " + MediaPortal.Util.Utils.GetCoverArtName(Thumbs.Yac, strCallerId)); + + if (File.Exists(MediaPortal.Util.Utils.GetCoverArt(Thumbs.Yac, strCallerId))) + { + if (_extensiveLogging) + Log.Info("found image for caller: " + MediaPortal.Util.Utils.GetCoverArt(Thumbs.Yac, strCallerId)); + else + Log.Info("found image for caller"); + + strImage = MediaPortal.Util.Utils.GetCoverArt(Thumbs.Yac, strCallerId); + } + else + { + Log.Info("found NO image for caller"); + strImage = MediaPortal.Util.Utils.GetCoverArt(Thumbs.Yac, "_noImage"); + } + } + + if (_showMsnOnHeading) + strHeading = GUILocalizeStrings.Get(1023) + " on " + strMSN; // ???? Incoming call on + else + strHeading = GUILocalizeStrings.Get(1023); // 1023 Incoming call + + //show dialog + if (g_Player.Playing && !g_Player.Paused && _stopMedia) + g_Player.Pause(); + + GUIDialogNotify dlgNotify = (GUIDialogNotify)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_NOTIFY); + if (dlgNotify == null) return; + + dlgNotify.Reset(); + dlgNotify.ClearAll(); + dlgNotify.SetHeading(strHeading); + dlgNotify.SetImage(strImage); + dlgNotify.SetText(strCallerId); + dlgNotify.TimeOut = _timeout; + + dlgNotify.DoModal(GUIWindowManager.ActiveWindow); + + if (g_Player.Playing && g_Player.Paused && _stopMedia && _resumeMedia) + g_Player.Pause(); + } + + private bool CheckMSN(string msn) + { + bool foundMSN = false; + + if (FritzBox._filterMSNs) + { + for (int i = 0; i <= FritzBox._msn.GetUpperBound(0); i++) + { + if (FritzBox._msn[i].ToString() == msn) + foundMSN = true; + } + if (foundMSN == true) + { + Log.Info("MSN is on list."); + return true; + } + else + { + Log.Info("MSN is not on list. Notify won't be shown."); + return false; + } + } + else + { + Log.Info("MSN filter is disabled."); + return true; + } + } + + + public void OnStartExternal(Process proc, bool waitForExit) + { + if (waitForExit) + { + _showNotify = false; + } + else + { + _showNotify = true; + } + } + public void OnStopExternal(Process proc, bool waitForExit) + { + _showNotify = true; + + //for (int i = 0; i < notifyQueue.Count; i++) + // OnFritzBoxEvent(notifyQueue[i]); + + notifyQueue.Clear(); + } + + #endregion + + #region <Interface> Implementations + + #region IPlugin Interface + + /// <summary> + /// This method will be called by mediaportal to start your process plugin + /// </summary> + public void Start() + { + Log.Info("FRITZ!Box Plugin {0} starting.", _version); + + FritzBoxWatch = new FritzBoxWatch(); + LoadSettings(); + FritzBoxWatch.Start(); + + FritzBoxWatch.FritzBoxAction += new FritzBoxWatch.EventHandler(OnFritzBoxEvent); + + Utils.OnStartExternal += new Utils.UtilEventHandler(OnStartExternal); + Utils.OnStopExternal += new Utils.UtilEventHandler(OnStopExternal); + } + + /// <summary> + /// This method will be called by mediaportal to stop your process plugin + /// </summary> + public void Stop() + { + if (!_fritzBoxDisabled) + FritzBoxWatch.Stop(); + + SaveSettings(); + } + + #endregion + + #region ISetupForm Interface + + public bool CanEnable() + { + return true; + } + + public string Description() + { + return "Displays FRITZ!Box calling information."; + } + + public bool DefaultEnabled() + { + return false; + } + + public int GetWindowId() + { + return -1; + } + + public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) + { + strButtonText = null; + strButtonImage = null; + strButtonImageFocus = null; + strPictureImage = null; + return false; + } + + public string Author() + { + return "chefkoch"; + } + + public string PluginName() + { + return "FRITZ!Box CallMonitor"; + } + + public bool HasSetup() + { + return true; + } + + public void ShowPlugin() + { + Form setup = new FritzBoxSetupForm(); + setup.ShowDialog(); + } + + #endregion + + #endregion + } +} \ No newline at end of file Copied: trunk/plugins/FritzBox/FritzBox/FritzBox.csproj (from rev 554, trunk/plugins/FritzBox/FritzBox.csproj) =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzBox.csproj (rev 0) +++ trunk/plugins/FritzBox/FritzBox/FritzBox.csproj 2007-06-17 15:37:03 UTC (rev 565) @@ -0,0 +1,117 @@ +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>8.0.50727</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{7A458560-A537-429E-A016-1A4513CB586F}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>FritzBox</RootNamespace> + <AssemblyName>FritzBox</AssemblyName> + <ApplicationIcon> + </ApplicationIcon> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> + <DebugSymbols>true</DebugSymbols> + <OutputPath>bin\x86\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <DebugType>full</DebugType> + <PlatformTarget>x86</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <Optimize>true</Optimize> + <DebugType>pdbonly</DebugType> + <PlatformTarget>x86</PlatformTarget> + <ErrorReport>prompt</ErrorReport> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Caller.cs" /> + <Compile Include="FritzBox.cs" /> + <Compile Include="FritzBoxSetupFrom.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="FritzBoxWatch.cs" /> + <Compile Include="Properties\Resources.Designer.cs"> + <AutoGen>True</AutoGen> + <DesignTime>True</DesignTime> + <DependentUpon>Resources.resx</DependentUpon> + </Compile> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\mediaportal\Core\Core.csproj"> + <Project>{02FFFC1F-2555-4B99-8B01-3432D0673855}</Project> + <Name>Core</Name> + </ProjectReference> + <ProjectReference Include="..\..\mediaportal\Dialogs\Dialogs.csproj"> + <Project>{396C5208-5D46-4A11-92C1-FD0F2F42D7DD}</Project> + <Name>Dialogs</Name> + </ProjectReference> + <ProjectReference Include="..\..\mediaportal\Utils\Utils.csproj"> + <Project>{6DA0E4DF-6230-4642-98B5-E690BB6942BB}</Project> + <Name>Utils</Name> + </ProjectReference> + <ProjectReference Include="..\..\mediaportal\WindowPlugins\WindowPlugins.csproj"> + <Project>{B282C55B-A37B-4CEC-A4FC-00791069BF00}</Project> + <Name>WindowPlugins</Name> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="FritzBoxSetupFrom.resx"> + <DependentUpon>FritzBoxSetupFrom.cs</DependentUpon> + <SubType>Designer</SubType> + </EmbeddedResource> + <EmbeddedResource Include="Properties\Resources.resx"> + <SubType>Designer</SubType> + <Generator>ResXFileCodeGenerator</Generator> + <LastGenOutput>Resources.Designer.cs</LastGenOutput> + </EmbeddedResource> + </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="FritzBoxDisabled.png" /> + <EmbeddedResource Include="FritzBox.png" /> + </ItemGroup> + <ItemGroup> + <None Include="gfx\FritzBoxIconTransparent.png" /> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> + <PropertyGroup> + <PostBuildEvent>copy "$(TargetPath)" "C:\Programme\Team MediaPortal\MediaPortal\Plugins\Process\$(TargetFileName)" +rem copy "$(TargetPath)" "$(ProjectDir)\..\FritzBox_release\MP_svn_release\Plugins\Process\$(TargetFileName)" +rem copy "$(ProjectDir)\*" "$(ProjectDir)\..\FritzBox_release\MP_svn_source\*"</PostBuildEvent> + </PropertyGroup> +</Project> \ No newline at end of file Copied: trunk/plugins/FritzBox/FritzBox/FritzBox.png (from rev 554, trunk/plugins/FritzBox/FritzBox.png) =================================================================== (Binary files differ) Copied: trunk/plugins/FritzBox/FritzBox/FritzBoxDisabled.png (from rev 554, trunk/plugins/FritzBox/FritzBoxDisabled.png) =================================================================== (Binary files differ) Copied: trunk/plugins/FritzBox/FritzBox/FritzBoxSetupFrom.cs (from rev 554, trunk/plugins/FritzBox/FritzBoxSetupFrom.cs) =================================================================== --- trunk/plugins/FritzBox/FritzBox/FritzBoxSetupFrom.cs (rev 0) +++ trunk/plugins/FritzBox/FritzBox/FritzBoxSetupFrom.cs 2007-06-17 15:37:03 UTC (rev 565) @@ -0,0 +1,1091 @@ +#region Copyright (C) 2005-2007 Team MediaPortal + +/* + * Copyright (C) 2005-2007 Team MediaPortal + * http://www.team-mediaportal.com + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This Program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GNU Make; see the file COPYING. If not, write to + * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * http://www.gnu.org/copyleft/gpl.html + * + */ + +#endregion + +using System; +using System.Drawing; +using System.Collections; +using System.ComponentModel; +using System.Windows.Forms; +using System.Net.Sockets; +using System.IO; +using MediaPortal.Profile; + +using MediaPortal.Util; +using MediaPortal.GUI.Library; +using MediaPortal.Configuration; + +namespace FritzBox +{ + /// <summary> + /// Zusammenfassung f\xFCr CallSetupFrom. + /// </summary> + public class FritzBoxSetupForm : Form + { + private MediaPortal.UserInterface.Controls.MPTabControl tabControlFritzBoxSettings; + private TabPage tabGeneral; + private TabPage tabIncoming; + private MediaPortal.UserInterface.Controls.MPGroupBox groupBoxNotify; + private MediaPortal.UserInterface.Controls.MPGroupBox groupBoxMedia; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxStopMedia; + private TabPage tabPhonebook; + private DataGridView dataGridView; + private DataGridViewTextBoxColumn colCallerId; + private DataGridViewTextBoxColumn colName; + private DataGridViewCheckBoxColumn colShow; + private MediaPortal.UserInterface.Controls.MPGroupBox groupBoxPhonebook; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxSaveUnknownCaller; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxShowUnknownCaller; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxUsePhonebook; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxCallerShow; + private MediaPortal.UserInterface.Controls.MPTextBox textBoxCallerName; + private MediaPortal.UserInterface.Controls.MPTextBox textBoxCallerId; + private MediaPortal.UserInterface.Controls.MPButton buttonCallerRemove; + private MediaPortal.UserInterface.Controls.MPLabel labelCallerId; + private MediaPortal.UserInterface.Controls.MPLabel labelCallerName; + private MediaPortal.UserInterface.Controls.MPButton buttonCallerChange; + private MediaPortal.UserInterface.Controls.MPButton buttonCancel; + private MediaPortal.UserInterface.Controls.MPButton buttonSave; + private MediaPortal.UserInterface.Controls.MPNumericUpDown numericUpDownTimeout; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxCloseOnTimout; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxResumeMedia; + private MediaPortal.UserInterface.Controls.MPLabel labelVersion; + private MediaPortal.UserInterface.Controls.MPGroupBox mpGroupBox1; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxExtensiveLogging; + private MediaPortal.UserInterface.Controls.MPButton buttonTest; + private MediaPortal.UserInterface.Controls.MPTextBox textBoxPort; + private MediaPortal.UserInterface.Controls.MPTextBox textBoxAddress; + private MediaPortal.UserInterface.Controls.MPLabel labelPort; + private MediaPortal.UserInterface.Controls.MPLabel labelAddress; + private MediaPortal.UserInterface.Controls.MPLabel labelHelp; + private MediaPortal.UserInterface.Controls.MPButton buttonMSNsRemove; + private MediaPortal.UserInterface.Controls.MPButton buttonMSNsAdd; + private PictureBox pictureBoxCaller; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxFilterMSNs; + private MediaPortal.UserInterface.Controls.MPComboBox comboBoxMSNs; + private MediaPortal.UserInterface.Controls.MPCheckBox checkBoxShowMsnOnHeading; + private PictureBox pictureBox1; + private MediaPortal.UserInterface.Controls.MPButton mpImportFBMonitor; + private OpenFileDialog openFileDialog; + + /// <summary> + /// Erforderliche Designervariable. + /// </summary> + private Container components = null; + + public FritzBoxSetupForm() + { + // + // Erforderlich f\xFCr die Windows Form-Designerunterst\xFCtzung + // + InitializeComponent(); + + LoadSettings(); + // + // TODO: F\xFCgen Sie den Konstruktorcode nach dem Aufruf von InitializeComponent hinzu + // + } + + /// <summary> + /// Die verwendeten Ressourcen bereinigen. + /// </summary> + protected override void Dispose(bool disposing) + { + if (disposing) + { + if (components != null) + { + components.Dispose(); + } + } + base.Dispose(disposing); + } + + #region Vom Windows Form-Designer generierter Code + + /// <summary> + /// Erforderliche Methode f\xFCr die Designerunterst\xFCtzung. + /// Der Inhalt der Methode darf nicht mit dem Code-Editor ge\xE4ndert werden. + /// </summary> + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FritzBoxSetupForm)); + this.tabControlFritzBoxSettings = new MediaPortal.UserInterface.Controls.MPTabControl(); + this.tabGeneral = new System.Windows.Forms.TabPage(); + this.checkBoxExtensiveLogging = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.mpGroupBox1 = new MediaPortal.UserInterface.Controls.MPGroupBox(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.buttonTest = new MediaPortal.UserInterface.Controls.MPButton(); + this.textBoxPort = new MediaPortal.UserInterface.Controls.MPTextBox(); + this.textBoxAddress = new MediaPortal.UserInterface.Controls.MPTextBox(); + this.labelPort = new MediaPortal.UserInterface.Controls.MPLabel(); + this.labelAddress = new MediaPortal.UserInterface.Controls.MPLabel(); + this.labelHelp = new MediaPortal.UserInterface.Controls.MPLabel(); + this.tabIncoming = new System.Windows.Forms.TabPage(); + this.groupBoxPhonebook = new MediaPortal.UserInterface.Controls.MPGroupBox(); + this.mpImportFBMonitor = new MediaPortal.UserInterface.Controls.MPButton(); + this.checkBoxSaveUnknownCaller = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.checkBoxShowUnknownCaller = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.checkBoxUsePhonebook = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.groupBoxNotify = new MediaPortal.UserInterface.Controls.MPGroupBox(); + this.checkBoxShowMsnOnHeading = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.buttonMSNsRemove = new MediaPortal.UserInterface.Controls.MPButton(); + this.checkBoxFilterMSNs = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.buttonMSNsAdd = new MediaPortal.UserInterface.Controls.MPButton(); + this.comboBoxMSNs = new MediaPortal.UserInterface.Controls.MPComboBox(); + this.numericUpDownTimeout = new MediaPortal.UserInterface.Controls.MPNumericUpDown(); + this.checkBoxCloseOnTimout = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.groupBoxMedia = new MediaPortal.UserInterface.Controls.MPGroupBox(); + this.checkBoxResumeMedia = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.checkBoxStopMedia = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.tabPhonebook = new System.Windows.Forms.TabPage(); + this.pictureBoxCaller = new System.Windows.Forms.PictureBox(); + this.buttonCallerChange = new MediaPortal.UserInterface.Controls.MPButton(); + this.checkBoxCallerShow = new MediaPortal.UserInterface.Controls.MPCheckBox(); + this.textBoxCallerName = new MediaPortal.UserInterface.Controls.MPTextBox(); + this.textBoxCallerId = new MediaPortal.UserInterface.Controls.MPTextBox(); + this.buttonCallerRemove = new MediaPortal.UserInterface.Controls.MPButton(); + this.dataGridView = new System.Windows.Forms.DataGridView(); + this.colCallerId = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colShow = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.labelCallerId = new MediaPortal.UserInterface.Controls.MPLabel(); + this.labelCallerName = new MediaPortal.UserInterface.Controls.MPLabel(); + this.buttonCancel = new MediaPortal.UserInterface.Controls.MPButton(); + this.buttonSave = new MediaPortal.UserInterface.Controls.MPButton(); + this.labelVersion = new MediaPortal.UserInterface.Controls.MPLabel(); + this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); + this.tabControlFritzBoxSettings.SuspendLayout(); + this.tabGeneral.SuspendLayout(); + this.mpGroupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.tabIncoming.SuspendLayout(); + this.groupBoxPhonebook.SuspendLayout(); + this.groupBoxNotify.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownTimeout)).BeginInit(); + this.groupBoxMedia.SuspendLayout(); + this.tabPhonebook.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBoxCaller)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit(); + this.SuspendLayout(); + // + // tabControlFritzBoxSettings + // + this.tabControlFritzBoxSettings.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tabControlFritzBoxSettings.Controls.Add(this.tabGeneral); + this.tabControlFritzBoxSettings.Controls.Add(this.tabIncoming); + this.tabControlFritzBoxSettings.Controls.Add(this.tabPhonebook); + this.tabControlFritzBoxSettings.Location = new System.Drawing.Point(12, 13); + this.tabControlFritzBoxSettings.Name = "tabControlFritzBoxSettings"; + this.tabControlFritzBoxSettings.SelectedIndex = 0; + this.tabControlFritzBoxSettings.Size = new System.Drawing.Size(531, 337); + this.tabControlFritzBoxSettings.TabIndex = 0; + // + // tabGeneral + // + this.tabGeneral.Controls.Add(this.checkBoxExtensiveLogging); + this.tabGeneral.Controls.Add(this.mpGroupBox1); + this.tabGeneral.Location = new System.Drawing.Point(4, 22); + this.tabGeneral.Name = "tabGeneral"; + this.tabGeneral.Padding = new System.Windows.Forms.Padding(3); + this.tabGeneral.Size = new System.Drawing.Size(523, 311); + this.tabGeneral.TabIndex = 0; + this.tabGeneral.Text = "General"; + this.tabGeneral.UseVisualStyleBackColor = true; + // + // checkBoxExtensiveLogging + // + this.checkBoxExtensiveLogging.AutoSize = true; + this.checkBoxExtensiveLogging.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.checkBoxExtensiveLogging.Location = new System.Drawing.Point(6, 138); + this.checkBoxExtensiveLogging.Name = "checkBoxExtensiveLogging"; + this.checkBoxExtensiveLogging.Size = new System.Drawing.Size(339, 17); + this.checkBoxExtensiveLogging.TabIndex = 1; + this.checkBoxExtensiveLogging.Text = "extensive logging (!!! phonenumbers are written to the logfile !!!)"; + this.checkBoxExtensiveLogging.UseVisualStyleBackColor = true; + // + // mpGroupBox1 + // + this.mpGroupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.mpGroupBox1.Controls.Add(this.pictureBox1); + this.mpGroupBox1.Controls.Add(this.buttonTest); + this.mpGroupBox1.Controls.Add(this.textBoxPort); + this.mpGroupBox1.Controls.Add(this.textBoxAddress); + this.mpGroupBox1.Controls.Add(this.labelPort); + this.mpGroupBox1.Controls.Add(this.labelAddress); + this.mpGroupBox1.Controls.Add(this.labelHelp); + this.mpGroupBox1.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.mpGroupBox1.Location = new System.Drawing.Point(6, 6); + this.mpGroupBox1.Name = "mpGroupBox1"; + this.mpGroupBox1.Size = new System.Drawing.Size(511, 125); + this.mpGroupBox1.TabIndex = 0; + this.mpGroupBox1.TabStop = false; + this.mpGroupBox1.Text = "connection"; + // + // pictureBox1 + // + this.pictureBox1.Image = global::FritzBox.Properties.Resources.FritzBoxIconTransparent; + this.pictureBox1.Location = new System.Drawing.Point(6, 20); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(97, 99); + this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pictureBox1.TabIndex = 2; + this.pictureBox1.TabStop = false; + // + // buttonTest + // + this.buttonTest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.buttonTest.Location = new System.Drawing.Point(430, 20); + this.buttonTest.Name = "buttonTest"; + this.buttonTest.Size = new System.Drawing.Size(75, 21); + this.buttonTest.TabIndex = 2; + this.buttonTest.Text = "Test"; + this.buttonTest.UseVisualStyleBackColor = true; + this.buttonTest.Click += new System.EventHandler(this.buttonTest_Click); + // + // textBoxPort + // + this.textBoxPort.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.textBoxPort.BorderColor = System.Drawing.Color.Empty; + this.textBoxPort.Location = new System.Drawing.Point(165, 47); + this.textBoxPort.Name = "textBoxPort"; + this.textBoxPort.Size = new System.Drawing.Size(259, 21); + this.textBoxPort.TabIndex = 1; + // + // textBoxAddress + // + this.textBoxAddress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.textBoxAddress.BorderColor = System.Drawing.Color.Empty; + this.textBoxAddress.Location = new System.Drawing.Point(165, 20); + this.textBoxAddress.Name = "textBoxAddress"; + this.textBoxAddress.Size = new System.Drawing.Size(259, 21); + this.textBoxAddress.TabIndex = 0; + // + // labelPort + // + this.labelPort.AutoSize = true; + this.labelPort.Location = new System.Drawing.Point(128, 50); + this.labelPort.Name = "labelPort"; + this.labelPort.Size = new System.Drawing.Size(31, 13); + this.labelPort.TabIndex = 8; + this.labelPort.Text = "Port:"; + // + // labelAddress + // + this.labelAddress.AutoSize = true; + this.labelAddress.Location = new System.Drawing.Point(109, 24); + this.labelAddress.Name = "labelAddress"; + this.labelAddress.Size = new System.Drawing.Size(50, 13); + this.labelAddress.TabIndex = 7; + this.labelAddress.Text = "Address:"; + // + // labelHelp + // + this.labelHelp.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.labelHelp.Location = new System.Drawing.Point(165, 73); + this.labelHelp.Name = "labelHelp"; + this.labelHelp.Size = new System.Drawing.Size(340, 49); + this.labelHelp.TabIndex = 6; + // + // tabIncoming + // + this.tabIncoming.Controls.Add(this.groupBoxPhonebook); + this.tabIncoming.Controls.Add(this.groupBoxNotify); + this.tabIncoming.Controls.Add(this.groupBoxMedia); + this.tabIncoming.Location = new System.Drawing.Point(4, 22); + this.tabIncoming.Name = "tabIncoming"; + this.tabIncoming.Padding = new System.Windows.Forms.Padding(3); + this.tabIncoming.Size = new System.Drawing.Size(523, 311); + this.tabIncoming.TabIndex = 1; + this.tabIncoming.Text = "Incoming Call"; + this.tabIncoming.UseVisualStyleBackColor = true; + // + // groupBoxPhonebook + // + this.groupBoxPhonebook.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBoxPhonebook.Controls.Add(this.mpImportFBMonitor); + this.groupBoxPhonebook.Controls.Add(this.checkBoxSaveUnknownCaller); + this.groupBoxPhonebook.Controls.Add(this.checkBoxShowUnknownCaller); + this.groupBoxPhonebook.Controls.Add(this.checkBoxUsePhonebook); + this.groupBoxPhonebook.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.groupBoxPhonebook.Location = new System.Drawing.Point(6, 208); + this.groupBoxPhonebook.Name = "groupBoxPhonebook"; + this.groupBoxPhonebook.Size = new System.Drawing.Size(511, 95); + this.groupBoxPhonebook.TabIndex = 2; + this.groupBoxPhonebook.TabStop = false; + this.groupBoxPhonebook.Text = "phonebook settings"; + // + // mpImportFBMonitor + // + this.mpImportFBMonitor.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.mpImportFBMonitor.Location = new System.Drawing.Point(355, 20); + this.mpImportFBMonitor.Name = "mpImportFBMonitor"; + this.mpImportFBMonitor.Size = new System.Drawing.Size(150, 23); + this.mpImportFBMonitor.TabIndex = 3; + this.mpImportFBMonitor.Text = "Import FRITZ!Box Monitor"; + this.mpImportFBMonitor.UseVisualStyleBackColor = true; + this.mpImportFBMonitor.Click += new System.EventHandler(this.mpImportFBMonitor_Click); + // + // checkBoxSaveUnknownCaller + // + this.checkBoxSaveUnknownCaller.AutoSize = true; + this.checkBoxSaveUnknownCaller.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.checkBoxSaveUnknownCaller.Location = new System.Drawing.Point(24, 68); + this.checkBoxSaveUnknownCaller.Name = "checkBoxSaveUnknownCaller"; + this.checkBoxSaveUnknownCaller.Size = new System.Drawing.Size(121, 17); + this.checkBoxSaveUnknownCaller.TabIndex = 2; + this.checkBoxSaveUnknownCaller.Text = "save unknown caller"; + this.checkBoxSaveUnknownCaller.UseVisualStyleBackColor = true; + // + // checkBoxShowUnknownCaller + // + this.checkBoxShowUnknownCaller.AutoSize = true; + this.checkBoxShowUnknownCaller.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.checkBoxShowUnknownCaller.Location = new System.Drawing.Point(24, 45); + this.checkBoxShowUnknownCaller.Name = "checkBoxShowUnknownCaller"; + this.checkBoxShowUnknownCaller.Size = new System.Drawing.Size(123, 17); + this.checkBoxShowUnknownCaller.TabIndex = 1; + this.checkBoxShowUnknownCaller.Text = "show unknown caller"; + this.checkBoxShowUnknownCaller.UseVisualStyleBackColor = true; + // + // checkBoxUsePhonebook + // + this.checkBoxUsePhonebook.AutoSize = true; + this.checkBoxUsePhonebook.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.checkBoxUsePhonebook.Location = new System.Drawing.Point(6, 20); + this.checkBoxUsePhonebook.Name = "checkBoxUsePhonebook"; + this.checkBoxUsePhonebook.Size = new System.Drawing.Size(97, 17); + this.checkBoxUsePhonebook.TabIndex = 0; + this.checkBoxUsePhonebook.Text = "use phonebook"; + this.checkBoxUsePhonebook.UseVisualStyleBackColor = true; + this.checkBoxUsePhonebook.CheckedChanged += new System.EventHandler(this.checkBoxUsePhonebook_CheckedChanged); + // + // groupBoxNotify + // + this.groupBoxNotify.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBoxNotify.Controls.Add(this.checkBoxShowMsnOnHeading); + this.groupBoxNotify.Controls.Add(this.buttonMSNsRemove); + this.groupBoxNotify.Controls.Add(this.checkBoxFilterMSNs); + this.groupBoxNotify.Controls.Add(this.buttonMSNsAdd); + this.groupBoxNotify.Controls.Add(this.comboBoxMSNs); + this.groupBoxNotify.Controls.Add(this.numericUpDownTimeout); + this.groupBoxNotify.Controls.Add(this.checkBoxCloseOnTimout); + this.groupBoxNotify.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.groupBoxNotify.Location = new System.Drawing.Point(6, 6); + this.groupBoxNotify.Name = "groupBoxNotify"; + this.groupBoxNotify.Size = new System.Drawing.Size(511, 122); + this.groupBoxNotify.TabIndex = 0; + this.groupBoxNotify.TabStop = false; + this.groupBoxNotify.Text = "notify settings"; + // + // checkBoxShowMsnOnHeading + // + this.checkBoxShowMsnOnHeading.AutoSize = true; + this.checkBoxShowMsnOnHeading.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.checkBoxShowMsnOnHeading.Location = new System.Drawing.Point(6, 99); + this.checkBoxShowMsnOnHeading.Name = "checkBoxShowMsnOnHeading"; + this.checkBoxShowMsnOnHeading.Size = new System.Drawing.Size(161, 17); + this.checkBoxShowMsnOnHeading.TabIndex = 6; + this.checkBoxShowMsnOnHeading.Text = "show MSN on notify-heading"; + this.checkBoxShowMsnOnHeading.UseVisualStyleBackColor = true; + // + // buttonMSNsRemove + // + this.buttonMSNsRemove.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.buttonMSNsRemove.Location = new System.Drawing.Point(275, 72); + this.buttonMSNsRemove.Name = "buttonMSNsRemove"; + this.buttonMSNsRemove.Size = new System.Drawing.Size(63, 21); + this.buttonMSNsRemove.TabIndex = 5; + this.buttonMSNsRemove.Text = "Remove"; + this.buttonMSNsRemove.UseVisualStyleBackColor = true; + this.buttonMSNsRemove.Click += new System.EventHandler(this.buttonMSNsRemove_Click); + // + // checkBoxFilterMSNs + // + this.checkBoxFilterMSNs.AutoSize = true; + this.checkBoxFilterMSNs.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.checkBoxFilterMSNs.Location = new System.Drawing.Point(6, 49); + this.checkBoxFilterMSNs.Name = "checkBoxFilterMSNs"; + this.checkBoxFilterMSNs.Size = new System.Drawing.Size(194, 17); + this.checkBoxFilterMSNs.TabIndex = 2; + this.checkBoxFilterMSNs.Text = "show notify only for following MSNs"; + this.checkBoxFilterMSNs.UseVisualStyleBackColor = true; + this.checkBoxFilterMSNs.CheckedChanged += new System.EventHandler(this.checkBoxFilterMSNs_CheckedChanged); + // + // buttonMSNsAdd + // + this.buttonMSNsAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.buttonMSNsAdd.Location = new System.Drawing.Point(206, 72); + this.buttonMSNsAdd.Name = "buttonMSNsAdd"; + this.buttonMSNsAdd.Size = new System.Drawing.Size(63, 21); + this.buttonMSNsAdd.TabIndex = 4; + this.buttonMSNsAdd.Text = "Add"; + this.buttonMSNsAdd.UseVisualStyleBackColor = true; + this.buttonMSNsAdd.Click += new System.EventHandler(this.buttonMSNsAdd_Click); + // + // comboBoxMSNs + // + this.comboBoxMSNs.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.comboBoxMSNs.BorderColor = System.Drawing.Color.Empty; + this.comboBoxMSNs.FormattingEnabled = true; + this.comboBoxMSNs.Location = new System.Drawing.Point(24, 72); + this.comboBoxMSNs.Name = "comboBoxMSNs"; + this.comboBoxMSNs.Size = new System.Drawing.Size(176, 21); + this.comboBoxMSNs.Sorted = true; + this.comboBoxMSNs.TabIndex = 3; + // + // numericUpDownTimeout + // + this.numericUpDownTimeout.Enabled = false; + this.numericUpDownTimeout.Location = new System.Drawing.Point(206, 20); + this.numericUpDownTimeout.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.numericUpDownTimeout.Name = "numericUpDownTimeout"; + this.numericUpDownTimeout.Size = new System.Drawing.Size(53, 21); + this.numericUpDownTimeout.TabIndex = 1; + this.numericUpDownTimeout.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; + this.numericUpDownTimeout.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // checkBoxCloseOnTimout + // + this.checkBoxCloseOnTimout.AutoSize = true; + this.checkBoxCloseOnTimout.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.checkBoxCloseOnTimout.Location = new System.Drawing.Point(6, 20); + this.checkBoxCloseOnTimout.Name = "checkBoxCloseOnTimout"; + this.checkBoxCloseOnTimout.Size = new System.Drawing.Size(179, 17); + this.checkBoxCloseOnTimout.TabIndex = 0; + this.checkBoxCloseOnTimout.Text = "auto-close after timeout expired"; + this.checkBoxCloseOnTimout.UseVisualStyleBackColor = true; + this.checkBoxCloseOnTimout.CheckedChanged += new System.EventHandler(this.checkBoxCloseOnTimout_CheckedChanged_1); + // + // groupBoxMedia + // + this.groupBoxMedia.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.groupBoxMedia.Controls.Add(this.checkBoxResumeMedia); + this.groupBoxMedia.Controls.Add(this.checkBoxStopMedia); + this.groupBoxMedia.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.groupBoxMedia.Location = new System.Drawing.Point(6, 134); + this.groupBoxMedia.Name = "groupBoxMedia"; + this.groupBoxMedia.Size = new System.Drawing.Size(511, 68); + this.groupBoxMedia.TabIndex = 1; + this.groupBoxMedia.TabStop = false; + this.groupBoxMedia.Text = "media settings"; + // + // checkBoxResumeMedia + // + this.checkBoxResumeMedia.AutoSize = true; + this.... [truncated message content] |