示例#1
0
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        private static void Main(string[] args)
        {
            // Watch for unhandled exceptions
            AppDomain.CurrentDomain.UnhandledException += UnhandledExceptionHandler;

            // Use invariant culture - we have to set it explicitly for every thread we create.
            Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;

            Console.ForegroundColor = ConsoleColor.Yellow;
            PrintBanner();
            PrintLicense();
            Console.ResetColor();

            InitLoggers(); // init logging facility.

            Logger.Info("voxeliq v{0} warming-up..", Assembly.GetExecutingAssembly().GetName().Version);
            PrintKeys();

            #if XNA
            Logger.Trace("Using XNA (Direct) as the framework.");
            #elif MONOGAME
            Logger.Trace("Using MonoGame (OpenGL) as the framework.");
            #else
            Logger.Trace("Can not determine underlying framework.");
            #endif

            using (var game = new VoxeliqGame()) // startup voxlr client.
            {
                Logger.Trace("Starting game loop..");
                game.Run();
            }
        }
示例#2
0
        private static readonly Logger Logger = LogManager.CreateLogger(); // the logger.

        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        private static void Main(string[] args)
        {
            // Watch for unhandled exceptions
            AppDomain.CurrentDomain.UnhandledException += UnhandledExceptionHandler;

            // Use invariant culture - we have to set it explicitly for every thread we create.
            Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;

            Console.ForegroundColor = ConsoleColor.Yellow;
            PrintBanner();
            PrintLicense();
            Console.ResetColor();

            InitLoggers(); // init logging facility.

            Logger.Info("voxeliq v{0} warming-up..", Assembly.GetExecutingAssembly().GetName().Version);
            PrintKeys();

            var frameworkVersion = System.Reflection.Assembly.GetAssembly(typeof(Microsoft.Xna.Framework.Game)).GetName().Version;

            #if XNA
            Logger.Trace(string.Format("Using XNA (v{0}) as the framework.", frameworkVersion));
            #elif MONOGAME
            Logger.Trace(String.Format("Using MonoGame (v{0}) as the framework.", frameworkVersion));
            #else
            Logger.Trace("Can not determine underlying framework.");
            #endif

            using (var game = new VoxeliqGame()) // startup the game.
            {
                Logger.Trace("Starting game loop..");
                game.Run();
            }
        }