Exemple #1
0
        public SSchemeLegendCupDetailConfig GetCupDetailConfig(SCupTypeKey sCupTypeKey)
        {
            SSchemeLegendCupDetailConfig result;

            if (m_cupDetailConfig.TryGetValue(sCupTypeKey, out result))
            {
                return(result);
            }

            return(null);
        }
Exemple #2
0
        // 比赛详细脚本
        private void LoadLegendCupDetailConfig(string stPath)
        {
            ScpReader reader = new ScpReader(stPath, true, 2);

            m_cupDetailConfig = new Dictionary <SCupTypeKey, SSchemeLegendCupDetailConfig>();
            for (int i = 0; i < reader.GetRecordCount(); i++)
            {
                SSchemeLegendCupDetailConfig cupTypeInfo = new SSchemeLegendCupDetailConfig();
                cupTypeInfo.nCupConfigID     = reader.GetInt(i, (int)ECupDetailCol.ECDC_COL_CUP_CONFIGID, 0);
                cupTypeInfo.nRoundIndex      = reader.GetInt(i, (int)ECupDetailCol.ECDC_COL_CUP_ROUNDINDEX, 0);
                cupTypeInfo.nCompetitionType = reader.GetInt(i, (int)ECupDetailCol.ECDC_COL_CUP_COMPETITIONTYPE, 0);
                cupTypeInfo.nGroupCount      = reader.GetInt(i, (int)ECupDetailCol.ECDC_COL_CUP_GROUPCOUNT, 0);
                cupTypeInfo.nMemberCount     = reader.GetInt(i, (int)ECupDetailCol.ECDC_COL_CUP_MEMBERCOUNT, 0);
                cupTypeInfo.nWinMemberCount  = reader.GetInt(i, (int)ECupDetailCol.ECDC_COL_CUP_WINMEMBERCOUNT, 0);
                cupTypeInfo.nStartDayGap     = reader.GetInt(i, (int)ECupDetailCol.ECDC_COL_CUP_STARTDAYGAP, 0);
                cupTypeInfo.nBoType          = reader.GetInt(i, (int)ECupDetailCol.ECDC_COL_CUP_BOTYPE, 0);
                cupTypeInfo.nBoTimeGap       = reader.GetInt(i, (int)ECupDetailCol.ECDC_COL_CUP_BOTIMEGAP, 0);
                cupTypeInfo.nRoundEndGap     = reader.GetInt(i, (int)ECupDetailCol.ECDC_COL_CUP_ROUNDENDGAP, 0);
                cupTypeInfo.sRoundDes        = reader.GetString(i, (int)ECupDetailCol.ECDC_COL_CUP_ROUNDDESC, "");

                string[] strBeginTime = reader.GetString(i, (int)ECupDetailCol.ECDC_COL_CUP_BEGINTIME, "").Split(';');
                if (strBeginTime != null && strBeginTime.Length > 0)
                {
                    cupTypeInfo.nBeginTime = new int[strBeginTime.Length];
                    for (int j = 0; j < strBeginTime.Length; ++j)
                    {
                        //cupTypeInfo.nBeginTime[j] = Convert.ToInt32(strBeginTime[j]);
                        Int32.TryParse(strBeginTime[j], out cupTypeInfo.nBeginTime[j]);
                    }
                }

                string[] strStartTime = reader.GetString(i, (int)ECupDetailCol.ECDC_COL_CUP_STARTTIME, "").Split(';');
                if (strStartTime != null && strStartTime.Length > 0)
                {
                    cupTypeInfo.nStartTime = new int[strStartTime.Length];
                    for (int p = 0; p < strStartTime.Length; ++p)
                    {
                        //cupTypeInfo.nStartTime[p] = Convert.ToInt32(strStartTime[p]);
                        Int32.TryParse(strStartTime[p], out cupTypeInfo.nStartTime[p]);
                    }
                }

                string[] strResetEndTime = reader.GetString(i, (int)ECupDetailCol.ECDC_COL_CUP_ROUND_RESET_ENDTIME, "").Split(';');
                if (strResetEndTime != null && strResetEndTime.Length > 0)
                {
                    cupTypeInfo.nRoundResetEndTime = new int[strResetEndTime.Length];
                    for (int q = 0; q < strResetEndTime.Length; ++q)
                    {
                        //cupTypeInfo.nRoundResetEndTime[q] = Convert.ToInt32(strResetEndTime[q]);
                        Int32.TryParse(strResetEndTime[q], out cupTypeInfo.nRoundResetEndTime[q]);
                    }
                }

                string[] strRoundEndTime = reader.GetString(i, (int)ECupDetailCol.ECDC_COL_CUP_ROUNDENDTIME, "").Split(';');
                if (strRoundEndTime != null && strRoundEndTime.Length > 0)
                {
                    cupTypeInfo.nRoundEndTime = new int[strRoundEndTime.Length];
                    for (int q = 0; q < strRoundEndTime.Length; ++q)
                    {
                        //cupTypeInfo.nRoundEndTime[q] = Convert.ToInt32(strRoundEndTime[q]);
                        Int32.TryParse(strRoundEndTime[q], out cupTypeInfo.nRoundEndTime[q]);
                    }
                }

                SCupTypeKey typeKey = new SCupTypeKey(cupTypeInfo.nCupConfigID, cupTypeInfo.nRoundIndex);
                m_cupDetailConfig[typeKey] = cupTypeInfo;
            }
        }