Ejemplo n.º 1
0
        private void UpdateLoL()
        {
            Process pastLol = lol;

            lol = Utilities.GetProcess(Constants.LoLExeName);
            if (pastLol == null && lol != null)
            {
                ExecutionData                = new LoLExeData();
                ExecutionData.Process        = lol;
                ExecutionData.ExecutablePath = LeagueOfLegendsAnalyzer.GetLoLExecutingPath();
                ExecutionData.LogFilePath    = GetLogFilePath(ExecutionData.ExecutablePath);
                ExecutionData.CommandLine    = Utilities.GetCommandLine(lol.Id);
                ExecutionData.LoLProcess     = lol;
                LoLCommandAnalyzer analyzer = new LoLCommandAnalyzer(ExecutionData.CommandLine);

                ExecutionData.MatchInfo = analyzer.GetGameInfo();
                if (LoLStartedEvent != null)
                {
                    LoLStarted dele = new LoLStarted(LoLStartedEvent);
                    Dispatcher.Invoke(dele, this, ExecutionData, analyzer.IsSuccess);
                }
            }
            else if (pastLol != null && lol == null)
            {
                ExecutionData = null;
                if (LoLFinishedEvent != null)
                {
                    LoLFinishedEvent();
                }
            }
        }
Ejemplo n.º 2
0
 private void LoLNewExecution(LoLWatcher sender, LoLExeData executiondata, bool isSpectateMode)
 {
     Logger.Instance.WriteLog("Detected LoL launched.");
     if (_launcher != null)
     {
         return;
     }
     StartNewRecoding(executiondata.MatchInfo, false, true);
 }
Ejemplo n.º 3
0
 public LoLRecorder(GameInfo gameinfo, bool externalStart = false)
 {
     this.externalStart = externalStart;
     this.gameInfo      = gameinfo;
     this.record        = new LoLRecord();
     if (externalStart)
     {
         exeData  = LoLWatcher.Instance.ExecutionData;
         selfGame = !exeData.IsSpectatorMode;
     }
 }
Ejemplo n.º 4
0
 public GameInfoFinder(LoLExeData data)
 {
     exeData = data;
 }