예제 #1
0
        public int NewIdx()
        {
            int iNexIdx = -1;
            List <CBaseObject> lstObj = GetList();

            foreach (CBaseObject obj in lstObj)
            {
                CTButtonInView biv = (CTButtonInView)obj;
                if (biv.Idx > iNexIdx)
                {
                    iNexIdx = biv.Idx;
                }
            }
            return(iNexIdx + 1);
        }
예제 #2
0
        public int CompareTo(object obj)
        {
            int res = 0;

            try
            {
                CTButtonInView sObj = (CTButtonInView)obj;
                if (this.Idx > sObj.Idx)
                {
                    res = 1;
                }
                else if (this.Idx < sObj.Idx)
                {
                    res = -1;
                }
            }
            catch (Exception ex)
            {
                throw new Exception("比较异常", ex.InnerException);
            }
            return(res);
        }