Exemplo n.º 1
0
        ///<summary>Returns a DefNum for the special image category specified.  Returns 0 if no match found.</summary>
        public static long GetImageCat(ImageCategorySpecial specialCat)
        {
            //No need to check RemotingRole; no call to db.
            Def def = Defs.GetDefsForCategory(DefCat.ImageCats, true).FirstOrDefault(x => x.ItemValue.Contains(specialCat.ToString()));

            return(def == null ? 0 : def.DefNum);
        }
Exemplo n.º 2
0
 ///<summary>Returns a DefNum for the special image category specified.  Returns 0 if no match found.</summary>
 public static long GetImageCat(ImageCategorySpecial specialCat)
 {
     Def[] defs = DefC.GetList(DefCat.ImageCats);
     for (int i = 0; i < defs.Length; i++)
     {
         if (defs[i].ItemValue.Contains(specialCat.ToString()))
         {
             return(defs[i].DefNum);
         }
     }
     return(0);
 }
Exemplo n.º 3
0
 ///<summary>Returns a DefNum for the special image category specified.  Returns 0 if no match found.</summary>
 public static long GetImageCat(ImageCategorySpecial specialCat)
 {
     Def[] defs=DefC.GetList(DefCat.ImageCats);
     for(int i=0;i<defs.Length;i++) {
         if(defs[i].ItemValue.Contains(specialCat.ToString())) {
             return defs[i].DefNum;
         }
     }
     return 0;
 }