From: <mas...@us...> - 2007-04-16 13:22:28
|
Revision: 42 http://svn.sourceforge.net/mp-webinterface/?rev=42&view=rev Author: maschine Date: 2007-04-16 06:22:05 -0700 (Mon, 16 Apr 2007) Log Message: ----------- Fixing exception generated while modifying a collection at runtime. Modified Paths: -------------- trunk/Version2/Web App/MPW/NowNext.aspx.cs Modified: trunk/Version2/Web App/MPW/NowNext.aspx.cs =================================================================== --- trunk/Version2/Web App/MPW/NowNext.aspx.cs 2007-04-09 21:27:33 UTC (rev 41) +++ trunk/Version2/Web App/MPW/NowNext.aspx.cs 2007-04-16 13:22:05 UTC (rev 42) @@ -12,6 +12,7 @@ using TvDatabase; using TvControl; using MPW.Utils; +using System.Collections.Generic; namespace MPW { @@ -144,16 +145,17 @@ // Get a list of all tv-channels IList channels = layer.GetTVGuideChannelsForGroup(group.IdGroup); + List<Channel> channelstv = new List<Channel>(); // Remove non TV channels foreach (Channel channel in channels) { - if (!channel.IsTv) - channels.Remove(channel); + if (channel.IsTv) + channelstv.Add(channel); } //Iterate through all the channels - foreach (Channel channel in channels) + foreach (Channel channel in channelstv) { TableRow channelNameRow = new TableRow(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |