Esempio n. 1
0
        public int GetRecordCols(string name)
        {
            int nCols = 0;

            if (name == null || name.Length == 0)
            {
                //Log.Trace("Error:GameObject.GetRecordCols name para is emtpy");
                return(nCols);
            }

            try
            {
                if (!mRecordSet.ContainsKey(name))
                {
                    //Log.Trace("Error:GameObject.GetRecordCols does not exist record:" + name);
                    return(nCols);
                }

                GameRecord record = mRecordSet[name];
                if (record != null)
                {
                    nCols = record.GetColcount();
                }
            }
            catch (Exception ex)
            {
                //Log.Trace("Error:GameObject.GetRecordCols Exception :" + ex.ToString());
                return(nCols);
            }
            return(nCols);
        }
Esempio n. 2
0
        public int GetRecordColType(string name, int col)
        {
            int nColType = 0;

            if (name == null || name.Length == 0)
            {
                //Log.Trace("Error:GameObject.GetRecordColType name para is emtpy");
                return(nColType);
            }

            if (col < 0)
            {
                //Log.Trace("Error:GameObject.GetRecordColType col para must  > 0");
                return(nColType);
            }

            try
            {
                if (!mRecordSet.ContainsKey(name))
                {
                    //Log.Trace("Error:GameObject.GetRecordColType does not have rercord :" + name);
                    return(nColType);
                }

                GameRecord record = mRecordSet[name];
                if (null == record)
                {
                    //Log.Trace("Error:GameObject.GetRecordColType GameRecord is null");
                    return(nColType);
                }

                if (col >= record.GetColcount())
                {
                    //Log.Trace("Error:GameObject.GetRecordColType GameRecord col para is too larger");
                    return(nColType);
                }

                nColType = record.GetColType(col);
                return(nColType);
            }
            catch (Exception ex)
            {
                //Log.Trace("GameObject.GetRecordColType Exception :" + ex.ToString());
                return(0);
            }
        }