protected String CreateDate(object DataItem) { GtsRecordBase record = (GtsRecordBase)DataItem; if (record.TimeDeposited == null) { return(""); } return(Common.HtmlEncode(((DateTime)record.TimeDeposited).ToString("f"))); }
protected String CreateNickname(object DataItem) { try { GtsRecordBase record = (GtsRecordBase)DataItem; return(Common.HtmlEncode(record.Pokemon.Nickname)); } catch { return("???"); } }
protected String CreateAbility(object DataItem) { try { GtsRecordBase record = (GtsRecordBase)DataItem; return(Common.HtmlEncode(record.Pokemon.Ability.Name.ToString())); } catch { return("???"); } }
protected String CreatePokedex(object DataItem) { try { GtsRecordBase record = (GtsRecordBase)DataItem; return(Common.HtmlEncode(record.Species.ToString())); } catch { return("???"); } }
protected String CreateWantedSpecies(object DataItem) { Pokedex.Pokedex pokedex = AppStateHelper.Pokedex(Application); GtsRecordBase record = (GtsRecordBase)DataItem; Species species = pokedex.Species[record.RequestedSpecies]; return("<img src=\"" + ResolveUrl(WebFormat.SpeciesImageSmall(species)) + "\" alt=\"" + Common.HtmlEncode(species.Name.ToString()) + "\" class=\"sprite speciesSmall\" width=\"40px\" height=\"32px\" />" + String.Format("{0} (#{1})", Common.HtmlEncode(species.Name.ToString()), record.RequestedSpecies)); }
protected String CreateSpecies(object DataItem) { try { Pokedex.Pokedex pokedex = AppStateHelper.Pokedex(Application); GtsRecordBase record = (GtsRecordBase)DataItem; return(Common.HtmlEncode(pokedex.Species[record.Species].Name.ToString())); } catch { return("???"); } }
protected String CreateOfferImage(object DataItem) { try { GtsRecordBase record = (GtsRecordBase)DataItem; return("<img src=\"" + ResolveUrl(WebFormat.PokemonImageLarge(record.Pokemon)) + "\" alt=\"" + Common.HtmlEncode(record.Pokemon.Species.Name.ToString()) + "\" class=\"sprite species\" width=\"96px\" height=\"96px\" />"); } catch { return("???"); } }
protected string CreateAdminLinks(object DataItem) { #if DEBUG GtsRecordBase record = (GtsRecordBase)DataItem; StringBuilder result = new StringBuilder(); result.Append("<li><a class=\"ui-button\" href=\""); result.Append(Common.HtmlEncode(Common.ResolveUrl("~/gts/Pokemon.aspx?g=" + (rbGen4.Checked ? "4" : "5") + "&offer=" + record.TradeId.ToString()))); result.Append("\" target=\"_blank\">Details</a></li>"); return(result.ToString()); #else return(""); #endif }
protected String CreateHeldItem(object DataItem) { try { GtsRecordBase record = (GtsRecordBase)DataItem; if (record.Pokemon.HeldItem == null) { return(""); } String itemName = Common.HtmlEncode(record.Pokemon.HeldItem.Name.ToString()); return("<img src=\"" + ResolveUrl(WebFormat.ItemImage(record.Pokemon.HeldItem)) + "\" alt=\"" + itemName + "\" class=\"sprite item\" width=\"24px\" height=\"24px\" />" + itemName); } catch { return("???"); } }
protected String CreatePokeball(object DataItem) { try { GtsRecordBase record = (GtsRecordBase)DataItem; // Hide pokeballs with incorrect numbers until we catalog them. if (record.Pokemon.Pokeball.Value4 > 15) { return(""); } String itemName = Common.HtmlEncode(record.Pokemon.Pokeball.Name.ToString()); return("<img src=\"" + ResolveUrl(WebFormat.ItemImage(record.Pokemon.Pokeball)) + "\" alt=\"" + itemName + "\" title=\"" + itemName + "\" class=\"sprite item\" width=\"24px\" height=\"24px\" />"); } catch { return("???"); } }
protected String CreatePokerus(object DataItem) { try { GtsRecordBase record = (GtsRecordBase)DataItem; switch (record.Pokemon.Pokerus) { case Pokerus.Infected: return("<span class=\"pkrs\">PKRS</span>"); case Pokerus.Cured: case Pokerus.None: default: return(""); } } catch { return(""); } }
protected String CreateWantedLevel(object DataItem) { GtsRecordBase record = (GtsRecordBase)DataItem; return(FormatLevels(record.RequestedMinLevel, record.RequestedMaxLevel)); }
protected String CreateWantedGender(object DataItem) { GtsRecordBase record = (GtsRecordBase)DataItem; return(Format.GenderSymbol(record.RequestedGender)); }
protected String CreateTrainer(object DataItem) { GtsRecordBase record = (GtsRecordBase)DataItem; return(Common.HtmlEncode(record.TrainerName)); }
protected String CreateLevel(object DataItem) { GtsRecordBase record = (GtsRecordBase)DataItem; return(record.Level.ToString()); }
protected string CreateGender(object DataItem) { GtsRecordBase record = (GtsRecordBase)DataItem; return(Format.GenderSymbol(record.Gender)); }