Exemple #1
0
        private static void PerformPlayback()
        {
            while (true)
            {
                try
                {
                    if (controlMessages.IsPlaybackEnabled())
                    {
                        var score = queue.GetNextScoreToPlay();
                        if (score != null)
                        {
                            playback.Play(score);
                        }
                    }

                    Thread.Sleep(Convert.ToInt32(ConfigurationManager.AppSettings["TimeBetweenScores"]) * 1000);
                }
                catch (Exception ex)
                {
                    Console.ForegroundColor = ConsoleColor.Red;
                    Console.Write(ex);
                    Console.ResetColor();
                }
            }
        }