コード例 #1
0
    /// <summary>
    /// The main entry point for the application.
    /// </summary>
    private static void Main(string[] args)
    {
      if (Debugger.IsAttached)
      {
        // The debugger is attached. The debugger will display any exception messages.

        // Run the XNA game.
        using (SampleGame game = new SampleGame())
          game.Run();
      }
      else
      {
        // The debugger is NOT attached. Use the ExceptionGame to display any 
        // exception messages. (This is the only method to display the message on 
        // the Xbox. On Windows we could use a Windows MessageBox.)

        try
        {
          // Run the XNA game.
          using (SampleGame game = new SampleGame())
            game.Run();
        }
        catch (Exception exception)
        {
          using (var game = new ExceptionGame())
          {
            game.Exception = exception;
            game.Run();
          }
        }
      }
    }
コード例 #2
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 private static void Main(string[] args)
 {
   if (Debugger.IsAttached)
   {
     // The debugger is attached:
     // Run the XNA game and let the debugger handle any exception messages.
     using (var game = new SampleGame())
       game.Run();
   }
   else
   {
     // The debugger is NOT attached:
     // Run the XNA game and use a MessageBox to display any exception messages.
     try
     {
       using (var game = new SampleGame())
         game.Run();
     }
     catch (Exception exception)
     {
       string message = SampleHelper.GetExceptionMessage(exception);
       MessageBox.Show(message, "Unexpected Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
   }
 }
コード例 #3
0
    private static void Main(string[] args)
    {
      if (Debugger.IsAttached)
      {
        // The debugger is attached. The debugger will display any exception messages.

        // Run the XNA game.
        using (SampleGame game = new SampleGame())
          game.Run();
      }
      else
      {
        // The debugger is NOT attached. Use a MessageBox to display any exception messages.

        try
        {
          // Run the XNA game.
          using (SampleGame game = new SampleGame())
            game.Run();
        }
        catch (Exception exception)
        {
          MessageBox.Show(SampleHelper.GetExceptionMessage(exception), "Unexpected Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
        }
      }
    }
コード例 #4
0
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        private static void Main(string[] args)
        {
            if (Debugger.IsAttached)
            {
                // The debugger is attached. The debugger will display any exception messages.

                // Run the XNA game.
                using (SampleGame game = new SampleGame())
                    game.Run();
            }
            else
            {
                // The debugger is NOT attached. Use the ExceptionGame to display any
                // exception messages. (This is the only method to display the message on
                // the Xbox. On Windows we could use a Windows MessageBox.)

                try
                {
                    // Run the XNA game.
                    using (SampleGame game = new SampleGame())
                        game.Run();
                }
                catch (Exception exception)
                {
                    using (var game = new ExceptionGame())
                    {
                        game.Exception = exception;
                        game.Run();
                    }
                }
            }
        }
コード例 #5
0
ファイル: Program.cs プロジェクト: terrynoya/DigitalRune
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 private static void Main(string[] args)
 {
     if (Debugger.IsAttached)
     {
         // The debugger is attached:
         // Run the XNA game and let the debugger handle any exception messages.
         using (var game = new SampleGame())
             game.Run();
     }
     else
     {
         // The debugger is NOT attached:
         // Run the XNA game and use a MessageBox to display any exception messages.
         try
         {
             using (var game = new SampleGame())
                 game.Run();
         }
         catch (Exception exception)
         {
             string message = SampleHelper.GetExceptionMessage(exception);
             MessageBox.Show(message, "Unexpected Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
 }
コード例 #6
0
 protected override void OnCreate(Bundle bundle)
 {
   base.OnCreate(bundle);
   var g = new SampleGame();
   SetContentView((View)g.Services.GetService(typeof(View)));
   g.Run();
 }
コード例 #7
0
        private static void Main(string[] args)
        {
            if (Debugger.IsAttached)
            {
                // The debugger is attached. The debugger will display any exception messages.

                // Run the XNA game.
                using (SampleGame game = new SampleGame())
                    game.Run();
            }
            else
            {
                // The debugger is NOT attached. Use a MessageBox to display any exception messages.

                try
                {
                    // Run the XNA game.
                    using (SampleGame game = new SampleGame())
                        game.Run();
                }
                catch (Exception exception)
                {
                    MessageBox.Show(SampleHelper.GetExceptionMessage(exception), "Unexpected Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
コード例 #8
0
ファイル: GameActivity.cs プロジェクト: terrynoya/DigitalRune
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            var g = new SampleGame();

            SetContentView((View)g.Services.GetService(typeof(View)));
            g.Run();
        }
コード例 #9
0
 public override bool FinishedLaunching(UIApplication app, NSDictionary options)
 {
     game = new SampleGame();
     game.Run();
     return(true);
 }
コード例 #10
0
 public override bool FinishedLaunching (UIApplication app, NSDictionary options)
 {
   game = new SampleGame();
   game.Run();
   return true;
 }
コード例 #11
0
 public override void FinishedLaunching(MonoMac.Foundation.NSObject notification)
 {
     game = new SampleGame();
     game.Run();
 }
コード例 #12
0
		public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
		{			
			game = new SampleGame ();
			game.Run ();
		}