Ejemplo n.º 1
0
 public static Recording CreateFromScheduleEvent(ScheduleEvent scheduleEvent)
 {
     return(new Recording(
                scheduleEvent.Id,
                (string)scheduleEvent.GetExtendedProperty(CHANNEL_ID),
                (string)scheduleEvent.GetExtendedProperty(TITLE),
                scheduleEvent.StartTime.ToLocalTime(),
                scheduleEvent.EndTime.ToLocalTime()
                ));
 }
Ejemplo n.º 2
0
        public static string ToKey(this ScheduleEvent se)
        {
            string theKey = se.StartTime.Ticks.ToString();
            string title  = (string)se.GetExtendedProperty("Title");

            if (title.Length > 15)
            {
                title = title.Substring(0, 15);
            }
            theKey += title;
            return(theKey);
        }
Ejemplo n.º 3
0
        // Conversion / Lookup
        public static string ScheduleEventSafeTitle(ScheduleEvent se)
        {
            try
            {
                ScheduleRequest sr = se.GetScheduleRequest();
                if (sr != null)
                {
                    return((string)sr.GetExtendedProperty("Title"));
                }
            }
            catch
            {
            }

            return((string)se.GetExtendedProperty("Title"));
        }
Ejemplo n.º 4
0
        public static string imgTagForScheduleEvent(ScheduleEvent se)
        {
            // prepare source
            string src;

            // filename exists?
            string fN = (string)se.GetExtendedProperty("FileName");

            if (String.IsNullOrEmpty(fN))
            {
                // TODO: depend upon upcoming type...
                src = "/skin/thumbnail_default.png";
            }
            else
            {
                src = "/rectvthumbnail?filename=" + HttpUtility.UrlEncode(fN);
            }


            // IMG Tag
            return("<img src=\"" + src + "\" class=\"showthumbnail\"/>");
        }