Ejemplo n.º 1
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            //CheckAndDownloadUpdateCompleted += Current_CheckAndDownloadUpdateCompleted;
            //CheckAndDownloadUpdateAsync();

            Host.Settings.EnableFrameRateCounter = true;
            Host.Settings.MaxFrameRate = int.MaxValue;

            if (Debugger.IsAttached)
                new DebugTraceListener { TraceLevel = TraceLevels.Verbose };

            if (IsRunningOutOfBrowser)
                new DebugLogTraceListener(Path.Combine(Paths.LogsDirectory, "debug.txt"));

            _gameHost = new ContentHost();

            if (IsRunningOutOfBrowser)
            {
                _clientControl = new GameHost();
                _gameHost.LayoutRoot.Children.Add(_clientControl);
            }
            else
            {
                _gameHost.LayoutRoot.Children.Add(new InstallPrompt());
            }

            RootVisual = _gameHost;
        }
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            //CheckAndDownloadUpdateCompleted += Current_CheckAndDownloadUpdateCompleted;
            //CheckAndDownloadUpdateAsync();

            Host.Settings.EnableFrameRateCounter = true;
            Host.Settings.MaxFrameRate           = int.MaxValue;

            if (Debugger.IsAttached)
            {
                new DebugTraceListener {
                    TraceLevel = TraceLevels.Verbose
                }
            }
            ;

            if (IsRunningOutOfBrowser)
            {
                new DebugLogTraceListener(Path.Combine(Paths.LogsDirectory, "debug.txt"));
            }

            _gameHost = new ContentHost();

            if (IsRunningOutOfBrowser)
            {
                _clientControl = new GameHost();
                _gameHost.LayoutRoot.Children.Add(_clientControl);
            }
            else
            {
                _gameHost.LayoutRoot.Children.Add(new InstallPrompt());
            }

            RootVisual = _gameHost;
        }