コード例 #1
0
        protected String CreateDate(object DataItem)
        {
            GtsRecordBase record = (GtsRecordBase)DataItem;

            if (record.TimeDeposited == null)
            {
                return("");
            }
            return(Common.HtmlEncode(((DateTime)record.TimeDeposited).ToString("f")));
        }
コード例 #2
0
 protected String CreateNickname(object DataItem)
 {
     try
     {
         GtsRecordBase record = (GtsRecordBase)DataItem;
         return(Common.HtmlEncode(record.Pokemon.Nickname));
     }
     catch
     {
         return("???");
     }
 }
コード例 #3
0
 protected String CreateAbility(object DataItem)
 {
     try
     {
         GtsRecordBase record = (GtsRecordBase)DataItem;
         return(Common.HtmlEncode(record.Pokemon.Ability.Name.ToString()));
     }
     catch
     {
         return("???");
     }
 }
コード例 #4
0
 protected String CreatePokedex(object DataItem)
 {
     try
     {
         GtsRecordBase record = (GtsRecordBase)DataItem;
         return(Common.HtmlEncode(record.Species.ToString()));
     }
     catch
     {
         return("???");
     }
 }
コード例 #5
0
        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));
        }
コード例 #6
0
 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("???");
     }
 }
コード例 #7
0
 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("???");
     }
 }
コード例 #8
0
        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
        }
コード例 #9
0
 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("???");
     }
 }
コード例 #10
0
 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("???");
     }
 }
コード例 #11
0
        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("");
            }
        }
コード例 #12
0
        protected String CreateWantedLevel(object DataItem)
        {
            GtsRecordBase record = (GtsRecordBase)DataItem;

            return(FormatLevels(record.RequestedMinLevel, record.RequestedMaxLevel));
        }
コード例 #13
0
        protected String CreateWantedGender(object DataItem)
        {
            GtsRecordBase record = (GtsRecordBase)DataItem;

            return(Format.GenderSymbol(record.RequestedGender));
        }
コード例 #14
0
        protected String CreateTrainer(object DataItem)
        {
            GtsRecordBase record = (GtsRecordBase)DataItem;

            return(Common.HtmlEncode(record.TrainerName));
        }
コード例 #15
0
        protected String CreateLevel(object DataItem)
        {
            GtsRecordBase record = (GtsRecordBase)DataItem;

            return(record.Level.ToString());
        }
コード例 #16
0
        protected string CreateGender(object DataItem)
        {
            GtsRecordBase record = (GtsRecordBase)DataItem;

            return(Format.GenderSymbol(record.Gender));
        }