Example #1
0
        protected override void OnStart(string[] args)
        {
            // Load configuration
            string configPath       = "";
            string translationsPath = "";

            if (args != null)
            {
                // Skip first command line argument, as it is the current directory
                if (args.Length > 1)
                {
                    configPath = args[1];
                }

                // Second argument is translations file
                if (args.Length > 2)
                {
                    translationsPath = args[2];
                }
            }

            // Setup scoring manager
            ScoringManager.Setup();

            // Start up configuration
            ConfigurationManager.Startup(configPath);

            // Start up translation manager
            TranslationManager.Startup(translationsPath);

            // Setup output manager
            OutputManager.Setup();

            // Create thread with loop function
            LoopThread = new Thread(Loop);

            // Run thread
            IsRunning = true;
            LoopThread.Start();
        }