public string GetFormatLink(@event item) { StringBuilder sb = new StringBuilder(); sb.Append("?formattype=").Append(GetFormat(item).ToLower()); return sb.ToString(); }
public string GetDate(@event item) { DateTime startDate = item.startdate; DateTime endDate = item.enddate; StringBuilder sb = new StringBuilder(); string format = "yyyy"; sb.Append(startDate.ToString("m")) .Append(" - ") .Append(endDate.ToString("m")) .Append(" ") .Append(startDate.ToString(format)); return sb.ToString(); }
public string GetImage(@event item) { string filename = ""; switch (item.organizer.TrimEnd()) { case "Grand Prix": filename = "../Images/gp.jpg"; break; case "Starcity Games": filename = "../Images/scglive.png"; break; case "Pro Tour": filename = "../Images/pt.jpg"; break; case "Channel Fireball": filename = "../Images/cfb.png"; break; case "TCGPlayer": filename = "../Images/tcg.png"; break; case "Cardtitan": filename = "../Images/cardtitan.png"; break; case "SCV": filename = "../Images/scv.png"; break; case "Worlds": filename = "../Images/worlds.png"; break; default: filename = "../Images/empty.png"; break; } return filename; }
public string GetFormat(@event item) { return item.format.TrimEnd(); }
public string GetName(@event item) { return item.name.TrimEnd(); }