示例#1
0
        /// <summary>
        /// LCU process finder
        /// </summary>
        private void UpdateLcuProcess()
        {
            // Try find process
            var process = LeagueConnector.Helpers.FindLcuProcess();

            if (process != null)
            {
                LcuStatus = true;

                // If new find result is not same for current
                if (!ConnectionStatus && process.StartTime != _lastLcuProcess?.StartTime)
                {
                    _lastLcuProcess = process;

                    // Connect to LCU
                    _league.Connect(_lastLcuProcess);
                }
            }
            else
            {
                LcuStatus = false;
            }
        }