Exemple #1
0
        private string GetChannelProgramIcon(Channel channel, Guid guideProgramId, out GuideUpcomingProgram guideUpcomingProgram)
        {
            Guid upcomingProgramId = UpcomingProgram.GetUniqueUpcomingProgramId(guideProgramId, channel.ChannelId);

            guideUpcomingProgram = null;
            string recordIconImage = null;
            GuideUpcomingProgram upcoming = null;
            ScheduleType type = ScheduleType.Recording;
            if (_model.UpcomingRecordingsById.ContainsKey(upcomingProgramId))
            {
                type = ScheduleType.Recording;
                upcoming = _model.UpcomingRecordingsById[upcomingProgramId];
                guideUpcomingProgram = upcoming;
            }
            else if (_model.UpcomingAlertsById.ContainsKey(upcomingProgramId))
            {
                type = ScheduleType.Alert;
                upcoming = _model.UpcomingAlertsById[upcomingProgramId];
                guideUpcomingProgram = upcoming;
            }
            else if (_model.UpcomingSuggestionsById.ContainsKey(upcomingProgramId))
            {
                type = ScheduleType.Suggestion;
                upcoming = _model.UpcomingSuggestionsById[upcomingProgramId];
            }
            if (upcoming != null
                && upcoming.ChannelId == channel.ChannelId)
            {
                recordIconImage = Utility.GetIconImageFileName(type, upcoming);
            }
            return recordIconImage;
        }
Exemple #2
0
 internal static string GetIconImageFileName(ScheduleType scheduleType, GuideUpcomingProgram upcoming)
 {
     return GetIconImageFileName(scheduleType, upcoming.IsPartOfSeries, upcoming.CancellationReason, upcoming.UpcomingRecording);
 }