Program.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #region Using Statements
  2. using System;
  3. #if IPHONE
  4. using MonoTouch.Foundation;
  5. using MonoTouch.UIKit;
  6. using Microsoft.Xna;
  7. using Microsoft.Xna.Framework.Media;
  8. #else
  9. #endif
  10. #endregion
  11. namespace Microsoft.Xna.Samples.GameStateManagement
  12. {
  13. #region Entry Point
  14. #if IPHONE
  15. [Register("AppDelegate")]
  16. class Program : UIApplicationDelegate
  17. {
  18. public override void FinishedLaunching(UIApplication app)
  19. {
  20. // Fun begins..
  21. GameStateManagementGame game = new GameStateManagementGame();
  22. game.Run();
  23. }
  24. /// <summary>
  25. /// The main entry point for the application.
  26. /// </summary>
  27. static void Main(string[] args)
  28. {
  29. UIApplication.Main(args, null, "AppDelegate");
  30. }
  31. }
  32. #else
  33. /// <summary>
  34. /// The main entry point for the application.
  35. /// </summary>
  36. static class Program
  37. {
  38. static void Main()
  39. {
  40. using (GameStateManagementGame game = new GameStateManagementGame())
  41. {
  42. game.Run();
  43. }
  44. }
  45. }
  46. #endif
  47. #endregion
  48. }