Exemplo n.º 1
0
        private void Btn_Synchronization_Click(object sender, RoutedEventArgs e)
        {
            MatchInfo?matchInfo = this.cmb_game.SelectedItem as MatchInfo?;

            if (matchInfo != null)
            {
                CenterDataFactory.BlackName(matchInfo.Value.SessionId);
                CenterDataFactory.WhiteName(matchInfo.Value.SessionId, matchInfo.Value.SessionName);
                MessageBox.Show("同步数据成功");
            }
            else
            {
                MessageBox.Show("请选择比赛场次");
            }
        }
 private void Upload()
 {
     while (true)
     {
         int    uploadInterval = ConfigurationManager.AppSettings["Upload_Interval"].ToInt();
         string gameName       = ConfigurationManager.AppSettings["ServerGameName"].ToString();
         int    minute         = DateTime.Now.Minute;
         bool   flag           = minute % uploadInterval == 0 && DateTime.Now.Second == 0;
         if (flag)
         {
             SessionModel session = CenterDataFactory.KeyTable();
             PoliceDataFactory.Entrance(session.Id, gameName);
             PoliceDataFactory.InspectTicket(session.Id, gameName);
             PoliceDataFactory.Ticket(session.Id, gameName);
         }
     }
 }
Exemplo n.º 3
0
 private void UploadData(object sessionId)
 {
     CenterDataFactory.Upload(sessionId);
     MessageBox.Show("上传数据成功");
 }