Esempio n. 1
0
 public DataProcessTT(SqlConnection sqlConn)
 {
     sqlConnection_    = sqlConn;
     curGameScores_    = new Dictionary <string, CurrentGameScore>();
     lastMatchInfos_   = new Dictionary <string, LastMatchStatusInfo>();
     ExtraTask         = new ExtraTaskInfo();
     ExtraTask.BTaskOK = false;
 }
Esempio n. 2
0
        public ExtraTaskInfo Clone()
        {
            ExtraTaskInfo info = new ExtraTaskInfo(TaskFlags, MatchID, SetOrder, GameOrder, BTaskOK);

            info.ChatName    = this.ChatName;
            info.ChatIP      = this.ChatIP;
            info.ChatContent = this.ChatContent;
            return(info);
        }
Esempio n. 3
0
        //计时计分xml更新到数据库之后,通知外围系统状态改变
        public void OnRecvExtraTaskPackage(ExtraTaskInfo extraInfo)
        {
            if (!extraInfo.BTaskOK)
            {
                return;
            }
            if ((extraInfo.TaskFlags & (int)ExtraWorkEnum.ExtraWorkNotifyProgress) != 0)
            {
                BDCommon.g_BDPlugin.DataChangedNotify(OVRDataChangedType.emMatchProgress, -1, -1, -1, extraInfo.MatchID, -1, null);
                OutputXmlToXuNi(extraInfo.MatchID);
            }

            if ((extraInfo.TaskFlags & (int)ExtraWorkEnum.ExtraWorkNotifySplitInfo) != 0)
            {
                BDCommon.g_BDPlugin.DataChangedNotify(OVRDataChangedType.emSplitInfo, -1, -1, -1, extraInfo.MatchID, -1, null);
                OutputXmlToXuNi(extraInfo.MatchID);
            }
            if ((extraInfo.TaskFlags & (int)ExtraWorkEnum.ExtraWorkNotifyStatusStartList) != 0)
            {
                BDCommon.g_ManageDB.SetCurrentSplitFlag(extraInfo.MatchID, 1, 1);
                BDCommon.g_BDPlugin.DataChangedNotify(OVRDataChangedType.emMatchStatus, -1, -1, -1, extraInfo.MatchID, -1, null);
            }
            if ((extraInfo.TaskFlags & (int)ExtraWorkEnum.ExtraWorkNotifyStatusRunning) != 0)
            {
                BDCommon.g_BDPlugin.DataChangedNotify(OVRDataChangedType.emMatchStatus, -1, -1, -1, extraInfo.MatchID, -1, null);
                OutputXmlToXuNi(extraInfo.MatchID);
            }
            if ((extraInfo.TaskFlags & (int)ExtraWorkEnum.ExtraWorkNotifyStatusUnofficial) != 0)
            {
                // UpdateRank
                BDCommon.g_ManageDB.UpdateMatchRankSets(extraInfo.MatchID);
                BDCommon.g_ManageDB.CreateGroupResult(extraInfo.MatchID);
                OVRDataBaseUtils.AutoProgressMatch(extraInfo.MatchID, BDCommon.g_adoDataBase.m_dbConnect, BDCommon.g_BDPlugin); //自动晋级
                BDCommon.g_ManageDB.SetCurrentSplitFlag(extraInfo.MatchID, -1, 3);                                              //设置比赛结束

                //  BDCommon.g_BDPlugin.DataChangedNotify(OVRDataChangedType.emMatchResult, -1, -1, -1, extraInfo.MatchID, extraInfo.MatchID, null);

                Int32 iPhaseID = BDCommon.g_ManageDB.GetPhaseID(extraInfo.MatchID);
                BDCommon.g_BDPlugin.DataChangedNotify(OVRDataChangedType.emPhaseResult, -1, -1, iPhaseID, -1, iPhaseID, null);
                BDCommon.g_BDPlugin.DataChangedNotify(OVRDataChangedType.emMatchStatus, -1, -1, -1, extraInfo.MatchID, extraInfo.MatchID, null);
                OutputXmlToXuNi(extraInfo.MatchID);
            }
            //收到导出schedule的消息
            if ((extraInfo.TaskFlags & (int)ExtraWorkEnum.ExtraWorkNotifyExportSchedule) != 0)
            {
                if (chkOuterData.Checked)
                {
                    string strRes = ExportScheduleXml2();
                    if (strRes == "")
                    {
                        AddInfoToFileBox("收到客户端导出schedule消息成功!");
                    }
                    else
                    {
                        AddInfoToFileBox("收到客户端导出消息," + strRes, false);
                    }
                }
                else
                {
                    AddInfoToFileBox("收到客户端导出schedule消息,未勾选External data", false);
                }
            }
        }