|
From: <mas...@us...> - 2007-04-18 16:38:09
|
Revision: 43
http://svn.sourceforge.net/mp-webinterface/?rev=43&view=rev
Author: maschine
Date: 2007-04-18 09:38:04 -0700 (Wed, 18 Apr 2007)
Log Message:
-----------
First version of the guide view.
Modified Paths:
--------------
trunk/Version2/Web App/MPW/Default.aspx
trunk/Version2/Web App/MPW/Default.aspx.cs
trunk/Version2/Web App/MPW/Default.aspx.designer.cs
trunk/Version2/Web App/MPW/css/mpw_style.css
Modified: trunk/Version2/Web App/MPW/Default.aspx
===================================================================
--- trunk/Version2/Web App/MPW/Default.aspx 2007-04-16 13:22:05 UTC (rev 42)
+++ trunk/Version2/Web App/MPW/Default.aspx 2007-04-18 16:38:04 UTC (rev 43)
@@ -1,10 +1,12 @@
-<%@ Page Language="C#" MasterPageFile="~/MPW.Master" AutoEventWireup="true"
- Codebehind="Default.aspx.cs" Inherits="MPW.MasterPages.WebForm11" Title="Untitled Page" %>
+<%@ Page Language="C#" MasterPageFile="~/MPW.Master" AutoEventWireup="true" Codebehind="Default.aspx.cs"
+ Inherits="MPW.MasterPages.WebForm11" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MPWContent" runat="server">
<br />
<asp:Button ID="ButtonPrev" runat="server" Text="<" />
<asp:Button ID="ButtonNext" runat="server" Text=">" />
+ <asp:DropDownList ID="GroupDropDown" runat="server">
+ </asp:DropDownList>
<asp:DropDownList ID="TimeDropDown" runat="server">
</asp:DropDownList>
<asp:DropDownList ID="DateDropDown" runat="server">
@@ -12,7 +14,7 @@
<br />
<asp:UpdatePanel ID="GuideUpdatePanel" runat="server" UpdateMode="Conditional">
<ContentTemplate>
- <asp:Table ID="Guide" runat="server" HorizontalAlign="Left">
+ <asp:Table ID="Guide" runat="server" Width="90%">
</asp:Table>
</ContentTemplate>
<Triggers>
Modified: trunk/Version2/Web App/MPW/Default.aspx.cs
===================================================================
--- trunk/Version2/Web App/MPW/Default.aspx.cs 2007-04-16 13:22:05 UTC (rev 42)
+++ trunk/Version2/Web App/MPW/Default.aspx.cs 2007-04-18 16:38:04 UTC (rev 43)
@@ -40,24 +40,84 @@
channels.Remove(channel);
}
+ //The Time
+ TableRow timerow = new TableRow();
+ TableCell spacer = new TableCell();
+ timerow.Cells.Add(spacer);
+
+ for (int i = 0; i < 3; i++)
+ {
+ TableCell cell = new TableCell();
+ cell.Text = "| " + guideStart.AddHours(i).ToShortTimeString();
+ cell.Width = 180;
+ timerow.Cells.Add(cell);
+ }
+ Guide.Rows.Add(timerow);
+
//Iterate through all the channels
foreach (Channel channel in channels)
{
TableRow r = new TableRow();
TableCell cell_channel = new TableCell();
TableCell cell_program = new TableCell();
+ cell_program.ColumnSpan = 3;
Label lbl_channel = new Label();
lbl_channel.Text = "<strong>" + channel.Name + "</strong>";
- Label lbl_program = new Label();
- lbl_program.Text = "EPG";
-
cell_channel.Controls.Add(lbl_channel);
cell_channel.CssClass = "guideChannel";
- cell_program.Controls.Add(lbl_program);
+ try
+ {
+ Program current = channel.GetProgramAt(guideStart);
+ Table programsTable = new Table();
+ TableRow programsRow = new TableRow();
+
+ TableCell firstcell = new TableCell();
+ firstcell.CssClass = "guidecell";
+
+ TimeSpan widthTime = current.EndTime - guideStart;
+ Unit widthPixel = new Unit(widthTime.Minutes.ToString());
+ firstcell.Width = widthPixel;
+ firstcell.Text = current.Title;
+ programsRow.Cells.Add(firstcell);
+
+ bool more = true;
+
+ while (more == true)
+ {
+ Program next = channel.GetProgramAt(current.EndTime.AddMinutes(1));
+ if (next.EndTime <= guideEnd)
+ {
+ TableCell nextcell = new TableCell();
+ nextcell.CssClass = "guidecell";
+
+ widthTime = next.EndTime - next.StartTime;
+ widthPixel = new Unit(widthTime.Minutes.ToString());
+ nextcell.Width = widthPixel;
+ nextcell.Text = next.Title;
+ programsRow.Cells.Add(nextcell);
+ current = next;
+ }
+ else
+ {
+ more = false;
+ }
+ }
+
+ programsTable.Rows.Add(programsRow);
+ cell_program.Controls.Add(programsTable);
+
+ }
+ catch
+ {
+ Label noEPG = new Label();
+ noEPG.Text = Resources.Resource.NoEPGInfo;
+ cell_program.Controls.Add(noEPG);
+ }
+
r.Cells.Add(cell_channel);
r.Cells.Add(cell_program);
Modified: trunk/Version2/Web App/MPW/Default.aspx.designer.cs
===================================================================
--- trunk/Version2/Web App/MPW/Default.aspx.designer.cs 2007-04-16 13:22:05 UTC (rev 42)
+++ trunk/Version2/Web App/MPW/Default.aspx.designer.cs 2007-04-18 16:38:04 UTC (rev 43)
@@ -38,6 +38,15 @@
protected global::System.Web.UI.WebControls.Button ButtonNext;
/// <summary>
+ /// GroupDropDown control.
+ /// </summary>
+ /// <remarks>
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ /// </remarks>
+ protected global::System.Web.UI.WebControls.DropDownList GroupDropDown;
+
+ /// <summary>
/// TimeDropDown control.
/// </summary>
/// <remarks>
Modified: trunk/Version2/Web App/MPW/css/mpw_style.css
===================================================================
--- trunk/Version2/Web App/MPW/css/mpw_style.css 2007-04-16 13:22:05 UTC (rev 42)
+++ trunk/Version2/Web App/MPW/css/mpw_style.css 2007-04-18 16:38:04 UTC (rev 43)
@@ -226,6 +226,13 @@
}
input.deleteschedule
{
- margin-left:10px;
- vertical-align:middle;
+ margin-left: 10px;
+ vertical-align: middle;
}
+
+td.guidecell
+{
+ height:20px;
+ overflow:hidden;
+ background-color:Lime;
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|