private void frmOVRSEDataEntry_Load(object sender, EventArgs e) { //Hoop EnableHoopCtrlBtn(false, true); EnableMatchCtrlBtn(false); EnableMatchAll(false, true); EnableExportImport(false); Localization(); SECommon.g_ManageDB.InitGame(); ovrRule = new OVRSERule(m_nCurMatchID); m_nCurMatchType = ovrRule.m_nMatchType; m_nCurStatusID = ovrRule.m_nMatchStatusID; if (m_nCurMatchID < 1) return; if (m_nCurMatchType == SECommon.MATCH_TYPE_REGU || m_nCurMatchType == SECommon.MATCH_TYPE_DOUBLE || m_nCurMatchType == SECommon.MATCH_TYPE_TEAM) { StartMatch(); tabControlDataEntry.SelectedTabIndex = 0; btnClearRes.Enabled = true; } else if (m_nCurMatchType == SECommon.MATCH_TYPE_HOOP) { StartHoopMatch(); tabControlDataEntry.SelectedTabIndex = 1; btnClearRes.Enabled = false; } }
public void OnMsgFlushSelMatch(Int32 nWndMode, Int32 nMatchID) { // Is Running if (m_bIsRunning) { MessageBox.Show(LocalizationRecourceManager.GetString(strSectionName, "mbRunningMatch")); return; } // Not valid MatchID if (nMatchID <= 0) { MessageBox.Show(LocalizationRecourceManager.GetString(strSectionName, "mbChooseMatch")); return; } m_nCurMatchID = nMatchID; m_nWndMode = nWndMode; m_nCurStatusID = SECommon.g_ManageDB.GetMatchStatus(m_nCurMatchID); Int32 nRegAID, nRegBID; //2013.11.08判断一下比赛类型,对抗类还是表演赛 ovrRule = new OVRSERule(m_nCurMatchID); m_nCurMatchType = ovrRule.m_nMatchType; m_nCurStatusID = ovrRule.m_nMatchStatusID; if (m_nCurMatchID < 1) return; if (m_nCurMatchType == SECommon.MATCH_TYPE_REGU || m_nCurMatchType == SECommon.MATCH_TYPE_DOUBLE || m_nCurMatchType == SECommon.MATCH_TYPE_TEAM) { // Not valid player SECommon.g_ManageDB.GetMatchMember(m_nCurMatchID, out nRegAID, out nRegBID); if (nRegAID <= 0 || nRegBID <= 0) { MessageBox.Show(LocalizationRecourceManager.GetString(strSectionName, "mbConfigMatchUp")); return; } StartMatch(); tabControlDataEntry.SelectedTabIndex = 0; btnClearRes.Enabled = true; } else if (m_nCurMatchType == SECommon.MATCH_TYPE_HOOP) { SECommon.g_ManageDB.GetHoopMatchMember(m_nCurMatchID, out nRegAID); if (nRegAID <= 0) { MessageBox.Show(LocalizationRecourceManager.GetString(strSectionName, "mbConfigMatchUp")); return; } StartHoopMatch(); tabControlDataEntry.SelectedTabIndex = 1; btnClearRes.Enabled = false; } return; }
bool InitHoopMatch() { bool bResult = false; if (!SECommon.g_ManageDB.GetMatchRuleID(m_nCurMatchID)) { MessageBox.Show(LocalizationRecourceManager.GetString(strSectionName, "mbMatchRule")); bResult = false; } ovrRule = new OVRSERule(m_nCurMatchID); m_nCurMatchType = ovrRule.m_nMatchType; m_nCurStatusID = ovrRule.m_nMatchStatusID; if (!SECommon.g_ManageDB.GetHoopMatchSplitCount(m_nCurMatchID, m_nCurMatchType, ref m_nSetsCount, ref m_nTeamSplitCount)) { m_nSetsCount = ovrRule.m_nSetsCount; m_nTeamSplitCount = ovrRule.m_nTeamSplitCount; if (1 != SECommon.g_ManageDB.CreateHoopMatchSplit(m_nCurMatchID, m_nCurMatchType, m_nSetsCount, m_nTeamSplitCount)) { MessageBox.Show(LocalizationRecourceManager.GetString(strSectionName, "mbCreateSplit")); EnableHoopCtrlBtn(false, false); bResult = false; } SECommon.g_SEPlugin.DataChangedNotify(OVRDataChangedType.emSplitAdd, -1, -1, -1, m_nCurMatchID, m_nCurMatchID, null); } // Load Split IDs if (m_nCurMatchType == SECommon.MATCH_TYPE_HOOP) { bResult = LoadSetSplitIDs(0); } InitHoopMatchDes(); UpdateHoopMatchStatus(); return(bResult); }