protected void ServiceRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e) { StreamingLiveLib.TrafficSession session = (StreamingLiveLib.TrafficSession)e.Item.DataItem; LinkButton TimeLink = (LinkButton)e.Item.FindControl("TimeLink"); TimeLink.Text = session.StartTime.ToString("hh:mm tt"); }
public void OnGetShow() { int idx = Convert.ToInt32(Request.Query["id"]); LoadSessions(); StreamingLiveLib.TrafficSession session = Sessions[idx]; ShowChart(session); }
private void ShowChart(StreamingLiveLib.TrafficSession session) { List <string> records = new List <string>(); foreach (StreamingLiveLib.TrafficMinute tm in session.TrafficMinutes) { records.Add($"['{tm.Timestamp.ToString("h:mm")}',{tm.ViewerCount}]"); } ChartOutput = String.Join(",", records); }
protected void ServiceRepeater_ItemCommand(object source, RepeaterCommandEventArgs e) { StreamingLiveLib.TrafficSession session = sessions[e.Item.ItemIndex]; ShowChart(session); }