Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
yamp committed Mar 4, 2005
1 parent 4613bd2 commit c57dfe1
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions mediaportal/WindowPlugins/GUITV/GUITVGuide.cs
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,7 @@ void RenderSingleChannel(TVChannel channel)

ArrayList programs=new ArrayList();
DateTime dtStart=DateTime.Now;
DateTime dtEnd =dtStart.AddHours(10);
DateTime dtEnd =dtStart.AddDays(30);
long iStart=Utils.datetolong(dtStart);
long iEnd=Utils.datetolong(dtEnd);
TVDatabase.GetProgramsPerChannel(channel.Name,iStart,iEnd,ref programs);
Expand Down Expand Up @@ -1086,10 +1086,23 @@ void RenderSingleChannel(TVChannel channel)
img.TextOffsetY1=5;
img.FontName1="font13";
img.TextColor1=0xffffffff;
string strTimeSingle=String.Format("{0}",
program.StartTime.ToString("t",CultureInfo.CurrentCulture.DateTimeFormat));

string strTime=String.Format("{0}-{1}",
program.StartTime.ToString("t",CultureInfo.CurrentCulture.DateTimeFormat),
program.EndTime.ToString("t",CultureInfo.CurrentCulture.DateTimeFormat));

if (program.StartTime.Date != DateTime.Now.Date)
{
strTime=String.Format("{0} {1}-{2}",
Utils.GetShortDayString(program.StartTime),
program.StartTime.ToString("t",CultureInfo.CurrentCulture.DateTimeFormat),
program.EndTime.ToString("t",CultureInfo.CurrentCulture.DateTimeFormat));
strTimeSingle=String.Format("{0} {1}",
Utils.GetShortDayString(program.StartTime),
program.StartTime.ToString("t",CultureInfo.CurrentCulture.DateTimeFormat));
}
img.Label1=program.Title;
GUILabelControl labelTemplate;
if (program.IsRunningAt(dt))
Expand Down Expand Up @@ -1122,7 +1135,7 @@ void RenderSingleChannel(TVChannel channel)
else
{
// No genre displayed, display start time as part of the program name
img.Label1=String.Format("{0} {1}", program.StartTime.ToString("t",CultureInfo.CurrentCulture.DateTimeFormat), program.Title);
img.Label1=String.Format("{0} {1}", strTimeSingle, program.Title);
}

if (program.IsRunningAt(dt))
Expand Down

0 comments on commit c57dfe1

Please sign in to comment.