예제 #1
0
        public override Boolean GetModelExport(AxDrawModelMatchList drawModelModel)
        {
            drawModelModel.RemoveAll();

            if (m_oGroup.GetPlayerCnt() < 1)
            {
                return(false);
            }

            Int32 nRoundCnt = m_oGroup.GetRoundCount();

            for (Int32 nCycRound = 0; nCycRound < nRoundCnt; nCycRound++)
            {
                stRrRound pRound    = m_oGroup.GetRoundObj(nCycRound);
                Int32     nMatchCnt = pRound.GetMatchCount();
                for (Int32 nCycMatch = 0; nCycMatch < nMatchCnt; nCycMatch++)
                {
                    stRrMatch pMatch = pRound.GetMatchObj(nCycMatch);

                    AxDrawModelMatchRow MatchRow = new AxDrawModelMatchRow();
                    MatchRow.m_nLeftFromLineOrIndex  = pMatch.m_byPlayerL;
                    MatchRow.m_nRightFromLineOrIndex = pMatch.m_byPlayerR;
                    MatchRow.m_byteRoundOrder        = (Byte)(nCycRound + 1);
                    MatchRow.m_byteMatchOrder        = (Byte)(nCycMatch + 1);
                    MatchRow.m_emLayerCode           = EDrawModelLayerCode.emLayerRound_RoundRobin;

                    drawModelModel.m_aryMatchRow.Add(MatchRow);
                }
            }

            return(true);
        }
예제 #2
0
        public override String GetDumpStr()
        {
            String StrOut;
            String strMsg;

            // 1. 打印内部结构
            {
                strMsg = String.Format("我们共有{0:D}个人 \r\n", m_oGroup.GetPlayerCnt());
                StrOut = strMsg;

                for (Int32 nRound = 0; nRound < m_oGroup.GetRoundCount(); nRound++)
                {
                    stRrRound pRound = m_oGroup.GetRoundObj(nRound);
                    strMsg  = String.Format("第{0:D}轮: \r\n", nRound + 1);
                    StrOut += strMsg;

                    for (Int32 nMatch = 0; nMatch < pRound.GetMatchCount(); nMatch++)
                    {
                        stRrMatch pMatch = pRound.GetMatchObj(nMatch);

                        strMsg = String.Format("Match[{0:D}-{1:D} {2:D} vs {3:D} ] ", nRound + 1, nMatch + 1,
                                               pMatch.m_byPlayerL, pMatch.m_byPlayerR);
                        StrOut += strMsg;
                    }

                    StrOut += "\r\n";
                }

                StrOut += "\r\n";
            }

            // 2.打印输出结构
            {
                AxDrawModelMatchList aryMatch = new AxDrawModelMatchList();
                GetModelExport(aryMatch);

                for (Int32 nCycRow = 0; nCycRow < (Int32)aryMatch.m_aryMatchRow.Count; nCycRow++)
                {
                    AxDrawModelMatchRow pMatchRow = aryMatch.m_aryMatchRow[nCycRow];

                    strMsg = String.Format("{0:D} 第{1:D}轮-第{2:D}场", nCycRow + 1,
                                           pMatchRow.m_byteRoundOrder, pMatchRow.m_byteMatchOrder);

                    //pMatchRow->nLeftFromLineOrIndex, pMatchRow->nLeftFromLineOrIndex,
                    //pMatchRow->GetVsDesc() );

                    StrOut += strMsg;
                    StrOut += "\r\n";
                }

                StrOut += "\r\n";
            }

            return(StrOut);
        }