Пример #1
0
        private void Loop()
        {
            // Loop until stopped
            while (IsRunning)
            {
                // If configuration is loaded, check and output scores
                if (ConfigurationManager.LoadedConfigFromFile)
                {
                    ScoringManager.CheckAndOutput();
                }

                // Allow configuration to check for any config updates
                ConfigurationManager.Loop();

                // Allow translation manager to check for updates
                TranslationManager.Loop();

                // Delay by loop delay length of milliseconds
                // If StopRequest.Set is called during delay, will return true
                if (StopRequest.WaitOne(LoopDelay))
                {
                    IsRunning = false;
                    break;
                }
            }
        }