///<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); }
///<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); }
///<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; }