コード例 #1
0
ファイル: Program.cs プロジェクト: pacificIT/MediaPortal-2
 public static RecordingStatus GetRecordingStatus(WebProgramBasic programDetailed)
 {
   RecordingStatus recordingStatus = RecordingStatus.None;
   if (programDetailed.IsScheduled)
     recordingStatus |= RecordingStatus.Scheduled;
   return recordingStatus;
 }
コード例 #2
0
        public ScheduleViewModel(WebProgramBasic program)
            : this(program.StartTime, program.EndTime, program.Title, program.IdChannel)
        {
            ProgramId = program.Id;

            ChannelName = MPEServices.TAS.GetChannelBasicById(program.IdChannel).DisplayName;
        }
コード例 #3
0
 public AddScheduleViewModel(WebProgramBasic program)
 {
     ProgramId = program.Id;
     ProgramTitle = program.Title;
     Types = ScheduleViewModel.ScheduleTypeNames
         .Select(x => new SelectListItem() { Value = ((int)x.Key).ToString(), Text = x.Value })
         .ToList();
 }
コード例 #4
0
        public ProgramDetailsViewModel(WebProgramBasic program)
        {
            Id = program.Id;
            Title = String.IsNullOrEmpty(program.Title) ? "Unknown" : program.Title; // creating links with empty text doesn't work
            Description = program.Description;
            StartTime = program.StartTime;
            EndTime = program.EndTime;
            IsScheduled = program.IsScheduled;

            var channel = MPEServices.TAS.GetChannelBasicById(program.IdChannel);
            ChannelName = channel.DisplayName;
        }
コード例 #5
0
        public ProgramDetailsViewModel(WebProgramBasic program)
        {
            Id = program.Id;
            Title = program.Title;
            Description = program.Description;
            StartTime = program.StartTime;
            EndTime = program.EndTime;
            IsScheduled = program.IsScheduled;

            var channel = MPEServices.TAS.GetChannelBasicById(program.IdChannel);
            ChannelName = channel.DisplayName;
        }
コード例 #6
0
        public TVGuideProgramViewModel(WebProgramBasic program, DateTime guideStart, DateTime guideEnd)
        {
            Id = program.Id;
            Title = String.IsNullOrEmpty(program.Title) ? "Unknown" : program.Title; // creating links with empty text doesn't work
            StartTime = program.StartTime;
            EndTime = program.EndTime;

            this.guideStart = guideStart;
            this.guideEnd = guideEnd;
        }
コード例 #7
0
        public TVGuideProgramViewModel(WebProgramBasic program, DateTime guideStart, DateTime guideEnd)
        {
            Id = program.Id;
            Title = program.Title;
            StartTime = program.StartTime;
            EndTime = program.EndTime;

            this.guideStart = guideStart;
            this.guideEnd = guideEnd;
        }