Example #1
0
 public LoLLauncher(SimpleLoLRecord simpleRecord)
 {
     if (simpleRecord.RecoringRecorder == null)
     {
         _record = new LoLRecord();
         _record.readFromFile(simpleRecord.FileName, false);
         _checkVersion = true;
     }
     else
     {
         _record = simpleRecord.RecoringRecorder.record;
     }
     _localPlay = true;
 }
Example #2
0
        public SimpleLoLRecord ReadRecord(String path, Boolean addToList)
        {
            LoLRecord lr = new LoLRecord();

            lr.readFromFile(path, true);
            if (lr.IsBroken)
            {
                return(null);
            }
            if (!loadRecordWorker.IsBusy)
            {
                if (!GameDatabase.Instance.IsExistsGame(lr.GameId, lr.GamePlatform))
                {
                    GameDatabase.Instance.AddGame(lr);
                }
            }
            return(ReadRecord(lr, addToList));
        }
Example #3
0
 public LoLRecordPlayer(LoLRecord playThis)
 {
     initResponseWorker();
     waitingResponse  = new Queue <Socket>();
     useAdvanceReplay = Properties.Settings.Default.AdvanceReplay;
     this.record      = playThis;
     randomPort();
     System.Net.IPAddress serverAddress = System.Net.IPAddress.Parse("127.0.0.1"); // <-- Change that as appropriate!
     try
     {
         this.listener = new TcpListener(serverAddress, _port);
         Logger.Instance.WriteLog(String.Format("Record player start listen to port {0}", _port));
         this.listener.Start();
     }
     catch (Exception ex)
     {
         Logger.Instance.WriteLog("TcpListener failed");
         Logger.Instance.WriteLog(ex.Message);
     }
 }
Example #4
0
        private void CheckDatabase()
        {
            List <LoLRecord>       needToAddToDb = new List <LoLRecord>();
            List <SimpleLoLRecord> needToUpdate  = new List <SimpleLoLRecord>();

            foreach (SimpleLoLRecord slr in records)
            {
                if (!GameDatabase.Instance.IsExistsGame(slr.GameId, slr.GamePlatform))
                {
                    needToUpdate.Add(slr);
                    LoLRecord record = new LoLRecord();
                    record.readFromFile(slr.FileName, true);
                    needToAddToDb.Add(record);
                }
            }
            GameDatabase.Instance.AddGame(needToAddToDb.ToArray());
            foreach (SimpleLoLRecord slr in needToUpdate)
            {
                slr.GetGameFromDB();
            }
        }
Example #5
0
 public LoLLauncher(LoLRecorder recordingRecorder)
 {
     _recoder   = recordingRecorder;
     _record    = recordingRecorder.record;
     _localPlay = true;
 }