From: <do...@us...> - 2009-01-08 12:26:08
|
Revision: 2498 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=2498&view=rev Author: dot-i Date: 2009-01-08 12:01:05 +0000 (Thu, 08 Jan 2009) Log Message: ----------- Updated to version 1.3.1.0. Modified Paths: -------------- trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/ForTheRecord.RecorderTuners.MediaPortalTvServer.csproj trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/MediaPortalRecorderTunerService.cs trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/RecordingThread.cs trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/SettingName.cs trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/SetupForm.Designer.cs trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/SetupForm.cs trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/SyncEpgThread.cs trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/Utility.cs trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/ActiveRecordings.cs trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/ChannelNavigator.cs trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/ForTheRecord.UI.MediaPortal.csproj trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/ForTheRecordHome.cs trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/SetupForm.Designer.cs trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/TextId.cs trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/TvFullScreen.cs trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/TvGuide.cs trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/TvGuideBase.cs trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/TvGuideSearch.cs trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/TvMiniGuide.cs trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/TvOSD.cs trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/TvProgramInfo.cs trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/TvRecorded.cs trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/UpcomingPrograms.cs trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/Utility.cs trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/language/fortherecord_de.xml trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/language/fortherecord_nl.xml trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Blue3/4TR_Active.xml trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Blue3/4TR_Home.xml trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Blue3/4TR_ProgramInfo.xml trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Blue3/4TR_RecordedTv.xml trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Blue3/4TR_TvGuideSearch.xml trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Blue3/4TR_Upcoming.xml trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/BlueTwo/4TR_Home.xml trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/BlueTwo wide/4TR_Home.xml trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Indigo/4TR_Home.xml trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Monochrome/4TR_Home.xml trunk/plugins/ForTheRecord/ForTheRecord.UI.Process/ForTheRecord.UI.Process.csproj trunk/plugins/ForTheRecord/ForTheRecord.UI.Process/ProcessUtility.cs trunk/plugins/ForTheRecord/ForTheRecord.UI.Process/SortableBindingList.cs trunk/plugins/ForTheRecord/ForTheRecord.UI.Process/TvChannelProgramsList.cs trunk/plugins/ForTheRecord/ForTheRecord.UI.Process/TvGuide/TvGuideController.cs trunk/plugins/ForTheRecord/ForTheRecord.UI.Process/TvGuide/TvGuideModel.cs trunk/plugins/ForTheRecord/ForTheRecord.UI.Process/UpcomingGuideProgramsDictionary.cs trunk/plugins/ForTheRecord/ReferencedAssemblies/Core.dll trunk/plugins/ForTheRecord/ReferencedAssemblies/Databases.dll trunk/plugins/ForTheRecord/ReferencedAssemblies/Dialogs.dll trunk/plugins/ForTheRecord/ReferencedAssemblies/ForTheRecord.Entities.dll trunk/plugins/ForTheRecord/ReferencedAssemblies/ForTheRecord.RecorderTuners.Common.dll trunk/plugins/ForTheRecord/ReferencedAssemblies/ForTheRecord.ServiceAgents.dll trunk/plugins/ForTheRecord/ReferencedAssemblies/ForTheRecord.ServiceContracts.dll trunk/plugins/ForTheRecord/ReferencedAssemblies/PluginBase.dll trunk/plugins/ForTheRecord/ReferencedAssemblies/SetupControls.dll trunk/plugins/ForTheRecord/ReferencedAssemblies/TVDatabase.dll trunk/plugins/ForTheRecord/ReferencedAssemblies/TvBusinessLayer.dll trunk/plugins/ForTheRecord/ReferencedAssemblies/TvControl.dll trunk/plugins/ForTheRecord/ReferencedAssemblies/TvLibrary.Interfaces.dll trunk/plugins/ForTheRecord/ReferencedAssemblies/Utils.dll Added Paths: ----------- trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/Channels/ trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/Channels/ChannelLink.cs trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/Channels/ChannelLinks.cs trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/Channels/LinkedMediaPortalChannel.cs trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/CreateChannelLinkForm.Designer.cs trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/CreateChannelLinkForm.cs trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/CreateChannelLinkForm.resx trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/TvRecordingOverlay.cs trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/language/fortherecord_sv.xml trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Aeon wide/ trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Aeon wide/4TR_Active.xml trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Aeon wide/4TR_Home.xml trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Aeon wide/4TR_ProgramInfo.xml trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Aeon wide/4TR_RecordedTv.xml trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Aeon wide/4TR_TvGuideSearch.xml trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Aeon wide/4TR_Upcoming.xml trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Aeon wide/Media/ trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Aeon wide/Media/4TR_Alert.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Aeon wide/Media/4TR_AlertCancelled.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Aeon wide/Media/4TR_AlertSeries.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Aeon wide/Media/4TR_AlertSeriesCancelled.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Aeon wide/Media/4TR_Recording.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Aeon wide/Media/4TR_RecordingCancelled.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Aeon wide/Media/4TR_RecordingCancelledHistory.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Aeon wide/Media/4TR_RecordingInConflict.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Aeon wide/Media/4TR_RecordingSeries.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Aeon wide/Media/4TR_RecordingSeriesCancelled.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Aeon wide/Media/4TR_RecordingSeriesCancelledHistory.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Aeon wide/Media/4TR_RecordingSeriesInConflict.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Aeon wide/Media/4TR_RecordingSeriesWithWarning.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Aeon wide/Media/4TR_RecordingWithWarning.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Aeon wide/Media/4TR_Suggestion.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Aeon wide/Media/4TR_SuggestionCancelled.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Aeon wide/Media/4TR_SuggestionSeries.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Aeon wide/Media/4TR_SuggestionSeriesCancelled.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Aeon wide/Media/togglebutton-off-focus.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Aeon wide/Media/togglebutton-off-nofocus.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Aeon wide/Media/togglebutton-on-focus.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Aeon wide/Media/togglebutton-on-nofocus.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Aeon wide/common.window.short.xml trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Blue3wide/ trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Blue3wide/4TR_Active.xml trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Blue3wide/4TR_Home.xml trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Blue3wide/4TR_ProgramInfo.xml trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Blue3wide/4TR_RecordedTv.xml trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Blue3wide/4TR_TvGuideSearch.xml trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Blue3wide/4TR_Upcoming.xml trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Blue3wide/Media/ trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Blue3wide/Media/4TR_Alert.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Blue3wide/Media/4TR_AlertCancelled.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Blue3wide/Media/4TR_AlertSeries.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Blue3wide/Media/4TR_AlertSeriesCancelled.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Blue3wide/Media/4TR_Recording.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Blue3wide/Media/4TR_RecordingCancelled.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Blue3wide/Media/4TR_RecordingCancelledHistory.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Blue3wide/Media/4TR_RecordingInConflict.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Blue3wide/Media/4TR_RecordingSeries.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Blue3wide/Media/4TR_RecordingSeriesCancelled.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Blue3wide/Media/4TR_RecordingSeriesCancelledHistory.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Blue3wide/Media/4TR_RecordingSeriesInConflict.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Blue3wide/Media/4TR_RecordingSeriesWithWarning.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Blue3wide/Media/4TR_RecordingWithWarning.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Blue3wide/Media/4TR_Suggestion.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Blue3wide/Media/4TR_SuggestionCancelled.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Blue3wide/Media/4TR_SuggestionSeries.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Blue3wide/Media/4TR_SuggestionSeriesCancelled.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/BlueTwo/4TR_TvGuideSearch.xml trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/BlueTwo/Media/4TR_RecordingCancelledHistory.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/BlueTwo/Media/4TR_RecordingSeriesCancelledHistory.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/BlueTwo wide/Media/4TR_RecordingCancelledHistory.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/BlueTwo wide/Media/4TR_RecordingSeriesCancelledHistory.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Indigo/4TR_TvGuideSearch.xml trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Indigo/Media/4TR_RecordingCancelledHistory.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Indigo/Media/4TR_RecordingSeriesCancelledHistory.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Monochrome/4TR_TvGuideSearch.xml trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Monochrome/Media/4TR_RecordingCancelledHistory.png trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Monochrome/Media/4TR_RecordingSeriesCancelledHistory.png trunk/plugins/ForTheRecord/ForTheRecord.UI.Process/UpcomingOrActiveProgramView.cs trunk/plugins/ForTheRecord/ForTheRecord.UI.Process/UpcomingOrActiveProgramsList.cs Removed Paths: ------------- trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Blue3/4TR_RecordedTvInfo.xml trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Blue3/4TR_TvGuide.xml trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/BlueTwo/4TR_RecordedTvInfo.xml trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/BlueTwo/4TR_TvGuide.xml trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/BlueTwo wide/4TR_RecordedTvInfo.xml trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/BlueTwo wide/4TR_TvGuide.xml trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Indigo/4TR_RecordedTvInfo.xml trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Indigo/4TR_TvGuide.xml trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Monochrome/4TR_RecordedTvInfo.xml trunk/plugins/ForTheRecord/ForTheRecord.UI.MediaPortal/skin/Monochrome/4TR_TvGuide.xml trunk/plugins/ForTheRecord/ForTheRecord.UI.Process/UpcomingProgramView.cs trunk/plugins/ForTheRecord/ForTheRecord.UI.Process/UpcomingProgramsList.cs Added: trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/Channels/ChannelLink.cs =================================================================== --- trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/Channels/ChannelLink.cs (rev 0) +++ trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/Channels/ChannelLink.cs 2009-01-08 12:01:05 UTC (rev 2498) @@ -0,0 +1,84 @@ +/* + * Copyright (C) 2007-2008 ForTheRecord + * http://www.4therecord.eu + * + * 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 + * + */ +using System; +using System.Collections.Generic; +using System.Text; +using System.Xml.XPath; +using System.Xml; + +namespace ForTheRecord.RecorderTuners.MediaPortalTvServer.Channels +{ + internal class ChannelLink + { + public ChannelLink(Guid tvChannelId, string tvChannelName, int mpChannelId, string mpChannelName) + { + this.TvChannelId = tvChannelId; + this.TvChannelName = tvChannelName; + this.MPChannelId = mpChannelId; + this.MPChannelName = mpChannelName; + } + + public static ChannelLink Parse(XPathNavigator navigator) + { + ChannelLink result = null; + Guid tvChannelId = Guid.Empty; + string id = navigator.GetAttribute("id", String.Empty); + if (!String.IsNullOrEmpty(id)) + { + tvChannelId = new Guid(id); + } + int mpChannelId = -1; + string mpId = navigator.GetAttribute("mpId", String.Empty); + if (!String.IsNullOrEmpty(id)) + { + mpChannelId = Int32.Parse(mpId); + } + if (tvChannelId != Guid.Empty + && mpChannelId >= 0) + { + string tvChannelName = navigator.GetAttribute("name", String.Empty); + string mpChannelName = navigator.GetAttribute("mpName", String.Empty); + result = new ChannelLink(tvChannelId, tvChannelName, mpChannelId, mpChannelName); + } + return result; + } + + public void WriteToXml(XmlTextWriter xmlWriter) + { + xmlWriter.WriteStartElement("link"); + xmlWriter.WriteAttributeString("id", this.TvChannelId.ToString()); + xmlWriter.WriteAttributeString("name", this.TvChannelName.ToString()); + xmlWriter.WriteAttributeString("mpId", this.MPChannelId.ToString()); + xmlWriter.WriteAttributeString("mpName", this.MPChannelName.ToString()); + xmlWriter.WriteEndElement(); + } + + public Guid TvChannelId { get; set; } + + public string TvChannelName { get; set; } + + public int MPChannelId { get; set; } + + public string MPChannelName { get; set; } + + public string MPChannelDisplayName { get; set; } + } +} Added: trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/Channels/ChannelLinks.cs =================================================================== --- trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/Channels/ChannelLinks.cs (rev 0) +++ trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/Channels/ChannelLinks.cs 2009-01-08 12:01:05 UTC (rev 2498) @@ -0,0 +1,224 @@ +/* + * Copyright (C) 2007-2008 ForTheRecord + * http://www.4therecord.eu + * + * 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 + * + */ +using System; +using System.Collections.Generic; +using System.IO; +using System.Xml.XPath; +using System.Xml; +using System.Collections; +using System.Text; + +using TvDatabase; + +using ForTheRecord.Entities; +using Gentle.Framework; + +namespace ForTheRecord.RecorderTuners.MediaPortalTvServer.Channels +{ + internal class ChannelLinks + { + private Dictionary<Guid, ChannelLink> _linksById = new Dictionary<Guid, ChannelLink>(); + + private ChannelLinks() + { + Load(); + } + + public static ChannelLinks LoadChannelLinks() + { + return new ChannelLinks(); + } + + public LinkedMediaPortalChannel GetLinkedMediaPortalChannel(TvChannel tvChannel) + { + bool isAutoLinked; + bool duplicateChannelsFound; + return GetLinkedMediaPortalChannel(tvChannel, out isAutoLinked, out duplicateChannelsFound); + } + + public LinkedMediaPortalChannel GetLinkedMediaPortalChannel(Guid tvChannelId, string displayName) + { + bool isAutoLinked; + bool duplicateChannelsFound; + return GetLinkedMediaPortalChannel(tvChannelId, displayName, out isAutoLinked, out duplicateChannelsFound); + } + + public LinkedMediaPortalChannel GetLinkedMediaPortalChannel(TvChannel tvChannel, out bool isAutoLinked, out bool duplicateChannelsFound) + { + return GetLinkedMediaPortalChannel(tvChannel.TvChannelId, tvChannel.DisplayName, out isAutoLinked, out duplicateChannelsFound); + } + + public LinkedMediaPortalChannel GetLinkedMediaPortalChannel(Guid tvChannelId, string displayName, out bool isAutoLinked, out bool duplicateChannelsFound) + { + isAutoLinked = false; + duplicateChannelsFound = false; + + if (_linksById.ContainsKey(tvChannelId)) + { + ChannelLink link = _linksById[tvChannelId]; + return new LinkedMediaPortalChannel(link.MPChannelId, link.MPChannelName, link.MPChannelDisplayName); + } + + Channel channel = GetChannelByDisplayName(displayName, out duplicateChannelsFound); + if (channel != null) + { + isAutoLinked = true; + return new LinkedMediaPortalChannel(channel.IdChannel, channel.Name, channel.DisplayName); + } + + return null; + } + + public void SetLinkedMediaPortalChannel(TvChannel tvChannel, Channel mpChannel) + { + ClearLinkedMediaPortalChannel(tvChannel); + ChannelLink link = new ChannelLink(tvChannel.TvChannelId, tvChannel.DisplayName, mpChannel.IdChannel, mpChannel.Name); + link.MPChannelDisplayName = mpChannel.DisplayName; + _linksById.Add(link.TvChannelId, link); + } + + public void ClearLinkedMediaPortalChannel(TvChannel tvChannel) + { + if (_linksById.ContainsKey(tvChannel.TvChannelId)) + { + _linksById.Remove(tvChannel.TvChannelId); + } + } + + public ChannelLink GetChannelLinkForMediaPortalChannel(Channel channel) + { + foreach (ChannelLink link in _linksById.Values) + { + if (link.MPChannelId == channel.IdChannel + && link.MPChannelName == channel.Name) + { + return link; + } + } + return null; + } + + #region Serialization + + private string SettingsFileName + { + get + { + return Path.Combine( + Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "For The Record"), + "MediaPortalTvServer.Channels.config"); + } + } + + private void Load() + { + _linksById.Clear(); + string settingsFileName = this.SettingsFileName; + if (File.Exists(settingsFileName)) + { + using (StreamReader reader = new StreamReader(settingsFileName, Encoding.UTF8)) + { + XPathDocument xpathDocument = new XPathDocument(reader); + XPathNavigator navigator = xpathDocument.CreateNavigator(); + XPathNodeIterator iterator = navigator.Select("/links/link"); + while (iterator.MoveNext()) + { + ChannelLink link = ChannelLink.Parse(iterator.Current); + if (link != null) + { + Channel channel = GetChannelById(link.MPChannelId); + if (channel == null + || channel.Name != link.MPChannelName) + { + channel = GetChannelByName(link.MPChannelName); + } + if (channel != null) + { + link.MPChannelDisplayName = channel.DisplayName; + _linksById.Add(link.TvChannelId, link); + } + } + } + } + } + } + + public void Save() + { + string settingsFileName = this.SettingsFileName; + string settingsDirName = Path.GetDirectoryName(settingsFileName); + if (!Directory.Exists(settingsDirName)) + { + Directory.CreateDirectory(settingsDirName); + } + using (XmlTextWriter xmlWriter = new XmlTextWriter(this.SettingsFileName, Encoding.UTF8)) + { + xmlWriter.Formatting = Formatting.Indented; + xmlWriter.WriteStartDocument(); + xmlWriter.WriteStartElement("links"); + foreach (ChannelLink link in _linksById.Values) + { + link.WriteToXml(xmlWriter); + } + xmlWriter.WriteEndElement(); + } + } + + #endregion + + #region Private Methods + + private Channel GetChannelByDisplayName(string displayName, out bool duplicateChannelsFound) + { + return InternalGetChannelBy("displayName", displayName, out duplicateChannelsFound); + } + + private Channel GetChannelById(int id) + { + bool duplicateChannelsFound; + return InternalGetChannelBy("idChannel", id, out duplicateChannelsFound); + } + + private Channel GetChannelByName(string name) + { + bool duplicateChannelsFound; + return InternalGetChannelBy("name", name, out duplicateChannelsFound); + } + + private Channel InternalGetChannelBy(string columnName, object value, out bool duplicateChannelsFound) + { + SqlBuilder sb = new SqlBuilder(StatementType.Select, typeof(Channel)); + sb.AddConstraint(Operator.Equals, columnName, value); + sb.AddConstraint(Operator.Equals, "visibleInGuide", true); + SqlResult result = Broker.Execute(sb.GetStatement()); + if (result.Rows.Count == 1) + { + duplicateChannelsFound = false; + IList channels = ObjectFactory.GetCollection(typeof(Channel), result); + return channels[0] as Channel; + } + duplicateChannelsFound = (result.Rows.Count > 0); + return null; + } + + #endregion + } +} Added: trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/Channels/LinkedMediaPortalChannel.cs =================================================================== --- trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/Channels/LinkedMediaPortalChannel.cs (rev 0) +++ trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/Channels/LinkedMediaPortalChannel.cs 2009-01-08 12:01:05 UTC (rev 2498) @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2007-2008 ForTheRecord + * http://www.4therecord.eu + * + * 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 + * + */ +using System; +using System.Collections.Generic; +using System.Text; + +namespace ForTheRecord.RecorderTuners.MediaPortalTvServer.Channels +{ + internal class LinkedMediaPortalChannel + { + public LinkedMediaPortalChannel(int id, string name, string displayName) + { + this.Id = id; + this.Name = name; + this.DisplayName = displayName; + } + + public int Id { get; set; } + public string Name { get; set; } + public string DisplayName { get; set; } + } +} Added: trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/CreateChannelLinkForm.Designer.cs =================================================================== --- trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/CreateChannelLinkForm.Designer.cs (rev 0) +++ trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/CreateChannelLinkForm.Designer.cs 2009-01-08 12:01:05 UTC (rev 2498) @@ -0,0 +1,212 @@ +namespace ForTheRecord.RecorderTuners.MediaPortalTvServer +{ + partial class CreateChannelLinkForm + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this._channelLabel = new System.Windows.Forms.Label(); + this._channelNameLabel = new System.Windows.Forms.Label(); + this._linkLabel = new System.Windows.Forms.Label(); + this._okButton = new System.Windows.Forms.Button(); + this._cancelButton = new System.Windows.Forms.Button(); + this._clearLinkButton = new System.Windows.Forms.Button(); + this._groupsBindingSource = new System.Windows.Forms.BindingSource(this.components); + this._channelsBindingSource = new System.Windows.Forms.BindingSource(this.components); + this._groupsListView = new System.Windows.Forms.ListView(); + this._groupNameColumn = new System.Windows.Forms.ColumnHeader(); + this._lvImageList = new System.Windows.Forms.ImageList(this.components); + this._channelsListView = new System.Windows.Forms.ListView(); + this._channelNameColumn = new System.Windows.Forms.ColumnHeader(); + ((System.ComponentModel.ISupportInitialize)(this._groupsBindingSource)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this._channelsBindingSource)).BeginInit(); + this.SuspendLayout(); + // + // _channelLabel + // + this._channelLabel.AutoSize = true; + this._channelLabel.Location = new System.Drawing.Point(12, 15); + this._channelLabel.Name = "_channelLabel"; + this._channelLabel.Size = new System.Drawing.Size(49, 13); + this._channelLabel.TabIndex = 0; + this._channelLabel.Text = "Channel:"; + // + // _channelNameLabel + // + this._channelNameLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this._channelNameLabel.AutoEllipsis = true; + this._channelNameLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this._channelNameLabel.Location = new System.Drawing.Point(67, 15); + this._channelNameLabel.Name = "_channelNameLabel"; + this._channelNameLabel.Size = new System.Drawing.Size(365, 20); + this._channelNameLabel.TabIndex = 1; + // + // _linkLabel + // + this._linkLabel.AutoSize = true; + this._linkLabel.Location = new System.Drawing.Point(12, 41); + this._linkLabel.Name = "_linkLabel"; + this._linkLabel.Size = new System.Drawing.Size(42, 13); + this._linkLabel.TabIndex = 2; + this._linkLabel.Text = "Link to:"; + // + // _okButton + // + this._okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this._okButton.Location = new System.Drawing.Point(165, 327); + this._okButton.Name = "_okButton"; + this._okButton.Size = new System.Drawing.Size(85, 23); + this._okButton.TabIndex = 4; + this._okButton.Text = "OK"; + this._okButton.UseVisualStyleBackColor = true; + this._okButton.Click += new System.EventHandler(this._okButton_Click); + // + // _cancelButton + // + this._cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this._cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this._cancelButton.Location = new System.Drawing.Point(347, 327); + this._cancelButton.Name = "_cancelButton"; + this._cancelButton.Size = new System.Drawing.Size(85, 23); + this._cancelButton.TabIndex = 5; + this._cancelButton.Text = "Cancel"; + this._cancelButton.UseVisualStyleBackColor = true; + // + // _clearLinkButton + // + this._clearLinkButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this._clearLinkButton.Location = new System.Drawing.Point(256, 327); + this._clearLinkButton.Name = "_clearLinkButton"; + this._clearLinkButton.Size = new System.Drawing.Size(85, 23); + this._clearLinkButton.TabIndex = 8; + this._clearLinkButton.Text = "Remove Link"; + this._clearLinkButton.UseVisualStyleBackColor = true; + this._clearLinkButton.Click += new System.EventHandler(this._clearLinkButton_Click); + // + // _groupsListView + // + this._groupsListView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this._groupsListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this._groupNameColumn}); + this._groupsListView.FullRowSelect = true; + this._groupsListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; + this._groupsListView.HideSelection = false; + this._groupsListView.Location = new System.Drawing.Point(67, 38); + this._groupsListView.MultiSelect = false; + this._groupsListView.Name = "_groupsListView"; + this._groupsListView.Size = new System.Drawing.Size(365, 104); + this._groupsListView.SmallImageList = this._lvImageList; + this._groupsListView.TabIndex = 11; + this._groupsListView.UseCompatibleStateImageBehavior = false; + this._groupsListView.View = System.Windows.Forms.View.Details; + this._groupsListView.SelectedIndexChanged += new System.EventHandler(this._groupNameListView_SelectedIndexChanged); + // + // _groupNameColumn + // + this._groupNameColumn.Text = "Channel Group"; + this._groupNameColumn.Width = 340; + // + // _lvImageList + // + this._lvImageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit; + this._lvImageList.ImageSize = new System.Drawing.Size(1, 18); + this._lvImageList.TransparentColor = System.Drawing.Color.Transparent; + // + // _channelsListView + // + this._channelsListView.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._channelsListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this._channelNameColumn}); + this._channelsListView.FullRowSelect = true; + this._channelsListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; + this._channelsListView.HideSelection = false; + this._channelsListView.Location = new System.Drawing.Point(67, 148); + this._channelsListView.MultiSelect = false; + this._channelsListView.Name = "_channelsListView"; + this._channelsListView.Size = new System.Drawing.Size(365, 161); + this._channelsListView.SmallImageList = this._lvImageList; + this._channelsListView.TabIndex = 12; + this._channelsListView.UseCompatibleStateImageBehavior = false; + this._channelsListView.View = System.Windows.Forms.View.Details; + this._channelsListView.DoubleClick += new System.EventHandler(this._channelsListView_DoubleClick); + // + // _channelNameColumn + // + this._channelNameColumn.Text = "MediaPortal Channel"; + this._channelNameColumn.Width = 340; + // + // CreateChannelLinkForm + // + this.AcceptButton = this._okButton; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this._cancelButton; + this.ClientSize = new System.Drawing.Size(444, 359); + this.Controls.Add(this._clearLinkButton); + this.Controls.Add(this._cancelButton); + this.Controls.Add(this._okButton); + this.Controls.Add(this._linkLabel); + this.Controls.Add(this._channelNameLabel); + this.Controls.Add(this._channelLabel); + this.Controls.Add(this._groupsListView); + this.Controls.Add(this._channelsListView); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "CreateChannelLinkForm"; + this.ShowIcon = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; + this.Text = "Create Channel Link"; + this.Load += new System.EventHandler(this.CreateShareForm_Load); + ((System.ComponentModel.ISupportInitialize)(this._groupsBindingSource)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this._channelsBindingSource)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label _channelLabel; + private System.Windows.Forms.Label _channelNameLabel; + private System.Windows.Forms.Label _linkLabel; + private System.Windows.Forms.Button _okButton; + private System.Windows.Forms.Button _cancelButton; + private System.Windows.Forms.Button _clearLinkButton; + private System.Windows.Forms.BindingSource _groupsBindingSource; + private System.Windows.Forms.BindingSource _channelsBindingSource; + private System.Windows.Forms.ListView _groupsListView; + private System.Windows.Forms.ColumnHeader _groupNameColumn; + private System.Windows.Forms.ListView _channelsListView; + private System.Windows.Forms.ColumnHeader _channelNameColumn; + private System.Windows.Forms.ImageList _lvImageList; + } +} \ No newline at end of file Added: trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/CreateChannelLinkForm.cs =================================================================== --- trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/CreateChannelLinkForm.cs (rev 0) +++ trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/CreateChannelLinkForm.cs 2009-01-08 12:01:05 UTC (rev 2498) @@ -0,0 +1,200 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +using TvDatabase; +using Gentle.Framework; + +using ForTheRecord.Entities; +using ForTheRecord.RecorderTuners.MediaPortalTvServer.Channels; + +namespace ForTheRecord.RecorderTuners.MediaPortalTvServer +{ + public partial class CreateChannelLinkForm : Form + { + public CreateChannelLinkForm() + { + InitializeComponent(); + } + + internal ChannelLinks ChannelLinks { set; get; } + + internal TvChannel TvChannel { set; get; } + + private void CreateShareForm_Load(object sender, EventArgs e) + { + _channelNameLabel.Text = this.TvChannel.DisplayName; + LoadGroups(); + + LinkedMediaPortalChannel linkedChannel = this.ChannelLinks.GetLinkedMediaPortalChannel(this.TvChannel); + if (linkedChannel != null) + { + SqlBuilder sb = new SqlBuilder(StatementType.Select, typeof(GroupMap)); + sb.AddConstraint(Operator.Equals, "idChannel", linkedChannel.Id); + SqlResult result = Broker.Execute(sb.GetStatement()); + List<GroupMap> groupMaps = (List<GroupMap>) + ObjectFactory.GetCollection(typeof(GroupMap), result, new List<GroupMap>()); + if (groupMaps.Count > 0) + { + foreach (ListViewItem item in _groupsListView.Items) + { + ChannelGroup channelGroup = item.Tag as ChannelGroup; + if (channelGroup.IdGroup == groupMaps[0].IdGroup) + { + item.Selected = true; + _groupsListView.EnsureVisible(item.Index); + break; + } + else + { + item.Selected = false; + } + } + + foreach (ListViewItem item in _channelsListView.Items) + { + ChannelItem channelItem = item.Tag as ChannelItem; + if (channelItem.Channel.IdChannel == linkedChannel.Id) + { + item.Selected = true; + _channelsListView.EnsureVisible(item.Index); + break; + } + else + { + item.Selected = false; + } + } + } + } + } + + private void LoadGroups() + { + SqlBuilder sb = new SqlBuilder(StatementType.Select, typeof(ChannelGroup)); + sb.AddOrderByField("groupName"); + SqlResult result = Broker.Execute(sb.GetStatement()); + List<ChannelGroup> channelGroups = (List<ChannelGroup>) + ObjectFactory.GetCollection(typeof(ChannelGroup), result, new List<ChannelGroup>()); + _groupsListView.Items.Clear(); + foreach (ChannelGroup channelGroup in channelGroups) + { + ListViewItem item = new ListViewItem(channelGroup.GroupName); + item.Tag = channelGroup; + _groupsListView.Items.Add(item); + } + ListViewItem allItem = new ListViewItem("All Channels"); + allItem.Tag = null; + _groupsListView.Items.Add(allItem); + } + + private void _okButton_Click(object sender, EventArgs e) + { + if (_channelsListView.SelectedItems.Count > 0) + { + ChannelItem channelItem = _channelsListView.SelectedItems[0].Tag as ChannelItem; + this.ChannelLinks.SetLinkedMediaPortalChannel(this.TvChannel, channelItem.Channel); + } + else + { + this.ChannelLinks.ClearLinkedMediaPortalChannel(this.TvChannel); + } + this.DialogResult = DialogResult.OK; + this.Close(); + } + + private void _clearLinkButton_Click(object sender, EventArgs e) + { + this.ChannelLinks.ClearLinkedMediaPortalChannel(this.TvChannel); + this.DialogResult = DialogResult.OK; + this.Close(); + } + + private void _channelsListView_DoubleClick(object sender, EventArgs e) + { + if (_channelsListView.SelectedItems.Count > 0) + { + _okButton_Click(this, EventArgs.Empty); + } + } + + private void _groupNameListView_SelectedIndexChanged(object sender, EventArgs e) + { + if (_groupsListView.SelectedItems.Count > 0) + { + ChannelGroup group = _groupsListView.SelectedItems[0].Tag as ChannelGroup; + + List<ChannelItem> channelItems = new List<ChannelItem>(); + if (group == null) + { + SqlBuilder sb = new SqlBuilder(StatementType.Select, typeof(Channel)); + sb.AddConstraint(Operator.Equals, "visibleInGuide", true); + sb.AddOrderByField("displayName"); + SqlResult result = Broker.Execute(sb.GetStatement()); + List<Channel> channels = (List<Channel>)ObjectFactory.GetCollection(typeof(Channel), result, new List<Channel>()); + foreach(Channel channel in channels) + { + channelItems.Add(new ChannelItem(channel)); + } + } + else + { + SqlBuilder sb = new SqlBuilder(StatementType.Select, typeof(GroupMap)); + sb.AddConstraint(Operator.Equals, "idGroup", group.IdGroup); + SqlResult result = Broker.Execute(sb.GetStatement()); + List<GroupMap> groupMaps = (List<GroupMap>) + ObjectFactory.GetCollection(typeof(GroupMap), result, new List<GroupMap>()); + + foreach (GroupMap groupMap in groupMaps) + { + channelItems.Add(new ChannelItem(groupMap.ReferencedChannel())); + } + channelItems.Sort( + delegate(ChannelItem c1, ChannelItem c2) { return c1.Channel.DisplayName.CompareTo(c2.Channel.DisplayName); }); + } + + _channelsListView.Items.Clear(); + foreach (ChannelItem channelItem in channelItems) + { + ListViewItem item = new ListViewItem(channelItem.ChannelName); + item.Tag = channelItem; + _channelsListView.Items.Add(item); + } + } + else + { + _channelsListView.Items.Clear(); + } + } + + private class ChannelItem + { + private Channel _channel; + + public ChannelItem(Channel channel) + { + _channel = channel; + } + + public Channel Channel + { + get { return _channel; } + } + + public string ChannelName + { + get + { + if (String.Equals(_channel.DisplayName, _channel.Name)) + { + return _channel.DisplayName; + } + return _channel.DisplayName + " (" + _channel.Name + ")"; + } + } + } + } +} Added: trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/CreateChannelLinkForm.resx =================================================================== --- trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/CreateChannelLinkForm.resx (rev 0) +++ trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/CreateChannelLinkForm.resx 2009-01-08 12:01:05 UTC (rev 2498) @@ -0,0 +1,129 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="_groupsBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="_channelsBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>191, 17</value> + </metadata> + <metadata name="_lvImageList.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>374, 17</value> + </metadata> +</root> \ No newline at end of file Modified: trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/ForTheRecord.RecorderTuners.MediaPortalTvServer.csproj =================================================================== --- trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/ForTheRecord.RecorderTuners.MediaPortalTvServer.csproj 2009-01-08 11:06:54 UTC (rev 2497) +++ trunk/plugins/ForTheRecord/ForTheRecord.RecorderTuners.MediaPortalTvServer/ForTheRecord.RecorderTuners.MediaPortalTvServer.csproj 2009-01-08 12:01:05 UTC (rev 2498) @@ -9,10 +9,10 @@ <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>ForTheRecord.RecorderTuners.MediaPortalTvServer</RootNamespace> <AssemblyName>ForTheRecord.RecorderTuners.MediaPortalTvServer</AssemblyName> - <SccProjectName>SAK</SccProjectName> - <SccLocalPath>SAK</SccLocalPath> - <SccAuxPath>SAK</SccAuxPath> - <SccProvider>SAK</SccProvider> + <SccProjectName>Svn</SccProjectName> + <SccLocalPath>Svn</SccLocalPath> + <SccAuxPath>Svn</SccAuxPath> + <SccProvider>SubversionScc</SccProvider> <FileUpgradeFlags> </FileUpgradeFlags> <OldToolsVersion>2.0</OldToolsVersion> @@ -38,37 +38,37 @@ <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> - <Reference Include="ForTheRecord.Entities, Version=1.3.0.0, Culture=neutral, PublicKeyToken=a9a5dfc20b8d6175, processorArchitecture=MSIL"> + <Reference Include="ForTheRecord.Entities, Version=1.3.1.0, Culture=neutral, PublicKeyToken=a9a5dfc20b8d6175, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\ReferencedAssemblies\ForTheRecord.Entities.dll</HintPath> </Reference> - <Reference Include="ForTheRecord.RecorderTuners.Common, Version=1.3.0.0, Culture=neutral, PublicKeyToken=a9a5dfc20b8d6175, processorArchitecture=MSIL"> + <Reference Include="ForTheRecord.RecorderTuners.Common, Version=1.3.1.0, Culture=neutral, PublicKeyToken=a9a5dfc20b8d6175, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\ReferencedAssemblies\ForTheRecord.RecorderTuners.Common.dll</HintPath> </Reference> - <Reference Include="ForTheRecord.ServiceAgents, Version=1.3.0.0, Culture=neutral, PublicKeyToken=a9a5dfc20b8d6175, processorArchitecture=MSIL"> + <Reference Include="ForTheRecord.ServiceAgents, Version=1.3.1.0, Culture=neutral, PublicKeyToken=a9a5dfc20b8d6175, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\ReferencedAssemblies\ForTheRecord.ServiceAgents.dll</HintPath> </Reference> - <Reference Include="ForTheRecord.ServiceContracts, Version=1.3.0.0, Culture=neutral, PublicKeyToken=a9a5dfc20b8d6175, processorArchitecture=MSIL"> + <Reference Include="ForTheRecord.ServiceContracts, Version=1.3.1.0, Culture=neutral, PublicKeyToken=a9a5dfc20b8d6175, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\ReferencedAssemblies\ForTheRecord.ServiceContracts.dll</HintPath> </Reference> <Reference Include="Gentle.Common, Version=1.2.9.1285, Culture=neutral, PublicKeyToken=80b5de62e27be49b"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\ReferencedAssemblies\Gentle.Common.dll</HintPath> + <HintPath>..\ForTheRecord.ReferencedAssemblies\MediaPortalAssemblies\Gentle.Common.dll</HintPath> </Reference> <Reference Include="Gentle.Framework, Version=1.2.9.1286, Culture=neutral, PublicKeyToken=80b5de62e27be49b"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\ReferencedAssemblies\Gentle.Framework.dll</HintPath> + <HintPath>..\ForTheRecord.ReferencedAssemblies\MediaPortalAssemblies\Gentle.Framework.dll</HintPath> </Reference> - <Reference Include="PluginBase, Version=0.9.2.16175, Culture=neutral, processorArchitecture=x86"> + <Reference Include="PluginBase, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> - <HintPath>..\ReferencedAssemblies\PluginBase.dll</HintPath> + <HintPath>..\ForTheRecord.ReferencedAssemblies\MediaPortalAssemblies\PluginBase.dll</HintPath> </Reference> - <Reference Include="SetupControls, Version=0.9.2.16173, Culture=neutral, processorArchitecture=x86"> + <Reference Include="SetupControls, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVer... [truncated message content] |