From: <tim...@us...> - 2008-03-25 08:04:12
|
Revision: 1513 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=1513&view=rev Author: timmyt81 Date: 2008-03-25 01:04:09 -0700 (Tue, 25 Mar 2008) Log Message: ----------- Added a folder remotely Added Paths: ----------- trunk/plugins/MyContacts/ trunk/plugins/MyContacts/LocalizeStrings.cs trunk/plugins/MyContacts/MyContacts.cs trunk/plugins/MyContacts/MyContacts.csproj trunk/plugins/MyContacts/MyContacts.csproj.user trunk/plugins/MyContacts/MyContacts.dll trunk/plugins/MyContacts/MyContacts.pdb trunk/plugins/MyContacts/MyContacts.sln trunk/plugins/MyContacts/MyContacts.suo trunk/plugins/MyContacts/MyContactsDetail.cs trunk/plugins/MyContacts/RequestResponse.cs trunk/plugins/MyContacts/_template.cs trunk/plugins/MyContacts/mycontacts_structure.xml trunk/plugins/MyContacts/readme.txt trunk/plugins/MyContacts/readme_dev.txt trunk/plugins/MyContacts/release_bluetwo.bat Added: trunk/plugins/MyContacts/LocalizeStrings.cs =================================================================== --- trunk/plugins/MyContacts/LocalizeStrings.cs (rev 0) +++ trunk/plugins/MyContacts/LocalizeStrings.cs 2008-03-25 08:04:09 UTC (rev 1513) @@ -0,0 +1,266 @@ +#region Copyright (C) 2005-2008 Team MediaPortal + +/* + * Copyright (C) 2005-2008 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.IO; +using System.Globalization; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.Xml; +using MediaPortal.Util; +using MediaPortal.GUI.Library; +using MediaPortal.Configuration; +using MediaPortal.Localisation; +using MyContacts.util; + +namespace MyContacts +{ + /// <summary> + /// THIS CLASS IS TAKEN FROM MyWorldMap PLUGIN + /// SOME SMALL CHANGES MADE BY MYSELF. + /// + /// This class will hold all text used in the application + /// The text is loaded for the current language from + /// the file language/[language]/strings.xml + /// </summary> + public class GUILocalizeStrings + { + #region Variables + static LocalisationProvider _stringProvider; + static Dictionary<string, string> _cultures; + static string[] _languages; + #endregion + + #region Constructors/Destructors + // singleton. Dont allow any instance of this class + private GUILocalizeStrings() + { + } + + static public void Dispose() + { + if (_stringProvider != null) + _stringProvider.Dispose(); + } + #endregion + + #region Public Methods + /// <summary> + /// Public method to load the text from a strings/xml file into memory + /// </summary> + /// <param name="strFileName">Contains the filename+path for the string.xml file</param> + /// <returns> + /// true when text is loaded + /// false when it was unable to load the text + /// </returns> + //[Obsolete("This method has changed", true)] + static public bool Load(string language) + { + bool isPrefixEnabled = true; + + using (MediaPortal.Profile.Settings reader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config, "MediaPortal.xml"))) + { + isPrefixEnabled = reader.GetValueAsBool("general", "myprefix", true); + if (language == null) language = reader.GetValueAsString("skin", "language", "English"); + } + + string directory = Config.GetSubFolder(Config.Dir.Language, "MyContacts"); + string cultureName = null; + if (language != null) cultureName = GetCultureName(language); + + MyLogger.Info("Loading localised Strings - Path: " + directory + " Culture: " + cultureName + " Language: " + language + " Prefix: " + isPrefixEnabled); + + _stringProvider = new LocalisationProvider(directory, cultureName, isPrefixEnabled); + + GUIGraphicsContext.CharsInCharacterSet = _stringProvider.Characters; + + return true; + } + + static public string CurrentLanguage() + { + if (_stringProvider == null) + Load(null); + + return _stringProvider.CurrentLanguage.EnglishName; + } + + static public void ChangeLanguage(string language) + { + if (_stringProvider == null) + Load(language); + else + _stringProvider.ChangeLanguage(GetCultureName(language)); + } + + /// <summary> + /// Get the translation for a given id and format the sting with + /// the given parameters + /// </summary> + /// <param name="dwCode">id of text</param> + /// <param name="parameters">parameters used in the formating</param> + /// <returns> + /// string containing the translated text + /// </returns> + static public string Get(int dwCode, object[] parameters) + { + if (_stringProvider == null) + Load(null); + + string translation = _stringProvider.GetString("unmapped", dwCode); + // if parameters or the translation is null, return the translation. + if ((translation == null) || (parameters == null)) + { + return translation; + } + // return the formatted string. If formatting fails, log the error + // and return the unformatted string. + try + { + return String.Format(translation, parameters); + } + catch (System.FormatException e) + { + MyLogger.Error("Error formatting translation with id " + dwCode); + MyLogger.Error("Unformatted translation: " + translation); + MyLogger.Error(e.ToString()); + return translation; + } + } + + /// <summary> + /// Get the translation for a given id + /// </summary> + /// <param name="dwCode">id of text</param> + /// <returns> + /// string containing the translated text + /// </returns> + static public string Get(int dwCode) + { + if (_stringProvider == null) + Load(null); + + string translation = _stringProvider.GetString("unmapped", dwCode); + + if (translation == null) + { + MyLogger.Error("No translation found for id " + dwCode); + return String.Empty; + } + + return translation; + } + + static public void LocalizeLabel(ref string strLabel) + { + if (_stringProvider == null) + Load(null); + + if (strLabel == null) strLabel = String.Empty; + if (strLabel == "-") strLabel = ""; + if (strLabel == "") return; + // This can't be a valid string code if the first character isn't a number. + // This check will save us from catching unnecessary exceptions. + if (!char.IsNumber(strLabel, 0)) + return; + + int dwLabelID; + + try + { + dwLabelID = System.Int32.Parse(strLabel); + } + catch (FormatException e) + { + MyLogger.Error(e.ToString()); + strLabel = String.Empty; + return; + } + + strLabel = _stringProvider.GetString("unmapped", dwLabelID); + if (strLabel == null) + { + MyLogger.Error("No translation found for id " + dwLabelID); + strLabel = String.Empty; + } + } + + public static string LocalSupported() + { + if (_stringProvider == null) + Load(null); + + CultureInfo culture = _stringProvider.GetBestLanguage(); + + return culture.EnglishName; + } + + public static string[] SupportedLanguages() + { + if (_languages == null) + { + if (_stringProvider == null) + Load(null); + + CultureInfo[] cultures = _stringProvider.AvailableLanguages(); + + SortedList sortedLanguages = new SortedList(); + foreach (CultureInfo culture in cultures) + sortedLanguages.Add(culture.EnglishName, culture.EnglishName); + + _languages = new string[sortedLanguages.Count]; + + for (int i = 0; i < sortedLanguages.Count; i++) + { + _languages[i] = (string)sortedLanguages.GetByIndex(i); + } + } + + return _languages; + } + + static public string GetCultureName(string language) + { + if (_cultures == null) + { + _cultures = new Dictionary<string, string>(); + + CultureInfo[] cultureList = CultureInfo.GetCultures(CultureTypes.AllCultures); + + for (int i = 0; i < cultureList.Length; i++) + { + _cultures.Add(cultureList[i].EnglishName, cultureList[i].Name); + } + } + + if (_cultures.ContainsKey(language)) + return _cultures[language]; + + return null; + } + #endregion + } +} \ No newline at end of file Added: trunk/plugins/MyContacts/MyContacts.cs =================================================================== --- trunk/plugins/MyContacts/MyContacts.cs (rev 0) +++ trunk/plugins/MyContacts/MyContacts.cs 2008-03-25 08:04:09 UTC (rev 1513) @@ -0,0 +1,510 @@ +#region Copyright (C) 2005-2008 Team MediaPortal + +/* + * Copyright (C) 2005-2008 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.Windows.Forms; +using MediaPortal.GUI.Library; +using MediaPortal.Dialogs; +using MyContacts.database; +using MediaPortal.Util; +using System.Collections.Generic; +using MyContacts.util; + +namespace MyContacts +{ + public class MyContacts : GUIWindow, IComparer<GUIListItem>, ISetupForm + { + #region GUI Components + + [SkinControlAttribute(2)] + protected GUIButtonControl btnViewAs = null; + [SkinControlAttribute(3)] + protected GUISortButtonControl btnSortBy = null; + //[SkinControlAttribute(4)] + //protected GUIButtonControl btnSync = null; + [SkinControlAttribute(50)] + protected GUIListControl listView = null; + [SkinControlAttribute(51)] + protected GUIThumbnailPanel thumbnailView = null; + + #endregion + + #region Variables + + View _currentView = View.List; + SortMethod _currentSortMethod = SortMethod.LastName; + bool _sortAscending = true; + MyContactsDetail _detail = null; + + #endregion + + #region Constants + + enum SortMethod + { + LastName = 0 + ,FirstName = 1 + ,NickName = 2 + } + + enum View : int + { + List = 0, + SmallIcons = 1, + BigIcons = 2 + } + + public const int WINDOW_ID_LIST = 7677; + public const int WINDOW_ID_DETAIL = 7678; + + #endregion + + public MyContacts() + { + GetID = WINDOW_ID_LIST; + + _detail = new MyContactsDetail(); + + Options opt = new Options(); + Contact cont = new Contact(); + } + + #region ISetupForm Members + + // Returns the name of the plugin which is shown in the plugin menu + public string PluginName() + { + return "My Contacts"; + } + + // Returns the description of the plugin is shown in the plugin menu + public string Description() + { + return "Display your contacts from your Plaxo account"; + } + + // Returns the author of the plugin which is shown in the plugin menu + public string Author() + { + return "TimmyT"; + } + + // show the setup dialog + public void ShowPlugin() + { + gui.Setup frmSetup = new gui.Setup(); + frmSetup.ShowDialog(); + } + + // Indicates whether plugin can be enabled/disabled + public bool CanEnable() + { + return true; + } + + // get ID of windowplugin belonging to this setup + public int GetWindowId() + { + return GetID; + } + + // Indicates if plugin is enabled by default; + public bool DefaultEnabled() + { + return true; + } + + // indicates if a plugin has it's own setup screen + public bool HasSetup() + { + return true; + } + + /// <summary> + /// If the plugin should have it's own button on the main menu of Mediaportal then it + /// should return true to this method, otherwise if it should not be on home + /// it should return false + /// </summary> + /// <param name="strButtonText">text the button should have</param> + /// <param name="strButtonImage">image for the button, or empty for default</param> + /// <param name="strButtonImageFocus">image for the button, or empty for default</param> + /// <param name="strPictureImage">subpicture for the button or empty for none</param> + /// <returns>true : plugin needs it's own button on home + /// false : plugin does not need it's own button on home</returns> + + public bool GetHome(out string strButtonText, out string strButtonImage, + out string strButtonImageFocus, out string strPictureImage) + { + strButtonText = getPluginName(); + strButtonImage = "hover_my contacts.png"; + strButtonImageFocus = String.Empty; + strPictureImage = String.Empty; + return true; + } + + #endregion + + #region GUIWindow Members + + public override bool Init() + { + bool ret=Load(GUIGraphicsContext.Skin + @"\mycontacts.xml"); + if (ret) + { + InitMyContacts(); + } + return ret; + } + + protected override void OnPageLoad() + { + GUIWaitCursor.Show(); + base.OnPageLoad(); + LoadList(); + OnSort(); + btnSortBy.SortChanged += new SortEventHandler(SortChanged); + GUIWaitCursor.Hide(); + } + + protected override void OnClicked(int controlId, GUIControl control, + MediaPortal.GUI.Library.Action.ActionType actionType) + { + if (control == btnViewAs) // view + { + _currentView = (View)btnViewAs.SelectedItem; + ShowThumbPanel(); + GUIControl.FocusControl(GetID, controlId); + } + + if (control == btnSortBy) // sort by + { + GUIDialogMenu dlg = (GUIDialogMenu)GUIWindowManager.GetWindow( + (int)GUIWindow.Window.WINDOW_DIALOG_MENU); + dlg.Reset(); + dlg.SetHeading(GUILocalizeStrings.Get(7677004)); + dlg.Add(GUILocalizeStrings.Get(7677001)); + dlg.Add(GUILocalizeStrings.Get(7677002)); + dlg.Add(GUILocalizeStrings.Get(7677003)); + dlg.DoModal(GUIWindowManager.ActiveWindow); + + int selected = dlg.SelectedId - 1; + + _currentSortMethod = (SortMethod)selected; + btnSortBy.Label = dlg.SelectedLabelText; + + OnSort(); + GUIControl.FocusControl(GetID, controlId); + } + + if (control == listView || control == thumbnailView) + { + GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_ITEM_SELECTED, GetID, 0, controlId, 0, 0, null); + OnMessage(msg); + int itemIndex = (int)msg.Param1; + if (actionType == Action.ActionType.ACTION_SELECT_ITEM) + { + OnClick(itemIndex); + } + } + + base.OnClicked(controlId, control, actionType); + } + + public override bool OnMessage(GUIMessage message) + { + return base.OnMessage(message); + } + + #endregion + + void OnClick(int itemIndex) + { + GUIListItem item = GetSelectedItem(); + if (item == null) return; + + Contact c = (Contact)item.MusicTag; + ShowDetails(c); + } + + #region IComparer<GUIListItem> Members + + public int Compare(GUIListItem item1, GUIListItem item2) + { + if (item1 == item2) return 0; + if (item1 == null) return -1; + if (item2 == null) return -1; + + SortMethod method = _currentSortMethod; + bool bAscending = _sortAscending; + + if (bAscending) + { + return String.Compare(item1.Label, item2.Label, true); + } + else + { + return String.Compare(item2.Label, item1.Label, true); + } + return 0; + } + + #endregion + + void SortChanged(object sender, SortEventArgs e) + { + _sortAscending = e.Order != System.Windows.Forms.SortOrder.Descending; + + OnSort(); + UpdateButtons(); + + GUIControl.FocusControl(GetID, ((GUIControl)sender).GetID); + } + + private string getPluginName() + { + Options opt = new Options(); + string name = opt.getValue(Options.PARAM_PLUGINNAME).ToString(); + opt.Dispose(); + return name; + } + + private void InitMyContacts() + { + // nothing to do so far + } + + private void SetLabels() + { + SortMethod method = _currentSortMethod; + + for (int i = 0; i < GetItemCount(); ++i) + { + GUIListItem item = GetItem(i); + Contact contact = (Contact)item.MusicTag; + bool bLastNameSet = contact.LastName.Length > 0; + bool bFirstNameSet = contact.FirstName.Length > 0; + switch (method) + { + case SortMethod.LastName: + { + if (bLastNameSet) + item.Label = contact.LastName; + if (bFirstNameSet) + if (bLastNameSet) + item.Label += " "; + item.Label += contact.FirstName; + if (item.Label.Length<1) + item.Label = contact.ContactIdentifier; + break; + } + case SortMethod.FirstName: + { + if (bFirstNameSet) + item.Label = contact.FirstName; + if (bLastNameSet) + if (bFirstNameSet) + item.Label += " "; + item.Label += contact.LastName; + if (item.Label.Length<1) + item.Label = contact.ContactIdentifier; + break; + } + case SortMethod.NickName: + { + item.Label = contact.NickName; + break; + } + } + } + } + + void OnSort() + { + SetLabels(); + listView.Sort(this); + thumbnailView.Sort(this); + UpdateButtons(); + } + + bool ViewByIcon + { + get + { + if (_currentView != View.List) return true; + return false; + } + } + + bool ViewByLargeIcon + { + get + { + if (_currentView == View.BigIcons) return true; + return false; + } + } + + GUIListItem GetSelectedItem() + { + if (ViewByIcon) + return thumbnailView.SelectedListItem; + else + return listView.SelectedListItem; + } + + GUIListItem GetItem(int itemIndex) + { + if (ViewByIcon) + { + if (itemIndex >= thumbnailView.Count) return null; + return thumbnailView[itemIndex]; + } + else + { + if (itemIndex >= listView.Count) return null; + return listView[itemIndex]; + } + } + + int GetSelectedItemNo() + { + if (ViewByIcon) + return thumbnailView.SelectedListItemIndex; + else + return listView.SelectedListItemIndex; + } + + int GetItemCount() + { + if (ViewByIcon) + return thumbnailView.Count; + else + return listView.Count; + } + + private void UpdateButtons() + { + listView.IsVisible = false; + thumbnailView.IsVisible = false; + + int iControl = listView.GetID; + if (ViewByIcon) + iControl = thumbnailView.GetID; + + GUIControl.ShowControl(GetID, iControl); + GUIControl.FocusControl(GetID, iControl); + + btnSortBy.IsAscending = _sortAscending; + } + + private void ShowThumbPanel() + { + int itemIndex = GetSelectedItemNo(); + thumbnailView.ShowBigIcons(ViewByLargeIcon); + if (itemIndex > -1) + { + GUIControl.SelectItemControl(GetID, listView.GetID, itemIndex); + GUIControl.SelectItemControl(GetID, thumbnailView.GetID, itemIndex); + } + UpdateButtons(); + } + + private string getPicturePath(Contact c) + { + return "DefaultContactsBig.png"; + // the stuff below makes it pretty slow... + //string imgpath = Constants.getThumbsPath() + c.ServerItemID.ToString() + ".jpg"; + //if (!System.IO.File.Exists(imgpath)) + // imgpath= "DefaultContactsBig.png"; + //return imgpath; + } + + private void LoadList() + { + GUIWaitCursor.Show(); + + listView.Clear(); + thumbnailView.Clear(); + int totalItems = 0; + + List<Contact> contacts = Contact.getAllContacts(); + foreach (Contact c in contacts) + { + GUIListItem item = new GUIListItem(); + string name = c.LastName; + if (name.Equals(string.Empty)) + name = c.FirstName; + else if (c.FirstName.Equals(string.Empty)) + name = c.Company; + else + name += ", " + c.FirstName; + item.Label = name; + item.MusicTag = c; + item.IsFolder = false; + item.ThumbnailImage = string.Empty; + if (!c.BusinessPhoto.Equals(string.Empty)) + { + MyLogger.Debug(c.ContactIdentifier + " has photo: " + c.BusinessPhoto); + item.IconImageBig = "http://" + c.BusinessPhoto; + } + else if (!c.PersonalPhoto.Equals(string.Empty)) + { + MyLogger.Debug(c.ContactIdentifier + " has photo: " + c.PersonalPhoto); + item.IconImageBig = "http://" + c.PersonalPhoto; + } + else + item.IconImageBig = getPicturePath(c); + + item.IconImage = "DefaultContacts.png"; + + listView.Add(item); + thumbnailView.Add(item); + totalItems++; + } + //set object count label + GUIPropertyManager.SetProperty("#itemcount", MediaPortal.Util.Utils.GetObjectCountLabel(totalItems)); + + ShowThumbPanel(); + + GUIWaitCursor.Hide(); + } + + private void ShowDetails(Contact c) + { + if (_detail == null) + _detail = new MyContactsDetail(); + + if (GUIWindowManager.GetWindow(_detail.GetID) == null) + { + GUIWindow win = (GUIWindow)_detail; + GUIWindowManager.Add(ref win); + } + + MyContactsDetail detail = (MyContactsDetail)GUIWindowManager.GetWindow(WINDOW_ID_DETAIL); + detail.ContactObj = c; + GUIWindowManager.ActivateWindow(WINDOW_ID_DETAIL); + } + } +} Added: trunk/plugins/MyContacts/MyContacts.csproj =================================================================== --- trunk/plugins/MyContacts/MyContacts.csproj (rev 0) +++ trunk/plugins/MyContacts/MyContacts.csproj 2008-03-25 08:04:09 UTC (rev 1513) @@ -0,0 +1,123 @@ +<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>{8C40816D-4ED4-4F35-BFC5-CBB9CAF2E633}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>MyContacts</RootNamespace> + <AssemblyName>MyContacts</AssemblyName> + <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent> + </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> + <ItemGroup> + <Reference Include="Core, Version=0.2.3.0, Culture=neutral, processorArchitecture=x86"> + <SpecificVersion>False</SpecificVersion> + <HintPath>C:\MediaPortal\Core.dll</HintPath> + <Private>False</Private> + </Reference> + <Reference Include="Databases, Version=0.2.3.0, Culture=neutral, processorArchitecture=x86"> + <SpecificVersion>False</SpecificVersion> + <HintPath>C:\MediaPortal\Databases.dll</HintPath> + <Private>False</Private> + </Reference> + <Reference Include="Dialogs, Version=0.2.3.0, Culture=neutral, processorArchitecture=x86"> + <SpecificVersion>False</SpecificVersion> + <HintPath>C:\MediaPortal\plugins\Windows\Dialogs.dll</HintPath> + <Private>False</Private> + </Reference> + <Reference Include="Interop.Phoner, Version=1.0.0.0, Culture=neutral"> + <SpecificVersion>False</SpecificVersion> + <HintPath>lib\Interop.Phoner.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + <Reference Include="Utils, Version=2.2.2.0, Culture=neutral, processorArchitecture=x86"> + <SpecificVersion>False</SpecificVersion> + <HintPath>c:\MediaPortal\Utils.dll</HintPath> + <Private>False</Private> + </Reference> + </ItemGroup> + <ItemGroup> + <Compile Include="commands\AddSubCommand.cs" /> + <Compile Include="commands\Command.cs" /> + <Compile Include="commands\CommandBase.cs" /> + <Compile Include="commands\CreateGUIDCommand.cs" /> + <Compile Include="commands\HeaderCommand.cs" /> + <Compile Include="commands\ItemSubCommand.cs" /> + <Compile Include="commands\StatusCommand.cs" /> + <Compile Include="commands\SubCommand.cs" /> + <Compile Include="commands\SyncCommand.cs" /> + <Compile Include="database\Contact.cs" /> + <Compile Include="database\ContactsDatabaseSQLite.cs" /> + <Compile Include="database\DBHandler.cs" /> + <Compile Include="database\Options.cs" /> + <Compile Include="gui\Browser.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="gui\Browser.Designer.cs"> + <DependentUpon>Browser.cs</DependentUpon> + </Compile> + <Compile Include="gui\Setup.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="gui\Setup.Designer.cs"> + <DependentUpon>Setup.cs</DependentUpon> + </Compile> + <Compile Include="LocalizeStrings.cs" /> + <Compile Include="MyContacts.cs" /> + <Compile Include="MyContactsDetail.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="RequestResponse.cs" /> + <Compile Include="voip\Phoner.cs" /> + <Compile Include="_template.cs" /> + <Compile Include="util\Constants.cs" /> + <Compile Include="util\MyLogger.cs" /> + <Compile Include="util\Section.cs" /> + <Compile Include="util\Encoding.cs" /> + <Compile Include="util\KeyValues.cs" /> + <Compile Include="util\SectionHandler.cs" /> + </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="gui\Browser.resx"> + <DependentUpon>Browser.cs</DependentUpon> + <SubType>Designer</SubType> + </EmbeddedResource> + <EmbeddedResource Include="gui\Setup.resx"> + <DependentUpon>Setup.cs</DependentUpon> + <SubType>Designer</SubType> + </EmbeddedResource> + </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:\Mediaportal\plugins\Windows\"</PostBuildEvent> + </PropertyGroup> +</Project> \ No newline at end of file Added: trunk/plugins/MyContacts/MyContacts.csproj.user =================================================================== --- trunk/plugins/MyContacts/MyContacts.csproj.user (rev 0) +++ trunk/plugins/MyContacts/MyContacts.csproj.user 2008-03-25 08:04:09 UTC (rev 1513) @@ -0,0 +1,5 @@ +<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <ProjectView>ProjectFiles</ProjectView> + </PropertyGroup> +</Project> \ No newline at end of file Added: trunk/plugins/MyContacts/MyContacts.dll =================================================================== (Binary files differ) Property changes on: trunk/plugins/MyContacts/MyContacts.dll ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MyContacts/MyContacts.pdb =================================================================== (Binary files differ) Property changes on: trunk/plugins/MyContacts/MyContacts.pdb ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MyContacts/MyContacts.sln =================================================================== --- trunk/plugins/MyContacts/MyContacts.sln (rev 0) +++ trunk/plugins/MyContacts/MyContacts.sln 2008-03-25 08:04:09 UTC (rev 1513) @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyContacts", "MyContacts.csproj", "{8C40816D-4ED4-4F35-BFC5-CBB9CAF2E633}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8C40816D-4ED4-4F35-BFC5-CBB9CAF2E633}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8C40816D-4ED4-4F35-BFC5-CBB9CAF2E633}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8C40816D-4ED4-4F35-BFC5-CBB9CAF2E633}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8C40816D-4ED4-4F35-BFC5-CBB9CAF2E633}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal Added: trunk/plugins/MyContacts/MyContacts.suo =================================================================== (Binary files differ) Property changes on: trunk/plugins/MyContacts/MyContacts.suo ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/plugins/MyContacts/MyContactsDetail.cs =================================================================== --- trunk/plugins/MyContacts/MyContactsDetail.cs (rev 0) +++ trunk/plugins/MyContacts/MyContactsDetail.cs 2008-03-25 08:04:09 UTC (rev 1513) @@ -0,0 +1,198 @@ +#region Copyright (C) 2005-2008 Team MediaPortal + +/* + * Copyright (C) 2005-2008 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; +using MediaPortal.GUI.Library; +using MyContacts.database; +using MyContacts.util; +using MediaPortal.Dialogs; +using System.Collections; +using MyContacts.voip; + +namespace MyContacts +{ + class MyContactsDetail : GUIWindow + { + #region GUI Components + + [SkinControlAttribute(2)] + protected GUIButtonControl btnViewAs = null; + [SkinControlAttribute(3)] + protected GUIButtonControl btnCall = null; + [SkinControlAttribute(52)] + protected GUITextControl txtDetail = null; + + #endregion + + #region Variables + + private Contact _contact = new Contact(); + private View _currentView = View.Home; + enum View : int + { + Home = 1, + Business = 2, + Other = 3 + } + private Section[] _sections = SectionHandler.Instance.getAllSections(); + private int _currentSection = 0; + + #endregion + + public MyContactsDetail() + { + GetID = MyContacts.WINDOW_ID_DETAIL; + Init(); + } + + public Contact ContactObj + { + get { return _contact; } + set { _contact = value; } + } + + private void ShowDetails() + { + string contactDetails = _sections[_currentSection].display(ContactObj); + txtDetail.Label = contactDetails; + } + + #region GUIWindow Members + + public override bool Init() + { + MyLogger.Debug("MyContactsDetail Init()"); + return Load(GUIGraphicsContext.Skin + @"\mycontactsdetail.xml"); + } + + protected override void OnPageLoad() + { + btnViewAs.Label = _sections[_currentSection].Name; + ShowDetails(); + base.OnPageLoad(); + } + + private void Call(string number) + { + //GUIWindowSkype skype = (GUIWindowSkype)GUIWindowManager.GetWindow(109144); + //GUIWindowManager.ActivateWindow(109144); + //skype.CallContact(contactToCall); + + //GUIDialogOK dlg = (GUIDialogOK)GUIWindowManager.GetWindow( + // (int)GUIWindow.Window.WINDOW_DIALOG_OK); + //dlg.SetHeading("Calling..."); + //dlg.SetLine(1, "You are calling " + contactToCall); + //dlg.SetLine(2, "(in future)"); + //dlg.SetLine(3, String.Empty); + //dlg.DoModal(GUIWindowManager.ActiveWindow); + + MyPhoner phoner = new MyPhoner(); + phoner.Call(number); + } + + + protected override void OnClicked(int controlId, GUIControl control, + MediaPortal.GUI.Library.Action.ActionType actionType) + { + if (control == btnViewAs) // view + { + if (_currentSection < (_sections.Length - 1)) + _currentSection++; + else + _currentSection = 0; + + btnViewAs.Label = _sections[_currentSection].Name; + + _currentView = (View)(btnViewAs.SelectedItem + 1); + GUIControl.FocusControl(GetID, controlId); + } + if (control == btnCall) // call + { + //string link = "callto://" + ContactObj.SkypeID; + //MyLogger.Info("callto = " + link); + //System.Diagnostics.Process.Start(link); + + //System.Net.WebRequest req = System.Net.WebRequest.Create(link); + //req.GetResponse(); + + KeyValues phone_numbers = new KeyValues(); + if (ContactObj.AssistantPhone.Length > 0) + phone_numbers.Add(Contact.F_AssistantPhone, ContactObj.AssistantPhone); + if (ContactObj.BusinessMobilePhone.Length > 0) + phone_numbers.Add(Contact.F_BusinessMobilePhone, ContactObj.BusinessMobilePhone); + if (ContactObj.HomePhone.Length > 0) + phone_numbers.Add(Contact.F_HomePhone, ContactObj.HomePhone); + if (ContactObj.HomePhone2.Length > 0) + phone_numbers.Add(Contact.F_HomePhone2, ContactObj.HomePhone2); + if (ContactObj.OtherPhone.Length > 0) + phone_numbers.Add(Contact.F_OtherPhone, ContactObj.OtherPhone); + if (ContactObj.PersonalMobilePhone.Length > 0) + phone_numbers.Add(Contact.F_PersonalMobilePhone, ContactObj.PersonalMobilePhone); + if (ContactObj.WorkPhone.Length > 0) + phone_numbers.Add(Contact.F_WorkPhone, ContactObj.WorkPhone); + if (ContactObj.WorkPhone2.Length > 0) + phone_numbers.Add(Contact.F_WorkPhone2, ContactObj.WorkPhone2); + + GUIDialogMenu dlg1 = (GUIDialogMenu)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_MENU); + dlg1.Reset(); + dlg1.SetHeading("Select number to call"); //TODO i18n + IEnumerator en = phone_numbers.getEnumerator(); + while (en.MoveNext()) + { + DictionaryEntry entry = (DictionaryEntry)en.Current; + dlg1.Add(entry.Key + ": " + entry.Value); + } + dlg1.DoModal(GetID); + + DictionaryEntry selected_entry = (DictionaryEntry)phone_numbers.Collection[dlg1.SelectedId-1]; + + GUIDialogOK dlg = (GUIDialogOK)GUIWindowManager.GetWindow( + (int)GUIWindow.Window.WINDOW_DIALOG_OK); + dlg.SetHeading("Info"); + dlg.SetLine(1, "You are calling " + selected_entry.Value); + dlg.DoModal(GUIWindowManager.ActiveWindow); + + Call(selected_entry.Value.ToString()); + } + ShowDetails(); + base.OnClicked(controlId, control, actionType); + } + + public override bool OnMessage(GUIMessage message) + { + switch (message.Message) + { + case GUIMessage.MessageType.GUI_MSG_WINDOW_INIT: + base.OnMessage(message); + break; + + } + return base.OnMessage(message); + } + #endregion + } +} Added: trunk/plugins/MyContacts/RequestResponse.cs =================================================================== --- trunk/plugins/MyContacts/RequestResponse.cs (rev 0) +++ trunk/plugins/MyContacts/RequestResponse.cs 2008-03-25 08:04:09 UTC (rev 1513) @@ -0,0 +1,160 @@ +#region Copyright (C) 2005-2008 Team MediaPortal + +/* + * Copyright (C) 2005-2008 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; +using MyContacts.database; +using System.Net; +using System.IO; +using MyContacts.commands; + +namespace MyContacts +{ + class RequestResponse + { + public const string NEWLINE = "%0a"; + + private RequestResponse() { } + + /// <summary> + /// removes any newline ("%0a") chunks from the start and the end of the given string + /// </summary> + /// <param name="response"></param> + /// <returns></returns> + public static string TrimNewLine(string response) + { + if (response.StartsWith(NEWLINE)) + response = response.Substring(NEWLINE.Length); + if (response.EndsWith(NEWLINE)) + response = response.Substring(0, response.Length - NEWLINE.Length); + return response; + } + + public static string URL + { + get + { + Options opt = new Options(); + string ret = (string)opt.getValue(Options.PARAM_URL); + opt.Dispose(); + return ret; + } + set + { + Options opt = new Options(); + opt.insertOrUpdate(Options.PARAM_URL, value); + opt.Dispose(); + } + } + + public static string sendRequest(string url) + { + WebResponse response = null; + Stream stream = null; + StreamReader reader = null; + + try + { + MediaPortal.GUI.Library.Log.Debug("MyContacts: send Request(" + url + ")"); + + HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); + + response = request.GetResponse(); + stream = response.GetResponseStream(); + + if (!response.ContentType.ToLower().StartsWith("text/")) + return null; + + string buffer = "", line; + + reader = new StreamReader(stream); + + while ((line = reader.ReadLine()) != null) + { + buffer += line + "\r\n"; + } + + return buffer; + } + catch (WebException e) + { + MediaPortal.GUI.Library.Log.Debug("MyContacts: Can't download:" + e); + return null; + } + catch (IOException e) + { + MediaPortal.GUI.Library.Log.Debug("MyContacts: Can't download:" + e); + return null; + } + finally + { + if (reader != null) + reader.Close(); + + if (stream != null) + stream.Close(); + + if (response != null) + response.Close(); + } + } + + public static string handleResponse(string response) + { + MediaPortal.GUI.Library.Log.Debug("MyContacts: handle response (" + response + ")"); + + string ret = string.Empty; // status message + + response = response.Replace("\r\n", "%0a"); + + /* handle the response header */ + HeaderCommand header = new HeaderCommand(); + header.HandleResponse(ref response); + + /* handle the response status */ + StatusCommand status = new StatusCommand(); + status.HandleResponse(ref response); + if (status.ErrorCode >= 300) + { + ret = status.ErrorMessage; + } + + /* handle the response sync */ + SyncCommand sync = new SyncCommand(); + if (response.Contains(sync.StartTag())) + { + sync.HandleResponse(ref response); + + int recordcount = 0; + foreach (SubCommand sc in sync.SubCommands) + recordcount += sc.Status; + ret = recordcount + " contacts added!"; + } + + return ret; + } + } +} Added: trunk/plugins/MyContacts/_template.cs =================================================================== --- trunk/plugins/MyContacts/_template.cs (rev 0) +++ trunk/plugins/MyContacts/_template.cs 2008-03-25 08:04:09 UTC (rev 1513) @@ -0,0 +1,79 @@ +#region Copyright (C) 2005-2008 Team MediaPortal + +/* + * Copyright (C) 2005-2008 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; + +/// <summary> +/// Summary description for Class1 +/// </summary> +public class Class1 +{ + #region Imports + #endregion + + #region Enums + #endregion + + #region Delegates + #endregion + + #region Events + #endregion + + #region Variables + // Private Variables + // Protected Variables + // Public Variables + #endregion + + #region Constructors/Destructors + + public Class1() + { + + } + + #endregion + + #region Properties + // Public Properties + #endregion + + #region Public Methods + #endregion + + #region Private Methods + #endregion + + #region <Base class> Overloads + #endregion + + #region <Interface> Implementations + // region for each interface + #endregion + + + +} Added: trunk/plugins/MyContacts/mycontacts_structure.xml =================================================================== --- trunk/plugins/MyContacts/mycontacts_structure.xml (rev 0) +++ trunk/plugins/MyContacts/mycontacts_structure.xml 2008-03-25 08:04:09 UTC (rev 1513) @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="utf-8" ?> +<MyContacts> + <settings> + <field name="bullet">- </field> + <field name="tab"> </field> + <field name="seperator">* * * * *</field> + </settings> + <section id="1" name="Privat"> + <line>[FirstName] [LastName]</line> + <line>[HomeAddress]</line> + <line>[HomeAddress2]</line> + <line>[HomeAddress3]</line> + <line>[HomeZipCode] [HomeCity][tab][HomeCountry]</line> + <line>[seperator]</line> + <line>Telefon:</line> + <line>[bullet]privat:[tab][HomePhone]</line> + <line>[bullet]mobil:[tab][BusinessMobilePhone]</line> + <line>[seperator]</line> + <line>Email:</line> + <line>[bullet][BusinessEmail]</line> + <line>[bullet][BusinessEmail2]</line> + <line>[bullet][BusinessEmail3]</line> + <line>[bullet][PersonalEmail]</line> + <line>[bullet][PersonalEmail2]</line> + <line>[bullet][PersonalEmail3]</line> + <line>[seperator]</line> + <line>Skype:[tab][SkypeID]</line> + <line>URL:[tab][PersonalWebPage]</line> + </section> + <section id="2" name="Geschäftlich"> + <line>[FirstName] [LastName]</line> + <line>[JobTitle]</line> + <line>[seperator]</line> + <line>[Company]</line> + <line>[WorkAddress]</line> + <line>[WorkAddress2]</line> + <line>[WorkAddress3]</line> + <line>[WorkZipCode] [WorkCity][tab][WorkCountry]</line> + <line>[seperator]</line> + <line>Telefon:</line> + <line>[bullet][WorkPhone]</line> + <line>[bullet][WorkPhone2]</line> + <line>Fax:</line> + <line>[bullet][WorkFax]</line> + <line>[seperator]</line> + <line>Email:</line> + <line>[bullet][BusinessEmail]</line> + <line>[bullet][BusinessEmail2]</line> + <line>[bullet][BusinessEmail3]</line> + <line>[bullet][PersonalEmail]</line> + <line>[bullet][PersonalEmail2]</line> + <line>[bullet][PersonalEmail3]</line> + <line>[bullet][seperator]</line> + <line>URL:[tab][BusinessWebPage]</line> + </section> + <section id="3" name="Weitere"> + <line>Nickname:[tab][NickName]</line> + <line>Birthday:[tab][Birthday]</line> + <line>[seperator]</line> + <line>Notes:</line> + <line>[Notes]</line> + </section> +</MyContacts> \ No newline at end of file Added: trunk/plugins/MyContacts/readme.txt =================================================================== --- trunk/plugins/MyContacts/readme.txt (rev 0) +++ trunk/plugins/MyContacts/readme.txt 2008-03-25 08:04:09 UTC (rev 1513) @@ -0,0 +1,182 @@ +******************************************************************************** +* * +* Plugin Name: My Contacts * +* Author: TimmyT (htp...@gm...) * +* Version: 0.2.0 * +* Build Date: 2008-03-14 * +* Plugin URL: http://dev.thomasblank.ch/mediaportal/my-contacts-plugin/ * +* * +* Summary: Display your contacts in MediaPortal without having to * +* reenter them manually. Just keep your address book in Plaxo * +* [www.plaxo.com] up-to-date and easily sync your contacts * +* to your MediaPortal. * +* * +******************************************************************************** + + +Description +*********** +A couple of months ago, I started to work on an address book plugin. My goal +was to easily import a variety of existing address books (MS Outlook, +Thunderbird and so on) and display the addresses in MediaPortal. I am a happy +Plaxo! user for some years now and when I found out that Plaxo offers an API, +I decided to create a MediaPortal plugin that synchronizes with a Plaxo account. + +For those of you who have no clou what Plaxo is (I suppose there are some), +Plaxo is a webservice that allows you to share data between different +application and services, such as Microsoft Outlook, Mozilla Thunderbird, Apple +Address Book and many more. Your information are mirrored on a Plaxo server and +all your application can access these information there. For example, I use +Outlook at my office and at home. Thanks to Plaxo, I always have my contacts, +my tasks and my notes synchronized between the two computers. + +Now back to my plugin... Obviously, you need the get a Plaxo account. Check out +the Plaxo website (http://www.plaxo.com) to find out if your favorite PIM +application is supported. If yes, great! You just need to download the +according tool and sync! Minutes later, all your infos are available in your +Plaxo account. If your favorite PIM is not supported - bad luck :-( You could +still use my plugin but you’d have to enter all your addresses through the +webfrontend of plaxo. + +Now when you do have all your contacts in your Plaxo account, you’re ready to +start with this plugin. Simply donwload and install the plugin and go to +configuration to set up your account. + +One more thing to say. Even though I talk about "synchronisation", it’s +actually just a one-way process. Everytime a sync is performed, the local +database will be deleted and all your contacts will be reimported. And for now, +this process is done manually through the configuration form only. Maybe in +future, this procedure can be triggered from within the mediaportal gui or do +even automatic syncs, but hey, this is just the first release... leave me some +room for improvement here ;-) + + +Installation +************ +- Just unpack the zip file and copy the folders "skin" and "plugins" to your + MediaPortal root directoy (c:\program files\team mediaportal\mediaportal) +- Start MediaPortal configuration and activate the plugin +- Enter the configuration for this plugin (details see below) + + +Configuration +************* +In the configuration form, enter your Plaxo username (email-address) and your +password. Press save and hit the sync button. Depending on the number of +contacts, this process takes a while, sometimes up to a minute, so be +patient ;-). You can also change the name of the plugin. + +After a successful sync, you can browse your contacts from within the +configuration form. Simple hit the "browse contacts" button and a very +rudimental form shows your contacts. You can delete some contacts if you wish to +(delete is just local, it won’t affect your contacts at Plaxo). Also you can see +the field names of your contact details. For example, the "Mobile Phone" field +in outlook is available in the "BusinessMobilePhone" field in Plaxo. You’ll +probably need the field names if you personalize your views (see below). + + +Release Notes +************* +v 0.2.0 (2008-03-14) +- first release + + +More details below... + + + +Configuration part II +********************* +The second part you can configure are the different views. Open the xml-file +"plugins\Windows\MyContacts\mycontacts_structure.xml" and you’ll see a +structure like this: + +<?xml version="1.0" encoding="utf-8" ?> +<MyContacts> +<settings> +<field name="bullet">- </field> +<field name="tab"> </field> +<field name="seperator">* * * * *</field> +</settings> + +<section id="1" name="Home"> +<line>[FirstName] [LastName]</line> +<line>[HomeAddress]</line> +<line>[HomeAddress2]</line> +<line>[HomeAddress3]</line> +<line>[HomeZipCode] [HomeCity][tab][HomeCountry]</line> +<line>[seperator]</line> +<line>Phone:</line> +<line>[bullet]private:[tab][HomePhone]</line> +<line>[bullet]mobile:[tab][BusinessMobilePhone]</line> +<line>Email:</line> +<line>[bullet][PersonalEmail]</line> +<line>[seperator]</line> +<line>Skype:[tab][SkypeID]</line> +<line>URL:[tab][PersonalWebPage]</line> +</section> + +<section id="2" name="Business"> +<line>[FirstName] [LastName]</line> +<line>[JobTitle]</line> +<line>[seperator]</line> +<line>[Company]</line> +<line>[WorkAddress]</line> +<line>[WorkAddress2]</line> +<line>[WorkAddress3]</line> +<line>[WorkZipCode] [WorkCity][tab][WorkCountry]</line> +<line>[seperator]</line> +<line>Telefon:</line> +<line>[bullet][WorkPhone]</line> +<line>[bullet][WorkPhone2]</line> +<line>Fax:</line> +<line>[bullet][WorkFax]</line> +<line>[seperator]</line> +<line>Email:</line> +<line>[bullet][BusinessEmail]</line> +<line>[bullet][seperator]</line> +<line>URL:[tab][BusinessWebPage]</line> +</section> + +<section id="3" name="Other"> +<line>Nickname:[tab][NickName]</line> +<line>Birthday:[tab][Birthday]</line> +<line>[seperator]</line> +<line>Notes:</line> +<line>[Notes]</line> +</section> +</MyContacts> + +As you can see, there are three different sections defined (you don’t have to +stick to this, you can define just two or even 6 sections - up to you). All +information that you define in one section are diplayed in a seperate window. +There are three settings (bullet, tab, seperator) that you can assign a +personalized value to. All fields must be in square brackets []. The name of the +sections (here Home, Business and Other) are variable and can be renamed. +They’re displayed in MediaPortal as labels of the switch buttons. + + +Photos +****** +Maybe you’ll notice that some of your contacts have photos (in thumbnail view), +but most of them probably don’t. Plaxo only shows photos of your contacts which +are Plaxo members themself. Unfortunately Plaxo doesn’t allow you to manually +assign photos to your contacts. So right now, the only way to get photos of +everybody is to persuade them to become a Plaxo member. + + +Known bugs +********** +Once you’ve entered your username/password in configuration form and hit the +button “save”, you cannot alter them anymore. You’ll have to hit “clear” first +and re-enter the values. + + +Limitations +*********** +Maybe you have more than one contact folder in P... [truncated message content] |