public void SetParam(Int32 nPlayerCnt) { if (nPlayerCnt != m_nPlayerCnt) { m_nPlayerCnt = nPlayerCnt; Int32 nLayer = AxModelKnockOut.GetLayer(m_nPlayerCnt); this.cbGroupSize.SelectedIndex = nLayer - 1; } }
public Int32 GetModelLayer(int nModelIndex) //创建的几个模型需要几层 { Int32 nPlayerCnt = GetModelSize(nModelIndex); return(AxModelKnockOut.GetLayer(nPlayerCnt)); }
//利用DrawInfo信息,创建一个结构 protected static AxDrawModelMatchList _CreateModelSingle(AxDrawModelInfo DrawInfo) { AxDrawModelMatchList retModel = new AxDrawModelMatchList(); if (DrawInfo.m_eType == EDrawModelType.emTypeManual) { return(retModel); } else if (DrawInfo.m_eType == EDrawModelType.emTypeRoundRobin) { AxModelRoundRobin roundRobin = new AxModelRoundRobin(); if (!roundRobin.Create(DrawInfo.m_nSize, DrawInfo.m_bBogol)) { retModel.RemoveAll(); return(retModel); } if (!roundRobin.GetModelExport(retModel)) { retModel.RemoveAll(); return(retModel); } return(retModel); } else if (DrawInfo.m_eType == EDrawModelType.emTypeKonckOut) { AxModelKnockOut knockOut = new AxModelKnockOut(); if (!knockOut.Create(DrawInfo.m_nSize, DrawInfo.m_nRank, false)) { retModel.RemoveAll(); return(retModel); } if (!knockOut.GetModelExport(retModel)) { retModel.RemoveAll(); return(retModel); } return(retModel); } else { return(retModel); } }