Beispiel #1
0
 private void LoLWatchTimer_Tick(object sender, EventArgs args)
 {
     if (!LeagueOfLegendsAnalyzer.IsLoLExists())
     {
         LoLWatchTimer.Stop();
         if (_recordPlayer != null)
         {
             _recordPlayer.StopPlaying();
         }
         if (AnyEvent != null)
         {
             AnyEvent(true, null);
         }
     }
     else
     {   //
         //if (!_cameraToolInjected && Properties.Settings.Default.EnableCameraRotation)
         //{
         //    ProcessMemory processMemory = new ProcessMemory();
         //    processMemory.openProcess(lol);
         //    _cameraToolInjected = processMemory.injectDll(Constants.CameraToolDllName);
         //    processMemory.closeProcess();
         //}
     }
 }
Beispiel #2
0
 public void PlayGame(GameInfo info)
 {
     if (!LeagueOfLegendsAnalyzer.IsLoLExists())
     {
         if (!LeagueOfLegendsAnalyzer.CheckLoLExeSelected())
         {
             return;
         }
     }
     StartLoLLauncher(new LoLLauncher(info));
 }
Beispiel #3
0
        public LoLRecorder StartNewRecoding(GameInfo info = null, Boolean playNow = false, Boolean externalStart = false, PlayerInfo[] players = null)
        {
            if (!LeagueOfLegendsAnalyzer.IsLoLExists())     //觀戰用,LoL沒在執行時要先確定有LoL路徑
            {
                if (!LeagueOfLegendsAnalyzer.CheckLoLExeSelected())
                {
                    return(null);
                }
            }
            LoLRecorder r = new LoLRecorder(info, externalStart);

            r.doneEvent     += new RecordDoneDelegate(RecordDone);
            r.infoDoneEvent += new BaronReplays.LoLRecorder.RecordEventDelegate(RecordInfoDone);

            if (players != null)
            {
                r.record.players = players;
            }


            if (playNow)
            {
                if (!LeagueOfLegendsAnalyzer.CheckLoLExeSelected())
                {
                    return(r);
                }
                r.prepareContentDoneEvent += Recorder_prepareContentDoneEvent;
            }

            ThreadStart recoderfunc = new ThreadStart(r.startRecording);
            Thread      t           = new Thread(recoderfunc);

            t.IsBackground = true;
            t.Name         = "Recorder";
            this.Recorders.Add(r, t);
            t.Start();
            Logger.Instance.WriteLog(String.Format("Recorder thread created {0}({1})", t.ManagedThreadId, t.Name));

            UpdateStatusBar();
            return(r);
        }