示例#1
0
        public enuQuality GetIDFromName(string Name)
        {
            enuQuality c = new enuQuality();

            for (int i = 0; i < 100; i++)
            {
                c = (enuQuality)i;
                if (c.ToString() == Name)
                {
                    return(c);
                }
            }
            return((enuQuality)int.Parse(Name));
        }
示例#2
0
        /// <summary>
        /// 返回中文  获得全部列表
        /// </summary>
        /// <returns>ArrayList(Quality)</returns>
        public static ArrayList List()
        {
            ItemShiftType o;
            enuQuality    e        = new enuQuality();
            ArrayList     alReturn = new ArrayList();
            int           i;

            for (i = 0; i <= System.Enum.GetValues(e.GetType()).GetUpperBound(0); i++)
            {
                o      = new ItemShiftType();
                o.ID   = (enuQuality)i;
                o.Memo = i.ToString();
                alReturn.Add(o);
            }
            return(alReturn);
        }